Bug 35067

Summary: Allow authorised value parent category so categories can be linked and shown together
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: CatalogingAssignee: Aleisha Amohia <aleisha>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: esther.melander, m.de.rooy, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 35067: [WIP]
Bug 35067: Add authorised_value_categories.parent column
Bug 35067: Schema updates
Bug 35067: Save a parent category for authorised value category
Bug 35067: Show parent authorised value options in biblio editor
Bug 35067: Add authorised_value_categories.parent column
Bug 35067: Schema updates
Bug 35067: Save a parent category for authorised value category
Bug 35067: Show parent authorised value options in biblio editor
Bug 35067: Add authorised_value_categories.parent column
Bug 35067: Schema updates
Bug 35067: Save a parent category for authorised value category
Bug 35067: Show parent authorised value options in biblio editor
Bug 35067: No parent category selected by default
Bug 35067: Fix for AV categories with no parent, and special AVs

Description Aleisha Amohia 2023-10-16 21:40:00 UTC
It would be useful to be able to set up a MARC framework subfield to use a plugin that would offer one or more authorised value categories that you could choose from.

For example:

041$a - we might want to populate this with international language codes, i.e afr, eng, mao, which would be stored in one authorised value category. we might want to populate this with Indigenous Australian language codes, which would be stored in their own authorised value category. We want both dropdowns to be options though we'd still only choose one language code.
Comment 1 Aleisha Amohia 2024-02-21 02:51:49 UTC
Created attachment 162312 [details] [review]
Bug 35067: [WIP]
Comment 2 Aleisha Amohia 2024-02-22 03:01:58 UTC
Created attachment 162326 [details] [review]
Bug 35067: Add authorised_value_categories.parent column
Comment 3 Aleisha Amohia 2024-02-22 03:02:00 UTC
Created attachment 162327 [details] [review]
Bug 35067: Schema updates
Comment 4 Aleisha Amohia 2024-02-22 03:02:03 UTC
Created attachment 162328 [details] [review]
Bug 35067: Save a parent category for authorised value category
Comment 5 Aleisha Amohia 2024-02-22 03:02:05 UTC
Created attachment 162329 [details] [review]
Bug 35067: Show parent authorised value options in biblio editor

This enhancement adds the option to link a parent authorised value category to a new authorised value category.
When the authorised value category is allocated to a biblio framework subfield, its values, plus it's parent's values, will show as possible options for that subfield in the cataloguing biblio editor.

To test:

1) Install database updates and restart services. You may also need to rebuild schema files to capture the change to the database.
2) Go to Koha Administration -> Authorised Values. Notice the table listing authorised values now has a 'Parent category' column.
3) Click the button to add a New category. Notice there is a 'Parent category' dropdown available to set, containing all of the existing authorised value categories. Give your new category a name (for eg, CHILD), and choose any parent category (perhaps LANG). Save.
4) Add a value or set of values to your new category CHILD.
5) Once saved, go back to the main Authorised Values page and confirm your new category CHILD is showing with the correct parent category in the 'Parent category' column.

6) Go to Koha Administration -> MARC bibliographic frameworks.
7) Click the Actions dropdown for the Default framework and click on MARC structure.
8) Search for a tag and click the Actions dropdown, then choose Edit subfields. For example if testing with the LANG authorised value category, choose the 041 tag and Edit its subfields.
9) Go to the 'a' subfield tab. Go down to 'Other options (choose one)' and assign your new category CHILD to the Authorised value setting. Save.

10) Go to Cataloguing and add a new record using the default framework.
11) Go to the tag your just edited, i.e. the 041 tag. Click the dropdown to open it.
12) Confirm a heading for your new category CHILD shows with its authorised value(s) listed below it as selectable options. Confirm that the parent category i.e. LANG shows underneath, with its authorised value(s) listed below as selectable options.
13) Confirm you are able to choose a value from either list and save the record as normal.

Sponsored-by: Education Services Australia SCIS
Comment 6 Aleisha Amohia 2024-02-23 00:49:20 UTC
Created attachment 162355 [details] [review]
Bug 35067: Add authorised_value_categories.parent column
Comment 7 Aleisha Amohia 2024-02-23 00:49:22 UTC
Created attachment 162356 [details] [review]
Bug 35067: Schema updates
Comment 8 Aleisha Amohia 2024-02-23 00:49:25 UTC
Created attachment 162357 [details] [review]
Bug 35067: Save a parent category for authorised value category
Comment 9 Aleisha Amohia 2024-02-23 00:49:27 UTC
Created attachment 162358 [details] [review]
Bug 35067: Show parent authorised value options in biblio editor

This enhancement adds the option to link a parent authorised value category to a new authorised value category.
When the authorised value category is allocated to a biblio framework subfield, its values, plus it's parent's values, will show as possible options for that subfield in the cataloguing biblio editor.

To test:

