I am following the tutorial here to proof the concept to proceed with using this feature in building some functionality. So far the dialog is working fine but the javascript is not invoked.
the dialog shows once the web item is clicked but the javascript in the web resource is not taking effect.
Debugging it in the browser javascript debugger i don't see it called at all.
What could be missing? do i need to reference the js file explicitly in the html of the dialog?
Thank you
Community moderators have prevented the ability to post new answers.
I notice in the example html, the dialog id is sr-dialog, whereas in the javascript the id is my-own-dialog. Whatever you use here, these need to be the same. Bit of a docn bug.
Also, if you want to edit the js and have it refreshed automatically, you need to run with atlassian.dev.mode=true, which means not in production.
Yes..that is the case. I have dialog id matching in the .js and the html returned from the REST. I also have the atlassian.dev.mode=true in the JVM REQ ARG. Also restarted JIRA multiple time, cleared the caches, hard edited the web item and the web resource from the GUI in SR and still don't see the JS. I copied it, pasted in the console in chrome and it excutes perfectly once the dialog shows so the problem seems to be that web item is not linked to the web-resource somehow.
Note worthy, I have created a directory called 'resources' under the 'scripts' dir of SR and added that to the -Dplugin.resource.directories. Could that be the problem?irs.resource.directories
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
shd be ok, but the js path should be relative to the "resources" directory then. Check your server logs, it should say if it can't find the file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes..it is relative to "resources", the List of resources panel complains actually if i try a wrong path and warns me. All that and still not working and to my bafflement nothing shows in the logs regarding this at all!!! I tried erasing all web items and resources and started over and restarted JIRA and cleared cache and nothing works...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at the page source, I am seeing the resource js file being downloaded and available among other resources. Just not sure why it doesn't execute whereas it executes only when i paste in the console. Could it be a latency issue or something? very confusing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie Echlin, after lots of debugging I am noticing that the resrouce js file i have created ('test.js') is available among other js resources under the 'Resources' tab in Chrome debugger (F12), while it doesn't show at all under the 'Debug' tab in Firefox...despite all other resources supplied by "com.onresolve.jira.groovy.groovyrunner" are available and all show in the source of the pages in both cases...but in reality it is not available among the resource captured by the browser! Any help here would be extremely appreciated. Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Contact us at https://productsupport.adaptavist.com/servicedesk/customer/portal/2 and we can arrange a screen sharing session, I think we've got as far as we're going to get on this forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jamie Echlin Thank you so much for the great support and help. Here is the REF#: SRJSUP-507
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I know that I am late but I am also running in this kind of problem.
Would it be possible to make SRJSUP-507 public or could someone post the solution here?
Best Regards,
Christian
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.