Reload all javascript after changing Request type?

Been busy created custom fields and screen within JIRA. Have been using javascript to hide certain fields, and also bolded up some header text.

But after all this hard work, I'm noticing when Creating Issue > changing request type, none of my javascript formatting shows up anymore. Only after I do a page refresh (F5), then my JIRA screen looks the way I want it to.

This indicates to me when I do change the request type, then JIRA doesn't actually load up the field description again. Instead it just gives the generic screen layout.

Is there a way to force JIRA to reload all javascript after changing request type?

I'm assuming it needs to capture the event (mouse click on Request type?), then force a reload of the create issue page. But how? Any ideas?

Thanks in advance.

2 answers

Found my answer, and it's nothing as complicated like creating my own plugin.

Answer is from here:

<script type="text/javascript">
AJS.$(document).bind('dialogContentReady', function(event, dialog) {
<!-- your script here -->

works for me. After changing the project or issue type, it recognised the event, and loads the Javascript again.

Now I can change and select any issue type within losing my fonts :)


Js wont work for the first time when you change the issue type, and it will work from the second time and if you need to make it work from first time, you need to create a plugin and you need to install it in jira, then it will work from the first time.

Check this link

If you have doubts, check the answer, if you don't know how to create a plugin, jus google it up for creating atlassian plugins,

Hope this helps!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,345 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot