Clear button does not work for Holdings Template Editor

Bug #1803584 reported by Sarah Childs on 2018-11-15
This bug affects 5 people
Affects Status Importance Assigned to Milestone

Bug Description

When you are creating and editing templates in the Holdings Template Editor (former Volume/Copy Template Editor), the clear button has no discernible effects. Any templates or values which have been applied, stay applied. In the Holdings Editor it actually clears all applied values, so I would expect it to do the same in the Template Editor. In order to clear the values in the Template Editor, you currently have to refresh the page. I'm in Evergreen Indiana and experiencing this in both our live 3.1 and demo server 3.2.

Sarah Childs (sarahc) on 2018-11-15
summary: - Clear button does not work for Holdings Template
+ Clear button does not work for Holdings Template Editor
Jason Boyer (jboyer) wrote :

Looks like a reference to MultiMap was added to the wrong clearWorking() function. The template editor dies trying to clear that while it't not currently possible to clear multiple items when editing them. This fixes it:;a=shortlog;h=refs/heads/user/jboyer/lp1803584_clear_editor working/user/jboyer/lp1803584_clear_editor

To test:

Pre-load, go to the template editor, change anything and then click Clear. Nothing will change and if you look at the console you'll see an error about setting a property on 'undefined'.

After loading, clicking the button will clear changes to the template editor and no error will be logged (about this... there are other errors that have appeared recently but don't appear to cause problems).

After loading you'll also be able to clear all items when editing multiple. You can see this by either making massive changes to multiple items or following through the debugger and just not saving.

Jason Boyer (jboyer) on 2018-11-17
tags: added: pullrequest
Jason Boyer (jboyer) on 2018-11-29
Changed in evergreen:
milestone: none → 3.2.3
Jason Boyer (jboyer) on 2019-01-17
Changed in evergreen:
milestone: 3.2.3 →
Jason Boyer (jboyer) on 2019-01-28
Changed in evergreen:
milestone: → 3.3-beta1
Changed in evergreen:
milestone: 3.3-beta1 → 3.3-rc
Beth Willis (willis-a) on 2019-03-04
Changed in evergreen:
assignee: nobody → Beth Willis (willis-a)
Beth Willis (willis-a) wrote :

This code works as described on our system running EG 3.2.4.

I was able to clear values from a template while creating a new template and while editing an existing template.

On our EG 3.1.8 system (without this code applied), when trying to clear values from a new template or editing an existing template, there were no visible changes to the template interface and the following error was generated:

TypeError: Cannot set property 'statcat_filter' of undefined
    at app.js:2528
    at Object.o [as forEach] (vendor.bundle.js:6)
    at f.$scope.clearWorking (app.js:2527)
    at fn (eval at compile (vendor.bundle.js:6), <anonymous>:4:156)
    at r (vendor.bundle.js:6)
    at f.$eval (vendor.bundle.js:6)
    at f.$apply (vendor.bundle.js:6)
    at HTMLButtonElement.<anonymous> (vendor.bundle.js:6)
    at HTMLButtonElement.dispatch (jquery.min.js:2)
    at HTMLButtonElement.y.handle (jquery.min.js:2)

I was able to clear values from the copy editor while editing multiple copies in both systems, with and without this code.

Beth Willis (willis-a) on 2019-03-05
Changed in evergreen:
status: New → Confirmed
Beth Willis (willis-a) wrote :

I have tested this code and consent to signing off on it with my name, Beth Willis and my email address, <email address hidden>.

tags: added: signedoff
Changed in evergreen:
assignee: Beth Willis (willis-a) → nobody
Bill Erickson (berick) on 2019-03-08
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Bill Erickson (berick) wrote :

New branch pushed:;a=shortlog;h=refs/heads/user/berick/lp1803584-copy-edit-template-clear

1. Adds mine and Beth's signoff to Jason's patch.
2. Adds a second patch to avoid JS/console errors when clearing templates, caused by code recently added to master.

tags: removed: signedoff
Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Changed in evergreen:
milestone: 3.3-rc → 3.3.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers