View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
09476Bug reportsExpression Managerpublic2015-02-11 15:57
Reporterpvdemael Assigned Tomfaber  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary09476: Wrong rendered date_min value in date question
Description

Situation:
the output from a date question (startDate) is used as the date_min value from another date question (stopDate)

Result:
The stopDate field always shows dates ranging from 1999 to now (date_max is set to "now").
Selecting stopDate after 1999 is fine, below is not possible.
Validation is rendered ok: validation will fail if a lower date is selected.

This happens with several methods on calculating the date_min value:

Steps To Reproduce

Create 3 date questions
startDate
date_max: date("Y-m-d H:i",strtotime("now"))

stopDate1
date_min: date("Y-m-d H:i",mktime(0,0,0,intval(substr(startDate,5,2)),intval(substr(startDate,8,2)),intval(substr(startDate,0,4))))
date_max: date("Y-m-d H:i",strtotime("now"))

stopDate2
date_min: startDate
date_max: date("Y-m-d H:i",strtotime("now"))

Additional Information

Question group attached containing questions above with some additional information printed out.

Screenshot attached where startDate = 2005

Screenshot attached where startDate = 1995

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)Versie 2.05+ Build 141210
I will donate to the project if issue is resolvedNo
BrowserChrome 39.0.2171.99 m
Database type & versionMySQL 5.5.37-0ubuntu0.13.10.1
Server OS (if known)Ubuntu Linux 3.11.0-26-generic
Webserver software & version (if known)Apache/2.2.22 (Ubuntu)
PHP Version5.4.6-1ubuntu1.2

Users monitoring this issue

User List pvdemael

Activities

pvdemael

pvdemael

2015-01-26 15:11

reporter  

date_test.ZIP (90,428 bytes)
mfaber

mfaber

2015-01-27 16:45

reporter   ~31492

Thanks for the detailed error report and example survey. That helps a lot.
The second method seems to work ok here (stopDate2). Or do you have issues with that as well?

pvdemael

pvdemael

2015-01-27 16:56

reporter   ~31493

The second one does also not work for me.

mfaber

mfaber

2015-01-27 17:25

reporter   ~31494

For stopDate1 it's a minor issue. Will try to fix soon.

Are you also missing the years < 1999 in stopDate2? I cannot reproduce locally.

It also works on our demo server
https://www.limesurvey.org/en/demo
See the survey called "issue 09476: Wrong rendered date_min value in date question (ID 556277)"

Thanks

mfaber

mfaber

2015-01-28 15:50

reporter   ~31508

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

pvdemael

pvdemael

2015-01-28 15:51

reporter   ~31509

I am not missing the years lower than 1999 in stopDate2. They range from 1900 to date_max

mfaber

mfaber

2015-01-28 15:52

reporter   ~31510

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

mfaber

mfaber

2015-01-28 15:57

reporter   ~31511

Issue with stopDate1 should be fixed in the next release. If you have further issues feel free to reopen this or issue a new bug report.

c_schmitz

c_schmitz

2015-02-11 15:57

administrator   ~31666

Version 2.05 Build 150211 released

Related Changesets

LimeSurvey: master e60fe6cd

2015-01-28 14:46:39

mfaber


Committer: mfaber Details Diff
Fixed issue 09476: wrongly rendered selectable years in dropbox date question

Dev: Selectable years in date question in dropbox style
Dev: could be rendered incorrect if datemin or datemax is
Dev: set using an expression.
Affected Issues
09476
mod - application/helpers/qanda_helper.php Diff File

LimeSurvey: 2.06 1d8ac47d

2015-01-28 14:46:39

mfaber


Committer: mfaber Details Diff
Fixed issue 09476: wrongly rendered selectable years in dropbox date question

Dev: Selectable years in date question in dropbox style
Dev: could be rendered incorrect if datemin or datemax is
Dev: set using an expression.
Affected Issues
09476
mod - application/helpers/qanda_helper.php Diff File

Issue History

Date Modified Username Field Change
2015-01-26 15:11 pvdemael New Issue
2015-01-26 15:11 pvdemael File Added: date_test.ZIP
2015-01-27 14:34 pvdemael Issue Monitored: pvdemael
2015-01-27 16:43 mfaber Assigned To => mfaber
2015-01-27 16:43 mfaber Status new => assigned
2015-01-27 16:45 mfaber Note Added: 31492
2015-01-27 16:45 mfaber Status assigned => feedback
2015-01-27 16:56 pvdemael Note Added: 31493
2015-01-27 16:56 pvdemael Status feedback => assigned
2015-01-27 17:25 mfaber Note Added: 31494
2015-01-27 17:25 mfaber Status assigned => feedback
2015-01-28 15:50 mfaber Changeset attached => LimeSurvey master e60fe6cd
2015-01-28 15:50 mfaber Note Added: 31508
2015-01-28 15:50 mfaber Resolution open => fixed
2015-01-28 15:51 pvdemael Note Added: 31509
2015-01-28 15:51 pvdemael Status feedback => assigned
2015-01-28 15:52 mfaber Changeset attached => LimeSurvey 2.06 1d8ac47d
2015-01-28 15:52 mfaber Note Added: 31510
2015-01-28 15:57 mfaber Note Added: 31511
2015-01-28 15:57 mfaber Status assigned => resolved
2015-01-28 15:57 mfaber Fixed in Version => 2.05+
2015-02-11 15:57 c_schmitz Note Added: 31666
2015-02-11 15:57 c_schmitz Status resolved => closed
2021-08-03 21:37 guest Bug heat 6 => 8