Distinguish between IssueCommented, Issue Comment edited and Issue Comment deleted?

sbhutada January 10, 2019

Is there a way to distinguish between IssueCommented, Issue Comment edited and Issue Comment deleted in scriptrunner.

Please find the attached image, I am exactly trying to do the same thing to distinguish between these 3 events in my inline code. I know the event exists for the comments but trying to find a way to distinguish them.

Below image is from adaptavist, I am trying to do something similar.Screen Shot 2019-01-09 at 6.13.38 PM.png

1 answer

1 accepted

2 votes
Answer accepted
sbhutada January 10, 2019

I was able to figure out -

def issueEventObject = event as IssueEvent
def eventTypeManager = ComponentAccessor.eventTypeManager
def eventType = eventTypeManager.getEventType(issueEventObject.getEventTypeId())

if(eventType.name == 'Issue Commented')
{

}else if(eventType.name == 'Issue Comment Edited')
{

Suggest an answer

Log in or Sign up to answer