Notify the assignee one week before the due date

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.

Bash
project = CASE

Boolean condition

Add a ConditionBoolean Condition 

Expression

Use the following parser expression:

Bash
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

To

Select the field Assignee in Users from field

Message

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

Bash
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


📤 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.

JavaScript
{
"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