View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
14080Bug reportsSurvey takingpublic2019-08-30 14:28
ReporterDeusdeorum Assigned ToDenisChenu  
PriorityimmediateSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.14.x 
Target Version3.14.xFixed in Version3.14.x 
Summary14080: moving backwards clears answer (Date/Time question)
Description

If you use a Date/Time question with dropdown layout and HH:MM as format and answers the question and proceed, moving backwards will clear the answer, from client and DB. I included two other date/time questions where it is working.

Steps To Reproduce

i) Create a survey with two groups. Add a Date/Time question with dropdown layout and HH:MM as format, add a placeholder question in second group.
ii) Take survey, answer the date/time question.
iii) Move forward, then backwards.

Answer is cleared from both client side and backend side.

TagsNo tags attached.
Attached Files
Bug heat12
Complete LimeSurvey version number (& build)3.14.9 github
I will donate to the project if issue is resolvedNo
Browserchrome, safari, ie
Database type & version mysqlnd 5.0.12-dev
Server OS (if known)Linux stretch 4.9.0-4-amd64
Webserver software & version (if known)nginx/1.10.3
PHP Version 7.0.27-0+deb9u1

Relationships

has duplicate 14115 closedDenisChenu time fields: input disappears 

Users monitoring this issue

There are no users monitoring this issue.

Activities

jelo

jelo

2018-09-20 02:35

partner   ~49098

I can confirm that issue.
To be more precise: The value is not erased from the DB when going backwards.
The drop down time question type is not getting the value from the database when respondent is going backwards.
So the answer of the respondent is no longer in the question.
When respondent is going forwards the question is saving the value (which is empty).

jelo

jelo

2018-09-20 02:39

partner   ~49099

@Deusdeorum: Can you set default answers values in any of the three date/time questions? I'm not able to set one.

Deusdeorum

Deusdeorum

2018-09-20 08:16

reporter   ~49100

@Jelo Ah, of course, it's getting replaced by an empty value. Anyhow, it's gone. I cannot set default answers no, only for the third (q1c) which is a date question, 2018-09-20 will set default value to today!

jelo

jelo

2018-09-20 10:42

partner   ~49102

@Deusdeorum: You're right, that it is bug. I only wanted to point out, that the routines to save the values are working.
The only workaround would be to make this question mandatory, to prevent saving an empty question. Still not nice for the respondent, but at least the value will be saved.

The default value setting routines seem to be buggy.
When a fix will be provided, we will need to check the following situation as well:
Default value is set. Respondent changes the value. Respondent forwards and then backwards.
What value is set. No value, default value or answered value.

DenisChenu

DenisChenu

2018-09-26 11:24

developer   ~49128

Last edited: 2018-09-26 13:53

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

DenisChenu

DenisChenu

2018-09-26 11:24

developer   ~49129

@jelo : can you test with default value please ? And if broken send a simple lss.

DenisChenu

DenisChenu

2018-09-26 13:59

developer   ~49137

Oup , surely issue with intval("")

DenisChenu

DenisChenu

2018-09-26 14:55

developer   ~49140

Last edited: 2019-08-30 14:28

https://bugs.limesurvey.org/plugin.php?page=Source/view&id=28016

Deusdeorum

Deusdeorum

2018-10-01 11:30

reporter   ~49199

I tested your latest fix. Everything but default value works for me. Thanks a lot for fixing this @DenisChenu

Deusdeorum

Deusdeorum

2018-10-01 11:32

reporter   ~49200

Okey, default value works as well, but not in HH:MM format. You'll have to enter 2018-10-01 11:32 to prefill 11:32.

DenisChenu

DenisChenu

2018-10-14 18:51

developer   ~49318

@Deusdeorum Not related of HTML (twig) part : think it must be fixed elsewhere :)

Related Changesets

LimeSurvey: master 16826026

2018-09-26 13:23

DenisChenu


Details Diff
Fixed issue 14080: moving backwards clears answer (Date/Time question)
Dev: 'selected' != selected (not an attribute)
Dev: use ==intval for all dropdown (like day of month)
Dev: rename currentdate to currentday for day …
Affected Issues
14080
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/answer/date/dropdown/rows/day.twig Diff File
mod - application/views/survey/questions/answer/date/dropdown/rows/hour.twig Diff File
mod - application/views/survey/questions/answer/date/dropdown/rows/minute.twig Diff File
mod - application/views/survey/questions/answer/date/dropdown/rows/month.twig Diff File
mod - application/views/survey/questions/answer/date/dropdown/rows/year.twig Diff File

LimeSurvey: master d1483937

2018-09-26 16:54

DenisChenu


Details Diff
Dev: follow 14080 : issue with '' == 0 only for minutes and seconds needed Affected Issues
14080
mod - application/views/survey/questions/answer/date/dropdown/rows/day.twig Diff File
mod - application/views/survey/questions/answer/date/dropdown/rows/hour.twig Diff File
mod - application/views/survey/questions/answer/date/dropdown/rows/minute.twig Diff File

Issue History

Date Modified Username Field Change
2018-09-19 08:34 Deusdeorum New Issue
2018-09-19 08:34 Deusdeorum File Added: limesurvey_survey_656226.lss
2018-09-19 08:35 Deusdeorum Summary moving backwards clears answer => moving backwards clears answer (Date/Time question)
2018-09-19 14:36 ollehar Priority none => immediate
2018-09-20 02:35 jelo Note Added: 49098
2018-09-20 02:39 jelo Note Added: 49099
2018-09-20 08:16 Deusdeorum Note Added: 49100
2018-09-20 10:42 jelo Note Added: 49102
2018-09-26 11:11 DenisChenu Assigned To => DenisChenu
2018-09-26 11:11 DenisChenu Status new => assigned
2018-09-26 11:24 DenisChenu Changeset attached => LimeSurvey master 16826026
2018-09-26 11:24 DenisChenu Note Added: 49128
2018-09-26 11:24 DenisChenu Resolution open => fixed
2018-09-26 11:24 DenisChenu Status assigned => resolved
2018-09-26 11:24 DenisChenu Fixed in Version => 3.14.x
2018-09-26 11:24 DenisChenu Note Added: 49129
2018-09-26 13:49 c_schmitz Note Edited: 49128
2018-09-26 13:51 c_schmitz Note Edited: 49128
2018-09-26 13:52 c_schmitz Note Edited: 49128
2018-09-26 13:53 c_schmitz Note Edited: 49128
2018-09-26 13:59 DenisChenu Status resolved => feedback
2018-09-26 13:59 DenisChenu Resolution fixed => reopened
2018-09-26 13:59 DenisChenu Note Added: 49137
2018-09-26 14:55 DenisChenu Changeset attached => LimeSurvey master d1483937
2018-09-26 14:55 DenisChenu Status feedback => resolved
2018-09-26 14:55 DenisChenu Resolution reopened => fixed
2018-09-26 14:55 DenisChenu Note Added: 49140
2018-10-01 10:47 DenisChenu Relationship added has duplicate 14115
2018-10-01 11:30 Deusdeorum Note Added: 49199
2018-10-01 11:32 Deusdeorum Note Added: 49200
2018-10-14 18:51 DenisChenu Note Added: 49318
2019-04-30 09:10 c_schmitz Status resolved => closed
2019-08-30 14:28 c_schmitz Note Edited: 49140