Automation for jira - update epic based on status of linked tickets
Asked by Gantner NV:

We're struggling to get the status of EPIC ticket updated thru automation-for-jira based on the status of the linked ticket.

In our current setup we've got 'Analysis Tasks' and 'UserStories/TechnicalSpikes' which are linked to an Epic.

Thru automation for jira we want to achieve following:

* 1) If min. 1 issue of the 'Analysis' -- issues type, linked to the EPIC, has been updated to 'in progress' the EPIC should be updated to 'In Preparation'. (UseCase 1)  

* 2) If ALL the issues of the 'Analysis' -- issue type, linked to the EPIC, have been updated to 'closed' the EPIC should be updated to 'Ready for development' (UseCase 2)  

* 3) If ALL the issues of the 'UserStories/TechnicalSpikes' -- issue type, linked to the EPIC, have been updated to 'awaiting for release' the EPIC should be updated to 'awaiting for release'(UseCase 3)

* 4) If ALL the issues of the 'UserStories/TechnicalSpikes' -- issue type, linked to the EPIC, have been updated to 'closed' the EPIC should be updated to 'closed' (UseCase 4)
* 

UseCase 1 is working fine but UseCase 2/3/4 fails due to issue-condition in the automation-for-jira rule.

* In UseCase 1 \> any of the 'Analysis' tasks should be updated to 'in progress'
* In UserCase 2/3/4 \> all of the 'UserStories/TechnicalSpikes' should be updated to a certain status ( and the status of other tickets linked to the epic should be ignored )

We already tried many different options but somehow we're not able to implement these simple use-cases.

Any thoughts?

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/134559iF5A8838DFBA9604C/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Bill Sheboy
body: Hi [@Gantner NV](/t5/user/viewprofilepage/user-id/3876550)

Thanks for the detailed set-up information for your question.

When you note that Use Cases 2, 3, and 4 fail due to the issue condition, what is the symptom you are observing? Does it have an error in the audit log? If so, please post an image of that as well.

And, reviewing your information it would appear there is an order of precedence for your use cases' tests. How are you enforcing that ordering?

Best regards,

Bill

comments: author: Gantner NV
body: hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Correct -- In the Audit-Log we always get 'The following issues did not match the condition:', although as per our knowledge it should meet the condition.

We've a simple EPIC workflow, having an 'all to status' -- transition for all status with a status-condition to 'hide transition for user'.

It seems that the 'Related Issues Condition' applied to Usecase 2/3/4 if causing the issue but NO idea why.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/134651i302FA49A4FC473E4/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/134652iF9B0A644F44A3ABA/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/134655iF004DB48448BC37F/image-size/large?v=v2&px=999 "image.png")


author: Bill Sheboy
body: Hmmm... I wonder if that last line in your workflow transition is the problem: Only users in group jira-administrators can execute this transition.

The actor for the automation rule is typically defaulted to Automation for Jira, and that is not an administrator.

If you remove that last user restriction, what happens?


author: Gantner NV
body: hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) - unfortunately this didn't to the trick as the automation-for-jira rule is executed by a user ( called Jira-admin ) which is a member of the jira-administrators group.

Any other bright thoughts?


author: Bill Sheboy
body: Thanks for that information.

Have you tried to remove that last user restriction to see the results, regardless of the rule's executing user? I am wondering if this is one of those edge-cases where interactions between rule execution and workflow is causing a problem.


author: Gantner NV
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) - I gave it another try but same result

( - the user-restriction has been removed in the workflow - )

Any other bright ideas because i'm out of options ;-(

Thx in advance,


author: Bill Sheboy
body: Hi [@Gantner NV](/t5/user/viewprofilepage/user-id/3876550)

One more thing to check: in your related issues JQL, please check that the case of the issue type and status values match your definitions. I have seen situations where something like "closed" and "Closed" behave differently.

If that doesn't help, I suggest you submit a ticket to support so they can look at your instance up close: <https://support.atlassian.com/contact/#/>

I cannot tell from your question if you are on a free or paid license for Jira; only the paid-license site admins can submit support tickets.