Null statcats break copy templates
Bug #1788680 reported by
Jeff Davis
This bug affects 33 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned | ||
3.1 |
Fix Released
|
High
|
Unassigned | ||
3.2 |
Fix Released
|
High
|
Unassigned | ||
3.3 |
Fix Released
|
High
|
Unassigned |
Bug Description
EG 3.0+
In the web client, copy templates do not apply properly when the template has null statcat values but a non-null statcat_filter value. For example, a copy template like the following will not work:
"Adult fiction"
This issue was originally reported in bug 1772062 and a fix was provided:
Since this is only a partial fix (the original bug has several other possible causes), we are breaking it out into a separate bug report.
tags: | added: pullrequest |
Changed in evergreen: | |
milestone: | none → 3.1.5 |
Changed in evergreen: | |
milestone: | 3.1.5 → 3.1.6 |
Changed in evergreen: | |
milestone: | 3.1.6 → 3.2.1 |
Changed in evergreen: | |
milestone: | 3.2.1 → 3.2.2 |
Changed in evergreen: | |
milestone: | 3.2.2 → 3.2.3 |
Changed in evergreen: | |
milestone: | 3.2.3 → 3.3-beta1 |
Changed in evergreen: | |
milestone: | 3.3-beta1 → 3.3-rc |
Changed in evergreen: | |
milestone: | 3.3-rc → 3.3.1 |
Changed in evergreen: | |
importance: | Undecided → High |
milestone: | 3.3.1 → 3.next |
assignee: | nobody → Dan Wells (dbw2) |
Changed in evergreen: | |
milestone: | 3.next → 3.4-beta1 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Testing the fix is a little cumbersome. Here's a contrived example; adjust as needed for your environment, or try it with an existing copy template that has null statcat values but a non-null statcat_filter value.
1. Create a copy stat cat at BR1:
INSERT INTO asset.stat_cat (id, owner, name) VALUES (1, 4, 'test stat cat');
2. Create a copy template for your test user with a non-null statcat_filter value and some null values for statcats, referencing the stat cat you just created:
INSERT INTO actor.usr_setting (usr, name, value) VALUES (1, 'webstaff. cat.copy. templates' , '{"Science fiction" :{"mint_ condition" :"t","statcats" :{"1":null} ,"circ_ lib":4, "ref":" f","circ_ modifier" :null," loan_duration" :2,"location" :123,"holdable" :"t","opac_ visible" :"t","circulate ":"t"," statcat_ filter" :4}}');
3. Login to the web client as your test user at BR1.
4. Go to the copy editor, select your copy template and click Apply. You'll see a console error and the copy attributes (shelving location, etc) are not correctly populated from your template.
5. Apply the bugfix.
6. Clear cache (and possibly local storage?) and repeat step #4. This time, clicking Apply should set your copy attributes correctly based on your template.