Bug 21093

Summary: Specified due date incorrectly retained when using fast add
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Lucas Gass <lucas>
Status: CLOSED FIXED QA Contact: Joonas Kylmälä <joonas.kylmala>
Severity: normal    
Priority: P5 - low CC: andrewfh, barton, fridolin.somers, gmcharlt, joonas.kylmala, kyle.m.hall, kyle, lucas, marjorie.barry-vila, tomascohen, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21981
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.11
Attachments: Bug 21093: In additem.pl set the right stickyduedate for fast add
Bug 21093: In additem.pl set the right stickyduedate for fast add
Bug 21093: In additem.pl set the right stickyduedate for fast add

Description Katrin Fischer 2018-07-19 16:34:51 UTC
When using the specify due date option and then created a fast add, the checkbox "Remember for sesssion" gets automatically checked and even after unchecking it and using "Clean" the date keeps reappearing until you switch to another patron account.

To test:
- Set the specify due date option to a date, don't check the checkbox
- Enter an unknown barcode
- Click on fast add
- Add a record
- Add an item (don't change the barcode!)
- The item is checked out to the patron
- Verify: The checkbox is "Remember for session" is checked now
- Uncheck checkbox and clear the specified date
- Check out another item
- Verify that the date is back.

So there is 2 problems here:
- Checkbox should not check itself
- it shoudl be able to clear the date
Comment 1 Katrin Fischer 2018-07-19 16:35:09 UTC
Tested with 17.11.06, need to retest in master.
Comment 2 Katrin Fischer 2018-08-01 22:33:04 UTC
Almost the same issue on master, checkbox will be checked, but clearing it works better:

To test:
- Set the specify due date option to a date, don't check the checkbox
- Enter an unknown barcode
- Click on fast add
- Add a record
- Add an item (don't change the barcode!)
- The item is checked out to the patron
- Verify: The checkbox is "Remember for session" is checked now
Comment 3 Katrin Fischer 2018-12-11 16:13:17 UTC
*** Bug 12551 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Fuerste-Henry 2021-09-07 21:30:26 UTC
Still valid in master. I'm changing this from enhancement to bug, setting it to normal.
Comment 5 Lucas Gass 2021-09-07 22:36:41 UTC
In additem.pl when doing a fast add we always set the value for stickyduedate=1, instead we should pass it the actual value from $fa_stickyduedate.
Comment 6 Lucas Gass 2021-09-07 22:41:00 UTC
Created attachment 124634 [details] [review]
Bug 21093: In additem.pl set the right stickyduedate for fast add

To test:
-1 Set the specify due date option to a date, don't check the checkbox
-2 Enter an unknown barcode
-3 Click on fast add
-4 Add a record
-5 Add an item (don't change the barcode!)
-6 The item is checked out to the patron
-7 Verify: The checkbox is "Remember for session" is checked now
-8 APPLY patch
-9 Do steps 1-6 again, this time "Remember for session" should be unchecked
-10 Do steps 1-6 again but this time do check the "Remember for session" checkbox.
-11 It should be properly checked
Comment 7 Andrew Fuerste-Henry 2021-09-08 12:32:12 UTC
Created attachment 124653 [details] [review]
Bug 21093: In additem.pl set the right stickyduedate for fast add

To test:
-1 Set the specify due date option to a date, don't check the checkbox
-2 Enter an unknown barcode
-3 Click on fast add
-4 Add a record
-5 Add an item (don't change the barcode!)
-6 The item is checked out to the patron
-7 Verify: The checkbox is "Remember for session" is checked now
-8 APPLY patch
-9 Do steps 1-6 again, this time "Remember for session" should be unchecked
-10 Do steps 1-6 again but this time do check the "Remember for session" checkbox.
-11 It should be properly checked

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 8 Joonas Kylmälä 2021-09-12 13:13:50 UTC
Created attachment 124813 [details] [review]
Bug 21093: In additem.pl set the right stickyduedate for fast add

To test:
-1 Set the specify due date option to a date, don't check the checkbox
-2 Enter an unknown barcode
-3 Click on fast add
-4 Add a record
-5 Add an item (don't change the barcode!)
-6 The item is checked out to the patron
-7 Verify: The checkbox is "Remember for session" is checked now
-8 APPLY patch
-9 Do steps 1-6 again, this time "Remember for session" should be unchecked
-10 Do steps 1-6 again but this time do check the "Remember for session" checkbox.
-11 It should be properly checked

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 9 Jonathan Druart 2021-09-20 12:47:01 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 10 Kyle M Hall 2021-10-01 18:07:15 UTC
Pushed to 21.05.x for 21.05.05
Comment 11 Fridolin Somers 2021-10-06 20:17:55 UTC
Pushed to 20.11.x for 20.11.11
Comment 12 Victor Grousset/tuxayo 2021-10-16 02:20:38 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.