web client: copy template converter doesn't work for older templates

Bug #1734963 reported by Chris Sharp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned

Bug Description

Found after applying the fix to bug 1691269: If certain fields in templates created in the XUL client do not store their values as strings (as newer versions of Evergreen do), template conversion fails with the following web console error:

TypeError: tmp_val.match is not a function
    at Object.service.convert_xul_templates (app.js:333)
    at app.js:285
    at angular.js:16696
    at m.$eval (angular.js:17994)
    at m.$digest (angular.js:17808)
    at m.$apply (angular.js:18102)
    at l (angular.js:12082)
    at K (angular.js:12291)

This happens because the conversion function calls match(), a string function, on values that are numbers. This appears to only affect older copy templates. Converting the value to a string for the purposes of match() solves the problem as far as I can tell.

Sincere thanks to Jeff Godin for troubleshooting help and Mike Rylander for the suggested solution.

Branch on the way.

Evergreen 3.0.1
OpenSRF 3.0.0
PostgreSQL 9.5
Ubuntu 16.04 LTS
Web client tested in Chrome 62 on Fedora 27

Revision history for this message
Chris Sharp (chrissharp123) wrote :
Changed in evergreen:
milestone: none → 3.0.2
milestone: 3.0.2 → 3.1-beta
tags: added: pullrequest webstaffclient
Jeff Godin (jgodin)
Changed in evergreen:
milestone: 3.1-beta → 3.0.2
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Jeff Godin (jgodin) wrote :

Signed off and picked to master and rel_3_0 -- thanks, Chris, Mike!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
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.