Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

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

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



Configuration

UI Steps

Field changed event

UI Step

Create a new rule and name it appropriately.


UI Text Box
typetip

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




UI Step

Add a Trigger → Field changed event

UI Steps


UI Step

Fields

Choose Assignee


UI Step

Changed to

Choose Any value





Boolean condition

UI Step

Add a Condition → Boolean condition

UI Steps


UI Step

Expression

Use the following expression:

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





 Update field action


UI Step

Add an Action → Update field action

UI Steps


UI Step

Field

Choose your custom Assignee


UI Step

Update to

Choose No value - clear field





Image AddedImport the example

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

UI Expand
titleJSON


UI Text Box
typewarning

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.


Code Block
languagejs
themeMidnight
linenumberstrue
{
"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
}



Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "use-case-workflow-auto" and label = "update-field" and space = "JWTSDC"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


Label
JWT feature

Image Added

Workflow functionParser functions
Automated action

Update field action

Label

Status
colourRed
titlestaff pick




Page properties
hiddentrue



Status
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged


...