Spine label changes are sometimes applied to all templates
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.evergreenc
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:/
tags: | added: spinelabels webstaffclient |
Changed in evergreen: | |
importance: | Undecided → Medium |
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.