Bug 17171

Summary: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Product: Koha Reporter: Nick Clemens <nick>
Component: CirculationAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: ByWaterSandboxes, cbrannon, david, gmcharlt, jonathan.druart, josef.moravec, katrin.fischer, kyle.m.hall, kyle, martin.renvoize, nick, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Some libraries don't want to force librarians to manually confirm each checkout when an item is checked out to another patron. Instead, they would prefer to be alerted afterwards. This enhancement allows this behavior using a new system preference "AutoReturnCheckedOutItems".
Version(s) released in:
19.05.00
Attachments: Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Bug 17171: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Bug 17171 [QA Followup]: Add message to batch checkout template
Bug 17171: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Bug 17171: (QA Followup) Add message to batch checkout template
Bug 17171: (QA Follow up) Using patron-title.inc for names
Bug 17171: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation
Bug 17171: (QA follow-up) Add message to batch checkout template
Bug 17171: (QA follow-up) Using patron-title.inc for names
Bug 17171: (QA follow-up) Remove cardnumber template variable

Description Nick Clemens 2016-08-23 15:58:20 UTC
Work to be done:
1) Add new system preference AutoReturnCheckedOutItemForNewCheckout ( or something more terse )
2) Add new system preference AutoReturnCheckedOutItemForNewCheckoutForgiveFine
3) Modify circulation.pl to accept these new parameters and report what happened (yellow box) instead of prompting for confirmation
Comment 1 Katrin Fischer 2016-08-23 21:01:57 UTC
AutoReturnCheckedOutItemForNewCheckoutForgiveFine

It looks a bit like all the Koha buzz words in one word :) Could we find something a bit shorter?
Comment 2 Kyle M Hall 2017-06-13 14:28:38 UTC
Created attachment 64260 [details] [review]
Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation

Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!
Comment 3 Christopher Brannon 2017-08-11 18:08:34 UTC
Patch does not apply.
Comment 4 Kyle M Hall 2017-08-11 18:25:19 UTC
Created attachment 65924 [details] [review]
Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation

Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!
Comment 5 Christopher Brannon 2017-08-11 18:53:38 UTC
The syspref worked when set to Don't.  That was the only confusion in the test plan.  Otherwise, works as expected!
Comment 6 ByWaterSandboxes 2017-08-11 18:55:18 UTC
Patch tested with a sandbox, by Christopher Brannon <cbrannon@cdalibrary.org>
Comment 7 ByWaterSandboxes 2017-08-11 18:55:34 UTC
Created attachment 65925 [details] [review]
Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation

Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>
Comment 8 Josef Moravec 2017-12-03 22:44:52 UTC
The file cash_register_stats.tt is edited probably by accident - it should be removed from this patch.
Comment 9 Nick Clemens 2018-01-19 17:23:29 UTC
Created attachment 70766 [details] [review]
Bug 17171 - Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation

Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>
Comment 10 Nick Clemens 2018-01-19 17:24:17 UTC
(In reply to Josef Moravec from comment #8)
> The file cash_register_stats.tt is edited probably by accident - it should
> be removed from this patch.

Removed and rebased
Comment 11 Katrin Fischer 2018-03-25 19:33:02 UTC
Created attachment 73258 [details] [review]
Bug 17171: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation

Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2018-03-25 19:33:31 UTC
Had to fix the alphabetic order in sysprefs.sql, but no other complaints ;)
Comment 13 Jonathan Druart 2018-03-26 18:58:19 UTC
1. It sounds like we should also modify circulation_batch_checkouts.tt

