webstaff holdings view: call numbers without copy can trigger exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When displaying the Holdings View tab for a bib in the web staff client, if a volume record has no copies, a Javascript error gets thrown:
vendor.bundle.js:6 TypeError: Cannot read property 'length' of undefined
at holdings.js:122
at Object.o [as forEach] (vendor.
at holdings.js:121
at u (vendor.
at vendor.bundle.js:6
at h.$digest (vendor.
at vendor.bundle.js:6
at r (vendor.
at vendor.bundle.js:6 "Possibly unhandled rejection: {}"
The offending line is this:
// create virtual field for copy alert count
});
Item-less volumes still end up in svc.copies at this point, so at the moment it is necessary to check whether copy_alerts actually exists. Some renaming might also be in order to clarify that svc.copies doesn't necessarily contain /only/ fleshed acp records.
Evergreen master/3.1
Changed in evergreen: | |
importance: | Undecided → Medium |
milestone: | none → 3.1-rc |
Changed in evergreen: | |
milestone: | 3.1-rc → 3.1.1 |
milestone: | 3.1.1 → none |
Changed in evergreen: | |
status: | New → Confirmed |
milestone: | none → 3.2-beta |
tags: | added: signedoff |
Changed in evergreen: | |
assignee: | nobody → Dan Wells (dbw2) |
no longer affects: | evergreen/3.1 |
Changed in evergreen: | |
milestone: | 3.2-beta → 3.1.2 |
status: | Fix Committed → Fix Released |
This is addressed in the branch located at: http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ miker/holdings- view-omnibus