[Koha-bugs] [Bug 15799] Move authorised values related code into Koha:: AuthorisedValues - part 2

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 11 14:08:53 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15799

--- Comment #4 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
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? :)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list