Get Initiatives and Epics

Melissa C
Contributor
November 4, 2024

Hello, 

I'm looking to get all Initiatives with Fix Version 25-Q1, this is straight forward, but I also need all of the Epics under all of the Initiatives 
I know this can be done on an individual level, but I'm not sure if can be done on a filter.

We are on Jira DC, a lot of the research says to use portfolioParentOf(), but I don't think there is a DC equivalent. 

@Bill Sheboy  You have been very helpful in other questions I've asked, wondering if you have a suggestion. 

1 answer

0 votes
Dick
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.
November 5, 2024

Hi @Melissa C 

You're a bit like me, going against the grain, or in this case, the hierarchy of issues types. You need  a field on the epics to be set  to a certain value depending on their connection to an initiative. If something happens to either epic or initiative, this value should be re-evaluated.

What I did was done in two automations, The first one (initiation) sets you up for further maintenance using the second automation (maintenance). The maintenance can be broken up in two separate automations as these can be triggered by either a change in the initiative or a change in the epic.

 

Initiation:

Lookup the epics of each initiative and copy the latest fix version value into the epic (mind you, that field gives you an array of strings, so use .last to retrieve the latest in the row). As you're on datacenter (like me), you don't get the foreach function in Automation, which makes this task cumbersome. Best approach this by making a user-triggered automation, that you need to select from the more-menu for each of the initiatives manually (sorry).

 

Maintenance:

1. You need to catch modifications to initiatives that have their fix/version field altered. This would require looking-up the epics from the previous fix/version field (use fromString to get that value). Then your need to fill the field on the epics with the toString value of the initiative.

2. You need to catch all possible actions with epics in relation to being linked to initiatives: which means you need to monitor:

  • New epic gets attached to an initiative
  • Epic gets moved between initiatives
  • Epic is detached from an initiative

 

Obstacle to be conquered:

All these comparisons with the fix/version field are a bit hampered by the fact that this field yields an array of string values. The order of that array is the order that the user generates them. Also edits can be performed in the middle of the array of values (deleting of a previously entered fix/version). This adds possible confusion and/or difficulty of really getting the fix/version you need. I would recommend using a more "immutable" field such as a component, with values Q1 through Q4. Where an additional target end date  field can provide the year that is needed.

 

Hope this sets you on track,

Dick

Dick
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.
November 12, 2024

Hi @Melissa C,

Does the line of thought given above resonate with you? 
I welcome your feedback in this regard. 

Dick

Suggest an answer

Log in or Sign up to answer