Is there a rule that reminds when a task is near the start date?
Asked by Glaucia Jourdain:

Hello Atlassian friends,

I am new to JMW, so JQL and smart values are not my expertise. My rule on "send reminders when task is near start date" failed. I believe I didn't get the JQL smart values correctly. I should also mention I used a due date rule as base for this rule. Please advise.

numberOfDaysBeforeStartInclusion

startdate \<= endOfDay({{numberOfDaysBeforeStartInclusion}}) AND statusCategory != done AND assignee != empty

Startdate \<= endOfDay({{numberOfDaysBeforeStartInclusion}}) AND statusCategory != done AND assignee = {{distinctAssignee}}

![Atlassian.PNG](/t5/image/serverpage/image-id/268518i10B5F46A6D341984/image-size/large?v=v2&px=999 "Atlassian.PNG")


Answers:
author: Trudy Claspill
body: Hello [@Glaucia Jourdain](/t5/user/viewprofilepage/user-id/5267107)

Welcome to the Atlassian community.

Please show us the details of the Create Variable step where you are defining numberOfDaysBeforeStartInclusion.

Please show us the Audit Log details for an execution of the rule where you did not get the results you expected.

Exactly what results do you expect, and what results actually occurred?

comments: author: Trudy Claspill
body: Hello [@Glaucia Jourdain](/t5/user/viewprofilepage/user-id/5267107)

Are you still needing assistance with this Automation Rule?

If so, can you provide us with the additional information I requested?


author: Glaucia Jourdain
body: Hello [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) I was on annual leave, sorry for the delay. I hope it is ok to pick this conversation up were we left. Ill send over the details requested. Thank you.


author: Trudy Claspill
body: Hello [@Glaucia Jourdain](/t5/user/viewprofilepage/user-id/5267107)

The rule for Due Date works because Due date is a special built-in field in Jira. It can be referenced in JQL using either "Due date" (the field name you see when viewing the issue details) or **duedate**. For most other fields you need to make sure that the name you use in JQL matches what you see when you view the issue.

This message

![Screen Shot 2023-08-28 at 3.58.43 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/277638iBE18D6A256DFC4A2/image-size/large?v=v2&px=999 "Screen Shot 2023-08-28 at 3.58.43 PM.png")

indicates you have not chosen the correct field name for using your start date field as criteria for the JQL statement. Usually this will be the name of the field that you see when you are viewing the issue.

Example:

![Screen Shot 2023-08-28 at 4.00.31 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/277639i090851768D74BA74/image-size/large?v=v2&px=999 "Screen Shot 2023-08-28 at 4.00.31 PM.png")

If the field name has a space in it, like in this example, then you need to put it into quotes.

Example:

"Start date" \<= endOfDay(.....

Try making that change and see if that helps.


author: Glaucia Jourdain
body: Hello [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) thank you for your reply.

I changed now the field in Look up issues to:

"Start date" \<= endOfDay({{numberOfDaysBeforeStartInclusion}}) AND statusCategory != done AND assignee != empty

Is it what you suggested? please see prints of the the rule and details bellow.

![rule detail 2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/278183iD1ABC3D6B0B0E3B1/image-size/large?v=v2&px=999 "rule detail 2.PNG")![rule detail.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/278184iFE01EDDC5E94E528/image-size/large?v=v2&px=999 "rule detail.PNG")![whole rule.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/278182i7FAE3F4EEF3B419A/image-size/large?v=v2&px=999 "whole rule.PNG")

Please let me know.

Many thanks in advance.

Glaucia J.


author: Trudy Claspill
body: The exact change you make depends on the start date field in your system.

When you view an issue, what exactly is the label for your start date field? In my case it was "Start date". In your system it may be different. You need to use the label/field name that is correct for your system.

If "Start date" is the label you see for your start date field, then the changes you made are correct.


author: Glaucia Jourdain
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) Yes "Start date" is how it is in my board as well. I set some issues to start on Monday as test. Ill post here the results. Thanks and have a great weekend.


author: Trudy Claspill
body: Looking at the image you posted it appears that there is a Lookup Issue action that is using "Startdate" instead of "Start date", so the Lookup Issue action is still failing.

![Screen Shot 2023-09-04 at 3.40.59 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/278688i1A5098E5C63A706D/image-size/large?v=v2&px=999 "Screen Shot 2023-09-04 at 3.40.59 AM.png")


author: Glaucia Jourdain
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) OK thanks, and how about the variable value? please advise.


author: Trudy Claspill
body: There is nothing wrong with the variable. You can see in the message that your variable has been converted to "1" in the endOfDay function.


author: Glaucia Jourdain
body: That is good news then, thank you. Also, the rule now works, see the audit log bellow ![rule sucess.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/278857iBD4FE3E5986D2D69/image-size/large?v=v2&px=999 "rule sucess.PNG")This completes my quest.

[@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) Thank you very much for the support.

Wish you the best.


author: Trudy Claspill
body: *I'm glad I could help.*

*If you issue has been solved please consider clicking the Accept Answer button on my answer.*


author: Glaucia Jourdain
body: Hello [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

The rule still is not working properly yet, the JQL did not bring the issue up on the email notification. I have got a notification that an issue is due to start but no link to the issue itself. I had made changes only in the JQL look up to state "Start date" at the begging for the formula but had not changed anything on the variable value. Any thought?

I suspect the variable value is wrong, as this value appears in every JQL look up: the value is numberOfDaysBefore**Start** Inclusion, shouldn't it be or numberOfDaysBefore"**Start date"**Inclusion ?

Any thought? Thanks

![variable.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/278679iA8A9057F81FFEE9F/image-size/large?v=v2&px=999 "variable.PNG")![variable 2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/278680i94F07773DDA5147E/image-size/large?v=v2&px=999 "variable 2.PNG")


author: Glaucia Jourdain
body: As I mentioned before, I am new at this and my goal is to have a rule that sends a reminder emails when a task is near its starting date. I created this rule follows the steps of the well functioning "When a task is near due ? send email reminder" rule. However the starting date rule fails every time. See bellow snip shots of details of the Create Variable step numberOfDaysBeforeStartInclusion defied as smart value 1, Audit Log details for an execution of the rule where you did not get the results I expected and results do you expect successively. I hope you can use these info. Looking forward hearing back from you. Thanks.

#### ![solution 1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/277479i6B1442DCB51836C9/image-size/large?v=v2&px=999 "solution 1.PNG") {#toc-hId-263564337}

![Error 1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/277480i46060EB097A182A9/image-size/large?v=v2&px=999 "Error 1.PNG")![Success.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/277481iB60120773B01BEE9/image-size/large?v=v2&px=999 "Success.PNG")


Tags: cloud

jira-work-management-cloud