Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

sbhutada
Contributor
January 10, 2019 edited

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
Contributor
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
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events