Bug 8231

Summary: Warning on Check in if borrower is restricted
Product: Koha Reporter: Adrien SAURAT <adrien.saurat>
Component: CirculationAssignee: Koha Team University Lyon 3 <koha>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: cedric.vita, chris, gmcharlt, jean-manuel.broust, jonathan.druart, katrin.fischer, koha, kyle.m.hall, mtj, sandboxes
Version: Main   
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:
Bug Depends on:    
Bug Blocks: 13242    
Attachments: proposed patch #1
Bug 8231 : Follow to fix date formatting
[SIGNED-OFF] Bug 8231: reminder when checking in for a restricted patron
Bug 8231 : Follow to fix date formatting
Bug8231 Systematic warning at check in if borrower is restricted
Bug 8231 Systematic warning at check in if borrower is restricted
Bug 8231 Systematic warning at check in if borrower is restricted
Bug 8231 Systematic warning at check in if borrower is restricted
[SIGNED-OFF] Bug 8231 Systematic warning at check in if borrower is restricted
Bug 8231 Systematic warning at check in if borrower is restricted
Bug 8231 Systematic warning at check in when borrower is debarred
Bug 8231 Systematic warning at check in if borrower is restricted
Bug 8231 Systematic warning at check in if borrower is restricted
Bug 8231 Systematic warning at check in if borrower is restricted

Description Adrien SAURAT 2012-06-11 13:30:51 UTC
Enhancement: when checking in for a restricted patron, display of a warning telling about this status.
Comment 1 Adrien SAURAT 2012-06-11 13:49:11 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2012-07-01 02:21:04 UTC
Patch applies ok, but uses format_date instead of using the KohaDates plugin.

Signing off but adding a follow to fix the date formatting.

Follow up still needs signoff
Comment 3 Chris Cormack 2012-07-01 02:36:45 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2012-07-01 02:37:54 UTC Comment hidden (obsolete)
Comment 5 Chris Cormack 2012-07-01 02:38:02 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2012-07-20 18:47:02 UTC
Why are there two different ways of handling restrictions? I see references to "Debarred" and "PrevDebarred." Are these for different cases? Under what circumstances is the "Debarred" message displayed? If they cannot be consolidated the new message should use the same format as the other one, naming and linking to the patron record. The message should also differentiate between a basic restriction (no specific date) and restricted until. In the former case the staff client should not say "restricted until 12/31/9999."
Comment 7 Jared Camins-Esakov 2013-01-02 02:43:04 UTC
Adrien, could you please address Owen's questions?
Comment 8 Koha Team University Lyon 3 2013-02-14 18:05:44 UTC Comment hidden (obsolete)
Comment 9 Koha Team University Lyon 3 2013-02-15 09:32:42 UTC
Well, I put my proper patch in discussion because there is a big error (sigh...) in it.
Comment 10 Koha Team University Lyon 3 2013-03-18 15:18:50 UTC Comment hidden (obsolete)
Comment 11 Owen Leonard 2013-03-19 19:39:25 UTC
Seems to work as it should, except for one thing: The warning about the patron being restricted is in a box with the heading "Cannot check in." This implies the check-in did not complete successfully, which isn't true.

I'm not sure how to word the restriction warning better. My only alternative suggestion is "Patron is still restricted until 04/03/2013"
Comment 12 Koha Team University Lyon 3 2013-03-20 09:17:27 UTC
The warning problem you mentionned is preexisting. I have opened a new bogue for it (bug 9860)
Comment 13 Koha Team University Lyon 3 2013-04-08 09:08:25 UTC Comment hidden (obsolete)
Comment 14 Koha Team University Lyon 3 2013-05-10 15:56:55 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2013-05-23 12:03:07 UTC
This patch needs a SO.
Comment 16 cedric.vita 2013-06-06 08:14:31 UTC
Hello,

I would like to test the patch but after the first test I have no messages displayed. Compared to the test plan, it is there to add information.

