On this page



Use case

Send an email for every issue that will be due in a week to the corresponding assignees.



Configuration


Create a new rule and name it appropriately.

Providing a description will help you to identify the purpose of the rule.


Scheduled event

Add a Trigger → Scheduled


Schedule

Choose Daily


Interval

Choose once per day at 1:00 am




JQL selector

Add a Selector → JQL Selector


Select the target issues for the automation rule with a JQL query like the following one.

project = CASE


Boolean condition


Add a ConditionBoolean Condition 


Expression

Use the following parser expression:

datePart({selector.issue.dueDate}, LOCAL) - datePart({system.currentDateTime}, LOCAL) = 7 * {DAY}


Send email action

Next to the JQL selector click on Add → Action → Send email


From

Select Default


To

Select the field Assignee in Users from field


Message

Enter a subject for your email and write the body of the email.

Hello %{selector.issue.assignee.displayName}, 
This is a reminder that the issue %{selector.issue.key} will be due in a week.
Best regards,
Your Jira Administrator





Enable the rule by clicking on the Enable button → 




Screencast

No screencast available at the moment.


Import the example

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


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": "Notify the assignee one week before the due date",
"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": "am",
"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",
"jqlParsingMode": "jql",
"actingUser": "field_00020"
},
"children": [
{
"sequence": 0,
"type": "BOOLEAN_CONDITION",
"ruleEntityType": "CONDITION",
"configuration": {
"refs": [
"issue",
"issues",
"selector.issue",
"selector.parent",
"system"
],
"expression": "datePart({selector.issue.dueDate}, LOCAL) - datePart({system.currentDateTime}, LOCAL) = 7 * {DAY}",
"expressionParsingMode": "logical",
"actingUser": "field_00020"
},
"children": [
{
"sequence": 0,
"type": "SEND_MAIL",
"ruleEntityType": "ACTION",
"configuration": {
"refs": [
"issue",
"issues",
"selector.issue",
"selector.parent",
"system"
],
"fromOption": "default",
"toUsersInField": [
"00003"
],
"subject": "Reminder",
"subjectParsingMode": "textBasic",
"contentType": "text/html",
"mailPriority": "3",
"sendingMode": "common",
"body": "Hello %{selector.issue.assignee.displayName}, \r\nThis is a reminder that the issue %{selector.issue.key} will be due in a week.\r\nBest regards,\r\nYour Jira Administrator",
"bodyParsingMode": "textBasic"
},
"children": null,
"hasChildren": false
}
],
"hasChildren": true
}
],
"hasChildren": true
}
],
"hasChildren": true
}



Related use cases




JWT feature

Automated actionSend email action
Label







Status
Tech review

Style guide