2. Are you sure we want this to apply to SIP and self-checkout?
Comment 14 Kyle M Hall 2018-03-27 14:11:45 UTC
Created attachment 73315 [details] [review]
Bug 17171 [QA Followup]: Add message to batch checkout template
Comment 15 Kyle M Hall 2018-03-27 14:13:20 UTC
(In reply to Jonathan Druart from comment #13)
> 1. It sounds like we should also modify circulation_batch_checkouts.tt

Follow-up submitted!

> 2. Are you sure we want this to apply to SIP and self-checkout?

Yes, the logic behind this is: if the patron is holding the book, they can check it out.
Comment 16 Jonathan Druart 2018-03-27 18:00:30 UTC
(In reply to Kyle M Hall from comment #15)
> (In reply to Jonathan Druart from comment #13)
> > 1. It sounds like we should also modify circulation_batch_checkouts.tt
> 
> Follow-up submitted!

Thanks

> > 2. Are you sure we want this to apply to SIP and self-checkout?
> 
> Yes, the logic behind this is: if the patron is holding the book, they can
> check it out.

Should not we make it explicit in the syspref's description in that case?
Comment 17 Jonathan Druart 2018-03-28 19:44:43 UTC
(In reply to Kyle M Hall from comment #14)
> Created attachment 73315 [details] [review] [review]
> Bug 17171 [QA Followup]: Add message to batch checkout template

Use patron-title.inc instead.
Comment 18 Jonathan Druart 2018-03-28 19:45:04 UTC
(In reply to Jonathan Druart from comment #17)
> (In reply to Kyle M Hall from comment #14)
> > Created attachment 73315 [details] [review] [review] [review]
> > Bug 17171 [QA Followup]: Add message to batch checkout template
> 
> Use patron-title.inc instead.

in circulation.tt as well.
Comment 19 Liz Rea 2019-04-01 19:42:46 UTC
Created attachment 87302 [details] [review]
Bug 17171: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation

Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 20 Liz Rea 2019-04-01 19:42:49 UTC
Created attachment 87303 [details] [review]
Bug 17171: (QA Followup) Add message to batch checkout template

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 21 Liz Rea 2019-04-01 19:42:52 UTC
Created attachment 87304 [details] [review]
Bug 17171: (QA Follow up) Using patron-title.inc for names

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 22 Liz Rea 2019-04-01 19:43:51 UTC
Just noting that I resolved a small conflict in the tests (they still pass) and added a follow up to address Jonathan's use patron-title.inc request.
Comment 23 Katrin Fischer 2019-04-10 22:55:04 UTC
Created attachment 87742 [details] [review]
Bug 17171: Add a syspref to allow currently issued items to be issued to a new patron without staff confirmation

Some libraries don't want to force the librarians to manually confirm
each checkout when the item is checked out to another. Instead, they
would prefer to be alerted after the fact.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable the new syspref AutoReturnCheckedOutItems
4) Check an item out to a patron
5) Check the same item out to another patron
6) Note you are not prompted to confirm the checkout,
   but are instead alerted that is had been checked out to another patron!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 24 Katrin Fischer 2019-04-10 22:55:09 UTC
Created attachment 87743 [details] [review]
Bug 17171: (QA follow-up) Add message to batch checkout template

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 25 Katrin Fischer 2019-04-10 22:55:13 UTC
Created attachment 87744 [details] [review]
Bug 17171: (QA follow-up) Using patron-title.inc for names

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 26 Katrin Fischer 2019-04-10 22:55:17 UTC
Created attachment 87745 [details] [review]
Bug 17171: (QA follow-up) Remove cardnumber template variable

The INCLUDE already takes care of displaying the cardnumber, the
extra variable is not needed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 27 Katrin Fischer 2019-04-10 22:55:40 UTC
Fixed commit messages, please spell: (QA follow-up) (or QA tool will complain) :)
Comment 28 Nick Clemens 2019-04-17 12:26:31 UTC
Awesome work all!

Pushed to master for 19.05
Comment 29 Martin Renvoize 2019-04-26 13:23:50 UTC
Enhancement will not be backported to 18.11.x series.
Comment 30 David Nind 2019-05-29 18:51:56 UTC
This is bugs is shown as sponsored, but who sponsored it is not shown.