How can i get the actual running event ID or NAME in scriptrunner during automation. the following doesnt work; using
No such property: event for class: Script756
Firstly, can you please clarify what the Automation is supposed to do? Is it to create a new issue or update an issue?
If Automation is used to create an issue, it would be best to create a separate listener via ScriptRunner's Listener and add an Issue Created event to get the information.
Alternatively, if you want to get the event details when Automation edits an issue, you can use the listener to track the Issue Updated event.
Please clarify so I can provide an example
Thank you and Kind regards,
Ram
@Ram Kumar Aravindakshan _Adaptavist_ Thank you for your Answer! trigger of automation is the add, edit oder delete comment; in automation itself i can get the actual event Type due the smartvalue {{eventType}}. In Scriptrunner this value doesnt exist or i dont know whats the name for it; my actual way to get it is to try it trough the eventTypeManager; but it seems i do something wrong or the method doesnt exist at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ram Kumar Aravindakshan _Adaptavist_ the automation itself should add a text to the comment body and write values to different custom fields depending on the event if the comment is added or edited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
with this code i can see all event types but how i can i get the actual running eventType of these in automation:
import com.atlassian.jira.event.type.EventType
import com.atlassian.jira.event.type.EventTypeManager
import com.atlassian.jira.component.ComponentAccessor
EventTypeManager etm = ComponentAccessor.getEventTypeManager();
Collection<EventType> alleventTypes = etm.getEventTypes()
def result="";
for (EventType ev : alleventTypes) {
result+=ev.toString()+"<br>";
}
return result;
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.