View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
17752Bug reportsRemoteControlpublic2021-11-23 12:42
ReporterMapache Assigned Togalads  
PrioritynoneSeverityblock 
Status feedbackResolutionreopened 
Product Version5.2.x 
Summary17752: list_questions JSON-RPC API method does not return subquestions or answers
Descriptionfetching questions via list_questions does not return subquestions (SQ) or answers.
Steps To ReproduceSteps to reproduce
------------------------------
run {"method": "list_questions", "params": ["TOKEN", "SURVEYID"], "id": 1} against the API

Expected result
-------------------------
return all questions with ther corresponding subquestions or answers (like 3.X)

Actual result
-----------------
no subquestions or answers are returned
TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)5.2.2+211115
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 8.0
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.25

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

Mapache

Mapache

2021-11-22 19:15

reporter   ~67482

quick check: no parent_qid other than "0" is returned
DenisChenu

DenisChenu

2021-11-23 08:13

developer   ~67484

My opinion :

1. list_question must return only primary question
2. get_question_property must return subquestion and answers
Mapache

Mapache

2021-11-23 09:50

reporter   ~67486

LTS returns everything
Mapache

Mapache

2021-11-23 10:00

reporter   ~67487

= in LS 3.xx LTS list_questions return all questions, subquestions and subanswers
Mapache

Mapache

2021-11-23 10:05

reporter   ~67488

but it is fine this way – get_question_properties returns all subquestion and answers so we can close this and update the docs
DenisChenu

DenisChenu

2021-11-23 10:05

developer   ~67489

Last edited: 2021-11-23 10:06

View 2 revisions

OK :)

PS : https://github.com/LimeSurvey/LimeSurvey/commit/7238a601d3c04f2619c0c42a2f4040d9fc74dcee not related , not in current version.
DenisChenu

DenisChenu

2021-11-23 10:07

developer   ~67490

Not without broke API compatibility :)
(but have an option can be great to have only primary question)
Mapache

Mapache

2021-11-23 10:12

reporter   ~67491

:)
galads

galads

2021-11-23 10:16

administrator   ~67492

Hello @Mapache , since this is not a bug as pointed out by @DenisChenu , I will close the ticket and create a task to include this in the manual.
DenisChenu

DenisChenu

2021-11-23 11:30

developer   ~67494

@galads : since it's not the same result in 3.X : it's an issue, no ?
galads

galads

2021-11-23 11:58

administrator   ~67497

@DenisChenu , personally I think the implementation should be as it is now. "list_questions" => list all the questions without sub-questions and answer options. And "get_question_properties" will list all questions with sub-questions and answers.

However, users who use these functions more will know the use case better and can comment if the "list_questions", should also return the subquestions and answer options.
DenisChenu

DenisChenu

2021-11-23 12:42

developer   ~67498

:+1:
Great !

Issue History

Date Modified Username Field Change
2021-11-22 18:58 Mapache New Issue
2021-11-22 19:15 Mapache Note Added: 67482
2021-11-22 19:15 Mapache Bug heat 0 => 2
2021-11-23 08:13 DenisChenu Note Added: 67484
2021-11-23 08:13 DenisChenu Bug heat 2 => 4
2021-11-23 09:50 Mapache Note Added: 67486
2021-11-23 10:00 Mapache Note Added: 67487
2021-11-23 10:05 Mapache Note Added: 67488
2021-11-23 10:05 DenisChenu Note Added: 67489
2021-11-23 10:06 DenisChenu Note Edited: 67489 View Revisions
2021-11-23 10:07 DenisChenu Note Added: 67490
2021-11-23 10:12 Mapache Note Added: 67491
2021-11-23 10:16 galads Note Added: 67492
2021-11-23 10:16 galads Bug heat 4 => 6
2021-11-23 10:16 galads Assigned To => galads
2021-11-23 10:16 galads Status new => closed
2021-11-23 10:16 galads Resolution open => fixed
2021-11-23 11:30 DenisChenu Status closed => feedback
2021-11-23 11:30 DenisChenu Resolution fixed => reopened
2021-11-23 11:30 DenisChenu Note Added: 67494
2021-11-23 11:31 DenisChenu Steps to Reproduce Updated View Revisions
2021-11-23 11:58 galads Note Added: 67497
2021-11-23 12:42 DenisChenu Note Added: 67498