Details
-
Bug
-
Status: Done
-
High
-
Resolution: Fixed
-
4.3.18
-
None
-
Sprint 28 - Ends Apr 19, Sprint 29 - Ends 10 May, Sprint 30 - Ends June 20, Sprint 31 - Ends June 27
-
3.5
Description
From my investigation it has become apparent that setting or clearing an error on a field from the move issue screen causes issues.
The setErrorText method blows up on the below line
$('[data-jbhv="' + labelText + '"]').remove();
If the behaviour script assigned to the field calls setError() or clearError(), this fires the setErrorText method in JS.
The problem is the labelText that is got using the line
var labelText = $("label[for='" + $field.attr('id') + "']").text();
returns different things on the move issue screen than the create issue screen.
"
Component/s:
"
vs.
"Component/s:"
On move issue, the text has lots of whitespace, which JQuery doesn't seem to be able to handle gracefully, throwing an exception.
Steps to reproduce
- Create a behaviour script that calls either setError or clearError and attach it to a field that will require an update on move (for example, components since they are unique to a project).
- Create an issue and try to move it to another project
- Watch the JS code blow up!