Bug 28538

Summary: Regression - Date of birth entered without correct format causes internal server error
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: CirculationAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: major    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle.m.hall, kyle, tomascohen, victor, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.01,20.11.07,20.05.13
Circulation function:
Bug Depends on: 27937, 28351    
Bug Blocks:    
Attachments: Bug 28538: Insert formatted date if valid
Bug 28538: Insert formatted date if valid
Bug 28538: Insert formatted date if valid

Description Nick Clemens (kidclamp) 2021-06-09 17:59:20 UTC
Bug 28351 removed the code from Bug 27937 - but it reintroduced the error caused by single date months/days

The issue appears to be that the 'Restrictions' section is in the circulation pages, which adds timepicker, this undoes the dateFormat pref and the date fails to be set after validation.
Comment 1 Nick Clemens (kidclamp) 2021-06-09 18:03:01 UTC
Created attachment 121745 [details] [review]
Bug 28538: Insert formatted date if valid

This patch restores the setting of the date from bug 27937 and adds a parsing of the date to
ensure the correct format

To test:
1 - Follow test plan from bug 27937 - it fails
2 - Follow test plan from bug 28351 - it succeeds
3 - Apply patch
4 - Repeat 1-2
5 - both plans pass now
Comment 2 Andrew Fuerste-Henry 2021-06-10 13:20:22 UTC
Created attachment 121784 [details] [review]
Bug 28538: Insert formatted date if valid

This patch restores the setting of the date from bug 27937 and adds a parsing of the date to
ensure the correct format

To test:
1 - Follow test plan from bug 27937 - it fails
2 - Follow test plan from bug 28351 - it succeeds
3 - Apply patch
4 - Repeat 1-2
5 - both plans pass now

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Tomás Cohen Arazi (tcohen) 2021-06-11 20:06:39 UTC
Created attachment 121882 [details] [review]
Bug 28538: Insert formatted date if valid

This patch restores the setting of the date from bug 27937 and adds a parsing of the date to
ensure the correct format

To test:
1 - Follow test plan from bug 27937 - it fails
2 - Follow test plan from bug 28351 - it succeeds
3 - Apply patch
4 - Repeat 1-2
5 - both plans pass now

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi (tcohen) 2021-06-11 20:07:57 UTC
Both test plans followed and works as expected. i.e. no regressions introduced, and the 'fixed' behaviour is re-introduced. There's an unadvertised input size change, that makes sense :-D

No QA complaints.
Comment 5 Jonathan Druart 2021-06-14 15:34:43 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall (khall) 2021-06-18 12:44:01 UTC
Pushed to 21.05.x for 21.05.01
Comment 7 Fridolin Somers 2021-06-21 12:47:17 UTC
Pushed to 20.11.x for 20.11.07
Comment 8 Victor Grousset/tuxayo 2021-06-22 01:06:47 UTC
Backported: Pushed to 20.05.x branch for 20.05.13
Comment 9 Wainui Witika-Park 2021-06-24 02:07:34 UTC
Should this be backported to 19.11.x? For 19.11.19?
Comment 10 Wainui Witika-Park 2021-07-04 04:35:47 UTC
Should this be backported to 19.11.x? For 19.11.20?
Comment 11 Victor Grousset/tuxayo 2021-07-04 09:13:49 UTC
hi, there is a missing dependency[1] so it shouldn't be possible to backport and 19.11.x shouldn't be affected by this regression.

[1] "Depends on" field => the bug linked => they aren't in 19.11.x
Comment 12 Wainui Witika-Park 2021-07-05 01:00:30 UTC
Not backported to 19.11.x

Missing dependancy