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.
Created attachment 162312 [details] [review] Bug 35067: [WIP]
Created attachment 162326 [details] [review] Bug 35067: Add authorised_value_categories.parent column
Created attachment 162327 [details] [review] Bug 35067: Schema updates
Created attachment 162328 [details] [review] Bug 35067: Save a parent category for authorised value category
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
Created attachment 162355 [details] [review] Bug 35067: Add authorised_value_categories.parent column
Created attachment 162356 [details] [review] Bug 35067: Schema updates
Created attachment 162357 [details] [review] Bug 35067: Save a parent category for authorised value category
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
Created attachment 162702 [details] [review] Bug 35067: Add authorised_value_categories.parent column
Created attachment 162703 [details] [review] Bug 35067: Schema updates
Created attachment 162704 [details] [review] Bug 35067: Save a parent category for authorised value category
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
Created attachment 162706 [details] [review] Bug 35067: No parent category selected by default
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.
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.
(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.