Comment 1 for bug 1788680

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

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.