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

sbhutada January 9, 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.

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

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2019

Hi Sameer,

Thank you for your question. 

Can I please check if you are using Jira Server or Jira Cloud as your screenshot which you have attached shows some Jira Server code configured as Jira Cloud is different to the server version as described here due to the fact that the Java API does not exist in Jira Cloud. 

If you wish to ask this question for the server version then you will need to recreate your post here and tag it with the tag of: com.onresolve.confluence.groovy.groovyrunner

In the meantime, I can answer your question relating to Jira Cloud and can confirm that it is possible in ScriptRunner for Jira Cloud to know what event was fired for the Comment Created, Comment Deleted and Comment Updated events. 

The reason for this is that we provided a variable called webhookEvent in the binding for Script Listeners in Jira cloud for these events and you can check what the value of this variable is in your script in order to see what event triggered the listener script to run.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

sbhutada January 10, 2019
Like # people like this

Suggest an answer

Log in or Sign up to answer