Skip to end of metadata
Go to start of metadata

One of the most typical usecases for notification is when status is transitioning from A to B, say "To Do" to "In Progress". Here's a small example on how to catch this and send a message to your users::


#foreach ($issue in $issues)
  #foreach ($item in $issue.lastchange.items)
    #if ($item.fromString == "To Do" && $item.toString == "In Progress")
        Issue $issue.key status is chagned to In Progress


Note the use of pseudo-field "lastchange" here. This is an array of "items" that were changed during the last update to JIRA issue.

So we iterate through that list and see if there's a change to field called "status" and transition must be from "Open" to "In Progress". Only if we find such item then the content between "fields" will be rendered.

Remember, that Jirassimo doesn't send out empty messages, so if there were no status changes with the issue, the above-mentioned script will evaluate to empty string and no message to user is sent.

  • No labels