Bug 22457

Summary: OpacHiddenItemsExceptions should be moved to a category attribute
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, josef.moravec, kyle, martin.renvoize, mtompset
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 22694    
Bug Blocks:    

Description Tomás Cohen Arazi (tcohen) 2019-03-05 14:18:12 UTC
In order to determine if an item should be hidden for a specific patron category, we now need to:
- Read and parse OpacHiddenItemsExceptions
- Verify it is a real category (subject to typos)
- Compare to the current patron category

This would be avoided by just having an attribute on the categories table (e.g. overrides_hidding_policy). I leave choosing the right attribute name to native speakers.
Comment 1 Katrin Fischer 2019-04-04 07:16:09 UTC
+1
Comment 2 Martin Renvoize (ashimema) 2019-04-11 07:12:20 UTC
+1, great idea.
Comment 3 Tomás Cohen Arazi (tcohen) 2019-04-11 11:04:35 UTC
Given the amount of places in which lots of code will need to be refactored (for good), I will file a series of bugs of which this will be the last one, and involve specifically the removal of the syspref and the use of the new attribute.
Comment 4 Mark Tompsett 2019-06-11 04:25:38 UTC
This is a global override, this is not the branch-based override as envisioned in bug 10589. So, perhaps both overrides, outright and partial based on matching item homebranch and patron branch, should be fields in the patron category table.
Comment 5 Tomás Cohen Arazi (tcohen) 2020-12-21 20:14:12 UTC
Thinking about this in the context of bug bug 10589: this is a clear use case for bug 26129.

- This bug tries to implement a flag on Koha::Patron::Categories.
- Bug 10589 pretends to make that flag per-category.

This could just be a per-branch configuration for each category, or a global value. This is all covered by bug 26129.

This bug and 10589 would just be choosing the right 'keyword' for the configuration entry, and adding the UI (on the categories?) and then using the methods to retrieve the configuration based on the parameters.
Comment 6 Katrin Fischer 2023-09-23 22:58:26 UTC
I am not sure if this is still valid now that we have the nice multi-select on the system preference. A con is that as a pref the OpacHidden* related features can appear in one spot. A contra could be that you need to remember to set this up if a new patron category is added.