Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get custom field and concatenate values in an issue from linked issues?

Angel Ferreira
Contributor
March 21, 2024

Hello:

How to get custom field and concatenate values in a text field in an issue from linked issues?

 

Thanks 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Kalyan Sattaluri
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 21, 2024

Hello @Angel Ferreira 

Can you tell what are you trying to do or what is the requirement?

If you have an issue, do you want to find all linked issue's custom-field value, concatenate them and edit your original issue? Please share details so community can help. You want to find this value from all linked issues or from certain link types? So many questions, lol

Angel Ferreira
Contributor
March 21, 2024

Hi,

Yes, I want to find the customfield value of all linked issues, concatenate them and add this string into a customfield within the original issue.

Kalyan Sattaluri
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 21, 2024

Broadly speaking there are 2 types of issuelinks. inward and outward.

Lets assume you have a trigger (manual/scheduled/field change etc)

And, If "Text 1" and "Text 2" are my customfields I want to retrieve from linked issues..

Then you should be able access your link's fields using below syntax:

{{issuelinks.inwardIssue.Text 1}}  <-- Gives list of all values in Text 1 field from links under inward categories.

{{issuelinks.outwardIssue.Text 2}} <-- Gives list of all values in Text 2 field from links under outward categories.

So a smartvalue like below will give you a comma separated list which you can use to edit/assign your trigger field.

{{issuelinks.inwardIssue.Text 1}}, {{issuelinks.outwardIssue.Text 2}}

image.png

 

If you dont want comma separated, you can save them individually in variable, split them and combine them however you want.

Hope it helps.

Like Laurie Sciutti likes this
Kalyan Sattaluri
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 21, 2024

BTW, may have to do a check on size of the list before you combine cause if {{issuelinks.inwardIssue.Text 1}} is empty, your end result will look like ",MINEMINE" ..

But hope you got the big picture and let me know if questions/clarifications.

Angel Ferreira
Contributor
March 21, 2024

Thanks thats works for me, Is it possible to remove the space between values ​​and just separate them by commas?

Angel Ferreira
Contributor
March 21, 2024

I solved sepate by commas only with this sitaxis:

 

{{#issuelinks.outwardIssue.customfieldName}}{{.}}{{^last}},{{/}}{{/}}

 

Thanks @Kalyan Sattaluri

Like Kalyan Sattaluri likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events