Forums

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

Jira automation- retrieve issuelink custom field value for a specific link type

Peter Reiser
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.
February 11, 2022

We have a use case very we need to inherit certain custom field values from the

link type is implemented by 

 

We use the smart value   {{issue.issuelinks.inwardIssue.CUSTOM_FIELD}}

which provide the values for all inward links but I need to extract only the values for 

link type is implemented by 

How can this be done ? 

 

Here is the current automation rule: 

 

Screenshot 2022-02-11 at 17.15.33.png

 

5 answers

1 accepted

0 votes
Answer accepted
Peter Reiser
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.
February 11, 2022

@Stefan Salzl 

Yepp I am from Switzerland - Since this  community is more english oriented I stick to english :-)

The trigger and link extraction direction is all  clear and works well with a single link.

The issue is  when we have multiple links on the same issue, then   {{issue.issuelinks.inwardIssue.CUSTOM_FIELD}} is returning the values for all links and there is no way to know which value comes from which link type

 

in the described scenario where we have 2 link types (blocks/Implements) we receive

Country custom field value: SK-Slovakia,CH-Switzerland

and we don't know which value belongs to which link type

 

Grüezi aus der Schweiz

Peter

Stefan Salzl
Community Champion
February 12, 2022

Hi @Peter Reiser ,
I was just always try to know the whole specification and details on a functional level to then find a solution on the technical side (the same as I do in software development).

 

Therefore I´m not quite sure my thoughts fit the requirement but I´ll give it a shot:

As you mentioned your trigger works: did you also think of the trigger "Issue linked"?

  • With this trigger the rule could listen for a certain link type (in your case "implements/is implemented by").
  • With the inward/outward relation this automatically provides the destination and source issue.
  • You could then automatically do a "copy from destination issue".

 

Might that be a feasable way? What do you think?

I´m going to create an example.

 

Looking forward to your answer.

 

Best
Stefan

Peter Reiser
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.
February 12, 2022

Hi @Stefan Salzl  thanks for your effort and example

 

It looks like its is currently not possible to retrieve the values for a particular link type when multiple links exist. 

 

see https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Can-I-retrieve-the-issue-key-of-a-Linked-Issue-in-Automation-for/qaq-p/1009032#M52645 

Stefan Salzl
Community Champion
February 12, 2022

Hi @Peter Reiser ,

if the link you provided here is the same you are looking for then I got you completly wrong.

 

My understanding was:

  • There is an Epic A
  • Story B --> "implements" Epic A
  • Story C --> "implements" Epic A
  • Story D --> "blocks" Epic A

 

  • field values from Epic should be inherited to linked issues but only to those linked with "implement/implemented by"

 

As I got it right here please see my screenshot with the "Issue updated" trigger. I tested it on my site with having different link types in one epic and only those with the "implement" link have been updated.

 

Best

Stefan

Stefan Salzl
Community Champion
February 12, 2022

Before change:

image.pngimage.pngimage.png

 

After changing Field "Stage" in EPIC (and automation rule):

  • image.png

 

  • no changes made in "blocks" linked issue

image.png

 

  • changes inherited to issues with "implements" link

image.png

 

  • audit log of automation rule shows changes/changed issues (the changed issues are those linked with "implement")

image.png

Stefan Salzl
Community Champion
February 23, 2022

Hi @Peter Reiser ,

Could you take a look at my latest suggestion/documentation? Your feedback would be highly appreciated.

Best
Stefan

Peter Reiser
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.
February 23, 2022

Hi Stefan - 

Many thanks for your detailed suggestion. 

Your solution definitely would work well except we hit

a.) this restriction:  Right now there isn't a way to filter down the smart value:

b) this bug: {{issue.issuelinks.first.inwardIssue.CUSTOM_FIELD}} is NOT working  and does not return any value

0 votes
Manoj N
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 21, 2022
0 votes
Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2022

Hi @Peter Reiser and @Stefan Salzl,

Right now there isn't a way to filter down the smart value:

{{issue.issuelinks.inwardIssue.CUSTOM_FIELD}}

To just one of the issue links. 

@Stefan Salzl suggested looking at the issue linked trigger. If you use this and then filter for your link type you get access to the information that you're after.

Cheers,

Simeon. 

Peter Reiser
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.
February 15, 2022

@[deleted] 

 Right now there isn't a way to filter down the smart value:

 

This is unfortunate as we cannot retrieve the value for the specific link type. 

Also we found a bug:

{{issue.issuelinks.first.inwardIssue.CUSTOM_FIELD}} is NOT working  and does not return any value

{{issue.issuelinks.inwardIssue.CUSTOM_FIELD}} works but  we cannot select the first value 

Is this a know bug ?

 

The current workaround is to check if {{issue.issuelinks.inwardIssue.size}} = 1

and then use {{issue.issuelinks.inwardIssue.CUSTOM_FIELD} to set the value

but that only works if we have a single inward link...

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2022

Hi @Peter Reiser,

Can you raise a support request for this? It needs to be looked at in greater depth and possibly looking at your site data.

Cheers,

Simeon. 

Like Bill Sheboy likes this
0 votes
Stefan Salzl
Community Champion
February 12, 2022

Hi @Peter Reiser ,
As mentioned before I just tried to reproduce some scenarios that might fit your description/requirement:

 

  • "Issue update" trigger

image.png

 

  • "Issue linked" trigger

image.png

 

Looking forward to your reply.

 

Best
Stefan

0 votes
Stefan Salzl
Community Champion
February 11, 2022

Hi @Peter Reiser ,

could you please give a description how the use exactly looks like (like kinda step by step what should happen to which issues, which issue/level triggers the rule)?

I would like to better understand the use case in order to provide a solution that really covers the requirement.

 

Thanks in advance

Best

Stefan

Peter Reiser
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.
February 11, 2022

@Stefan Salzl 

 

We have Work Breakdown structure (WBS) templates for our software project using following hierarchy:

EPIC -> New Feature - Story

EPIC - New  Feature - New Feature - Story

etc. 

to build  the hierarchy below the Epic with use link Implements / is implements by 

Screenshot 2022-02-11 at 19.38.45.png

Now down the hierarchy we inheriting certain fields like Tempo accounts etc. to the child using automation. 

Now a story in the hierarchy  EPIC - New Feature - Story can have multiple linked issues with different link types.

As example we use Big Picture for planning where we automatically import the defined WBS structure. When we do dependency planning then link type blocks/blocked by is added.

but the hierarchy inheritance has to come from Implements / is implements by 

 

So that means with  {{issue.issuelinks.inwardIssue.CUSTOM_FIELD}} we get all the values for all the link types:

e.g.  Country custom field value: SK-Slovakia (from link blocks), CH-Switzerland (from link is implemented by )

and we can't just pull the value for the link type is implemented by  (CH-Switzerland)

 

So the questions is 

How can we just get the value for  Link is implemented by 

Stefan Salzl
Community Champion
February 11, 2022

Hi @Peter Reiser ,

Sorry I´m still not getting it in the Jira context. What exactly is the trigger?

like:

"When we update the epic-issue/when we do a certain update/action in the epic issue...."

 

and the furthermore what should then happen:

"....then all of the stories that are linked in this epic with "implements" should inherit certain values from the epic"

 

I just trying to figure out which action in Jira is really the trigger and in which direction values should be inherited.

 

Best

Stefan

 

BTW: Your name suggests you are from the DACH area. If you speak German and as I am from Austria we could also communicate in German ;)

Suggest an answer

Log in or Sign up to answer