View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
18679 | Bug reports | RemoteControl | public | 2023-03-14 10:50 | 2023-05-08 11:59 |
Reporter | pixelit | Assigned To | ollehar | ||
Priority | none | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 5.6.x | ||||
Summary | 18679: API Access to Question Type Array Dual Scale merge scales if answer code is not unique | ||||
Description | If a array dual scale question is defined with 2 scales, that both have the same code, for the answers (e.g. both start at 1) the api only provides the first scale. This seems to be caused by the way the "answeroptions" object is encoded where the answer code is used as an object key. | ||||
Steps To Reproduce | Steps to reproducecreate a simple Array Dual Scale question with 1 subquestion (does not matter) scale 1:
Access the question through the API. It only gives 2 scale values ("answeroptions") with the scale_id: 0 Expected result"answeroptions": { Actual result"answeroptions": { | ||||
Tags | No tags attached. | ||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | Version 5.6.9 or Version 3.25.16+210302 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mysql | ||||
Server OS (if known) | debian | ||||
Webserver software & version (if known) | apache | ||||
PHP Version | 7.4.30 | ||||
After some reviewal, we have fixed some problems, but we still think the expected outcome should be as follows:
(this is n PHP, not in json) Thoughts? |
|
This sounds good. I think using a multidimensional array is probably the savest solution. Does this impact other question types like a array flexible label? This type has just one scale. Will this also result in a 2 dimensional array, or will single scale questions still be a flat array? |
|
Reviewed, have auto test : ready to merge ? |
|
@pixelit array flexible label have only one answer scale (+ one subquestions) |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34411 |
|
Fixed in Release 5.6.14+230403 |
|
@DenisChenu Are you aware of any other question type that has dual scale? |
|
For answers : no i don't think For Sub-questions : on Array/text and array/number ? |
|
New tests for the gest_question_properties method. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=34594 |
|
Fixed in Release 6.0.6+230508 |
|
LimeSurvey: master 7c8ab1a9 2023-04-03 12:34 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18679 API Access to Question Type Array Dual Scale merge scales if answer code is not unique. (#3025) Co-authored-by: Lapiu Dev <devgit@lapiu.biz> |
Affected Issues 18679 |
|
mod - application/helpers/remotecontrol/remotecontrol_handle.php | Diff File | ||
mod - application/models/Question.php | Diff File | ||
add - tests/data/surveys/survey-dual-scale-question-api-test.lss | Diff File | ||
add - tests/unit/helpers/remotecontrol/RemoteControlQuestionPropertiesTest.php | Diff File | ||
LimeSurvey: master 8a6ae1cb 2023-05-03 17:20 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18679: API access to question type array dual scale merges scales if answer code is not unique (#3049) Co-authored-by: Lapiu Dev <devgit@lapiu.biz> |
Affected Issues 18679 |
|
mod - tests/data/surveys/survey-dual-scale-question-api-test.lss | Diff File | ||
mod - tests/unit/helpers/remotecontrol/RemoteControlQuestionPropertiesTest.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-03-14 10:50 | pixelit | New Issue | |
2023-03-20 21:53 | gabrieljenik | Assigned To | => gabrieljenik |
2023-03-20 21:53 | gabrieljenik | Status | new => assigned |
2023-03-29 17:34 | gabrieljenik | Note Added: 74307 | |
2023-03-29 17:34 | gabrieljenik | Bug heat | 0 => 2 |
2023-03-29 17:37 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
2023-03-29 17:37 | gabrieljenik | Status | assigned => ready for code review |
2023-03-29 17:37 | gabrieljenik | Note Added: 74308 | |
2023-03-30 10:19 | pixelit | Note Added: 74309 | |
2023-03-30 10:19 | pixelit | Bug heat | 2 => 4 |
2023-03-30 10:32 | DenisChenu | Status | ready for code review => ready for testing |
2023-03-30 10:32 | DenisChenu | Note Added: 74310 | |
2023-03-30 10:32 | DenisChenu | Bug heat | 4 => 6 |
2023-03-30 10:34 | DenisChenu | Note Added: 74311 | |
2023-04-01 11:04 | DenisChenu | Assigned To | DenisChenu => |
2023-04-03 10:34 | Changeset attached | => LimeSurvey master 7c8ab1a9 | |
2023-04-03 10:34 | guest | Note Added: 74336 | |
2023-04-03 10:34 | guest | Bug heat | 6 => 8 |
2023-04-03 10:58 | LimeBot | Note Added: 74340 | |
2023-04-03 10:58 | LimeBot | Status | ready for testing => closed |
2023-04-03 10:58 | LimeBot | Resolution | open => fixed |
2023-04-03 10:58 | LimeBot | Bug heat | 8 => 10 |
2023-04-04 10:45 | gabrieljenik | Note Added: 74360 | |
2023-04-04 10:51 | DenisChenu | Assigned To | => DenisChenu |
2023-04-04 10:51 | DenisChenu | Status | closed => feedback |
2023-04-04 10:51 | DenisChenu | Resolution | fixed => reopened |
2023-04-04 10:51 | DenisChenu | Note Added: 74362 | |
2023-04-04 10:51 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2023-04-04 10:51 | DenisChenu | Status | feedback => closed |
2023-04-14 22:02 | gabrieljenik | Assigned To | gabrieljenik => ollehar |
2023-04-14 22:02 | gabrieljenik | Status | closed => ready for merge |
2023-04-14 22:02 | gabrieljenik | Note Added: 74501 | |
2023-05-03 15:48 | Changeset attached | => LimeSurvey master 8a6ae1cb | |
2023-05-03 15:48 | guest | Note Added: 74790 | |
2023-05-08 11:59 | LimeBot | Note Added: 74886 | |
2023-05-08 11:59 | LimeBot | Status | ready for merge => closed |
2023-05-08 11:59 | LimeBot | Resolution | reopened => fixed |