How to check if bug is part of an epic?

Nauman Ahmed August 16, 2022

Hi,

I want to create some rules in Jira. Wondering how type of parent can be checked for bug or task ? This also requires dynamically setting custom fields to required options based on condition.

Rules required are:

if Bug is not part of an Epic, set CustomBucketField=Corrective Content

If Task is not part of an Epic, set CustomBucketField=Operations

 If CustomBucketField=blank, app. assigns per RAB 

RAB stands for Resource Allocation Bucket which is another custom field like CustomBucketField.

 

2 answers

0 votes
Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2022

Hello @Nauman Ahmed 

An automation rule structured similar to this may help you. I second @Mark Segall questions and approach, but I'd suggest simplifying the "Epic check" condition as illustrated:

Screen Shot 2022-08-16 at 3.09.38 PM.png

 

As Mark asked, I am not sure how your last rule above plays into this, if that last rule does not depend on the presence/absence of an Epic, then you would need to restructure the rule as I illustrated it here.

Hope this helps

Nauman Ahmed August 17, 2022

Hi Samuel, 

thanks for your prompt response.

I am looking at your screenshot - are you using any particular plugin ?

This doesn't look like automation for jira?

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2022

Hello @Nauman Ahmed this is Automation for Jira, it looks different from what you posted as I can see you're using the server version.

In any case, it looks like the Related Issues condition should work if you want to check the existence of an Epic:

Screen Shot 2022-08-23 at 8.42.12 AM.png

I understand it will look a little different than what you're seeing, but if you have the "Related Issues Condition" then you should be set

Like Mark Segall likes this
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2022

@Nauman Ahmed - As @Sam Nadarajan suggests this will work on Jira server.  I have confirmed in my environment.

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2022

Hi @Nauman Ahmed - You'll want to think of it in terms of trigger, condition, and action.  From your description, it sounds like you have a condition and action, but I'm not getting how it triggers.  So, if you need help with that please, share when this rule is expected to trigger (e.g. issue created, field value changed, schedule, manual, etc.).

It sounds like you have a couple conditions:

  1. Issue Type
  2. Epic association
    NOTE - This one will be different depending upon whether your project is Company-Managed vs Team-Managed.
    1. Company Managed: "Epic Link"
    2. Team Managed: Parent

Here's how you can address it (this is based upon company-managed so if you have a Team-Managed project, you'll just need to substitute Parent wherever I reference Epic Link):

  • TRIGGER: Your trigger
  • IF CONDITION: Issue Type = Bug AND "Epic Link" IS EMPTY
    • ACTION: Edit Issue - CustomBucketField = Corrective Content
  • E:SE CONDITION: Issue Type = Task AND "Epic Link" IS EMPTY
    • ACTION: Edit Issue - CustomBucketField = Operations
  • ELSE
    • ACTION: Edit Issue - CustomBucketField = {{issue.Resource Allocation Bucket}}

I'm not entirely sure of the last condition so what I have there is based upon my interpretation of what you shared in the description.

Nauman Ahmed August 23, 2022

@Sam Nadarajan  / @Mark Segall : guys thanks for pointing me in the correct direction, i've managed to create an automation rule - there is only one issue

The EPIC LINK field is not available for automation rules, it does not show in the list of available values and i learned that it used to be available but then it was removed.

In the picture uploaded - the highlighted field should be EPIC LINK - is there any way to get that in automation rule?

Nauman Ahmed August 23, 2022

automation.jpg

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
5.0.3
TAGS
AUG Leaders

Atlassian Community Events