LP#2007351: fix the MARC editor heading linker for certain fields user/gmcharlt/lp2007351_fix_heading_linking_in_cat_editor
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 15 Feb 2023 17:01:47 +0000 (12:01 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 15 Feb 2023 17:01:47 +0000 (12:01 -0500)
commit0bf4e5fb233dcee0cbdf7232fbdc5e2c6b624c58
tree60d2399a1758ac9d03d40bca7a34f564fc13a2f1
parentf793685ffc019b48aa1930d0f73d69dad165d1d8
LP#2007351: fix the MARC editor heading linker for certain fields

The headings linker in the Angular bib record editor could fail
to retrieve the relevant authority control field metadata to determine
what subfields in the bib record are controlled by a top-level authority
record (as opposed to a subdivision record). This patch fixes this
by adjusting the query for bib-to-authority linking relationships.

This manifiested by the headings linker not consistently bringing
up the headings browse when attemping to link headings in the bib
600, 600, 651, and 655 field.A

To test:

[1] Open a bib record in the Angular MARC editor and create a 650
    field.
[2] Click the button to open the headings linker. Note that no
    browse is performed. (This is not 100%, as the bug is sensitive
    to the exact order that the database happens to return rows
    from the authority.control_set_bib_field table.)
[3] Apply the patch and repeat step 2.
[4] This time, the browse list in the headings linker should show
    results.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/share/marc-edit/authority-linking-dialog.component.ts