Hello Community,
I've encountered an issue with a Jira Cloud automation rule, and I'm hoping someone can help me resolve it.
I've set up an automation rule to count field changes in an issue from Monday to Friday. However, it appears that the rule is also counting changes on Saturday and Sunday, which is not the intended behavior.
Is there a way to configure the automation rule to exclude weekends (Saturday and Sunday) from the count? I want it to operate strictly on weekdays.
Any guidance or suggestions on how to achieve this would be greatly appreciated.
Thank you in advance for your assistance!
Best regards,
[Kotala Saraswathi]
Feel free to customize this request as needed and then post it in the Atlassian Community to get help with your issue.
If I understand correctly you want the date difference calculation to exclude weekends and your current calculation is:
{{now.diff(issue.created).abs.days}}
As per the documentation concerning smart values for date and time:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
...if you look at the diff function you will see that it has an option for business days.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill i want smart value {{now.diff(issue.created).abs.days}} in issue aging filed only need to count Monday to Friday.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Refer to the answer I provided. Use the businessDays option instead of abs.days
If you want it to always be a positive number then use businessDays.abs
As per a note farther down in the document "BusinessDays (business days are considered to be Monday to Friday, 9am to 6pm)"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill thanks for you reply.
i don't have idea in automation. that's why I have one more doubt. please tell me.
(business days are considered to be Monday to Friday, 9am to 6pm)" if i created issues after 7pm to 8am it will count are not?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't know. I suggest you create a version of the rule that uses a Manual trigger and only prints the result of the calculation to the Audit Log, and then trigger the rule from issues created outside of the 9 am to 6 range and review the results.
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.
That image does not show a rule that is using the date diff function, which is the context of this Question post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No action done is showing like this.
The message in the Audit log indicates that no qualifying issues were found. Check the JQL in your trigger to confirm that it is finding issues. Also note the checkbox below the JQL in the trigger. In addition to matching the JQL the issues must also have had some update since the last time the rule ran, otherwise they will not be considered.
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.
Have any of them changed since the last time the rule was run?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill actually its running rule every day mrg 9am Monday to Friday. when start Monday running rule its counting Saturday ,Sunday also. below given screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That history information is from September 11. You just changed the rule today, September 27, so that it would not include weekends in the calculation. The information from September 11 is not relevant to the rule today.
Have any of the 133 issues selected by the JQL been updated in any way (status change, field updates) since the last time that the rule was executed?
The issues must have been updated in some way since the last time the rule was executed or they will be ignored by the rule. That is what the checkbox means in the last image I posted.
If you want the rule to recalculate the information even if the issues have not been updated then you need to uncheck the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill Good morning
the businessDays option instead of abs.days. this rule is working but its came None
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have a typo in the smart value. Remove the blank space between "business" and "Days".
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.
Hi @Saraswathikotala , can you share an image of your rule with the details on your conditions for business days?
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.
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.
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.