View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
15310Bug reportsSurvey takingpublic2023-02-08 20:25
Reportercdorin Assigned Togabrieljenik  
PrioritylowSeveritypartial_block 
Status assignedResolutionfixed 
Product Version3.17.x 
Summary15310: Display dropdown boxes - Date/Time question type not working correctly if minimum date < 1900
Description

See title.

No year < 1900 can be selected even if the minimum date field is correctly set up.

Pre-condition: display dropdown attribute is enabled.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)3.x
I will donate to the project if issue is resolvedNo
Browser
Database type & versionirrelevant
Server OS (if known)
Webserver software & version (if known)
PHP Versionirrelevant

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2022-08-01 21:47

manager   ~71284

Last edited: 2022-08-02 14:58

@ollehar @DenisChenu

https://github.com/LimeSurvey/LimeSurvey/blob/master/application/core/QuestionTypes/Date/RenderDate.php#L176

        if (!isset($yearmin) || $yearmin &lt; 1900 || $yearmin > 2187) {
            $yearmin = 1900;
        }

Any idea why years before 1900 or not allowed?
I mean, it is not default, but forbdding here.
Technical reason?

Why is this applying for dropdowns but not for date picker?

I think this is related to 09476.
Still, the bug may not be solved. If I select year 2012 and there is a 2 digit year, how should that be considered?

I just think sometime, the format of 2 digits for year shall not be used instead of restrtcing the years.

Thoughts?

gabrieljenik

gabrieljenik

2022-08-01 21:48

manager   ~71285

PS: This happens on master as well

gabrieljenik

gabrieljenik

2022-08-19 14:49

manager   ~71496

Chat with carsten:
Condition should be adjusted to allow lower and upper values.
Then lot of testing

gabrieljenik

gabrieljenik

2022-09-21 21:57

manager   ~71881

LTS: https://github.com/LimeSurvey/LimeSurvey/pull/2628

DenisChenu

DenisChenu

2022-09-22 09:20

developer   ~71883

It's not related to datepicker ?

Since we update it, maybe it work now ?

DenisChenu

DenisChenu

2022-09-22 09:35

developer   ~71885

Maybe need a test process here ?
What date must be tested ?

Can we have year between 0 and 100 ?
Can we have year before 0 ?

What is the date of murder of Julius Caesar
(year between -200 and 100 for example)

gabrieljenik

gabrieljenik

2022-09-22 14:46

manager   ~71894

It's not related to datepicker ?

Why would it be? This is when using dropdown

DenisChenu

DenisChenu

2022-09-22 14:54

developer   ~71895

Argl Sorry :)

gabrieljenik

gabrieljenik

2022-10-10 00:56

manager   ~72174

After testing and finding some stuff still didn't work with years like 2100, got to this.
https://bugs.limesurvey.org/view.php?id=8684

I think we should test 08684 is OK before pushing this.

gabrieljenik

gabrieljenik

2022-10-12 01:24

manager   ~72208

Tested it OK.
Although I believe more testing/reviewing could be usefull, as we are removing code which was there for very long time.

DenisChenu

DenisChenu

2022-10-12 09:55

developer   ~72213

Although I believe more testing/reviewing could be usefull, as we are removing code which was there for very long time.

We need to have a «What must be tested» list maybe ?

gabrieljenik

gabrieljenik

2022-11-02 11:05

manager   ~72509

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=34013

LimeBot

LimeBot

2022-11-07 11:36

administrator   ~72588

Fixed in Release 3.28.37+221108

gabrieljenik

gabrieljenik

2022-11-07 13:58

manager   ~72605

Reopening it as to keep on discussing and also apply it to master

gabrieljenik

gabrieljenik

2023-02-08 20:25

manager   ~73761

Taking into account the LTS merge was done quite some time ago (https://github.com/LimeSurvey/LimeSurvey/pull/2628), should we prepare the master fix?

Related Changesets

LimeSurvey: 3.x-LTS 4eed5988

2022-11-02 11:05:38

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 15310: Display dropdown boxes - Date/Time question type not working correctly if minimum date < 1900 (#2628)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
Affected Issues
15310
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File

Issue History

Date Modified Username Field Change
2019-09-19 15:41 cdorin New Issue
2019-11-14 21:53 cdorin Assigned To => cdorin
2019-11-14 21:53 cdorin Status new => assigned
2021-02-06 18:54 cdorin Assigned To cdorin =>
2021-02-06 18:54 cdorin Priority none => low
2021-02-06 18:54 cdorin Status assigned => confirmed
2021-02-06 18:54 cdorin Sync to Zoho Project => |Yes|
2022-07-27 23:15 gabrieljenik Assigned To => gabrieljenik
2022-07-27 23:15 gabrieljenik Status confirmed => assigned
2022-08-01 21:47 gabrieljenik Note Added: 71284
2022-08-01 21:47 gabrieljenik Bug heat 0 => 2
2022-08-01 21:48 gabrieljenik Note Added: 71285
2022-08-02 14:58 gabrieljenik Note Edited: 71284
2022-08-03 18:29 gabrieljenik Assigned To gabrieljenik => ollehar
2022-08-03 18:29 gabrieljenik Status assigned => feedback
2022-08-03 18:29 gabrieljenik Complete LimeSurvey version number (& build) irrelevant => 5.x
2022-08-19 14:49 gabrieljenik Note Added: 71496
2022-09-21 21:57 gabrieljenik Assigned To ollehar => DenisChenu
2022-09-21 21:57 gabrieljenik Status feedback => ready for code review
2022-09-21 21:57 gabrieljenik Complete LimeSurvey version number (& build) 5.x => 3.x
2022-09-21 21:57 gabrieljenik Note Added: 71881
2022-09-22 09:20 DenisChenu Note Added: 71883
2022-09-22 09:20 DenisChenu Bug heat 2 => 4
2022-09-22 09:35 DenisChenu Note Added: 71885
2022-09-22 14:46 gabrieljenik Note Added: 71894
2022-09-22 14:54 DenisChenu Note Added: 71895
2022-09-22 14:55 DenisChenu Assigned To DenisChenu =>
2022-09-22 14:55 DenisChenu Status ready for code review => ready for testing
2022-10-10 00:56 gabrieljenik Note Added: 72174
2022-10-12 01:23 gabrieljenik Assigned To => gabrieljenik
2022-10-12 01:23 gabrieljenik Status ready for testing => in testing
2022-10-12 01:24 gabrieljenik Note Added: 72208
2022-10-12 09:55 DenisChenu Note Added: 72213
2022-11-02 11:05 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 4eed5988
2022-11-02 11:05 gabrieljenik Note Added: 72509
2022-11-02 11:05 gabrieljenik Resolution open => fixed
2022-11-07 11:36 LimeBot Note Added: 72588
2022-11-07 11:36 LimeBot Status in testing => closed
2022-11-07 11:36 LimeBot Bug heat 4 => 6
2022-11-07 13:58 gabrieljenik Status closed => assigned
2022-11-07 13:58 gabrieljenik Note Added: 72605
2023-02-08 20:25 gabrieljenik Note Added: 73761