after upgrade from jira 4.1.1 to jira 5.1.6 some workflow transitions don't work


after upgrading our jira some workflow transitions don't work.

when pressing the transition button the following happens:

the loading icon appears and it keeps loading forever.

firebug shows that a successful 302 took place to the correct transition form.

If I copy the url from the firebug and paste it in the browser, I get the form. If I do this, the form loads with bad css formatting, but it's readable and I can complete the transition this way.

If i rightclick the transition button and choose open in new window I get the correct transition form and i can complete the transition.

6 answers

1 accepted

0 votes

What post-functions and validators do you have on the transition? If there are any based on post-functions provided by plugins, have you checked that those are the right versions? You've used the tag "javascrip" - is there a reason for that?

What does your log file say?

It looks like the problem is caused by javascript in field descriptions.
The javascript uses jQuery. When it loads in a separate page JIRA provides jQuery and it works fine.
But when it loads with the inline=true parameter, no jQuery is provided. For this reason a javascript errors occur.
I assume the javascript error messes up the javascript chain on the page. this prevents the loading animation to stop and the form to properly display.

i've added this tag to one of the scripts:
<script src="//" type="text/javascript"></script>

this tag provides jQuery. this seems to have solved the problem for this particular transition.

Howerver, loading a foreign jQuery like this overrides some atalssian customizations so it's still pretty broken...

0 votes

Ah, that explains the tag. I assume that if you remove the javascript, it behaves ok?

Version 5 made some very sweeping changes to javascript frameworks and methods, so a lot of it needs rewriting on upgrade. The handful I use had to be done pretty much from scratch (although most of it simply went in the bin because it was working around things that v5 started to supply).

I don't know javascript well enough to help you with the details, but I did find that trying to import externals was a nightmare, as it interfered with the Atlassian stuff. I found it better to use the stuff Jira already exposes whereever possible (or, rather, I found lots of answers here encouraging that approach)

Have a look at (for some of the background to this)

Thanks for the tip, Nic. Looks like encasing my stuff in

AJS.$(document).bind('dialogContentReady', function(event, dialog) {});

Does the trick. I guess I'll need to read into the framework atalassian built. Maybe this is the only solution.
However, this isn't a very good solution for me, since i have dozens of scripts. Maybe i'll do a batch solution.. like search and replace all my scripts through the database..
but there must be a better way.

Yea, i definetly need to read into AJS.

using 'dialogContentReady' for binding only works for popup dialogues. so if it's not a popup dialog the script won't run at all.

using JIRA.Events.NEW_CONTENT_ADDED works if the script only requires the field itself to be loaded.. still need to find a bind that answers all.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,436 views 15 19
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