In previous versions of JIRA (4.4.4 and earlier) script tags could be included within the description of a field. One example use of this would be to hide/show a one field (e.g. Priority Explanation) based on the value of a previous field (e.g. priority = Critical).
Since upgrading to JIRA 5.1.4, it appears that the script tags (and its contents) are stripped from a description of a field when rendered in the new create/edit dialog boxes. However, when using the CreateIssue.jspa page to enter issues, the script tags are rendered and therefore function as expected.
Is this by design? If so is there any recommended work around?
Thanks
Ian
Yes and no!
After some discussion with Atlassian support, during which they were unable to identify (or recreate) the problem, a screen sharing session was arranged.
During the session I was able to demonstrate the problem to Atlassian on 2 different browsers (IE & Chrome). All the admin settings for fields, screens and projects were checked and seemed to be configured correctly, the indexes were cleared, JIRA was restarted and the browser cache was flushed in Chrome with no effect.
Finally, a new field with the same settings (but different name) was created an added to all screens. A second refresh of the cache was performed and the new field and the existing field began to work! The new field was then deleted, the cache refreshed for a third time and the problem has gone away.
Atlassian have chalked it up to a browser cache or index problem - three weeks on the problem has not reappeared!?!?!?!?!
Wow really!! Ok, I'll give that a try
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Colin
We did subsequently experience a problem which we (wrongly) immediately assumed to be the same problem recurring. It turned out that one of the Field Configurations had a different description for the field which didn't include the script so that may be something worth looking at too!
Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie
Yes I am using a self-hosted jira, but as I am not using a Custom Field plugin I hadn't looked at the developer notes during the preparation for the 5.1.4 upgrade :(
Here's how my custom field (id = 10030) is configured (via the Custom Fields page in the JIRA Administration section):
Please provide an explanation when selecting a priority of <em>Critical</em>. <script type="text/javascript"> var priority = AJS.$('#priority'); if (priority) { var priorityExplanation = AJS.$('#customfield_10030'); // Hide the target field if priority isn't critical if (priority.val() != '2') { priorityExplanation.parent().hide(); } priority.change(function() { var priority = AJS.$('#priority'); var priorityExplanation = AJS.$('#customfield_10030'); if (priority.val() == '2') { priorityExplanation.parent().show(); } else { priorityExplanation.parent().hide(); } }); } </script>
On the classic Create Issue page (/secure/CreateIssue.jspa) the Javascript works and can be seen by viewing source or inspecting the elements!
On the new Creat/Edit dialog boxes, the Javascript does not work nor is it viewable in the page source or by inspecting the elements!?!?
Thanks for any help you can provide!
Ian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ian did you find any more info about this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this self-hosted jira? If so are you sure they're getting stripped - possibly they are just getting executed too early. Can you paste an example of one of your scripts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.