Hi Atlassian community,
Hope everyone is doing okay.
I am trying to set an automation rule in my project, the rule is that:
- Trigger: when issue is transition to done
- Condition: it has been 48 hours since it was transitioned
- Action: delete issue
So basically I'm stuck at the condition part. How do you determine it has been 48 hours? And also, what if it is Thursday/Friday, how can Automation determines it is weekend so the rule should not run or more like: what the calculation should look like?
Kind regards,
John
First, are you sure you wish to delete issues? As you are likely are aware once deleted all history of its existence is gone.
with that said...
I would suggest you set up a daily automation rule and select the checkbox to run JQL and execute on the results.
resolutiondate <= startofday(-48h) And ???
??? = your additional criteria to operate only on the issues desired
Thank you, Jack Brickey.
You raised an interesting point, I really need to double check with the team members to see whether if they really want to delete the issues or not. The only thing I recalled was "making the issues in done column disappear".
In terms of JQL query, I'm not sure resolutiondate is one of the fields in Jira issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
thank you for your valuable response.
I just want to ask that if it the issue is done on Friday, then resolutiondate < startofDay(-48h) will delete the issue on Sunday. Is there anyway to make the JQL run specifically on Business Day?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JQL does not accommodate business days. One option would be to create a custom field and set it using automation since automation can consider business days using smart values. There are a number of posts on how to leverage Automation with business days and I encourage you to seek those out if this is of interest.
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.