Bug 36616 - Ability to stop Complex See Reference authority records from being linked to bibliographic records
Summary: Ability to stop Complex See Reference authority records from being linked to ...
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-17 00:48 UTC by Aleisha Amohia
Modified: 2024-09-27 15:20 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 36616: Add LinkEstablishedHeadings system preference (3.70 KB, patch)
2024-04-22 05:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36616: [WIP] Add option to authority cataloguing plugin to show established headings only (3.18 KB, patch)
2024-04-22 05:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36616: [WIP] Add option to authority cataloguing plugin to show established headings only (3.93 KB, patch)
2024-05-02 04:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36616: Add LinkEstablishedHeadings system preference (3.70 KB, patch)
2024-05-15 01:50 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36616: Add option to authority cataloguing plugin to show established headings only (12.69 KB, patch)
2024-05-15 01:50 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36616: Add LinkEstablishedHeadings system preference (3.75 KB, patch)
2024-05-27 00:54 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36616: Prevent reference headings from being linked to biblio records (5.07 KB, patch)
2024-05-27 00:54 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36616: Add LinkEstablishedHeadings system preference (3.79 KB, patch)
2024-06-04 00:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 36616: Prevent reference headings from being linked to biblio records (5.11 KB, patch)
2024-06-04 00:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 36616: Prevent reference headings from being linked to biblio records (5.34 KB, patch)
2024-09-27 15:20 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2024-04-17 00:48:04 UTC
We want to prevent cataloguers from being able to select an authority in the bibliographic edit Catalogue authority plugin if the authority record contains a 260 MARC field. 

The 260 tag in an authority record indicates that it is a Complex See Reference record and contains an instructional note for the cataloguer. https://www.loc.gov/marc/authority/ad260.html These are typically guidance authorities and not meant to be inserted into the bibliographic record. 
 
It would be great to enable a feature that prevented these reference headings from being linked to biblios.
Comment 1 Phil Ringnalda 2024-04-18 00:38:05 UTC
The existence of a 260 works for subjects, but not for names, which will instead have a 664 or 666.

Really, we should only allow selecting (and also only link to in the linker) authorities where 008/09 is either 'a' or 'f' (and probably '|', no attempt to code). Every other letter is one form or another of unestablished heading.
Comment 2 Aleisha Amohia 2024-04-18 00:47:24 UTC
That's an interesting idea, Phil. I'll see what the sponsoring organisation thinks.
Comment 3 Aleisha Amohia 2024-04-22 05:04:21 UTC
Created attachment 165248 [details] [review]
Bug 36616: Add LinkEstablishedHeadings system preference
Comment 4 Aleisha Amohia 2024-04-22 05:04:23 UTC
Created attachment 165249 [details] [review]
Bug 36616: [WIP] Add option to authority cataloguing plugin to show established headings only
Comment 5 Aleisha Amohia 2024-05-02 04:45:21 UTC
Created attachment 166033 [details] [review]
Bug 36616: [WIP] Add option to authority cataloguing plugin to show established headings only
Comment 6 Aleisha Amohia 2024-05-02 04:45:52 UTC
I'm close but I'm struggling with getting it working for 'a' OR 'f' OR '|'! Any ideas?
Comment 7 Aleisha Amohia 2024-05-15 01:50:10 UTC
Created attachment 166746 [details] [review]
Bug 36616: Add LinkEstablishedHeadings system preference
Comment 8 Aleisha Amohia 2024-05-15 01:50:13 UTC
Created attachment 166747 [details] [review]
Bug 36616: Add option to authority cataloguing plugin to show established headings only

This enhancement adds a Yes/No dropdown option to the authority cataloguing plugin for showing established headings only. These are headings where the 008/09 is set to 'a' or 'f' (established) or '|' (not coded). When set to Yes, non-established headings will not show in the authority search results so can't be chosen to link to the bibliographic record.

This also adds a system preference LinkEstablishedHeadings to determine whether the Yes/No dropdown should be enabled or disabled by default.

This works for both Zebra and Elasticsearch.

To test:

1) Apply patches and install database updates and restart services
2) Go to Koha Administration -> system preferences. Search for LinkEstablishedHeadings. This should be disabled by default.
3) Create two PERSO_NAME authority records. Give them similar names so you'd expect them to come up in a search together i.e. name one "James 1" and the second "James 2". For "James 1" set the 008/09 to 'a' and for "James 2" set the 008/09 to 'b'.
4) Go to Cataloguing and click New record
5) Go to tab 1 and tag 100. Click the plugin editor for 100$a Personal name.
6) Notice the "Established headings only" dropdown is set to No because LinkEstablishedHeadings is disabled.
7) Search for "James" and keep "Established headings only" set to No. Confirm both of your James records show in the results.
8) Change the "Established headings only" to Yes and search again. Confirm only "James 1" shows in the results.
9) Change the LinkEstablishedHeadings system preference to "Only established headings, as indicated by the 008/09" and save.
10) Repeat steps 4 and 5. Confirm the "Established headings only" dropdown is set to Yes by default.

11) If you did the above test plan with Zebra as the search enginge (as set by SearchEngine system preference), test again with Elasticsearch. The steps and outcomes should be the same.

