Forums

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

how to display epic name in issue type (story, task and subtasks)

Tehmina Aslam
Contributor
March 31, 2022

Hi,

In my Issuetype = Epic, the Issue name and Summary is synced. But I want to be updated the field "Epic Name" in the Tasks, Story, and Subtask when these are linked with the Epic link. 

 

Can we create some kind of rule that checks if a story/task/ is linked with an epic then the EPic name should be automatically updated with the Epic Summary or Epic name based on the epic link? 

 

I have created the below rule but it only posts the comment with null, it should check the epic link and get the value of summary and epic name and post it and place it in the epic name filed. What I am missing here?

2022-03-31_15h09_18.png2022-03-31_15h10_38.pngThanks in advance

2 answers

2 votes
Nic Brough -Adaptavist-
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.
March 31, 2022

The Epic name field is only valid on Epics, you'll have to copy the value into a text custom field if you want it to appear on other issues.

Tehmina Aslam
Contributor
April 2, 2022

Thank you for reply :)

1 vote
Bill Sheboy
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.
March 31, 2022

Hi @Tehmina Aslam 

Beyond the scope of your question about cascading the epic information (which Nic has answered), I note a few things in your automation rule to consider:

  • Given the inconsistencies in capitalization/spacing of smart values, I highly encourage you to never use a created variable name that can match an issue field name.  Instead consider always adding a prefix to make them unique and avoid confusing the rule engine.  For example, use {{varEpicName}}
  • As you have designed your rule, the created variables will often be null after that branch because the condition tests for Task, Story, and Subtasks...but the JQL noted is for key = {{issue.parent.Epic Link}}  which will only work for the Subtasks.
    • One solution is to use an if/else condition on issue type and...
    • For Story and Task, just use the values directly of {{issue.parent.Epic Name}} and {{issue.parent.summary}}
    • For Subtask, branch to the parent issue first and then you can access the "grandparent" epic.
  • Your rule uses the generic Issue Updated trigger...and so could trigger itself...or not if the rule engine detects the looping.  Please consider how you want to structure this solution to meet your need.  For example: specifically check for a changes to an Epic, created issues, or changes to a standard issue type's Epic Link field (in story, task, or bug).

Kind regards,
Bill

Tehmina Aslam
Contributor
April 2, 2022

Thank you for your detailed reply. let me try and get back to you

Tehmina Aslam
Contributor
April 3, 2022

@Bill Sheboy I have tried all your mentioned things but the issue is, that varEpicName or varEpicSummary is not saving the actual name it just showing my initial value which is null. 

Now just want the the epic name from the story 

2022-04-04_11h49_37.png

Bill Sheboy
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.
April 4, 2022

Hi @Tehmina Aslam 

That error in the audit log shows that the branch's JQL is not getting a key value, which can occur if the source issue was a Story or Task: checking one of those for {{issue.parent.Epic Link}} has no meaning as Epics do not have Epic Links.

Please check again if your if/else logic is correctly handling the cases.  You may need multiple rules to do this, as I suggested earlier.

Case 1: for an Epic, the Epic Name or Summary change

Case 2: for a Story or Task which are assigned to/removed from a parent Epic.  There are actually two sub-cases: create and update.

Case 3: for a Subtask which is a child of a Story or Task...(please see Case 2 above).

 

This complexity is one reason not to implement rules like this, as they are duplicating the data stored in other issues, normally provided via the issue hierarchy.  Another approach may be to investigate reporting or JQL addons which allow you to see what you want with out creating such rules and duplicating the data.

 

Kind regards,
Bill

Like Tehmina Aslam likes this
Tehmina Aslam
Contributor
April 6, 2022

For some, my rule works :) 

2022-04-07_10h14_01.png

Suggest an answer

Log in or Sign up to answer