Hello All
I have to do a task only if 'PNR Name' Changed.
I am trying to skip the check on Issue Created, but I am not finding a way to check on the event. First line in code below is giving error (I understand method is not available)
Can you please tell me how to do this check for Issue Created Event
/if(event.getName() != 'Issue Created'){
// If product name did not change return
def changeLog = event?.changeLog
def changeItems = changeLog.getRelated("ChildChangeItem")
def change = changeItems?.find{ it.field == "PNR Name"}
if(!change){
return
}
//}
Thanks
Abe
I tried this as well
if(event instanceof IssueCreatedEvent)
How do I check in scriptrunner listener for IssueCreated Vs IssueUpdate etc?
The code above didn't work for me also, but I used the "eventTypeId" property instead:
if ( event.eventTypeId == 1 )
You can trigger the event and debug it:
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.