Hey, I have created a URL field in my form where people paste in the URL to the jira task they would like linked.
How can I automise this?
I have included some screenshots of where I need help :) I have set it up so that when an issue is created and the 'er knyttet til en annen oppgave?' is not empty then the edit issues field is edited. I then want the URL from this field to be used so that it knows which issue to link.
Hoping this makes sense :)
Here's how to do it:
Replace trigger and conditions to match your scenario.
Hi @Hannah Sorrell -- Welcome to the Atlassian Community!
You could use text functions to extract the issue key from the URL in the custom field, and then use that in the Link Issues action: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/
For example, the issue link URL probably looks like this:
your Jira URL/TEST-123
And so the key may be extracted with:
{{issue.yourCustomField.substringAfterLast("/")}}
That will work if the field is plain text. If it is a smart link, use this:
{{issue.yourCustomField.substringAfterLast("/").substringBefore("]")}}
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.
Thanks Bill! Could you explain this a little more?
It is possible to ask people to write the issue number, for example TEST-123, instead of the URL.
However I have not managed to automate linking of tasks yet.
Here is what I have just tried :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what happens when I create a text field in the form instead of a URL:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thing, when using the Issue Created trigger, it can fire so quickly that some data may not yet be available to the rule...potentially causing unexpected behaviors.
The fix for that is to always add the Re-fetch Issue action immediately after the trigger, to slow down the rule and re-load the data:
Next, smart values are name, spacing, and case-sensitive. When an incorrect one is used it returns as null. I recommend pausing to confirm the correct smart value (or custom field id) for your field using this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Finally, if your team members may enter just the issue key or enter a URL, the rule will need to handle both cases. Is that accurate?
You may want to create a variable for the expected key and then use a condition to test it. For example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Hannah Sorrell
Great question here, and meanwhile I'm unsure whether the URL can be used to link it you can always give it a try by using the "Link issues" action alongside the smart value for the field. That dropdown can also have values typed in.
To access the field you've created use {{issue.Field Name}}, in this case for your example you'd put in {{issue.er knyttet til en annen oppgave?}}
It may not work with URLs, but worth a shot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much, I gave this a try but unfortunately had no luck.
Something interesting is, even when I have the value set to 'trigger issue' or 'most recently created issue' I still don't get an any tasks linked. So I wonder if there is something else wrong with my automisation rule also?
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.