View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
19754Bug reportsRemoteControlpublic2025-03-03 14:59
Reporterginosupport Assigned Totibor.pacalat  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version6.6.x 
Summary19754: RemoteControl list_participants parameter bUnused is confusing
Description

Both the documentation and the implementation of the bUnused parameter in https://api.limesurvey.org/classes/remotecontrol-handle.html#method_list_participants is confusing.

According to the documentation, i would expect not supplying the bUnused parameter and supplying the bUnused parameter as false to have the same effect. I would interpret that effect to be that it returns ONLY the USED tokens.

It is not clear what the expectation of bUnused = true should be. I can read this as getting ONLY unused, or ALSO unused tokens.

The actual behavior of list_participants is doing none of these things as expected/documented.

Steps To Reproduce

Steps to reproduce

Create a survey with some participants, some of which are used and some of which are unused. Call the list_participants function with bUnused having the following values:
1) Not supplied at all
2) explicit false (default value according to the documentation)
3) explicit true

Expected result

1) Returns only used tokens
2) Identical as 1) because according to the docs false is the default value
3) Not entirely clear, but i would assume that it would return all tokens, used AND unused.

I also expect the documentation to reflect this behavior clearly and correctly.

Actual result

1) Returns only UNUSED tokens
2) Returns ALL tokens, used and unused
3) Returns only UNUSED tokens

The documentation is unclear and does not reflect the actual functionality. The default value as documented seems to be wrong, and the value of the property seems to do the exact oposite as the naming suggests.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)6.6.2+240827
I will donate to the project if issue is resolvedNo
Browsernone
Database type & versionPostgreSQL
Server OS (if known)RHEL 9
Webserver software & version (if known)
PHP Version7.4.33

Users monitoring this issue

There are no users monitoring this issue.

Activities

tibor.pacalat

tibor.pacalat

2025-02-03 14:48

administrator   ~81953

From looking at documentation of this function (see screenshot), I would expect:

  • if omitted or false -> I get all tokens
  • if true -> I get only unused tokens

This works as expected for me. I am not sure which part of the documentation needs updating or clarifying.

ginosupport

ginosupport

2025-02-28 16:02

reporter   ~82164

The docs I linked to still mention "If you want unused tokens, set true". Because it doesn't mention what happens when it's false, it doesn't help me to identify the effect of the property: do i ALSO get unused tokens or ONLY get unused tokens? Please specify in the docs what the effect of BOTH values is, as apparently my expectation (as mentioned in the original report) is different from your expectation. By the way, I don't see a screenshot, so i'm not sure if we're looking at the same thing.

tibor.pacalat

tibor.pacalat

2025-03-03 14:59

administrator   ~82170

I updated the docs.

Issue History

Date Modified Username Field Change
2024-09-19 12:30 ginosupport New Issue
2025-02-03 14:48 tibor.pacalat Note Added: 81953
2025-02-03 14:48 tibor.pacalat Bug heat 0 => 2
2025-02-03 14:48 tibor.pacalat Assigned To => tibor.pacalat
2025-02-03 14:48 tibor.pacalat Status new => feedback
2025-02-28 16:02 ginosupport Note Added: 82164
2025-02-28 16:02 ginosupport Bug heat 2 => 4
2025-02-28 16:02 ginosupport Status feedback => assigned
2025-03-03 14:59 tibor.pacalat Note Added: 82170
2025-03-03 14:59 tibor.pacalat Status assigned => closed
2025-03-03 14:59 tibor.pacalat Resolution open => fixed