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:

https://answers.atlassian.com/questions/160233/javascript-files-are-not-loading-on-the-pop-screen-of-jira-5-1

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

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

Hi,

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

https://answers.atlassian.com/questions/47843/strange-javascript-problem-in-create-screen

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Service Desk

Wy are we still using email for Service Desk workflows?

...attest to the experience of an urgent approval that gets lost in the boss’s inbox and requires that special “Please Approve” email or text message. In an age where we have distributed teams...

111 views 0 2
Read article

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