web client: copy template converter doesn't work for older templates
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.
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
Changed in evergreen: | |
milestone: | 3.1-beta → 3.0.2 |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Branch here:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ csharp/ lp1734963_ copy_template_ conversion_ fix