Product event avi:activity:updated:issue doesn't fire on comment changes

If I add a comment to an issue the event avi:activity:updated:issue is not fired. I don’t see a avi:activity:updated:created event.

Is that coming? Or how can I react on comment changes.

2 Likes

Hi @m.schmidt,

There is a avi:jira:commented:issue event that fires when a comment is created or updated.
It is now documented here:
https://developer.atlassian.com/platform/forge/events-reference/jira/#comment-on-issue

I’ve just tried it and it’s working fine.

This is my manifest.yml:

modules:
  trigger:
    - key: jira-edit-comment
      function: main
      events:
        - avi:jira:commented:issue
  function:
    - key: main
      handler: index.run
app:
  id: ari:cloud:ecosystem::app/<appId>
  name: jira_edit_comment
permissions:
  scopes:
    - read:jira-work

In the index.jsx, I’m logging a few details related to the commend update like this:

export async function run(event, context) {
	console.log(`Comment updated on issue: ${event.issue.id} at ${event.comment.updated} by ${event.comment.updateAuthor.accountId}`);
}

In the console, you will see a log similar to the following:

INFO    06:24:57.216  c9bd95e8ecbbed4f  Comment updated on issue: 10007 at 2021-05-04T16:24:55.699+1000 by <accountId>

Cheers and thank you for your patience,
Caterina

1 Like