edgarrmondragon / citric

A client to the LimeSurvey Remote Control API 2, written in modern Python.
https://citric.rtfd.io
MIT License
26 stars 8 forks source link

[Bug]: Participant attributes "invited" and "reminded" don't seem to be included #1045

Closed autopoiesis3004 closed 10 months ago

autopoiesis3004 commented 10 months ago

Citric Version

0.10.0

Python Version

3.11

LimeSurvey Version

5.6.47

Backend database

5.5.5

Operating System

Windows 11

Description

I try to include the extra participant attributes "invited" and "reminded" to the result of the RPC function "list_participants" but they don't show up. All other attributes show up as expected.

Code

participant_attributes = ['emailstatus','remindercount','invited', 'reminded','completed','usesleft','attribute_1','attribute_2']

from settings import LS_URL, USER_NAME, USER_PW
from citric import Client
with Client(LS_URL, USER_NAME, USER_PW) as client:
        participants = pd.DataFrame(client.list_participants(survey_id, unused=True, attributes=participant_attributes))            

        client.session.close()

Permissions Matrix

No response

edgarrmondragon commented 10 months ago

Hey @autopoiesis3004! Thanks for reporting, I'll be looking into this.

edgarrmondragon commented 10 months ago

@autopoiesis3004 I think the attributes you're looking for are

They'll have a value of N if the respective message hasn't been sent, otherwise they'll be the event date.

Let me know if that's useful!


It's probably worth documenting somewhere the whole list of available attributes, but in the meantime this was useful for reference: https://github.com/LimeSurvey/LimeSurvey/blob/26cd37a09c7250b75ef3e1a8f212ba8fb4e8be31/application/models/Token.php#L89-L106

autopoiesis3004 commented 10 months ago

Thanks a lot Edgar - it worked! The issue was that these 2 fields have different names when I export the participant list as CSV file. Best, Henning