Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×Hi - Can someone help me with how I can create a automation condition for when the ticket created date is within 5 business days of the end of a month.
My purpose is to add actions based on the fact that a certain issue type ticket was created within last 5 business days of any month and move it to a higher priority, add labels, etc.
Also would advanced compare condition or compare condition be the better route.
Thank you for your help in advance!
Hi @Neha Shah -- Welcome to the Atlassian Community!
What have you tried so far, as the functions you ask about are described here: https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/
To compare something like this, you probably want to use an advanced compare condition. That will give you better control over what is being checked. For example:
If you review that documentation page, you can adjust what I show to match your need for comparing to any month (such as during the same month as the create date).
For your Jira instance, you would want to check on your settings for working days/time, and then test as the behavior of the date/time smart value functions is impacted by those settings.
Kind regards,
Bill
Hi @Bill Sheboy
Thanks so much for getting back to me on this. I used the below advanced compared condition but I don't have the less than or equal to (see image). It does work but i'm unsure if it's pulling for last month vs current month.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I missed that! I guess I always assumed the condition had all the logical operators. Using less than and 6 is a good work-around.
And...the expression you show seems to be asking:
Which of these do you want to check:
The expression for #1 would be:
{{issue.created.diff(now.lastBusinessDayOfMonth).businessDays}}
The expression for #2 would be:
{{issue.created.diff(issue.created.lastBusinessDayOfMonth).businessDays}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.