Hello everybody! In script listener it works fine, but in post function error
def eventTypeManager = ComponentAccessor.getEventTypeManager()
def eventTypeName = eventTypeManager.getEventType(event.eventTypeId).getName()
I suppose that there're no event in post function. But I need to know what happened with issue, closed or resolved and depending on this add comment or not. Point is that I have one script on two transitions issue resolved and issue closed. In order not to make 2 scripts with slight difference I want to add one script on both transitions and want script to check the event. Is it possible or I have to do script listener or two scripts for different transitions?
you can get transition id (or even name) like this:
https://scriptrunner.adaptavist.com/5.6.7/jira/recipes/workflow/get-workflow-vars.html
and base your logic on it
Thanks it works, but what is transientVars there? Is that some collection with all transitions? And how script get exactly desired transition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
transientVars is what's called "binding variable". basically a map that gets injected in the postfunction and has some transition info, one of which being actionId
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.