Hello:
How to get custom field and concatenate values in a text field in an issue from linked issues?
Thanks
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
If you dont want comma separated, you can save them individually in variable, split them and combine them however you want.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks thats works for me, Is it possible to remove the space between values and just separate them by commas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I solved sepate by commas only with this sitaxis:
{{#issuelinks.outwardIssue.customfieldName}}{{.}}{{^last}},{{/}}{{/}}
Thanks @Kalyan Sattaluri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.