Forums

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

Automation - Linking Epic to Initiative when parent doesn't exist

Nikki Hylton
Contributor
December 2, 2022 edited

Is there a way to automate epics so that if they do not have a parent initiative, they are automatically assigned? We will always only have one initiative per project, and want epics to be automatically assigned to that initiative in case that step is missed. 

We have this so far, but we need a way to automate the initiative ID, rather than hard coding it like we have here, "CST-8"

MicrosoftTeams-image (6).png

Resources used so far: 

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Linking-issues

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

2 answers

2 accepted

4 votes
Answer accepted
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.
December 2, 2022

Hi @Nikki Hylton - If you're looking to get the initiative dynamically, you could do something like this...

Just before your Edit Issues Action, add a Lookup Issues action

issueType = Initiative

For good measure, you probably want to make sure that there is only one Initiative so you could add an advanced condition of:

{{lookupIssues.size}}
Equals
1

Replace CST-8 in your Edit issues action with this:

{{lookupIssues}}
Nikki Hylton
Contributor
December 7, 2022

Exactly what we needed - thanks so much!

Like Mark Segall likes this
Nikki Hylton
Contributor
December 14, 2022

Hi @Mark Segall - thanks again for your help before! This worked perfectly within a project, but now we're trying to make a global rule across all projects. We have a global rule in place which is now searching for Initiative across all projects... so we'd like to modify it to lookup the Initiative in the same project  where the issue (epic) is being created. Any ideas?

 

Thanks again,

Nikki

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.
December 14, 2022

Yes, following the same assumption that there is one and only one initiative per project, you would change your lookup issues action to this:

project = {{issue.project}} and issueType = Initiative
Nikki Hylton
Contributor
December 14, 2022

Hi @Mark Segall,

Thank you! We tried that but it throws this error: 

MicrosoftTeams-image (7).png

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.
December 14, 2022

Maybe try this instead:

project = {{issue.project.key}} and issueType = Initiative
Like Nikki Hylton likes this
Nikki Hylton
Contributor
December 15, 2022

That did it- thanks so much!

Like Mark Segall likes this
1 vote
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2022

Does the single initiative for the project live within that project or in it's own project? Is there anything in the initiate that identify which project it belongs to? If the answer is yes to either of these questions you could use the lookup issues action to get the issue key for the initiative and then add it to the epic.

Nikki Hylton
Contributor
December 7, 2022

The single initiative lives within that project. Lookup function worked - thank you!!

Nikki

Like Mikael Sandberg likes this
Rodolfo So April 9, 2023

Hi @Nikki Hylton 

Can you share screenshot with your automation rule for this?

 

Thanks

Rod

Nikki Hylton
Contributor
April 10, 2023

Hi @Rodolfo So ! Here is how our automation is set up. We renamed initiative to “Project Level (Do not use)” and the custom field mentioned is the parent link.

 jira automation1.png jira automation2.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, loom, AI, meeting recording, community

[NEW] Record your meetings with Loom

Welcome to great meetings, with less work. Automatically record, summarize, and share instant recaps of your meetings with Loom AI.

Learn more
AUG Leaders

Atlassian Community Events