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

This widget could not be displayed.

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

Charlie Misonne Community Champion Jan 22, 2016

thank you so much smile

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

46 views 1 0
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