On this page

Use case

Clear the field Assignee when a sub-task has been assigned to the same user for the second time.

You can alternatively set an assignee automatically based on the members of a group.


Configuration

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.

Field changed event

Add a Trigger → Field changed event

Fields

Choose Assignee

Changed to

Choose Any value

Boolean condition

Add a Condition → Boolean condition

Expression

Use the following expression:

%{trigger.issue.issueType} = "Sub-task" and %{trigger.issue.assignee} in fieldValue(%{trigger.issue.assignee}, siblingSubtasks())

 Update field action

Add an Action → Update field action

Field

Choose your custom Assignee

Update to

Choose No value - clear field

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.

{
"name": "Prevent having the same assignee in two sub-tasks",
"description": "Clear the field Assignee when a sub-task has been assigned to the second user for the second time.",
"creator": "admin",
"status": false,
"triggerData": "",
"triggerType": "FIELD_CHANGED_EVENT",
"configuration": {
"refs": [
"issue",
"system",
"trigger.issue",
"trigger.parent"
],
"fieldId": "00003",
"option": "any",
"triggerType": ""
},
"children": [
{
"sequence": 0,
"type": "BOOLEAN_CONDITION",
"ruleEntityType": "CONDITION",
"configuration": {
"refs": [
"issue",
"project",
"system",
"trigger",
"trigger.issue",
"trigger.parent"
],
"expression": "%{trigger.issue.issueType} = \"Sub-task\" and %{trigger.issue.assignee} in fieldValue(%{trigger.issue.assignee}, siblingSubtasks())",
"expressionParsingMode": "logical",
"actingUser": "field_00020"
},
"children": [
{
"sequence": 0,
"type": "UPDATE_FIELD",
"ruleEntityType": "ACTION",
"configuration": {
"refs": [
"issue",
"project",
"system",
"trigger",
"trigger.issue",
"trigger.parent"
],
"fieldId": "00003",
"mode": "clear",
"actingUser": "field_00020"
},
"children": null,
"hasChildren": false
}
],
"hasChildren": true
}
],
"hasChildren": true
}

If you still have questions, feel free to refer to our support team.