View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
11531Bug reportsRemoteControlpublic2016-08-17 14:54
Reporterpennedav Assigned Toaesteban  
PrioritynoneSeveritypartial_block 
Status closedResolutionunable to reproduce 
Product Version2.50.x 
Summary11531: Function add_participants fails to return "tid" field for new tokens
Description

The add_participants RPC method fails to return the tid field when called via JSON-RPC in 2.50+-160731

The issue does not occur in 2.50+-160728.

Using git bisect I have been able to identify commit 81aeb59ff68f8e87a6f892f73e7216bbae76be72 as the change which first introduced the bug.

Steps To Reproduce

Enable JSON-RPC interface
Create and activate a survey (I've attached the LSS file for my survey)
Attempt to call add_participants to add tokens to the survey
The tokens are created and valid, but the "tid" field is not returned to the client which made the JSON-RPC call

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)160731
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.6
Server OS (if known)Ubuntu 14
Webserver software & version (if known)Apache 2.4
PHP Version5.5.38

Users monitoring this issue

pennedav

Activities

c_schmitz

c_schmitz

2016-08-10 09:03

administrator   ~40215

Alfredo, since this was your commit, can you please have a look at this issue?

aesteban

aesteban

2016-08-10 18:09

developer   ~40239

Yes, no problem

aesteban

aesteban

2016-08-10 20:22

developer   ~40240

I'm not able to reproduce this bug. This is my call and the response:

$ curl -H 'Content-Type: application/json' -H 'Accept:application/json' --data '{"jsonrpc":"2.0","method":"add_participants","params":["kkfx6zupvi2f5buztk9r2j9hq8kx6aw8",364413, [{"firstname":"ejemplorpc","lastname":"secondejemplorpc"}]],"id":1}' http://limesurvey/limesurvey/index.php/admin/remotecontrol

{"id":1,"result":[{"sent":"N","remindersent":"N","remindercount":0,"completed":"N","usesleft":1,"firstname":"ejemplorpc","lastname":"secondejemplorpc","token":"s1v2LuYGtSAsKn9","email":"","emailstatus":"OK","tid":"1","participant_id":null,"language":null,"blacklisted":null,"validfrom":null,"validuntil":null,"mpid":null}],"error":null}

As you can see, tid is returned.

I tried with the attached survey unsuccessfully. This is a .lss file. Perhaps with the .lsa file I could reproduce the bug.

pennedav

pennedav

2016-08-12 20:25

reporter   ~40283

As of build 160812 I'm no longer able to reproduce this. I am still able to reproduce it with build 160804.

Since there's a build which no longer has the bug I consider it resolved, but seems like there was something weird going on between 160731 and 160804. I have not tested build 160810.

I will attach LSA files for the two surveys in the following examples.

On 160804, I get:

curl -H 'Content-Type: application/json' -H Accept:application/json --data '{"jsonrpc":"2.0","id":2,"method":"add_participants","params":["xaxrnajj5i5ngi7np82uvguk3jf2uyys",389828,[{"firstname":"David","lastname":"Penner"}]]}' http://localhost/limesurvey-160804/index.php/admin/remotecontrol

{"id":2,"result":[{"firstname":"David","lastname":"Penner","errors":[]}],"error":null}

On 160812, I get:

curl -H 'Content-Type: application/json' -H Accept:application/json --data '{"jsonrpc":"2.0","id":2,"method":"add_participants","params":["ugmgpamabe25z5sznx4nbz3esriiq7jc",982879,[{"firstname":"David","lastname":"Penner"}]]}' http://localhost/limesurvey-160812/index.php/admin/remotecontrol

{"id":2,"result":[{"sent":"N","remindersent":"N","remindercount":0,"completed":"N","usesleft":1,"firstname":"David","lastname":"Penner","token":"klEaAZX6YfK0o2H","email":"","emailstatus":"OK","tid":"1","participant_id":null,"language":null,"blacklisted":null,"validfrom":null,"validuntil":null,"mpid":null}],"error":null}

c_schmitz

c_schmitz

2016-08-17 14:54

administrator   ~40321

Version 2.50+ Build 160817 released

Issue History

Date Modified Username Field Change
2016-08-08 20:26 pennedav New Issue
2016-08-08 20:26 pennedav File Added: limesurvey_survey_364413.lss
2016-08-08 20:27 pennedav Issue Monitored: pennedav
2016-08-10 09:03 c_schmitz Assigned To => aesteban
2016-08-10 09:03 c_schmitz Status new => assigned
2016-08-10 09:03 c_schmitz Note Added: 40215
2016-08-10 18:09 aesteban Note Added: 40239
2016-08-10 20:22 aesteban Note Added: 40240
2016-08-10 20:22 aesteban Status assigned => feedback
2016-08-12 20:25 pennedav Note Added: 40283
2016-08-12 20:25 pennedav Status feedback => assigned
2016-08-12 20:26 pennedav File Added: survey_archive_389828.lsa
2016-08-12 20:26 pennedav File Added: survey_archive_982879.lsa
2016-08-12 20:36 aesteban Status assigned => resolved
2016-08-12 20:36 aesteban Resolution open => unable to reproduce
2016-08-17 14:54 c_schmitz Note Added: 40321
2016-08-17 14:54 c_schmitz Status resolved => closed