Hey everyone! I’m working on a Jira project and I’ve got a quick question. I’ve made a groovy script that copies issues when you move them to a new status. It’s working great in the background, but I want to make it a bit more user-friendly.
What I’m trying to do is show a little window that pops up and asks the user to confirm the name of the new issue before it gets created. I’m not sure how to make these pop-up windows in Jira though.
Has anyone done this before? Any tips or tricks would be super helpful! I’ve looked around online but couldn’t find anything that really clicked for me. Thanks in advance for any help you can give!
Having worked extensively with Jira customizations, I can say that generating pop-up windows isn’t straightforward within Jira’s native environment. However, a workaround I’ve successfully implemented is using the JIRA Issue Collector. It’s not a traditional pop-up, but it provides a similar user experience.
To set this up, create an Issue Collector in your Jira instance and customize its appearance and fields. Then, in your Groovy script, you can trigger the Issue Collector programmatically when the issue status changes. This method allows you to gather additional information from users before proceeding with the issue copy.
While it’s not a perfect solution, it integrates well with Jira’s existing functionality and doesn’t require external libraries or complex JavaScript injections. Just remember to handle the collected data appropriately in your script.
hey mate, i’ve done this before. you can use the AUI dialog2 function from jira’s JS library. just inject some javascript into ur groovy script. it’s pretty straightforward:
- use AJS.dialog2() to make the popup
- set the title, message, and buttons
- handle the user’s choice
good luck with ur project!
I’ve tackled this issue before in one of my Jira projects. For generating pop-up windows, I found that using the AUI (Atlassian User Interface) dialog component works well. It’s part of Jira’s built-in JavaScript library.
Here’s what I did:
- In your Groovy script, you’ll need to inject some JavaScript into the page.
- Use AJS.dialog2() to create the dialog.
- Set up the dialog with a title, body content (your confirmation message), and buttons (confirm/cancel).
- Handle the user’s response in a callback function.
The tricky part was getting the timing right - make sure your dialog appears before the issue is copied. Also, remember to test thoroughly, as pop-ups can sometimes be finicky across different browsers.
If you’re not comfortable with JavaScript, there are some Jira add-ons that can help create custom dialogs, but I found coding it myself gave me more control over the exact behavior I wanted.