Forums

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

Automation rules creation

Hasanein Ba-Alawi May 12, 2021

Team

Can you please help with this requirement. We have a issue item workflows, of which I want to automate transitioning for this scenario.

After an issue is moved to workflow X, after 4 weeks from this date, automatically transition the workflow to Y (if there are no open bugs, issues, tasks,...) is that possible? I started the below which I hope is a good starting point.

Thanks.

Has Rule.PNG

2 answers

2 accepted

0 votes
Answer accepted
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2021

Hi Hasanein,

Developer from Automation here.


As mentioned above by Alex one method would be to set a custom date field, then have a scheduled rule that checks the date saved. JQL by default should support time in status checks though, so you can use this provided you don't care which status is transitioned  from otherwise you should do the above, anyway if not you can do something like: status != "Done" and status changed to "TO DO" after -4w. 

Regarding your mention if no linked issues being opened, you can also use a "Related issue condition" and provide JQL to check if one of them isn't Done or Open depending on your setup.

Here's my example of course you'll need to change statuses based on your workflows, might be worth testing it with a shorter time in status first to make sure it works for you:
Screen Shot 2021-05-14 at 5.10.32 pm.png

Screen Shot 2021-05-14 at 5.01.08 pm.png


If you require further help with your rule then you can contact our support here: https://support.atlassian.com/

Cheers.

Hasanein Ba-Alawi May 14, 2021

Thanks team. 

0 votes
Answer accepted
Alexander Pappert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2021

you could use automation addon

https://www.atlassian.com/software/jira/automation-template-library/rules#/rule/new/new

rule #1:

trigger on transition

when issue is transitioned to status B, you can fill a custom date field with the date

rule #2:

manual triggered with CRON settings

when issue has status B AND date >30d, then transition to status C

+ optional empty the date field (if you have a workflow that can go back to Status B)

 

I have some extra addon, which shows the time that the issue stucks in the current transition. if automation is possible to read this information, then you would only need rule #2.

Hasanein Ba-Alawi May 12, 2021

Thanks for your prompt response the solution looks promising. I need to ensure the CRON job only runs IF there are no linked AND open issues. Is that possible?

Alexander Pappert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2021

with CRON, you define when the automation rule is triggered (I would do it daily at night)

after CRON, just insert some condition (IF or JQL)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events