Bug 21981 - Specify due date, remember for session and alert
Summary: Specify due date, remember for session and alert
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-10 16:32 UTC by Marjorie Barry-Vila
Modified: 2023-01-19 23:22 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:


Attachments

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