MARC editor authority browse context menu not rendered if one the authority records listed lacks an 003 field

Bug #1235474 reported by Galen Charlton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned
2.5
Fix Released
Undecided
Unassigned

Bug Description

For bib fields meant to be controlled by authority records, right-clicking on one of their subfields in the MARC editor is supposed to bring up a context menu displaying relevant authority records. However, if any of the authority records that would be retrieved does not have an 003 field, the authority popup menu is not displayed; instead the default context menu is displayed.

This stems from a line in marcedit.js that retrieves the contents of the 003 field but throws an uncaught exception if that control field is not present.

A similar problem occurs if one of the authority records lacks a 901$c.

Evergreen 2.4.2

Revision history for this message
Galen Charlton (gmc) wrote :

Also affects master.

Changed in evergreen:
milestone: none → 2.5.0-rc
importance: Undecided → Low
Revision history for this message
Galen Charlton (gmc) wrote :

A fix is available at the tip of the user/gmcharlt/lp1235474_fix_auth_ctx_menu_crash branch in the working/Evergreen repository:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/gmcharlt/lp1235474_fix_auth_ctx_menu_crash

The patch deals with the case where an authority record lacks an 003 field, as there is nothing that strictly enforces that all authority records have an 003 field. In contrast, triggers ensure that they will always have a 901$c.

tags: added: pullrequest
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.0-rc → 2.5.1
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.5.1 → 2.5.2
Yamil (ysuarez)
tags: added: authority
Dan Wells (dbw2)
no longer affects: evergreen/2.3
Changed in evergreen:
milestone: 2.5.2 → 2.6.0-alpha1
Dan Scott (denials)
Changed in evergreen:
status: New → Fix Committed
Revision history for this message
Dan Scott (denials) wrote :

Good fun setting up this one for testing:

UPDATE config.global_flag SET enabled = FALSE WHERE name = 'cat.maintain_control_numbers';
UPDATE authority.record_entry SET marc = replace(marc, '003', '004') WHERE id = 9;

Then search the bib records for "Petrov", open the bib record in the MARC editor, and right click on the "Petrov" field... there we go!

Thanks for the fix, Galen; much appreciated, and pushed to master, rel_2_5, and rel_2_4.

Changed in evergreen:
status: Fix Committed → Fix Released
no longer affects: evergreen/2.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.