Bug 26370

Summary: Add ability to disable demagnetizing items via SIP2 based on patron categories
Product: Koha Reporter: Kyle M Hall <kyle>
Component: SIP2Assignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: colin.campbell, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This patch adds a new option to the SIP config, `inhouse_patron_categories`. Adding a comma-separated list of patron category codes to this option will cause the SIP checkout to never send the 'demagnetize' command to the checkout preventing said users from removing the items from the library.
Version(s) released in:
22.05.00
Bug Depends on:    
Bug Blocks: 31296    
Attachments: Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories
Bug 26370: (QA follow-up) Add new option to templates
Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories
Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories
Bug 26370: (QA follow-up) Add new option to templates

Description Kyle M Hall 2020-09-03 14:38:38 UTC

    
Comment 1 Kyle M Hall 2020-09-03 14:41:29 UTC
Some libraries have certain patron categories that can only do in house checkouts via SIP self check machines. In these cases, the items should not be demagnetized since the items cannot leave the library.
Comment 2 Kyle M Hall 2020-09-03 14:42:05 UTC
Created attachment 109630 [details] [review]
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories

Some libraries have certain patron categories that can only do in house checkouts via SIP self check machines.
In these cases, the items should not be demagnetized since the items cannot leave the library.
Comment 3 Kyle M Hall 2021-05-11 11:52:30 UTC
Created attachment 120834 [details] [review]
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories

Some libraries have certain patron categories that can only do in house checkouts via SIP self check machines.
In these cases, the items should not be demagnetized since the items cannot leave the library.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t
Comment 4 Martin Renvoize 2022-04-11 09:52:40 UTC
Created attachment 133144 [details] [review]
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories

Some libraries have certain patron categories that can only do in house checkouts via SIP self check machines.
In these cases, the items should not be demagnetized since the items cannot leave the library.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2022-04-11 09:52:44 UTC
Created attachment 133145 [details] [review]
Bug 26370: (QA follow-up) Add new option to templates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2022-04-11 09:54:31 UTC
This works well.. I've added a follow-up to add the new option to the templates.

We still need to also document it on https://wiki.koha-community.org/wiki/SIP2_configuration#accounts.

However, I'm not sure about the option name... it's a little opaque. `never_demagnetize`.. I think we should update it to something clearer.. perhaps `inhouse_patron_categories` or something along those lines?
Comment 7 Martin Renvoize 2022-04-11 09:54:50 UTC
Lets agree on a name and then we can PQA this.. it's a trivial piece of code.
Comment 8 Kyle M Hall 2022-04-11 10:38:30 UTC
Created attachment 133146 [details] [review]
Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories
Comment 9 Martin Renvoize 2022-04-12 09:38:34 UTC
Created attachment 133206 [details] [review]
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories

Some libraries have certain patron categories that can only do in house checkouts via SIP self check machines.
In these cases, the items should not be demagnetized since the items cannot leave the library.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2022-04-12 09:38:38 UTC
Created attachment 133207 [details] [review]
Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2022-04-12 09:38:42 UTC
Created attachment 133208 [details] [review]
Bug 26370: (QA follow-up) Add new option to templates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2022-04-12 09:39:36 UTC
This all works as designed and doesn't cause any regressions.

Passing QA
Comment 13 Martin Renvoize 2022-04-12 09:44:23 UTC
I've documented to new config option on the wiki now too :)
Comment 14 Kyle M Hall 2022-04-12 10:19:41 UTC
(In reply to Martin Renvoize from comment #13)
> I've documented to new config option on the wiki now too :)

Awesome! Thanks!
Comment 15 Fridolin Somers 2022-04-20 19:04:31 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