View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
17752Bug reportsRemoteControlpublic2022-07-05 15:30
ReporterMapache Assigned Togabrieljenik  
PrioritynoneSeverityblock 
Status closedResolutionreopened 
Product Version5.2.x 
Summary17752: list_questions JSON-RPC API method does not return subquestions or answers
Description

fetching questions via list_questions does not return subquestions (SQ) or answers.

Steps To Reproduce

Steps 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 heat12
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

Relationships

related to 17984 closedgabrieljenik Using method="list_questions" does not give the subquestions 

Users monitoring this issue

JanE01

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

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

reporter   ~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

reporter   ~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 !

tammo

tammo

2022-03-23 19:40

developer   ~68787

I really think that it would be good to have a choice here. Default: show everything, including subquestions. This broke my program.

With switch: leave away subquestions. This will need many more calls to the API (one for all questions + one for each question that has subquestions/answer options) making reporting much slower.

tammo

tammo

2022-03-23 19:40

developer   ~68788

And the documentation was not updated yet.

gabrieljenik

gabrieljenik

2022-05-05 19:01

manager   ~69431

This was already fixed in 17984.
There backwards compatibility was honored.

About documentation, not sure if changes are needed.
Are they?

gabrieljenik

gabrieljenik

2022-07-05 15:30

manager   ~70736

Hi Tammo!

As per the comments, will be closing the ticket.
Please add any comments in case it should be reopened.
Thanks

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
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
2021-11-23 11:58 galads Note Added: 67497
2021-11-23 12:42 DenisChenu Note Added: 67498
2022-03-23 19:35 JanE01 Issue Monitored: JanE01
2022-03-23 19:35 JanE01 Bug heat 6 => 8
2022-03-23 19:40 tammo Note Added: 68787
2022-03-23 19:40 tammo Bug heat 8 => 10
2022-03-23 19:40 tammo Note Added: 68788
2022-05-04 08:30 galads Assigned To galads => gabrieljenik
2022-05-04 08:30 galads Status feedback => assigned
2022-05-05 18:57 gabrieljenik Relationship added related to 17984
2022-05-05 19:01 gabrieljenik Note Added: 69431
2022-05-05 19:01 gabrieljenik Bug heat 10 => 12
2022-05-05 19:01 gabrieljenik Status assigned => feedback
2022-07-05 15:30 gabrieljenik Status feedback => closed
2022-07-05 15:30 gabrieljenik Note Added: 70736