View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
17172Bug reportsMenu systempublic2021-03-15 15:37
ReporterPMagel Assigned Toollehar  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version4.4.12 
Summary17172: Question type: List (Ratio) does not save state - Did not go live with the patch.
Description

This ticket is related to another one:

ID: 17158
URL: https://bugs.limesurvey.org/view.php?id=17158

"We found a Problem regarding the List (Ratio) question type.
When you create It with the entry 0 and 1, then select the 0 as the option and go to the next step. After this go back a step to the selection of the List (Ratio) and you see the answer is not selected anymore.
When you do the same steps with the 1 as your answer it stays selected."

The problem ist resolved and should be patched in the new live version, but it isn't. So I opened this one so It can be fixed in the next patch.

Steps To Reproduce

Just create 2 questions, first a List (Ratio) type and the second one I selected a Long free text as an example.
For the first one you need two entries (0 and 1).
Or you take the import file I provided for example.

Additional Information

As disguised in the notes of the previous ticket, the problem can be solved via this change in the code:

File: 'application/models/QuestionBaseRenderer.php'
Line: 295 - 301

Change to this to solve:

protected function setDefaultIfEmpty($value, $default)
{
if(is_null($value)) {
return $default;
}
return trim($value) == '' ? $default : $value;
}

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)4.4.12+210308
I will donate to the project if issue is resolvedYes
Browser
Database type & versionPostgresSQL
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.15

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2021-03-09 18:43

administrator   ~62968

Jesus, sorry. Will fix now.

ollehar1

ollehar1

2021-03-09 18:44

reporter   ~62969

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31303

lime_release_bot

lime_release_bot

2021-03-15 15:37

administrator   ~63369

Fixed in Release 4.4.13+210315

Related Changesets

LimeSurvey: master 6b4044a0

2021-03-09 18:44:18

ollehar1

Details Diff
Fixed issue 17172: Question type: List (Radio) does not save state Affected Issues
17172
mod - application/models/QuestionBaseRenderer.php Diff File

Issue History

Date Modified Username Field Change
2021-03-09 17:37 PMagel New Issue
2021-03-09 17:37 PMagel File Added: limesurvey_survey_319611.lss
2021-03-09 18:43 ollehar Note Added: 62968
2021-03-09 18:43 ollehar Assigned To => ollehar
2021-03-09 18:43 ollehar Status new => assigned
2021-03-09 18:44 ollehar1 Changeset attached => LimeSurvey master 6b4044a0
2021-03-09 18:44 ollehar1 Note Added: 62969
2021-03-09 18:44 ollehar Status assigned => resolved
2021-03-09 18:44 ollehar Resolution open => fixed
2021-03-15 15:37 lime_release_bot Note Added: 63369
2021-03-15 15:37 lime_release_bot Status resolved => closed