Hi Team,
I would like to pop-up window and navigate to specified url when the ticket status after transition to "Done" status. I used custom script post function using script runner, but its not working as expected. Is there any wrong in my script ?
import com.atlassian.jira.component.ComponentAccessorimport java.net.URIimport java.awt.Desktopdef issue = issue // Specify the URL you want to open in the popup window def url = "https://confluence.atlassian.com/adminjiraserver/working-with-workflows-938847362.html" // Sample urldef currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() log.warn("By user: " + currentUser.getUsername())log.warn("Moved issue to DONE: " + issue.getId() + " - " + issue.getSummary())// check if desktop methods supportedif(Desktop.isDesktopSupported()) { log.warn("Desktop class is SUPPORTED on the current platform")} else { log.warn("Desktop class IS NOT SUPPORTED on the current platform")} // Open the URL in a new browser window try { log.warn("Open browser window with specified URL " + url) Desktop.getDesktop().browse(new URI(url)) } catch(Exception e) { log.warn("Error occurred: " + e.getMessage()) log.warn("Stack trace: " + e.printStackTrace())}return null
Hi @jira_admin_cu
For your requirement, I would suggest looking into ScriptRunner's Fragments.
If you intend to create a new dialog, it would be best to look into the Fragment's Web Item.
The sample Web Item link above provides a working code along with instructions on how to enable the dialog is provided.
You must use both the REST Endpoint and the Fragment Web item.
I hope this helps to answer your question. :-)Thank you and Kind regards,
Ram
It looks like you're new here. Sign in or register to get started.