We are JIRA 7.6 datacenter/server.
Is it still possible to add javascript to the announcement banner? I am looking to add a column to the Issues in Epic table and found the following code:
<script type='text/javascript'> AJS.$(document).ready(function() { AJS.$('#ghx-issues-in-epic-table tr').each(function(){ console.log('Found epic table'); var row = this; var issueKey = AJS.$(this).attr("data-issuekey"); AJS.$.getJSON(AJS.contextPath() + '/rest/api/latest/issue/' + issueKey, function(data){ console.log('Got data for - ' + issueKey); var value = data.fields.customfield_10600; console.log('Value - ' + value); var actions = AJS.$(row).find('td.issue_actions'); AJS.$(actions).before('<td class="nav">' + value + '</td>'); }); }); }); </script>
When adding this to the Announcement Banner, the code displays as plain text in the banner. Can anyone help out a javascsript nube??
Yes it is possible. however if you found this code on our site from a post that was before April 2017, it's likely that this isn't working because certain characters in that code have been converted. This is a side-effect of our community site's migration from the old answers site. Many of those older posts inadvertently had their contents altered in this way unfortunately.
You should be able though to correct this just by replacing all the instances of < with < and all the instances of > with >
Once you do that, then the script should actually run.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.