Skip to content

Jira Automation Rules for Extended Out of Office Scenarios

An Out of Office rule acts on the work items assigned to the person who is away. Anything keyed to somebody else on the work item - the reporter is out, a user field holds someone who is out - is Jira automation's job. The app writes each person's absence onto their Jira user record as searchable fields, so an automation flow can test them like any other JQL field.

Use absence data in a flow

The example below comments on a work item whenever someone adds a comment and the reporter is out of office today.

  1. Open the space, select More actions (…) > Space settings, then Automation in the side panel.

  2. Select Create flow, then Create from scratch.

  3. Under Select a trigger, choose Work item commented.

  4. Select Add step, add a condition, choose JQL, and enter reporter.outofoffice-today = 1.

  5. Select Add step again and add the action you want - a comment naming who to contact instead, a notification, or a transition.

  6. Select Flow details, give the flow a name, then select Turn on flow.

JQL Filter Configuration Guide lists the fields, what each one returns, and the user fields they can be read through.

Keep a flow from fighting reassignment

A flow that assigns work items to a fixed person can end up in a loop with an Out of Office rule. The rule moves the work item to the coverer, the flow moves it back to the person who is away, and the rule moves it again. The signature is a flow firing every few seconds on the same work item in the Automation Audit log.

Out of Office detects this and stops reassigning that work item, provided the flow assigns as an automation account. The work item is recorded as a failed assignment on the rule: in My Rules, select the rule's Reassignments button and open the Failures tab of the Reassignment Log. The entry names a rule in Automation for Jira or ScriptRunner as the cause. A flow whose Actor, set under Flow details, is User who triggered the event assigns as a person, so nothing is detected, the Failures tab stays empty and the loop keeps running.

Two things keep the two apart:

  • Let the rule do the handover. A coverer already reassigns the absent person's work items, so a flow that assigns them to a fixed person duplicates that in the opposite direction.

  • Where a flow does have to set an assignee in a space that Out of Office rules cover, narrow it with a JQL condition so it cannot fire on those work items, or have it assign to the coverer rather than to the person who is away.

Once the flow is corrected or turned off, the rule reassigns as usual the next time the work item is assigned; nothing changes in the app.