Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
11702Bug reportsSurvey takingpublic2016-11-11 13:18
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.52.x 
Fixed in Version2.55.x 
Summary11702: Dropdown question : 2 'no answer' if value selected is 0
Description

We can see, in some situation in dropdown question 2 no answer value : one with "Please choose ..." one with "No answer"

Steps To Reproduce

Import this lss

  • launch
  • answer to the first question (select "value 0")
  • Leave second questioin empty
  • Try submit , look at dropdown : "Please choose ..." is still here and have html code
    <option value='' SELECTED >
    Please choose...</option>
Additional Information

We test only !$SESSION['survey'.Yii::app()->getConfig('surveyID')][$ia[1]]

Then, if 0 return true.

OIn fact is true for whole answer , we must test exactly:

$SESSION['survey'.Yii::app()->getConfig('surveyID')][$ia[1]]!== null && $SESSION['survey'.Yii::app()->getConfig('surveyID')][$ia[1]]!== ""

Because :
It always set to null in _validateQuestion in Expression Manager (it must be)
If not answered : it's "".

Maybe the alternative can be (for dropdown)

Show "Please choose .." if it's null (not set) OR ==="" and mandatory
Show "No answer" if it's not mandatory and ===""

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)20160922
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 11700 closedDenisChenu Mandatory array (dropdown) is not mandatory 

Activities

DenisChenu

DenisChenu

2016-09-22 10:26

developer   ~40914

PS : it's better if the "Please choose ..." option must NEVER have "selected" tag because it was the first : then is selected by default.
And in reality : it was not selected : ir's the one by default.

Cleaner :)

DenisChenu

DenisChenu

2016-10-06 13:05

developer   ~41169

for 3.0 ?

DenisChenu

DenisChenu

2016-10-15 16:00

developer   ~41376

Fix committed to answers_html branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=21032

DenisChenu

DenisChenu

2016-10-15 16:07

developer   ~41377

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

c_schmitz

c_schmitz

2016-11-11 13:18

administrator   ~41860

Version 2.55.3 released

Related Changesets

LimeSurvey: answers_html a027f11a

2016-10-15 16:00:16

DenisChenu

Details Diff
Fixed issue 11702: Dropdown question : 2 'no answer' if value selected is 0 Affected Issues
11702
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/list_dropdown/answer.php Diff File

LimeSurvey: master 646ecdac

2016-10-15 16:07:38

DenisChenu

Details Diff
Fixed issue 11702: Dropdown question : 2 'no answer' if value selected is 0

# Conflicts:
# application/views/survey/questions/list_dropdown/answer.php
Affected Issues
11702
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/list_dropdown/answer.php Diff File

Issue History

Date Modified Username Field Change
2016-09-22 10:24 DenisChenu New Issue
2016-09-22 10:25 DenisChenu File Added: limesurvey_survey_2noanswer.lss
2016-09-22 10:26 DenisChenu Note Added: 40914
2016-09-22 10:27 DenisChenu Relationship added related to 11700
2016-10-06 12:55 c_schmitz Assigned To => DenisChenu
2016-10-06 12:55 c_schmitz Status new => assigned
2016-10-06 13:05 DenisChenu Note Added: 41169
2016-10-15 16:00 DenisChenu Changeset attached => LimeSurvey answers_html a027f11a
2016-10-15 16:00 DenisChenu Note Added: 41376
2016-10-15 16:00 DenisChenu Resolution open => fixed
2016-10-15 16:07 DenisChenu Changeset attached => LimeSurvey master 646ecdac
2016-10-15 16:07 DenisChenu Note Added: 41377
2016-10-15 16:15 DenisChenu Status assigned => resolved
2016-10-15 16:15 DenisChenu Fixed in Version => 2.55.x
2016-11-11 13:18 c_schmitz Note Added: 41860
2016-11-11 13:18 c_schmitz Status resolved => closed