Bug 28538 - Regression - Date of birth entered without correct format causes internal server error
Summary: Regression - Date of birth entered without correct format causes internal ser...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Nick Clemens (kidclamp)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 27937 28351
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-09 17:59 UTC by Nick Clemens (kidclamp)
Modified: 2022-06-06 20:25 UTC (History)
7 users (show)

See Also:
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:


Attachments
Bug 28538: Insert formatted date if valid (2.47 KB, patch)
2021-06-09 18:03 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 28538: Insert formatted date if valid (2.51 KB, patch)
2021-06-10 13:20 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 28538: Insert formatted date if valid (2.56 KB, patch)
2021-06-11 20:06 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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