Bug 29500

Summary: Flatpickr accepting original date in the past for futuredate but also other dates in the past
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 29241, 29394    
Bug Blocks: 29478    
Attachments: Bug 29500: Flatpickr - accept original date in the past and not others
Bug 29500: Flatpickr - accept original date in the past and not others
Bug 29500: Flatpickr - accept original date in the past and not others
Bug 29500: Flatpickr - accept original date in the past and not others

Description Jonathan Druart 2021-11-17 10:20:03 UTC
Bug 29241 was supposed to fix this but it didn't properly. We are accepting other dates in the past when we should only accept the original one (the one from the DB) AND dates in future.
Comment 1 Jonathan Druart 2021-11-17 10:25:04 UTC
Created attachment 127710 [details] [review]
Bug 29500: Flatpickr - accept original date in the past and not others

Bug 29241 was supposed to fix this but it didn't properly.
We are accepting other dates in the past when we should only accept the
original one (the one from the DB) AND dates in future.

Test plan:
Retry test plan for 29241 and confirm that you cannot set manually another
date in the past.
Comment 2 Jonathan Druart 2021-11-17 10:52:03 UTC
Created attachment 127720 [details] [review]
Bug 29500: Flatpickr - accept original date in the past and not others

Bug 29241 was supposed to fix this but it didn't properly.
We are accepting other dates in the past when we should only accept the
original one (the one from the DB) AND dates in future.

Test plan:
Retry test plan for 29241 and confirm that you cannot set manually another
date in the past.
Comment 3 Owen Leonard 2021-11-18 15:02:28 UTC
Created attachment 127803 [details] [review]
Bug 29500: Flatpickr - accept original date in the past and not others

Bug 29241 was supposed to fix this but it didn't properly.
We are accepting other dates in the past when we should only accept the
original one (the one from the DB) AND dates in future.

Test plan:
Retry test plan for 29241 and confirm that you cannot set manually another
date in the past.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Martin Renvoize 2021-11-22 10:23:31 UTC
Created attachment 127919 [details] [review]
Bug 29500: Flatpickr - accept original date in the past and not others

Bug 29241 was supposed to fix this but it didn't properly.
We are accepting other dates in the past when we should only accept the
original one (the one from the DB) AND dates in future.

Test plan:
Retry test plan for 29241 and confirm that you cannot set manually another
date in the past.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2021-11-22 10:24:13 UTC
This works as expected.. at some point I'd love to see us do more JS testing, but I don't think we should hold this up.

Passing QA
Comment 6 Jonathan Druart 2021-11-22 11:15:08 UTC
Pushed to master for 21.11, thanks to everybody involved!