Bug 21981

Summary: Specify due date, remember for session and alert
Product: Koha Reporter: Marjorie Barry-Vila <marjorie.barry-vila>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, hannah.co, jonathan.druart, kyle.m.hall, lucas, patrick.robitaille
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21093
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marjorie Barry-Vila 2018-12-10 16:32:08 UTC
Hi,

Due date is remaining after a yellow alert with question

Test plan in 18.05:

- Set the specify due date option to a date, check the checkbox Remember for session
- Check out an item
- Change patron
- Uncheck checkbox and clear the specified date
- Check out another item
- a yellow alert displayed to confirm checkout
- Verify that the date is back

Regards
Marjorie
Comment 1 Jonathan Druart 2018-12-11 14:48:28 UTC
Confirmed on master.

Also the date is not correctly formatted when "remember for session" is set (always displayed as YYYY-MM-DD HH:MM).

It will be hard to fix it without being sure it will not introduce regressions, a whole rewrite covered by selenium tests is, in my opinion, the only way to fix issues related to "sticky due date" & friends.
Comment 2 Jonathan Druart 2018-12-11 15:17:33 UTC
(In reply to Jonathan Druart from comment #1)
> Confirmed on master.
> 
> Also the date is not correctly formatted when "remember for session" is set
> (always displayed as YYYY-MM-DD HH:MM).

This problem may be fixed with:
modified: koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@ circulation.tt:237 @
     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
     [% IF ( INVALID_DATE ) %]
     <p>
-    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec | html %]" />
+    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates %]" />
Comment 3 Jonathan Druart 2018-12-11 15:19:08 UTC
And to fix the issue from comment 0 we certainly need to pass yet another value to tell the script stickyduedate must be reset.

So far we are doing:

my $stickyduedate  = $query->param('stickyduedate') || $session->param('stickyduedate');

which means we cannot tell "stickyduedate" must be turned off
Comment 4 Katrin Fischer 2018-12-11 16:09:14 UTC
There is another bug where the checkbox gets checked without being checked, might go in the same direction:
Bug 21093 - Problem when using specify due date with fast add
Comment 5 Lucas Gass (lukeg) 2022-06-15 21:32:27 UTC
This is still valid and a big blocker for some libraries. Is there any way to get this moving again without a entire rewrite of  "sticky due date" & friends ?
Comment 6 Patrick Robitaille 2024-04-26 17:59:48 UTC
+1