View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
03800 | Bug reports | Survey taking | public | 2009-10-28 14:50 | 2009-11-28 13:45 |
Reporter | bkgray | Assigned To | c_schmitz | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.86 | ||||
Fixed in Version | 1.87RC3 | ||||
Summary | 03800: Condition comparison of dates fails | ||||
Description | A condition that compares a date entered in a previous question to a date constant or date entered in a token field does not work as expected. The survey's date format is yyyy/mm/dd. When I display the precious answer in the body of a subsequent question, it is displayed with format dd.mm.yyyy Conditional comparisons for "less than" and "equals" do not work. I have not tested others. The conditions worked as expected in most recent 1.85+. | ||||
Additional Information | See the sample survey file attached. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 7697 | ||||
I will donate to the project if issue is resolved | |||||
Browser | FF, IE | ||||
Database type & version | MySql | ||||
Server OS (if known) | Win 2K3, | ||||
Webserver software & version (if known) | Apache | ||||
PHP Version | 5.1.4 | ||||
I get the following notices, if I run the attached survey: Notice: Undefined variable: thistype in /home/.sites/962/site989/web/limesurvey/common.php on line 6142 Notice: Undefined variable: cq_gid in /home/.sites/962/site989/web/limesurvey/common.php on line 6158 Notice: Undefined variable: cq_gid in /home/.sites/962/site989/web/limesurvey/common.php on line 6286 |
|
This is no bug, you juste have to use YYY-MM-DD format as the constant value because conditions are independant on the date-format defined in a specific language of a survey. I've updated Documentation. |
|
Thanks, lemeur. I changed the date constants to the correct format and it fixed the problem. Oddly, if I display the value of the entered date in the text of a subsequent question (using INSERTANS), the date is displayed as dd.mm.yyyy. Also, in the survey I uploaded (with the date constant modified to the correct format) and with $debug = 1, I still get the four undefined variable error messages in one case on question code q4. The condition on q4 is <date> not equal to 2009-10-28. If I enter another date in the previous question, the condition is triggered and I get the appropriate message, but the screen also shows the four error message. Thanks for the quick answer! bkg |
|
the error message you see is because your survey structure contains a strange condition for question q4: it has cqid field set to '0' which is not normal... Juste delete the condition and create it again, this should fix the issue. |
|
Carsten, I assign this one to you: the remaining issue is about the format used to display INSERTANS: answers corresponding to date questions. It seems that the getextendedanswer() function in common.php always returns a d.m.Y date format getextendedanswer($fieldcode, $value, $format='', $dateformatphp='d.m.Y') line 2047: Do you think we should change this ? |
|
Fixed remaining issues with INSERTANS |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2009-10-28 14:50 | bkgray | New Issue | |
2009-10-28 14:50 | bkgray | Status | new => assigned |
2009-10-28 14:50 | bkgray | Assigned To | => user372 |
2009-10-28 14:50 | bkgray | File Added: limesurvey_survey_73529.csv | |
2009-10-28 14:50 | bkgray | LimeSurvey build number | => 7697 |
2009-10-28 14:50 | bkgray | Browser | => FF, IE |
2009-10-28 14:50 | bkgray | Database & DB-Version | => MySql |
2009-10-28 14:50 | bkgray | Operating System (Server) | => Win 2K3, |
2009-10-28 14:50 | bkgray | Webserver | => Apache |
2009-10-28 14:50 | bkgray | PHP Version | => 5.1.4 |
2009-10-28 14:54 | bkgray | Issue Monitored: bkgray | |
2009-10-28 16:38 |
|
Note Added: 09896 | |
2009-10-28 16:38 |
|
Assigned To | user372 => lemeur |
2009-10-28 22:06 | lemeur | Note Added: 09908 | |
2009-10-28 22:55 | bkgray | Note Added: 09910 | |
2009-10-28 23:04 | lemeur | Note Added: 09911 | |
2009-10-28 23:31 | lemeur | Assigned To | lemeur => c_schmitz |
2009-10-28 23:33 | lemeur | Note Added: 09912 | |
2009-11-22 20:19 | c_schmitz | Note Added: 10207 | |
2009-11-22 20:19 | c_schmitz | Status | assigned => resolved |
2009-11-22 20:19 | c_schmitz | Fixed in Version | => 1.87RC3 |
2009-11-22 20:19 | c_schmitz | Resolution | open => fixed |
2009-11-28 13:45 | c_schmitz | Status | resolved => closed |
2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |
2021-09-17 03:32 | guest | Bug heat | 8 => 10 |