Hello All
I have a custom field on an issue that contains multiple issue keys separated by commas. The field looks something like "Key-1, Key-2, Key-3". I want to write an automation that will parse out the issue keys and then link the trigger issue to the issues with keys from the custom field. Is there a slick way to do this?
Thanks,
Christian
Hi @Christian ,
yes you can achieve this, for that you have to use Automation and some scripting.Here's a high-level example of how you might implement this using Jira Automation:
Trigger: When an issue is created or updated.
Action: Use a script to extract the issue keys from the custom field.Iterate over the extracted issue keys.
For each extracted issue key (Use the Jira REST API or a Jira Automation action to link the trigger issue to the issue identified by the key.)
Thanks,
Heena Chaudhary.
Hello @Christian
Does the field have just this list of keys or do you have to extract these from the field? What I mean is, is your field like:
customfield_11 = key-1, key-2, key-3 .. or
customfield_11 =
Some text..... then your keys
key-1, key-2, key-3
then some more text
Please share a screenshot of a sample issue with this field populated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Christian
If your field is set up as shown in screenshot,
you can split them by comma and link them to your trigger issue.
Smart value to use is like below:
{{#Time in Development.split(", ")}} {{.}} {{/}}
My recommendation is to log values after the trigger, before linking so you know you are parsing it correctly.
Please see my screenshot I am using Text 2 is my example, you will replace it with your field.
Hope it helps and accept answer if it solves your issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Christian
Adding to Kalyan's suggestions...
Something to consider for a scenario like this is context and edge cases:
Please pause to consider these questions, and your answers, as they may impact the results versus what you expected for this scenario. Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.