Summary: | Move authorised values related code into Koha::AuthorisedValues - part 2 | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | veron |
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: | 10363, 15797, 15800, 15803, 17216, 17248, 17249, 17250, 17251, 17252, 17253, 17844, 17847 | ||
Bug Blocks: | 15779, 17642 |
Description
Jonathan Druart
2016-02-11 14:09:06 UTC
GetKohaImageurlFromAuthorisedValues is removed by bug 15797 Bug 15803 - Koha::AuthorisedValues - Remove GetAuthorisedValueCategories We have already started to move the authorised values related code to the Koha namespace, but some are still missing. To continue and move C4::Koha::*AuthorisedValues* subroutines to Koha::AuthorisedValues, we will need to join on marc_subfield_structure(.authorised_value which is actually an authorised value category). To do so we need to define a relationship (fk) between the two tables. But we have "special AV" like Asort1 (and friends) , LOST, DAMAGED, etc.) Which could not be in the authorised_values table [yet]. And 3 other "special special AV) like itemtypes, branches and cn_source. Others (undetermined so far) are linked to a marc_subfield_structure from installer/**/marcflavour/**/*framework*.sql, like STACK. My idea would be to move all the AV categories to a new table authorised_value_categories. It will contain only 1 column category_name refered by 1. authorised_values.category, 2. additional_fields.authorised_value_category (others authorised_value field should be renamed like that when they refer AV categories) and 3. iitems_search_fields.authorised_value_category. And, maybe later, auth_subfield_structure, auth_tag_structure, borrower_attribute_types, marc_tag_structure (some are varchar(10) et 20 when they should be 32!) We could imagine more attributes to this table, but don't ask me to add a authorised_value_categories.id as pk please :) We will have to use temporary tables to deal with the DB constraints, to add more fun. Finally the .sql will have to be updated to reflect these changes. I have just started but before to enter in this tunnel I'd like to know if there are a couple of volunteers to test? :) (In reply to Jonathan Druart from comment #4) New table created on bug 17216 - Add a new table to store authorized value categories. Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib Bug 17249 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValuesFromField Bug 17250 - Koha::AuthorisedValues - Remove GetAuthValCode Bug 17251 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValuesMapping Bug 17252 - Koha::AuthorisedValues - Remove GetAuthorisedValueByCode Bug 17253 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValues Bug 17844 - Move C4::Koha::get_notforloan_label_of to Koha::AuthorisedValues Bug 17847 - Move C4::Koha::GetAuthvalueDropbox to Koha::AuthorisedValues All dependent bugs have been closed - yay! |