Resolve issues when all options of a checklist are checked

Use case

Sometimes resolving issues depends on fields set to a specific value. In this case, the issue is automatically resolved and transitioned to "Done" when all options of the checkbox custom field are ticked.


⚒️ Configuration

Field changed event

Create a new rule and name it appropriately.

Providing a description will help you to identify what the rule does but this step is optional.

Add a Trigger → Field changed event

Field

Choose your checkbox custom field

Changed to

Choose Any value

No further configuration needed. The automation rule is triggered every time an issue is being transitioned.

Boolean condition

Add ConditionBoolean condition

Use the following Parser Expression:

Bash
numberOfSelectedItems(%{trigger.issue.c11500}) = numberOfAvailableItems(%{trigger.issue.cf11500})
#Replace field code with the field code of your custom field. Use the field dropdown to automatically insert the field code

Transition issue action

Add ActionTransition issue

Mode

Choose Transitions to status

Status

Choose Done

The target status has to be reachable from the current status, otherwise, the action will not be executed.

Enable the rule by clicking on the Enable button  rule-status-off.png →  rule-status-on.png

📹 Screencast

This is how the configuration above should look on your screen

📤 Import the example

Import the JSON file below to get started in no time.

JSON

After importing the JSON file, make sure to check the configuration of the rule. Non-existing configuration elements (issue types, fields, values etc.) will be highlighted.

JavaScript
{
    "name": "Resolve issues when all options of a checklist are ticked",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "FIELD_CHANGED_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "fieldId": "12200",
        "option": "any",
        "triggerType": ""
    },
    "children": [
        {
            "sequence": 0,
            "type": "BOOLEAN_CONDITION",
            "ruleEntityType": "CONDITION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent"
                ],
                "expression": "numberOfSelectedItems(%{trigger.issue.cf12200}) = numberOfAvailableItems(%{trigger.issue.cf12200})",
                "expressionParsingMode": "logical",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "TRANSITION_ISSUE",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "project",
                            "system",
                            "trigger",
                            "trigger.issue",
                            "trigger.parent"
                        ],
                        "option": "status",
                        "status": "10012",
                        "actingUser": "field_00020"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}


📚 Related use cases