12) Confirm tests pass
- t/Koha/SearchEngine/Zebra/QueryBuilder.t
- t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Sponsored-by: Education Services Australia SCIS
Comment 9 Aleisha Amohia 2024-05-26 21:35:07 UTC
The sponsor has advised this development has gone in the wrong direction - rather than hiding unestablished headings from the search results, they should be visible but unable to be chosen.
Comment 10 Aleisha Amohia 2024-05-27 00:54:18 UTC
Created attachment 167185 [details] [review]
Bug 36616: Add LinkEstablishedHeadings system preference
Comment 11 Aleisha Amohia 2024-05-27 00:54:20 UTC
Created attachment 167186 [details] [review]
Bug 36616: Prevent reference headings from being linked to biblio records

When the new LinkEstablishedHeadings system preference is enabled, this enhancement will disable the Choose button next to reference authority records in the cataloguing authority plugin search results. Users will still be able to choose established headings, where the 008/09 is set to 'a' or 'f' (established) or '|' (not coded).

This works for both Zebra and Elasticsearch.

To test:

1) Apply patches and install database updates and restart services
2) Go to Koha Administration -> system preferences. Search for LinkEstablishedHeadings. This should be disabled by default (set to 'All headings'). Change to 'Only established headings' and Save.
3) Create a PERSO_NAME authority record. Set the 008/09 to 'b'.
4) Go to Cataloguing and click New record
5) Go to tab 1 and tag 100. Click the plugin editor for 100$a Personal name.
6) Search for your new PERSON_NAME authority record. Confirm it shows in the results but the Choose button is disabled and cannot be clicked.
7) Edit the authority record and set the 008/09 to 'a'.
8) Repeat steps 4-6. This time the Choose button should be possible to click and insert into the biblio record.

9) If you did the above test plan with Zebra as the search enginge (as set by SearchEngine system preference), test again with Elasticsearch. The steps and outcomes should be the same - you may need to manually rebuild the indexes between changing the 008/09.

10) Confirm tests pass
- t/db_dependent/AuthoritiesMarc.t

Sponsored-by: Education Services Australia SCIS
Comment 12 David Nind 2024-06-04 00:57:15 UTC
Created attachment 167365 [details] [review]
Bug 36616: Add LinkEstablishedHeadings system preference

Signed-off-by: David Nind <david@davidnind.com>
Comment 13 David Nind 2024-06-04 00:57:18 UTC
Created attachment 167366 [details] [review]
Bug 36616: Prevent reference headings from being linked to biblio records

When the new LinkEstablishedHeadings system preference is enabled, this enhancement will disable the Choose button next to reference authority records in the cataloguing authority plugin search results. Users will still be able to choose established headings, where the 008/09 is set to 'a' or 'f' (established) or '|' (not coded).

This works for both Zebra and Elasticsearch.

To test:

1) Apply patches and install database updates and restart services
2) Go to Koha Administration -> system preferences. Search for LinkEstablishedHeadings. This should be disabled by default (set to 'All headings'). Change to 'Only established headings' and Save.
3) Create a PERSO_NAME authority record. Set the 008/09 to 'b'.
4) Go to Cataloguing and click New record
5) Go to tab 1 and tag 100. Click the plugin editor for 100$a Personal name.
6) Search for your new PERSON_NAME authority record. Confirm it shows in the results but the Choose button is disabled and cannot be clicked.
7) Edit the authority record and set the 008/09 to 'a'.
8) Repeat steps 4-6. This time the Choose button should be possible to click and insert into the biblio record.

9) If you did the above test plan with Zebra as the search enginge (as set by SearchEngine system preference), test again with Elasticsearch. The steps and outcomes should be the same - you may need to manually rebuild the indexes between changing the 008/09.

10) Confirm tests pass
- t/db_dependent/AuthoritiesMarc.t

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Comment 14 David Nind 2024-06-04 00:58:25 UTC
I've signed off.

While I don't understand the MARC21 intricacies, everything works as per the test plan.
Comment 15 Lucas Gass (lukeg) 2024-09-23 22:32:55 UTC
Doesn't apply cleanly to current main. Looks like AuthoritiesMarc.t needs reworked.
Comment 16 Aleisha Amohia 2024-09-27 15:20:30 UTC
Created attachment 172125 [details] [review]
Bug 36616: Prevent reference headings from being linked to biblio records

When the new LinkEstablishedHeadings system preference is enabled, this enhancement will disable the Choose button next to reference authority records in the cataloguing authority plugin search results. Users will still be able to choose established headings, where the 008/09 is set to 'a' or 'f' (established) or '|' (not coded).

This works for both Zebra and Elasticsearch.

To test:

1) Apply patches and install database updates and restart services
2) Go to Koha Administration -> system preferences. Search for LinkEstablishedHeadings. This should be disabled by default (set to 'All headings'). Change to 'Only established headings' and Save.
3) Create a PERSO_NAME authority record. Set the 008/09 to 'b'.
4) Go to Cataloguing and click New record
5) Go to tab 1 and tag 100. Click the plugin editor for 100$a Personal name.
6) Search for your new PERSON_NAME authority record. Confirm it shows in the results but the Choose button is disabled and cannot be clicked.
7) Edit the authority record and set the 008/09 to 'a'.
8) Repeat steps 4-6. This time the Choose button should be possible to click and insert into the biblio record.

9) If you did the above test plan with Zebra as the search enginge (as set by SearchEngine system preference), test again with Elasticsearch. The steps and outcomes should be the same - you may need to manually rebuild the indexes between changing the 008/09.

10) Confirm tests pass
- t/db_dependent/AuthoritiesMarc.t

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Comment 17 Aleisha Amohia 2024-09-27 15:20:50 UTC
(In reply to Lucas Gass from comment #15)
> Doesn't apply cleanly to current main. Looks like AuthoritiesMarc.t needs
> reworked.

I've rebased and set back to Signed off!