Hi,
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.
Having looked at Nic Brough's links:
I have wrapped my code in AJS.$(document).bind
That mostly did the trick.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the tip, Nic. Looks like encasing my stuff in
{code}AJS.$(document).bind('dialogContentReady', function(event, dialog) {});
{code}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
https://developer.atlassian.com/display/JIRADEV/Custom+Fields+that+use+CSS+or+JavaScript+Web+Resources+in+JIRA+5.0 (for some of the background to this)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" 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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.