Spine label changes are sometimes applied to all templates

Bug #1805615 reported by Kathy Lussier
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Won't Fix
Medium
Unassigned

Bug Description

Evergreen version: 3.2

This behavior is NOT seen on 3.1

There are cases where changes to item templates will sometimes save to all templates, not just the one that the user is actively trying to save. You can replicate the issue at demo.evergreencatalog.org by following the below steps:

1. Clear out any local or server settings related to item templates.
2. Pull up some items in item status or copy buckets and choose the action to print item templates. Adjust some of the font settings, provide a name for your first template, and click Save.
3. Without closing the tab, change the font settings, provide a name for a new template, and click Save.
4. Select the 1st template from the dropdown menu. Click apply. No changes will be made to the preview or settings. This is because the changes you just made were saved to both templates, not just the 2nd template you created.

You can see the behavior in the screencast at https://drive.google.com/file/d/1vw_J73ZzzcTN7DpmzLdgwNxL3XjgaYDC/view

Kathy Lussier (klussier)
tags: added: spinelabels webstaffclient
Changed in evergreen:
importance: Undecided → Medium
Revision history for this message
Adam Bowling (abowling) wrote :

After quite a bit of troubleshooting, the best I can tell is this is a byproduct of saving to local DB storage and the templates maintaining the $scope.preview_scope values after saving. (I don't know if it affects other template storages outside of spine labels, but I can imagine it might.) e.g. template-example-1 gets saved with "Arial, sans-serif" and "16px" as its font family and font size settings, respectively. Then those get updated as "Times, serif" and "12px" and saved to template-example-2. Because $scope.templates is storing those values as references to $scope.preview_scope, template-example-1 gets saved with the new values, even when it's not intended.

The only I way I know to code around this in JavaScript is to build in an interstitial function, which I've done and will be posting subsequently as a fix, because JS passes values through functions rather than references.

Revision history for this message
Adam Bowling (abowling) wrote :

Following on, there's more that needs to be changed on this. It's affecting the font settings preview, etc. I'm working on it now.

Revision history for this message
Terran McCanna (tmccanna) wrote :

This appears to be resolved with the new work in:

https://bugs.launchpad.net/evergreen/+bug/1787479

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Terran McCanna (tmccanna) wrote :
Changed in evergreen:
status: Confirmed → Won't Fix
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.