thank you
Comment 17 Koha Team University Lyon 3 2013-06-07 10:30:15 UTC
?! I redid tests and it's ok for me. I have first the 'is now debarred until' message and then the 'Reminder: Patron was earlier restricted until' message for the following checkin with shorter late.

Are you sure of your test ?

Olivier Crouzet
Comment 18 cedric.vita 2013-06-13 08:22:38 UTC
When testing on a sandbox, I have no message when check in. Items is late with different passed duedate, a patron is debarred,  but no message. There he has a preference system to activate ? Notifications are active for check out and check in.

Thank you for your information
Comment 19 Koha Team University Lyon 3 2013-06-13 08:33:21 UTC
Bonjour Cédric,
No there's no syspref to activate nor updatedatabase to do, but I repeat it works on our test instance. Anyhow you should have at least the already existing message 'is now debarred until'. Do you have this one without the patch ?

Olivier
Comment 20 Owen Leonard 2013-08-23 14:04:25 UTC Comment hidden (obsolete)
Comment 21 Jonathan Druart 2013-09-13 11:49:53 UTC Comment hidden (obsolete)
Comment 22 Galen Charlton 2013-10-31 05:40:15 UTC
This patch no longer applies.  This is more than just a merge conflict; the change in the restriction introduced for bug 2720 should be taken into account.
Comment 23 Koha Team University Lyon 3 2013-11-12 15:00:20 UTC Comment hidden (obsolete)
Comment 24 jmbroust 2013-12-20 05:53:11 UTC
Hello
Tested on sandbox biblibre 1. It works ! Maybe you had forgotten to tell in your testplan that u need to have suspension in days set in your issuing rules for this feature to work. Thanks.
Comment 25 Jonathan Druart 2013-12-23 11:24:14 UTC
(In reply to Koha Team Lyon 3 from comment #23)
> Created attachment 22883 [details] [review] [review]
> Bug 8231 Systematic warning at check in when borrower is debarred
> 
> Patch redone taking into account changes introduced by bug 2720.

Olivier, Your last past does not include the DateTime->compare test, is it intended?
Comment 26 Katrin Fischer 2014-01-12 13:43:36 UTC
Team Lyon, there is an open question from Jonathan in comment 25 - could you please take a look? :)
Comment 27 Koha Team University Lyon 3 2014-01-13 11:20:54 UTC Comment hidden (obsolete)
Comment 28 Jonathan Druart 2014-01-13 14:22:41 UTC
Hi Olivier,
The last patch has not been signed off, I switch the status back accordingly.
Comment 29 Biblibre Sandboxes 2014-01-13 17:53:48 UTC
Patch tested with a sandbox, by JMBroust <jean-manuel.broust@univ-lyon2.fr>
Comment 30 Biblibre Sandboxes 2014-01-13 17:54:11 UTC Comment hidden (obsolete)
Comment 31 Jonathan Druart 2014-01-14 10:10:54 UTC
It works as before the rebase, no regression found.
Marked as Passed QA.
Comment 32 Jonathan Druart 2014-01-14 10:11:13 UTC
Created attachment 24273 [details] [review]
Bug 8231 Systematic warning at check in if borrower is restricted

Display, at check in, a reminder of an already existing suspension date
even if the returned document is not late

Test plan :
1) Apply the patch
2) Go to a borrower checkout page and checkout some documents with
different passed duedate using "Specify due date" function. Checkout out
one with the default duedate.
3) Check in the document with the bigger delay :
You will get the message : 'X is now restricted until ...'
4) Check in one of the document with a smaller delay :
You 'll get a different message : 'Reminder : Patron was earlier
restricted untill...'.
5) Check in the document which is not late :
You 'll get the same message as the previous one

Signed-off-by: JMBroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 33 Galen Charlton 2014-05-05 00:41:59 UTC
Pushed to master.  Thanks, Olivier!