Bug 26591 - Add a choice to prevent the checkout or warn the user at the selfcheckout system if we use CheckPrevCheckout
Summary: Add a choice to prevent the checkout or warn the user at the selfcheckout sys...
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matthias Meusburger
QA Contact: Testopia
URL:
Keywords:
Depends on: 19457
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-01 09:03 UTC by Koha Team University Lyon 3
Modified: 2020-11-04 13:30 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 26591: SIP option prevcheckout_block_checkout to block checkout of previously checked-out documents (8.35 KB, patch)
2020-11-04 08:24 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 26591: SIP option prevcheckout_block_checkout to block checkout of previously checked-out documents (8.41 KB, patch)
2020-11-04 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 26591: SIP option prevcheckout_block_checkout to block checkout of previously checked-out documents (8.96 KB, patch)
2020-11-04 13:30 UTC, Matthias Meusburger
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team University Lyon 3 2020-10-01 09:03:03 UTC
Since BZ19457, the checkout is allowed at the selfcheckout system if if we use the system preference CheckPrevCheckout. It can be useful for some libraries but not for the others. For example, in my libray, we want to prevent users who are using the selfcheckout system to checkout an item they have just check-in. They didn't really matter the warning and they can keep a book for all the time. For some title, there's a real pressure becaus they are recommanded by the teachers and we can't have one for all the students.
The behaviour should be configurable.
Comment 1 Matthias Meusburger 2020-11-04 08:24:13 UTC
Created attachment 112975 [details] [review]
Bug 26591: SIP option prevcheckout_block_checkout to block checkout of previously checked-out documents

This patchs adds a new SIP option to block checkout of previously
checked-out documents: prevcheckout_block_checkout

See the CheckPrevCheckout system preference to enable previously
checked-out verification in Koha.

Test plan:
  1) Apply this patch
  2) Prove t/db_dependent/SIP/Message.t
Comment 2 Kyle M Hall 2020-11-04 12:06:42 UTC
Created attachment 112986 [details] [review]
Bug 26591: SIP option prevcheckout_block_checkout to block checkout of previously checked-out documents

This patchs adds a new SIP option to block checkout of previously
checked-out documents: prevcheckout_block_checkout

See the CheckPrevCheckout system preference to enable previously
checked-out verification in Koha.

Test plan:
  1) Apply this patch
  2) Prove t/db_dependent/SIP/Message.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Jonathan Druart 2020-11-04 12:11:27 UTC
Matthias, please provide a complete test plan. Prove is not enough here.
Comment 4 Matthias Meusburger 2020-11-04 13:29:27 UTC
Sure thing!
Comment 5 Matthias Meusburger 2020-11-04 13:30:23 UTC
Created attachment 112991 [details] [review]
Bug 26591: SIP option prevcheckout_block_checkout to block checkout of previously checked-out documents

This patchs adds a new SIP option to block checkout of previously
checked-out documents: prevcheckout_block_checkout

See the CheckPrevCheckout system preference to enable previously
checked-out verification in Koha.

Test plan:
  1) Apply this patch
  2) Enable the CheckPrevCheckout syspref (on "Do" for instance)
  3) Enable prevcheckout_block_checkout in the SIP server config file
  4) Checkout and checkin an item for a user
  5) Checkout the item again with the SIP CLI tool
  6) Check that the SIP message is "This item was previously checked out by you"
     and that the item was not checked out
  7) Disable prevcheckout_block_checkout in the SIP server config file
  8) Checkout the item again with the SIP CLI tool
  9) Check that the SIP message is "This item was previously checked out by you"
     and that the item was checked out.
 10) Prove t/db_dependent/SIP/Message.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>