View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17230 | Bug reports | _ Unknown | public | 2021-04-06 22:26 | 2021-04-07 08:02 |
Reporter | mfcsita | Assigned To | c_schmitz | ||
Priority | none | Severity | minor | ||
Status | resolved | Resolution | fixed | ||
Product Version | 4.4.15 | ||||
Summary | 17230: Inconsistent 'willRun' state of the survey when Start date is undefined | ||||
Description | Hi, the method Survey::getState() can return the state 'willRun'; apparently 'willRun' should return when the survey is active and the start date is in the future. If the survey is active without a start date it should return 'willExpire'. The code says: // now with timeadjust correction $sNow = date("Y-m-d H:i:s", strtotime(Yii::app()->getConfig('timeadjust'), strtotime(date("Y-m-d H:i:s")))); ... // null if start date is empty $sStart = ($this->startdate != '') ? date("Y-m-d H:i:s", strtotime(Yii::app()->getConfig('timeadjust'), strtotime($this->startdate))) : null; ... // now without any correction if $sStart is null $oStart = new DateTime($sStart); ... // inconsistent, $oStart could be before o after $oNow based on correction $bWillRun = (!is_null($oStart) && $oStart > $oNow); I think the last line should be: $bWillRun = (!is_null($sStart) && $oStart > $oNow); | ||||
Tags | No tags attached. | ||||
Complete LimeSurvey version number (& build) | 4.4.15 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database & DB-Version | any | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | any | ||||
Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31547 | |
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31549 | |
Thank you! | |
LimeSurvey: 3.x-LTS 32ddd29a 2021-04-07 08:00:54 Details Diff |
Fixed issue 17230: Inconsistent 'willRun' state of the survey when Start date is undefined |
Affected Issues 17230 |
|
mod - application/models/Survey.php | Diff File | ||
LimeSurvey: master 76f707d6 2021-04-07 08:00:54 Details Diff |
Fixed issue 17230: Inconsistent 'willRun' state of the survey when Start date is undefined |
Affected Issues 17230 |
|
mod - application/models/Survey.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-04-06 22:26 | mfcsita | New Issue | |
2021-04-07 08:01 | c_schmitz | Changeset attached | => LimeSurvey 3.x-LTS 32ddd29a |
2021-04-07 08:01 | c_schmitz | Note Added: 63844 | |
2021-04-07 08:01 | c_schmitz | Assigned To | => c_schmitz |
2021-04-07 08:01 | c_schmitz | Resolution | open => fixed |
2021-04-07 08:02 | c_schmitz | Changeset attached | => LimeSurvey master 76f707d6 |
2021-04-07 08:02 | c_schmitz | Note Added: 63845 | |
2021-04-07 08:02 | c_schmitz | Status | new => resolved |
2021-04-07 08:02 | c_schmitz | Note Added: 63846 |