- Introduction to Automation
- Getting Started
- Jira Automation Rules
- Confluence Automation Rules
- Best Practices
- Common Use Cases
- Troubleshooting
- Advanced Techniques
Automation rules in Jira and Confluence help streamline workflows, reduce manual tasks, and ensure consistent processes across your organization. These rules follow a simple structure: Trigger → Condition(s) → Action(s).
- Reduced Manual Work: Automate repetitive tasks like status updates and notifications
- Improved Consistency: Ensure processes are followed uniformly
- Enhanced Productivity: Free up time for higher-value activities
- Better Governance: Automatic compliance with organizational standards
- Faster Response Times: Immediate reactions to specific events
- Triggers: Events that start the automation (e.g., issue created, page updated)
- Conditions: Criteria that must be met for actions to execute
- Actions: What happens when triggers fire and conditions are met
- Jira/Confluence administrator or appropriate permissions
- Understanding of your team's workflows
- Access to Automation settings in your instance
Jira: Settings → System → Automation Confluence: Settings → General Configuration → Automation
- Jira Cloud: 1000 rules per site, 100 executions per rule per month (varies by plan)
- Confluence Cloud: 1000 rules per site, execution limits based on plan
- Server/Data Center: No built-in limits but performance considerations apply
- Issue Created: When a new issue is added
- Issue Updated: When any field changes
- Issue Transitioned: When status changes
- Issue Assigned: When assignee changes
- Issue Commented: When someone adds a comment
- Issue Deleted: When an issue is removed
- Scheduled: Run at specific times/intervals
- Field Value Changed: When specific fields are modified
- Issue Fields Changed: Specific field modifications
- Compare Fields: Field value comparisons
- User Condition: Actions based on user roles/groups
- Issue Properties: Custom field conditions
- JQL Condition: Use Jira Query Language for complex criteria
- Related Issues Condition: Check parent/child/linked issues
- Condition Groups: Combine multiple conditions with AND/OR logic
- Edit Issue: Update fields, status, assignee
- Create Issue: Generate new tickets
- Clone Issue: Duplicate with modifications
- Link Issues: Create relationships between tickets
- Delete Issue: Remove tickets (use carefully)
- Send Email: Custom notifications
- Add Comment: Automatic status updates
- Send Slack/Teams Message: External notifications
- Create Branch: Git integration
- Log Work: Automatic time tracking
- Execute Script: Custom Groovy/JavaScript code
Trigger: Issue Created
Condition: Component equals "Frontend"
Action: Assign issue to user "john.doe"
JQL Example:
project = "WEB" AND component = "Frontend" AND assignee is EMPTY
Trigger: Scheduled (daily at 9 AM)
Condition: JQL Query
JQL: priority = Critical AND status not in (Done, Closed) AND updated <= -2d
Action: Send email to project lead
Trigger: Scheduled (weekly)
Condition: JQL Query
JQL: status = Resolved AND updated <= -7d AND resolution is not EMPTY
Action: Transition issue to Done
Trigger: Scheduled (daily at 6 PM)
Condition: JQL Query
JQL: Sprint in openSprints() AND status = "To Do" AND assignee is EMPTY AND created <= -3d
Action: Assign to Scrum Master for triage
Trigger: Scheduled (weekdays at 10 AM)
Condition: JQL Query
JQL: status = "Code Review" AND updated <= -2d AND assignee in membersOf("developers")
Action: Send Slack message with reminder
- Page Created: New page added
- Page Updated: Content modified
- Page Moved: Location changed
- Page Deleted: Content removed
- Comment Added: New discussion
- User Added to Space: New space member
- User Removed from Space: Member departure
- Page Title Contains: Text matching
- Space Condition: Specific spaces
- Label Condition: Page labels
- Page Template: Based on templates used
- User in Group: Group membership
- Page Restrictions: Permission-based conditions
- Add Label: Automatic tagging
- Move Page: Relocate content
- Copy Page: Duplicate content
- Set Page Restrictions: Manage permissions
- Send Email: Notifications
- Add Comment: Automatic updates
- Send Slack Message: External alerts
- Create Jira Issue: From Confluence content
- Update Jira Issue: Based on page changes
Trigger: Page Created
Condition: Space = "Product Documentation"
Action: Add label "needs-review"
CQL Context:
space = "Product Documentation" AND status = current AND type = page
Trigger: Page Created
Condition: CQL Query
CQL: title ~ "Meeting Notes*" AND space = "TEAM"
Actions:
- Add label "meeting-notes"
- Send email to team lead
- Set page restrictions to team members only
Trigger: Scheduled (weekly)
Condition: CQL Query
CQL: space = "DOCS" AND lastmodified <= -90d AND status = current AND label != "archived"
Action: Send email to content owners requesting review
Trigger: Scheduled (monthly)
Condition: CQL Query
CQL: label = "draft" AND created <= -30d AND contributor != currentUser()
Action: Send notification to page creator
Trigger: Page Updated
Condition: CQL Query
CQL: space = "KB" AND label = "published" AND lastmodified >= -1d
Action: Send notification to support team about KB updates
- Start with basic rules and add complexity gradually
- One clear purpose per rule
- Avoid overly complex condition chains
- Clear rule names: "Auto-assign Frontend issues to John"
- Detailed descriptions explaining purpose and logic
- Document business rationale
- Use test projects/spaces for rule development
- Validate with edge cases
- Monitor rule execution logs
- Be careful with rules that modify the same fields they monitor
- Use conditions to prevent recursive execution
- Consider rule execution order
- Put most restrictive conditions first
- Use JQL efficiently in Jira rules
- Minimize API calls in actions
- Track rule execution frequency
- Watch for failed executions
- Review performance impact regularly
- Grant automation permissions carefully
- Use service accounts for rule execution
- Regular permission audits
- Avoid exposing sensitive information in logs
- Use appropriate field visibility settings
- Consider data retention policies
Trigger: Issue Transitioned to "In Progress"
Condition: Sprint is not null AND Assignee is empty
Action: Assign to sprint owner
Trigger: Version Released
Condition: Fix Version = [target version]
Action: Create deployment checklist issue
Trigger: Scheduled (weekdays at 8:30 AM)
Condition: Issues assigned to team AND Status ≠ Done
Action: Send Slack message with open issues
Trigger: Issue Transitioned to "Code Review"
Condition: Component = [any]
Action: Send email to tech leads
Trigger: Page Created
Condition: Space = "Architecture" AND Template ≠ "RFC Template"
Action: Add comment requesting RFC compliance
Trigger: Issue Updated
Condition: Priority changed to "Critical"
Action: Add approval required label
- Check Permissions: Ensure automation user has required access
- Verify Conditions: Test conditions independently
- Review Triggers: Confirm trigger events are occurring
- Check Rule Status: Ensure rule is enabled
- Optimize Conditions: Reorder for efficiency
- Reduce Frequency: Adjust scheduled rule timing
- Simplify Actions: Break complex rules into smaller ones
- Monitor Execution: Use audit logs to identify bottlenecks
- Review Rule Logic: Check condition combinations
- Test in Isolation: Disable other rules temporarily
- Check Dependencies: Verify external integrations
- Examine Logs: Use execution history for debugging
- Access through Settings → Audit Log
- Filter by automation activities
- Review execution details and errors
- Use dedicated test projects/spaces
- Create sample data for testing
- Validate rule behavior before production
- Build rules step by step
- Test each component individually
- Add complexity gradually
A simple query in JQL (also known as a "clause") consists of a field, followed by an operator, followed by one or more values or functions.
field operator value
# Equality operators
project = "MYPROJECT"
assignee != currentUser()
priority in (High, Critical)
status not in (Done, Closed)
# Comparison operators
created >= -30d
priority > Normal
timeestimate <= 8h
# Text operators
summary ~ "database" # Contains word
description !~ "deprecated" # Does not contain
summary ~ "bug*" # Wildcard search
summary ~ "\"exact phrase\"" # Exact phrase match
# Empty/null operators
assignee is EMPTY
assignee is not EMPTY
# Issue identification
project = "PROJ"
key = "PROJ-123"
parent = "PROJ-100"
# People fields
assignee = "john.doe"
reporter in membersOf("developers")
creator = currentUser()
# Status and workflow
status = "In Progress"
resolution = Unresolved
status changed to "Done" during (-1w, now())
# Dates and time
created >= startOfYear()
updated <= -7d
resolutiondate > "2024-01-01"
duedate < endOfWeek()
# Priority and type
priority in (High, Highest)
issuetype = Bug
issueFunction in subtasksOf("parent = PROJ-100")
# Custom fields
"Story Points" > 8
"Sprint" in openSprints()
# Relative date functions
created >= -2w # Last 2 weeks
updated <= -3d # More than 3 days ago
duedate >= startOfDay() # Today onwards
created <= endOfMonth(-1) # Before end of last month
# Specific date ranges
created >= "2024-01-01" AND created <= "2024-01-31"
resolved during ("2024-01-01", "2024-12-31")
# Time-based functions
created >= startOfYear()
updated <= endOfWeek()
duedate < startOfMonth(1) # Before start of next month
# Multiple conditions with precedence
project = "WEB" AND (priority = High OR priority = Highest) AND assignee = currentUser()
# Advanced filtering
project in (PROJ, TEST) AND status = "In Progress" AND updated >= -1d ORDER BY priority DESC
# Sprint and agile queries
Sprint in openSprints() AND assignee in membersOf("development-team")
Sprint in closedSprints() AND Sprint not in futureSprints()
# Linked issues
issue in linkedIssues("PROJ-123", "blocks")
parent = "PROJ-100" AND status != Done
# Commenting and updates
commented >= -1w
status changed from "To Do" to "In Progress" by currentUser()
assignee changed after "-2d"
# Epic and hierarchy
"Epic Link" = "PROJ-50"
issueFunction in subtasksOf("project = PROJ AND issuetype = Epic")
# Version and release
fixVersion in unreleasedVersions()
affectedVersion = "1.0.0"
fixVersion in releasedVersions() AND resolved >= -30d
# User and group functions
assignee in membersOf("jira-developers")
reporter = currentUser()
watcher = currentUser()
# Date functions
created >= startOfDay()
updated <= endOfDay(-1)
due >= startOfWeek()
# Issue relationship functions
issueFunction in subtasksOf("parent = EPIC-123")
issueFunction in linkedIssuesOf("key = PROJ-456", "Blocks")
issueFunction in parentsOf("assignee = currentUser()")
# Sprint functions (for Scrum projects)
Sprint in openSprints()
Sprint in closedSprints()
Sprint = "Sprint 23"
# Version functions
fixVersion in unreleasedVersions("PROJ")
fixVersion in releasedVersions("PROJ")
affectedVersion in earliestUnreleasedVersion("PROJ")
# Overdue issues assigned to current user
assignee = currentUser() AND duedate < now() AND status != Done
# High priority bugs created this week
issuetype = Bug AND priority in (High, Highest) AND created >= -1w
# Issues ready for testing
status = "Ready for QA" AND assignee in membersOf("qa-team")
# Stale in-progress issues
status = "In Progress" AND updated <= -1w AND assignee != EMPTY
# Epic completion tracking
project = "PROJ" AND "Epic Link" = "PROJ-100" AND status in (Done, Closed)
# Code review backlog
labels = "needs-review" AND status = "Code Review" AND assignee in membersOf("tech-leads")
# Release preparation
fixVersion = "2.1.0" AND status not in (Done, Closed, "Won't Do")
# Security vulnerability tracking
labels in (security, vulnerability) AND priority = Highest AND status != Done
A simple query in CQL (also known as a 'clause') consists of a field, followed by an operator, followed by one or more values or functions.
field operator value# Space and content identification
space = "PROJ"
space in ("PROJ", "DOCS", "TECH")
title = "Project Overview"
title ~ "meeting notes"
# Content type filtering
type = page
type = blogpost
type = attachment
type in (page, comment)
# Content status
status = current
status in (current, trashed)
# User and contributor fields
contributor = "john.doe"
creator = "jane.smith"
contributor in ("john.doe", "jane.smith")
# Date filtering
created >= "2024-01-01"
lastmodified <= -7d
created >= startOfDay()
# Label and categorization
label = "meeting-notes"
label in ("draft", "review", "approved")
label = "team-alpha"
# Content hierarchy
ancestor = "Project Documentation"
parent = "Technical Specs"
# Text search
text ~ "database migration"
text ~ "API*"
text ~ "\"exact phrase\""# Relative dates
created >= -1w # Last week
lastmodified >= -30d # Last 30 days
created <= -1d # More than 1 day ago
# Specific date ranges
created >= "2024-01-01" AND created <= "2024-12-31"
lastmodified during ("2024-01-01", "2024-01-31")
# Date functions
created >= startOfMonth()
lastmodified >= startOfWeek()
created <= endOfYear()# Multi-space documentation search
space in ("PROJ", "TECH") AND label = "specification" AND status = current
# Recent updates by team
space = "TEAM" AND lastmodified >= -7d AND contributor in ("alice", "bob", "charlie")
# Draft content for review
label = "draft" AND space = "DOCS" AND created >= -14d ORDER BY created DESC
# Outdated documentation
space = "DOCS" AND lastmodified <= -90d AND status = current AND type = page
# Meeting notes hierarchy
ancestor = "Meeting Notes" AND created >= startOfMonth() AND type = page
# Template-based content
title ~ "Template*" AND space = "ADMIN" AND type = page
# Archived content cleanup
status = trashed AND lastmodified <= -30d
# Content without labels
label is null AND space = "PROJ" AND type = page# Find pages needing review
label in ("needs-review", "outdated") AND space in ("DOCS", "SPECS")
# Personal drafts
creator = currentUser() AND label = "draft"
# Popular content by space
space = "KB" AND type = page ORDER BY title
# Recent blog posts
type = blogpost AND created >= -30d ORDER BY created DESC
# Compliance documentation
space = "COMPLIANCE" AND label in ("policy", "procedure") AND status = current
# Technical documentation updates
space in ("TECH", "API") AND lastmodified >= startOfWeek() AND type = page
# Content by specific author
contributor = "technical.writer" AND space = "DOCS" AND created >= -1w# Date functions
startOfDay()
startOfWeek()
startOfMonth()
startOfYear()
endOfDay()
endOfWeek()
endOfMonth()
endOfYear()
# User functions
currentUser()
# Content relationship functions
ancestor = "parent-page-title"
parent = "direct-parent-title"
# Search functions (for text fields)
text ~ "search term"
title ~ "page*" # Wildcard
title ~ "\"exact match\"" # Exact phrase# Quarterly documentation review
space = "DOCS" AND lastmodified <= -90d AND status = current AND type = page
# New team member onboarding content
label = "onboarding" AND space = "HR" AND status = current ORDER BY title
# API documentation maintenance
space = "API" AND (title ~ "endpoint" OR title ~ "reference") AND lastmodified <= -60d
# Meeting notes without action items
ancestor = "Meeting Notes" AND NOT text ~ "action" AND created >= -30d
# Draft content approaching deadline
label = "draft" AND created <= -14d AND space != "PERSONAL"
# Compliance audit preparation
label in ("gdpr", "sox", "hipaa") AND lastmodified >= startOfQuarter()
# Knowledge base article updates
space = "KB" AND label = "customer-facing" AND lastmodified >= -7d
# Architecture decision records
space = "ARCH" AND title ~ "ADR*" AND status = current ORDER BY created DESCDynamic variables that provide context-aware information:
{{issue.key}} - Issue key
{{issue.summary}} - Issue title
{{issue.assignee.displayName}} - Assignee name
{{trigger.changelog.field}} - Changed field
{{now}} - Current timestamp
{{#issues}}...{{/issues}} - Iterate through issues
Create conditional logic within rules:
{{#if(equals(issue.priority,"Critical"))}}
Send immediate alert
{{else}}
Add to daily digest
{{/if}}
Store automation state:
Action: Set entity property
Key: last_processed
Value: {{now}}
Trigger: Issue Status = Done
Condition: Issue Type = "Documentation Task"
Action: Create Confluence page from template
Trigger: Issue Created
Condition: Component = "API"
Action: Send webhook to monitoring system
Process multiple items efficiently:
Trigger: Scheduled
JQL: project = PROJ AND status = "In Progress" AND updated < -7d
Action: Bulk transition to "Stalled"
Create reusable rule patterns for common scenarios across projects and teams.
Effective automation in Jira and Confluence requires understanding your team's workflows, starting simple, and iterating based on results. Focus on high-impact, repetitive tasks first, then expand to more complex scenarios. Regular monitoring and optimization ensure your automation continues to provide value as your organization grows and evolves.
Remember: automation should enhance human decision-making, not replace it entirely. Always maintain the ability to override automated actions when business context requires it.