This article describes how to create JQL based rules, which are triggered by the issues defined in the custom query.

Types of rule triggers

Each Out of Office rule needs a definition of which issues will trigger it. The triggers can be:

  • global (apply to every project)
  • a single project
  • customized with JQL queries

How to create JQL based rules

  • In the Out of Office rule form, simply click on JQL filter, to the right of the project picker

  • Select an existing filter or build a custom filter on the go

  • If you pick a custom filter, you can then write your query and evaluate it to see existing search results

When to use JQL queries to define an Out of Office rule

Here are some of the most typical use cases for JQL based rules:

JQL based rules for selected projects

DescriptionThe rule should be triggered in more than one project where the rule owner is a member, with the exception of at least one project
ExampleHelen is a back-end developer. She is going on holiday for three weeks and wants her issues reassigned to her colleague Audrey across every product.
However, she is also advising the marketing department in creating content aimed at technical people, and doesn't want any of that work to be delegated.
Sample syntax
Project IN ('project1', 'project2', 'project3')
CODE

JQL based rules for a selection of issues

DescriptionThe rule should be triggered only for some issues within a project or group of projects
ExampleBillie is a busy IT manager and needs to delegate some of her work. She decides to reassign low priority service requests to her junior colleague Warren.
Sample syntax
issuetype = "[System] Service request" AND priority <= medium
CODE


Segmenting with multiple JQL based rules for the same owner and project(s)

DescriptionWithin the same project, some issues should trigger one rule, while other issues should trigger a different rule
ExampleRichard handles customers in the EMEA region. When he takes a paternity leave, he reassigns every incoming request based on the country
Sample syntax
1- Project ="New Contracts" AND country="Spain"
2- Project ="New Contracts" AND country="Turkey"
3- Project ="New Contracts" AND country="Germany"
4- Project ="New Contracts" AND country="Poland"
5- Project ="New Contracts" AND country="UK"
CODE


Forcing existing issues in StatusCategory To Do to be eligible for bulk reassignment 

DescriptionBy default, Out of Office rules can only be used to reassigned existing issues that are currently in progress. A JQL based rule that specifies the status category of the triggering issues can be used for this.
ExampleBeth is assigned to a priority initiative and has to drop all her work in a software project. Every issues assigned to her in the backlog should be reassigned to Jim.
Sample syntax
Project = 'Agile project' AND StatusCategory IN ("To Do", "In Progress")
CODE

Typical reassignment errors when working with JQL queries

The most frequent reason why the app can fail to reassign an issue is because the appointed coverer is not a member of the selected project.

To prevent such errors, we recommend specifying in the JQL for which projects a rule is valid. This is particularly important for rule owners that are members of many projects.