Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Running a scheduled event with JQL to test if due date is 18 Business Days away

Alexandra Peia April 24, 2025

Hello,

 

I am trying to create a daily scheduled rule to check for issues that have the due date exactly 18 business days from today. 

I am trying: 

duedate = now.plusBusinessDays(18)

duedate.jqlDateTime = now.plusBusinessDays(18).jqlDateTime

the error is: "Unable to find JQL function 'now.minusBusinessDays(18)'." or others.

 

I also tries putiing the second part in {{ }} Nothing works. Thank you!

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
April 24, 2025

Hello @Alexandra Peia 

plusBusinessDays() is not a function that can be used in a JQL statement directly. You can use it as part of a smart value to calculate a date that will be substituted into the JQL in the Automation Rule. 

Put curly braces around it thus:

duedate = {{now.plusBusinessDays(18)}}

You said you tried curly braces but you didn't show us exactly how you used them.

If my suggestion doesn't work, can you share with us screen images that show your entire Automation Rule, the details of the step that includes the JQL, and the details from the rule audit log for running the rule after that change is made?

Alexandra Peia April 25, 2025

Thank you for your answer. Now I have issues with posting a reply here. Seems the due date format inludes a "+0000" at the end and this is fiddling with the rule...not sure how to change that.

Trudy Claspill
Community Champion
April 25, 2025

Can you provide more information about what you mean by "fiddling"?

If the rule is not doing what you want and you need more help then please:

1. Provide screen images showing your rule, and the details of any step that you think is not working correctly.

2. Provide screen images showing the output in the Audit Log for the rule execution. Make sure you expand all the sections of the execution log entry to reveal all the details.

3. Provide an explanation of what you want to happen versus what you are observing is happening.

Alexandra Peia April 29, 2025

Here are the printscreens.

I want to check the issues of a certain type, with a checkbox field value of a certain type ("Da"), that have the due date in 18 business days and are still in status "TO DO". I am not receiving any email. All other conditions in this rule, except for the duedate one, are working fine for other similar rules. 

log.pngrule.pngrule1.png

Trudy Claspill
Community Champion
April 29, 2025

Thank you for the additional information.

First swap the positions of duedate and the smart value so that the comparison has duedate on the left of the and the smart value on the right.

Next, use a date/time format command to reduce the smart value to just a date:

{{now.plusBusinrssDays(18).jiraDate}}

Let us know if that resolved the errors.

Alexandra Peia April 30, 2025

Thank you so much, now it works! I have tried the "jiraDate" and putting the duedate before the smart value, but probably in different combinations than this exact one. Thank you again!

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
April 30, 2025

You're welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events