Forums

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

Help me link an issue to linkissue.issuelinks, I think I just need help with formatting.

kimberly July 20, 2022

I need help fixing this jql/smartvalue automation. What I am trying to do is to pull back the links on the linked issues.  

#lookupissuesbrings brings back 5 arrays of ticket keys. (picture 1 & 2) 
Screen Shot 2022-07-20 at 9.32.20 AM.pngScreen Shot 2022-07-20 at 9.31.11 AM.png

I figured out how to get the values out of the brackets/arrays. (picture 3 & 4)
Screen Shot 2022-07-20 at 9.34.08 AM.png
Screen Shot 2022-07-20 at 9.34.03 AM.png

However a need to add a comma after each of key. I figured out how to do that too. (picture 5 & 6)
Screen Shot 2022-07-20 at 9.40.34 AM.png
Screen Shot 2022-07-20 at 9.40.28 AM.png

But I can't figure out how to get rid the last comma before the parentheseis. I tried "{{^last}}," but that takes the last comma from each array. I have been working on this for waaaaaaaaaaaaaaaaaay too long and cannot figure how to remove it.

I have tried putting the lookupissues in a variable as well, I can't figure why that won't work. I have tried splitting key for the smart value, that won't work for me either. But it is driving me bananas.

If you all have a different way to approach this, that works too.

Screen Shot 2022-07-20 at 11.51.34 AM.png

2 answers

1 accepted

1 vote
Answer accepted
kimberly July 21, 2022

I figured it out! 

issue in ({{#lookupIssues}}{{issuelinks.inwardissue}}{{^last}}, {{/}}{{/}})
0 votes
Bill Sheboy
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.
July 20, 2022

Hi @kimberly 

When using that {{^last}} syntax did you close it with a {{/}} ... so something like this:

{{#lookupIssues.issuelinks.outwardIssue}}{{key}}{{^last}}, {{/}}{{/}}

 

Kind regards,
Bill

kimberly July 21, 2022

The problem is when I do that, it removes it after every array, not just the last array.

Screen Shot 2022-07-21 at 11.32.43 AM.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events