[Bug 39267] New: Specified due date remains for checkouts even when removing unchecking remember for session
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 Bug ID: 39267 Summary: Specified due date remains for checkouts even when removing unchecking remember for session Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: glasklas@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When checking out an item for a borrower, choosing a specific due date and checking the "remember for session". If another checkout is done, removing the date and unchecking "remember for session", after the checkout has been performed, the previously set due date is still there. It's difficult to see how the correct behaviour shouldn't be that the date is cleared from the session as well. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |glasklas@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 --- Comment #1 from David Gustafsson <glasklas@gmail.com> --- Have a patch but realized needs some more work, there are some unclear dependencies between how templates params are set from cgi and session params that needs to be straightened out. More or less got it to work but believe it's still very hard to follow and ensure correctness. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxeinergl@gcc.edu --- Comment #2 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- We would also like to see this setting be less sticky. One almost has to log out/log back in to clear that manual due date once it's been remembered. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 --- Comment #3 from David Gustafsson <glasklas@gmail.com> --- Created attachment 179088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179088&action=edit Bug 39267: Specified due date remains for checkouts even when removing unchecking remember for session To test: 1) Checkout an item for a patron, specify a due date and check remember for session. 2) Remove the due date, uncheck remember for session and checkout another item. 3) The previously specified due date is filled in again, while remember for session remains unchecked. 4) Apply patch 5) Repeat the steps above, in step 3) due date should now remain empty. Sponsored-by: Gothenburg University Libarary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179088|0 |1 is obsolete| | --- Comment #4 from David Gustafsson <glasklas@gmail.com> --- Created attachment 179089 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179089&action=edit Bug 39267: Specified due date remains for checkouts even when removing unchecking remember for session To test: 1) Checkout an item for a patron, specify a due date and check remember for session. 2) Remove the due date, uncheck remember for session and checkout another item. 3) The previously specified due date is filled in again, while remember for session remains unchecked. 4) Apply patch 5) Repeat the steps above, in step 3) due date should now remain empty. Sponsored-by: Gothenburg University Libarary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #5 from David Gustafsson <glasklas@gmail.com> --- In the first patch I moved the block where the stickyduedate session value is set if stickyduedate param or $restoreduedatespec is set (around line 737, at "# Restore adate if changed by holds and/or save stickyduedate to session) further up where the related template variable are set for clarity when reading the code. The only variable affected by this change is $duedatespec which is validated on line 217, and that validation should not fail if doesn't come from user input. So thought perhaps better to leave that block where it is for a more minimal patch and less risk of introducing new behavior. The reason for the current behavior is that even if $duedatespec is set to an empty string if the stickyduedate param is not present, it will still be reassigned the previous date in the block mentioned above, as $restoredduedate is assigned as: my $restoreduedatespec = $query->param('restoreduedatespec') || $duedatespec || $session->param('stickyduedate'); Before the session is cleared. I don't see how this makes any sense and as far as I is not correct. I originally felt the urge to try to clean up all the different assignments in a way that is easier to follow, but the current code relies on a lot of very subltle and opaque consequences of how these assignments are currently made and to do this without unintended consequences just to fix this isolated issue seems way out of scope for the current patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 --- Comment #6 from David Gustafsson <glasklas@gmail.com> --- To clarify, in the assignment above $session->param('stickyduedate') will have the value the previous due date. Clearing the session before this is made seems to resolve the issue, and have not been able to find any unintended consequences of doing so even if it's hard to be completely sure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Automatic patch test results: â ï¸ The patch applies with fuzzy option (ignoring whitespace). This may indicate minor conflicts that need to be resolved. Details: Patch applies with fuzzy option (ignoring whitespace) This is an automated message from the patch testing system. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #8 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- This patch didn't work for me; the behavior was unfortunately the same before and after applying. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #9 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- Correcting that. I missed an important restart. This works for me and I did not notice any other side effects. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39267 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179089|0 |1 is obsolete| | --- Comment #10 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 194552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194552&action=edit Bug 39267: Specified due date remains for checkouts even when removing unchecking remember for session To test: 1) Checkout an item for a patron, specify a due date and check remember for session. 2) Remove the due date, uncheck remember for session and checkout another item. 3) The previously specified due date is filled in again, while remember for session remains unchecked. 4) Apply patch 5) Repeat the steps above, in step 3) due date should now remain empty. Sponsored-by: Gothenburg University Libarary Signed-off-by: Gretchen <maxeinergl@gcc.edu> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org