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

Add a comment to the issues in a certain status whose status has not been updated in 7 days.



Image ModifiedConfiguration

UI Steps


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.




Image ModifiedScheduled trigger

UI Step

Add a TriggerScheduled and choose who you want to execute this rule in Run as*

UI Steps


UI Step

Schedule

Choose Daily


UI Step

Interval

Set to Once per day at 1 00 am




Image ModifiedJQL selector

UI Step

Add Selector JQL selector


UI Step

JQL Query

Use the following expression:

Code Block
languagebash
linenumberstrue
project = CASE and status = "Wating for Customer"

This JQL query will retrieve the issues of the CASE project and in Waiting for Customer status.

UI Text Box
typenote

Do not forget to change the key of the project and the status in your own automation rule.


Image ModifiedBoolean condition


UI Step

Add Condition → Boolean condition



UI Step

Expression

Use the following expression

Code Block
languagebash
linenumberstrue
datePart(lastFieldChangeTime(%{selector.issue.status}), LOCAL) = addDays(datePart({system.currentDateTime}, LOCAL), -7 , LOCAL)



Image ModifiedAdd comment action

UI Step

Next to JQL Selector click on Add → Action → Add Comment



UI Steps



UI Step

Comment's text

Code Block
languagebash
linenumberstrue
Hello %{selector.issue.reporter},

We have not received an answer in 7 days. The issue will close itself automatically tomorrow.

Best regards,
%{system.currentUser.displayName}





UI Step

Enable the rule by clicking on the Enable button → 



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": "Add comment after 7 days in status",
"description": "",
"creator": "admin",
"status": false,
"triggerData": "",
"triggerType": "SCHEDULED",
"configuration": {
"refs": [
"issue",
"system",
"trigger.issue",
"trigger.parent"
],
"runAs": "admin",
"scheduledTriggerCron.dailyWeeklyMonthly": "daily",
"scheduledTriggerCron.daysOfMonthOpt": "dayOfMonth",
"scheduledTriggerCron.monthDay": "1",
"scheduledTriggerCron.week": "1",
"scheduledTriggerCron.day": "1",
"scheduledTriggerCron.interval": "0",
"scheduledTriggerCron.runOnceHours": "1",
"scheduledTriggerCron.runOnceMins": "0",
"scheduledTriggerCron.runOnceMeridian": "pm",
"scheduledTriggerCron.runFromHours": "1",
"scheduledTriggerCron.runFromMeridian": "am",
"scheduledTriggerCron.runToHours": "1",
"scheduledTriggerCron.runToMeridian": "am",
"triggerType": ""
},
"children": [
{
"sequence": 0,
"type": "JQL_SELECTOR",
"ruleEntityType": "SELECTOR",
"configuration": {
"refs": [
"system"
],
"jql": "project = CASE and status = \"Wating for Customer\"",
"jqlParsingMode": "jql",
"actingUser": "field_00020"
},
"children": [
{
"sequence": 0,
"type": "BOOLEAN_CONDITION",
"ruleEntityType": "CONDITION",
"configuration": {
"refs": [
"issue",
"issues",
"selector.issue",
"selector.parent",
"system"
],
"expression": "datePart(lastFieldChangeTime(%{selector.issue.status}), LOCAL) = addDays(datePart({system.currentDateTime}, LOCAL), -7 , LOCAL)",
"expressionParsingMode": "logical",
"actingUser": "field_00020"
},
"children": [
{
"sequence": 0,
"type": "ADD_COMMENT",
"ruleEntityType": "ACTION",
"configuration": {
"refs": [
"issue",
"issues",
"selector.issue",
"selector.parent",
"system"
],
"comment": "Hello %{selector.issue.reporter},\r\n\r\nWe have not received an answer in 7 days. The issue will close itself automatically tomorrow.\r\n\r\nBest regards,\r\n%{system.currentUser.displayName}",
"commentParsingMode": "textBasic",
"actingUser": "field_00020",
"commentVisibility": "everybody",
"sendMail": "true"
},
"children": null,
"hasChildren": false
}
],
"hasChildren": true
}
],
"hasChildren": true
}
],
"hasChildren": true
}





Image ModifiedRelated use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "use-case-workflowauto" and label = "add-comment" and space = "JWTSDC"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


Parser functions
JWT featureWorkflow function

Image Added

Automated action

Add comment action


Label





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