Forums

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

How to prefill a custom field with the link of an initiative?

AB January 20, 2022

Hi!

Our issue hierarchy looks like this:
Initiative
Epic (contains standard link to initiative)
Story (contains epic-link)

I need a link or Custom Field in the Story with the Initiative-Key - ideally automatically filled and not manually.

Question 1:
How do I query which Epic the Story is linked to? I could do it this way, but doesn't seem like the best way:

issueFunction in linkedIssuesOfAll("issue = STORY-1") and type = epic

Question 2:
What is the best way to query the initiative then? It goes like this, but is that ideal?

issueFunction in linkedIssuesOfAll('issueFunction in linkedIssuesOfAll("issue = STORY-1") and type = epic') and type = initiative

Question 3:
What is the best way to store the initiative information in the story (dynamically)?

Cheers

1 answer

1 accepted

0 votes
Answer accepted
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2022

Hi @AB 

For Qs 1 and 2 it's only possible with Scriptrunner and you have the JQL that works best to returning issues which you need

For Qs 3 Automation is the answer

AB January 20, 2022

Hi @Pramodh M 

thanks for your reply! I'm happy that I had the right idea for the queries. And yes, Automation might be the answer for many things but unfornately I won't be able to use it for my project.

Alexander

AB February 1, 2022

Hi @Pramodh M 

I have discarded the jql approach.

I made a Scriptrunner Field for it. Fist I identify the epic link of the issue, then I get the key of the epic. Then I search for all links of the epic and filter for the link of the type initiative. After that I return the key and the summary in the field as html.

Alexander

Suggest an answer

Log in or Sign up to answer