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 :)

thank you so much smile


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 Sign up to answer
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

41 views 0 2
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