Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding custom javascript to issue collector?

ICANSEEYOU7867 May 26, 2022

I have been struggling with this, however I think I have a workable solution... however it is not the prettiest thing.

I am wanting to hide the User's Name and Email address fields, as I am populating this from the confluence page automatically.  Using the Fragment locator tool, I discovered that the custom template for an issue collector has:
Panel: wikiRendererWebPanel

I can add a "Show web panel" and add some javascript:

<script type="text/javascript">
jQuery(document).ready(function() {


And this WORKS!  However due to a Jira bug, custom issue collector templates no longer work using an iframe in chrome:
However, when you use the other templates (Got Feedbag? or Raise a bug), 
Panel: wikiRendererWebPanel no longer exists on the page.
So I have two questions...

Is there a better way to do this?  I think you can actually edit the template files on the server but I would rather have a scripted/scriptRunner way if possible.

And second question:
Is there a way to use a condition statement on an issue collector page?  I would like to restrict the code to running on a specific issue collector... however I have no idea how to do this.  I know the snippet shows:
jiraHelper.project?.key == "JRA"

But this didnt seem to work for restricting it to my project key with an issue collector.  I am not sure if I can verify the collector ID or do something else there?  Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events