Bug 26370 - Add ability to disable demagnetizing items via SIP2 based on patron categories
Summary: Add ability to disable demagnetizing items via SIP2 based on patron categories
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 31296
  Show dependency treegraph
 
Reported: 2020-09-03 14:38 UTC by Kyle M Hall (khall)
Modified: 2023-06-08 22:26 UTC (History)
3 users (show)

See Also:
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
Circulation function:


Attachments
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories (2.25 KB, patch)
2020-09-03 14:42 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories (8.68 KB, patch)
2021-05-11 11:52 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories (8.73 KB, patch)
2022-04-11 09:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26370: (QA follow-up) Add new option to templates (1.76 KB, patch)
2022-04-11 09:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories (3.94 KB, patch)
2022-04-11 10:38 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories (8.73 KB, patch)
2022-04-12 09:38 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories (4.00 KB, patch)
2022-04-12 09:38 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26370: (QA follow-up) Add new option to templates (1.78 KB, patch)
2022-04-12 09:38 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2020-09-03 14:38:38 UTC

    
Comment 1 Kyle M Hall (khall) 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 (khall) 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 (khall) 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 (ashimema) 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 (ashimema) 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 (ashimema) 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 (ashimema) 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 (khall) 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 (ashimema) 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 (ashimema) 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 (ashimema) 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 (ashimema) 2022-04-12 09:39:36 UTC
This all works as designed and doesn't cause any regressions.

Passing QA
Comment 13 Martin Renvoize (ashimema) 2022-04-12 09:44:23 UTC
I've documented to new config option on the wiki now too :)
Comment 14 Kyle M Hall (khall) 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 ﷐[U+1F984]﷑