Hi Everyone,
I have set up a script that I run on create and update of an issue, I have it set up so it compares the old and new value of a few fields to figure out if the scripts should be run (has the field changed).
The issue I am having is that now it only runs on an update, it does not run on a create issue event.
This is what I want to do:
if(fieldA_Changed || eventIsCreate) {
blah blah
}
I am not sure how I can check to see if the event type is a create event, not an update event.
anyone familiar with this?
Thanks!
I was able to figure this out, I used event.getEventTypeId() to get the event type Id and check for it.
def eventTypeId = event.getEventTypeId()
if (eventTypeId == 3) { //3 is for create Issue, 2 is for update issue
//do stuff
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.