View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
17025Bug reportsOtherpublic2021-01-29 15:07
Reporterjujubre Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version4.3.33 
Summary17025: Single choice code to 0 reset to empty
DescriptionWhen update response is allowed, some are not displayed.
Steps To Reproduce1. create survey which allow to update answers
2. use type L question
3. set an assessment value of 0 and (maybe) a code 0
4. run the survey
5. choose the 0 answer
6. quit and come back
7. answer is not selected (but other questions are)
Additional InformationA logical test is not taking care of the 0 value. I added a 2nd test for the value. Here is the patch, usure if there are any side effects.

application/models/QuestionBaseRenderer.php 2020-12-21 07:51:02.000000000 -0500
+++ html/application/models/QuestionBaseRenderer.php 2021-01-13 17:00:13.898358517 -0500
@@ -293,7 +293,7 @@
 
     protected function setDefaultIfEmpty($value, $default)
     {
- if(!$value) {
+ if(!$value && $value != 0) {//tibo
             return $default;
         }
         return trim($value) == '' ? $default : $value;
TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)Version 4.3.32+201221
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql8.0.20, database version 430
Server OS (if known)
Webserver software & version (if known)
PHP Version7.2.24

Users monitoring this issue

User List DenisChenu

Activities

jujubre

jujubre

2021-01-28 21:19

reporter  

DenisChenu

DenisChenu

2021-01-29 08:32

developer   ~61800

Please : send a lss with numeric and text value …
DenisChenu

DenisChenu

2021-01-29 08:51

developer   ~61801

OK,

lss + screencast
Peek 29-01-2021 08-50.gif (161,819 bytes)

Issue History

Date Modified Username Field Change
2021-01-28 21:19 jujubre New Issue
2021-01-28 21:19 jujubre File Added: limesurvey_question_58195.lsq
2021-01-29 08:11 DenisChenu Issue Monitored: DenisChenu
2021-01-29 08:32 DenisChenu Note Added: 61800
2021-01-29 08:51 DenisChenu Note Added: 61801
2021-01-29 08:51 DenisChenu File Added: Peek 29-01-2021 08-50.gif
2021-01-29 08:51 DenisChenu File Added: limesurvey_survey_0asAnswerCode.lss
2021-01-29 10:44 DenisChenu Summary Re-use answers => Single choice code to 0 reste to not set
2021-01-29 10:44 DenisChenu Steps to Reproduce Updated View Revisions
2021-01-29 10:44 DenisChenu Additional Information Updated View Revisions
2021-01-29 14:24 ollehar Product Version => 4.3.33
2021-01-29 15:07 DenisChenu Summary Single choice code to 0 reste to not set => Single choice code to 0 reset to empty