Short 006/007/008 considered harmful

Bug #1309717 reported by Mike Rylander
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Low
Unassigned

Bug Description

There are ways (many) where the 00X fields of a record may be saved without trailing spaces to pad out the correct length. This causes problems for the fixed field editor grid, which uses the substring() method to read and stitch together the data in the fixed fields. Specifically, if trailing space is truncated, both read and insertion can fail in annoying ways.

To fix this, we should always pad out the 00X fields to their appropriate lengths before reading or modifying them.

Branch coming soon ... WATCH THIS SPACE!

Tags: cataloging
Revision history for this message
Mike Rylander (mrylander) wrote :
tags: added: pullrequest
no longer affects: evergreen/2.4
Revision history for this message
Galen Charlton (gmc) wrote :

Bumping up importance, as this is arguably a data-integrity bug.

Changed in evergreen:
importance: Low → High
assignee: nobody → Galen Charlton (gmc)
Galen Charlton (gmc)
Changed in evergreen:
importance: High → Low
Revision history for this message
Galen Charlton (gmc) wrote :

On reflection, setting back to low.

Note that while the 008 should be exactly 40 characters wide (for bib records) and the 006 exactly 17 characters wide, the length of the 007 varies depending on the first character. Also note that the convention is /not/ to retain trailing spaces in the 007 when saving the record; the padding should be understood to be a convenience for extracting values. It's OK to force 006 and 008 fields trailing padding when the record is saved, however.

On testing: the editor will throw "FIXME, MARC Editor, fillFixedFields: TypeError: result is undefined" alerts if the record lacks an 006 or 007 field. Removing pullrequest because of this.

tags: removed: pullrequest
Changed in evergreen:
assignee: Galen Charlton (gmc) → nobody
Changed in evergreen:
milestone: 2.6.1 → none
no longer affects: evergreen/2.5
tags: added: cataloging
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.