1) Install database updates and restart services. You may also need to rebuild schema files to capture the change to the database.
2) Go to Koha Administration -> Authorised Values. Notice the table listing authorised values now has a 'Parent category' column.
3) Click the button to add a New category. Notice there is a 'Parent category' dropdown available to set, containing all of the existing authorised value categories. Give your new category a name (for eg, CHILD), and choose any parent category (perhaps LANG). Save.
4) Add a value or set of values to your new category CHILD.
5) Once saved, go back to the main Authorised Values page and confirm your new category CHILD is showing with the correct parent category in the 'Parent category' column.

6) Go to Koha Administration -> MARC bibliographic frameworks.
7) Click the Actions dropdown for the Default framework and click on MARC structure.
8) Search for a tag and click the Actions dropdown, then choose Edit subfields. For example if testing with the LANG authorised value category, choose the 041 tag and Edit its subfields.
9) Go to the 'a' subfield tab. Go down to 'Other options (choose one)' and assign your new category CHILD to the Authorised value setting. Save.

10) Go to Cataloguing and add a new record using the default framework.
11) Go to the tag your just edited, i.e. the 041 tag. Click the dropdown to open it.
12) Confirm a heading for your new category CHILD shows with its authorised value(s) listed below it as selectable options. Confirm that the parent category i.e. LANG shows underneath, with its authorised value(s) listed below as selectable options.
13) Confirm you are able to choose a value from either list and save the record as normal.

Sponsored-by: Education Services Australia SCIS
Comment 10 Aleisha Amohia 2024-03-03 21:16:36 UTC
Created attachment 162702 [details] [review]
Bug 35067: Add authorised_value_categories.parent column
Comment 11 Aleisha Amohia 2024-03-03 21:16:39 UTC
Created attachment 162703 [details] [review]
Bug 35067: Schema updates
Comment 12 Aleisha Amohia 2024-03-03 21:16:42 UTC
Created attachment 162704 [details] [review]
Bug 35067: Save a parent category for authorised value category
Comment 13 Aleisha Amohia 2024-03-03 21:16:44 UTC
Created attachment 162705 [details] [review]
Bug 35067: Show parent authorised value options in biblio editor

This enhancement adds the option to link a parent authorised value category to a new authorised value category.
When the authorised value category is allocated to a biblio framework subfield, its values, plus it's parent's values, will show as possible options for that subfield in the cataloguing biblio editor.

To test:

1) Install database updates and restart services. You may also need to rebuild schema files to capture the change to the database.
2) Go to Koha Administration -> Authorised Values. Notice the table listing authorised values now has a 'Parent category' column.
3) Click the button to add a New category. Notice there is a 'Parent category' dropdown available to set, containing all of the existing authorised value categories. Give your new category a name (for eg, CHILD), and choose any parent category (perhaps LANG). Save.
4) Add a value or set of values to your new category CHILD.
5) Once saved, go back to the main Authorised Values page and confirm your new category CHILD is showing with the correct parent category in the 'Parent category' column.

6) Go to Koha Administration -> MARC bibliographic frameworks.
7) Click the Actions dropdown for the Default framework and click on MARC structure.
8) Search for a tag and click the Actions dropdown, then choose Edit subfields. For example if testing with the LANG authorised value category, choose the 041 tag and Edit its subfields.
9) Go to the 'a' subfield tab. Go down to 'Other options (choose one)' and assign your new category CHILD to the Authorised value setting. Save.

10) Go to Cataloguing and add a new record using the default framework.
11) Go to the tag your just edited, i.e. the 041 tag. Click the dropdown to open it.
12) Confirm a heading for your new category CHILD shows with its authorised value(s) listed below it as selectable options. Confirm that the parent category i.e. LANG shows underneath, with its authorised value(s) listed below as selectable options.
13) Confirm you are able to choose a value from either list and save the record as normal.

Sponsored-by: Education Services Australia SCIS
Comment 14 Aleisha Amohia 2024-03-03 21:16:47 UTC
Created attachment 162706 [details] [review]
Bug 35067: No parent category selected by default
Comment 15 Aleisha Amohia 2024-03-04 00:24:35 UTC
Created attachment 162708 [details] [review]
Bug 35067: Fix for AV categories with no parent, and special AVs

Test that item type, classification sources, and standard authorised values like YES_NO still work as normal.
Comment 16 Esther Melander 2024-03-20 18:14:40 UTC
I tested this and everything works as it should when I select an authorized value from the Child category. I went back and edited the same record to change the authorized value to a selection from the parent category and the bibliographic detail view displayed a period punctuation mark and not the value.
Comment 17 Katrin Fischer 2024-04-01 12:44:33 UTC
(In reply to Esther Melander from comment #16)
> I tested this and everything works as it should when I select an authorized
> value from the Child category. I went back and edited the same record to
> change the authorized value to a selection from the parent category and the
> bibliographic detail view displayed a period punctuation mark and not the
> value.

Marking Failed QA as per Esther's comment.