View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14703Bug reports_ Unknownpublic2019-08-08 17:16
Reporterbismark Assigned ToLimeBot  
PrioritynoneSeveritytrivial 
Status assignedResolutionopen 
Summary14703: Survey getState
Description

when a survey is active and still between startdate and expire date I would expect the state of the survey is "running"

By the way when working with date comparison consider to "composer require nesbot/carbon"

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)master
I will donate to the project if issue is resolvedNo
Browser
Database type & version10.1.26-MariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version7.1.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-03-29 08:28

developer   ~51189

It's a feature request ? Something to know if survey are in active and open scope ?

bismark

bismark

2019-03-29 10:17

reporter   ~51190

in fact I use Survey::model()->active()->open()->findAll(), before I stumbled across Survey::getState()
however, the "running"-state doesnt consider start- expire dates, although I assumed the survey is "running" between start and expire dates

DenisChenu

DenisChenu

2019-03-29 10:27

developer   ~51191

Oups … didn't see Survey::getState() function…

But it's seems it consider start/epires date : it's broken ?
https://github.com/LimeSurvey/LimeSurvey/blob/392b869292012b19b3606e711924cc2fc00b01c6/application/models/Survey.php#L1090

DenisChenu

DenisChenu

2019-06-24 15:04

developer   ~52505

I take it, fix is quick :)

DenisChenu

DenisChenu

2019-06-24 15:11

developer   ~52506

API update …

Current

  1. between startdate and expire date > return willExpire
  2. After startdate, no expire date > return … null : this is the issue

If moving from willExpire to running : this can broke plugin.

DenisChenu

DenisChenu

2019-06-24 15:19

developer   ~52507

Maybe decision to do : https://github.com/LimeSurvey/LimeSurvey/pull/1299

But i don't think we need a «after Start Date but no expires» state.
We must leave willExpire even if it can be running …

Issue History

Date Modified Username Field Change
2019-03-28 22:24 bismark New Issue
2019-03-29 08:28 DenisChenu Note Added: 51189
2019-03-29 10:17 bismark Note Added: 51190
2019-03-29 10:27 DenisChenu Note Added: 51191
2019-06-24 14:44 cdorin Assigned To => dominikvitt
2019-06-24 14:44 cdorin Status new => assigned
2019-06-24 15:04 DenisChenu Assigned To dominikvitt => DenisChenu
2019-06-24 15:04 DenisChenu Note Added: 52505
2019-06-24 15:11 DenisChenu Note Added: 52506
2019-06-24 15:17 DenisChenu Assigned To DenisChenu => dominikvitt
2019-06-24 15:19 DenisChenu Note Added: 52507
2019-07-15 11:41 dominikvitt Assigned To dominikvitt => cdorin
2019-08-08 17:16 cdorin Assigned To cdorin => LimeBot