Automatically set issue components based on labels
Teddy Fischer avatar
Written by Teddy Fischer
Updated over a week ago

Objective

This runbook covers how to automate setting components on Jira issues to specific users based on issue labels.

Requirements

  1. Administrative access to the Jira project.

Overview

  1. Create a mapping of labels to components (e.g., "Salesforce integration" -> "Integration").

  2. Create necessary labels and/or components in the project.

  3. Navigate to Project SettingsAutomation, click Create rule.

  4. Set up trigger:

    1. Choose Field value changed.

    2. Select "Labels" for Fields to monitor for changes.

    3. Choose "Any changes to the field value" for Change type.

    4. Select "All issue operations" for For.

  5. Configure conditions:

    1. Add Issue fields condition: "Labels" "contains any of" "label1" "label2". e.g. "Salesforce Integration"

  6. Define action:

    1. Add Edit issue

    2. Set fields to set... as "Components"

    3. Add Components to be applied when the label conditions are met. e.g. "Integration"

  7. Publish the rule.

  8. Copy the rule for other label(s)-component(s) rules using the three-dot menu.

Validation

Create a new Jira issue with a rule-defined label and confirm the issue is auto-edited to include the corresponding component(s). If not, review the automation rules in Project SettingsAutomation.

Guide

1. Click on Project settings

Click on Project settings

2. Click on Automation

Click on Automation

3. Click on Create rule

Click on Create rule

4. Click on Field value changed…

Click on Field value changed…

5. Click on Fields to monitor for changes

Click on Fields to monitor for changes

6. Type "labels"

Type "labels"

7. Click on Labels

Click on Labels

8. Click on Save

Click on Save

9. Click on New condition…

Click on New condition…

10. Click on Issue fields condition…

Click on Issue fields condition…

11. Click on Field

Click on Field

12. Type "labels"

Type "labels"

13. Click on Labels

Click on Labels

14. Click on Value

Click on Value

15. Add the label(s) to use for this rule

Add the label(s) to use for this rule

16. Click on Save

Click on Save

17. Click on New action…

Click on New action…

18. Click on Edit issue…

Click on Edit issue…

19. Click on Choose fields to set...

Click on Choose fields to set...

20. Type "components"

Type "components"

21. Click on Components

Click on Components

22. Click on Components

Click on Components

23. Click on the component(s) to add to the issue

Click on the component(s) to add to the issue

24. Click on Save

Click on Save

25. Name the automation

Name the automation

26. Click on Turn it on 🎉

Click on Turn it on 🎉

Did this answer your question?