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|When to use).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

From time to time employees leave a company. What happens to the respective Jira account? Deactivating could be an option but for data security reasons users might have to be deleted.

To avoid issues when deleting the user from the internal directory, the following rule can come in handy. It replaces all affected assignees and reporters. Otherwise user cannot be deleted! Plus: Issue related users will be informed by a comment!




UI Steps

 Manual trigger

UI Step

Excerpt Include
DECADIS:Automation Use Case - Create Rule Step
DECADIS:Automation Use Case - Create Rule Step
nopaneltrue


UI Step

Add a Trigger → Manual

UI Text Box
typeinfo

No further configuration needed. The rule will only be executed if a user hits the Execute button .



UI Text Box
typetip

We want to update both the assignee and the reporter but the issues might not be identical. This is why we have to set up two selectors and dedicated action.


UI Expand
titleUpdate the reporter

JQL Selector

UI Steps


UI Step

Add Selector → JQL Selector


UI Step

JQL Query

Use the following Expression:

Code Block
languagebash
linenumberstrue
reporter = john.doe


UI Text Box
typenote

Replace "john.doe" with the user name of the user that should be deleted.



Update field action

UI Steps

Next to the JQL Selector click on Add → Action → Update field

UI Steps


UI Step

Field

Choose Reporter


UI Step

Update to

Choose Selected value


UI Step

Value

Select the new reporter that should be set.



Add comment action

UI Step

Underneath the Update field Action click on Add → Action → Add comment


UI Step

Comment text

Code Block
languagebash
linenumberstrue
For liability reasons the reporter has been automatically changed.





UI Expand
titleUpdate the assignee


UI Steps

JQL Selector

UI Step

Underneath the first JQL Selector click on Add → Selector → JQL Selector


UI Step

JQL Query

Use the following Expression:

Code Block
languagebash
linenumberstrue
assignee = john.doe


UI Text Box
typenote

Replace "john.doe" with the user name of the user that should be deleted.



 Assign issue action

UI Step

Next to the second JQL Selector click on Add → Action → Assign issue


UI Step

Assignee

Choose one of the given options that fit most for you.


 Add comment action

UI Step

Underneath the Assign issue action click on Add → Action → Add comment


UI Step

Comment text

Code Block
languagebash
linenumberstrue
For liability reasons the assignee has been automatically changed.







Screencast

This is how the configuration above should look on your screen

Multimedia
nameemployee-offboarding.mp4
width700


Import 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": "Update assignee and reporter to facilitate user deletion",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "",
    "triggerType": "MANUAL",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "actingUser": "field_00020",
        "triggerType": ""
    },
    "children": [
        {
            "sequence": 0,
            "type": "JQL_SELECTOR",
            "ruleEntityType": "SELECTOR",
            "configuration": {
                "refs": [
                    "system"
                ],
                "jql": "reporter = %{system.currentUser}",
                "jqlParsingMode": "jql",
                "actingUser": "fixed_user",
                "fixedActingUser": "cowens"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "ADD_COMMENT",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "issues",
                            "selector.issue",
                            "selector.parent",
                            "system"
                        ],
                        "comment": "For liability reasons the reporter has been automatically changed.",
                        "commentParsingMode": "textBasic",
                        "actingUser": "field_00020",
                        "commentVisibility": "everybody",
                        "sendMail": "true"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        },
        {
            "sequence": 1,
            "type": "JQL_SELECTOR",
            "ruleEntityType": "SELECTOR",
            "configuration": {
                "refs": [
                    "system"
                ],
                "jql": "assignee = eparis",
                "jqlParsingMode": "jql",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "ADD_COMMENT",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "issues",
                            "selector.issue",
                            "selector.parent",
                            "system"
                        ],
                        "comment": "For liability reasons the assignee has been automatically changed.",
                        "commentParsingMode": "textBasic",
                        "actingUser": "field_00020",
                        "commentVisibility": "everybody",
                        "sendMail": "true"
                    },
                    "children": null,
                    "hasChildren": false
                },
                {
                    "sequence": 1,
                    "type": "ASSIGN_ISSUE",
                    "ruleEntityType": "ACTION",
                    "configuration": {
                        "refs": [
                            "issue",
                            "issues",
                            "selector.issue",
                            "selector.parent",
                            "system"
                        ],
                        "assignMode": "user",
                        "user": "eparis",
                        "mode": "projectRoleRandom",
                        "sendMail": "true",
                        "actingUser": "field_00020"
                    },
                    "children": null,
                    "hasChildren": false
                }
            ],
            "hasChildren": true
        }
    ],
    "hasChildren": true
}




 Related use cases

Page properties report
headingsAutomated action, JWT feature, Label
sortByTitle
cqllabel = "use-case-auto" and label in ("assign-issue","add-comment","update-field") and space = "JWTSDC"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Automated action

Add comment action

Assign issue action

Update field action

Label

Status
colourRed
titlestaff pick




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titleto dodone

Style guide

Status
colourGreen
titledone

Status
titleto do
Status
colourGreen
titledone
Status
colourYellow
titleneeds review
Status
colourRed
titleflagged


...