Hi all,
When the user is creating an issue, I want to show a confirmation popup if some optional field is not filled.
The confirmation popup says: “You have not selected [Name], are you sure you want to create a ticket with no [Name]?”
The field [Name] is optional, and we just want to alert them about that.
Is there any way I can achieve this?
Thank you!
Hi!
On Your very first transition, the one that leads to the first workflow status, usually “Open”, You can create a Validator with a custom groovy script.
Within this script You can check values and when some condition is not fulfilled, You can generate an error message, here’s a small example:
import com.atlassian.jira.user.ApplicationUser;
import com.atlassian.jira.component.ComponentAccessor;
Issue myIssue = issue
ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
if(user.geName() != “nhac”) {
invalidInputException = new InvalidInputException(“Invalid User”)
}
For the question You have to configure a seperate Screen on the transition, which holds the appropriate elements.
Hope this helps!
Regards,
Hans