Examples

Typical event rules

How to monitor issue transition

The simplest issue transition rule would be like:

when issue is transitioned
then
  add comment "Issue transitioned"

In most cases, you may be interested in how the status is changed, a predicate can be specified in where part to filter the status value.

when issue is transitioned
  where the status is changed from "Done" to "To Do"
then
  add comment "Issue re-opend with highest priority"

If you are concerned with issue properties other than status, then specify the predicate in if condition

when issue is transitioned
   where the status is changed from "Done" to "To Do"
if
   the priority of the issue is "Highest"
then
   add comment "Issue re-opend with highest priority"

How to monitor issue update event

You need to specify the where predicate to ensure the wanted field is changed, then check the value in if condition.

when issue is updated
   where the field "priority" is changed
if
   the priority of the issue is "Highest"
then
   add comment "Issue updated to high priority"

How to filter issue based on more than one property

You can specify multiple predicate with AND in if condition.

when issue is created
if
   the type of the issue is "Bug"
   and the priority of the issue is "High"
then
   add user "jsmith" to the watchers of the issue

How to detect if a newly created issue is not assigned after a period of time

Two rules will be required to work together in this case. The first rule is to detect the issue create event and trigger a custom event. You may use day, hour or minute as the unit for the time period.

when issue is created
if
   the type of the issue is "Bug"
   and the priority of the issue is one of ["High", "Highest"]
then
   trigger custom event with the issue after 4 hours

And the second rule is to receive the custom event and check if the assignee is present then perform action if needed.

when custom event is triggered
if
   the assignee is not present
then
   add comment "The issue is not assigned within 4 hours"

How to update all subtasks when parent issue is changed

This can be achieved using custom event too. A list of issues can be specified as the payload when custom event is triggered. This is a feature supported since 1.1.0.

The first rule triggers a custom event with the subtasks.

when issue is updated
then
   trigger custom event "subtask updating" with the subtasks

And the second rule will be triggered by the custom event to update all subtasks. Note the loop will be handled implicitly.

when custom event is triggered
    where the name is "subtask updating"
then
   set the summary of the issue to "updated"
Last modified March 25, 2020