[Koha-bugs] [Bug 23681] New: Patron restrictions should be user definable
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Sep 26 15:59:33 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23681
Bug ID: 23681
Summary: Patron restrictions should be user definable
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Patrons
Assignee: koha-bugs at lists.koha-community.org
Reporter: andrew.isherwood at ptfs-europe.com
QA Contact: testopia at bugs.koha-community.org
CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com
Currently the patron restrictions are hard coded as enums in
borrower_debarments.type, the available values are
'SUSPENSION','OVERDUES','MANUAL','DISCHARGE'.
We (PTFS Europe) have a customer requirement to:
- Provide a select box when adding a patron restriction containing user defined
values for restriction types, the user defined values should be defined as
authorised values
- Ensure a default value if no restriction type is selected
- Allow the name of the default value to be modifiable
- Ensure that if a restriction type authorised value is removed, any
restrictions that use it should revert to the default value
- Make the selection of restriction type optional via a syspref
Currently, at the DB level, the default value is 'MANUAL'.
The plan is to:
DB MIGRATION
------------
- Add authorised_value_categories row for 'PATRON_RESTRICTIONS'
- Add authorised_values.core, default value 0
- Implies AV cannot be deleted and authorised_values.authorised_value cannot
be changed
- Add new borrower_debarments.debarment_type column
- Select distinct values from borrower_debarments.type
- For each $value:
- Create AV rows:
- authorised_values.authorised_value = $value
- authorised_values.lib = $value
- authorised_values.core = 1
- ** Note id of each new row, associated with $value
- update borrower_debarments.debarment_type to be appropriate AV id
- Remove borrower_debarments.type
OTHER STUFF
-----------
- AV UI (and anything else that can bring about AV modification), should
respect "core"
- Modify Patron::Debarments appropriate functions to abstract underlying
changes i.e. we maintain backward compatibility with the way they currently
work, we just obfuscate the fact that the "type" comes from a different table
- Overload AuthorisedValue::delete to allow us to call optional functions after
delete - in a sane world this would be a trigger. This will allow us to set
appropriate patron_debarments.debarment_type rows to default value upon AV
deletion
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list