Hi,
I'm trying to edit a custom field value in a ticket through Jira Automation. As a result I want custom field value to be same as a value of another custom field in some other ticket.
can something like this work:
{
"fields": {
"customfield_10356": "{{issue.KEY-123.customfield_10269.value}}"
}
}
If not, what could be the solution. I would prefer a solution without buying Jira addon.
Thanks in advance for any help.
If those issues are linked to each other then I believe you can use the branch rule with linked issue. You can then save the value in a variable which you can later reuse in the rule. Or try {{triggerIssue.customfield_10269}} to get the value. I am quite sure one of these method should work.
Hi @Ravi Sagar _Sparxsys_
Thanks for your reply, but the two issues are not related / linked in any way. I'm here referring to two independent issues. I believe both of your suggestions work only for linked issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you need to use links for this to work. You can't use smart values to fetch values of issues by using hard coded issue keys.
However if are not using the issue links then another solution would be to make a web request using Automation. In response to a web request you will get a json data containing that issue's data which you can use in your rule using a smart value {{webhookResponse}}
I have explained how to make REST calls here if you want to take that route but I still think using issue links will be much simpler and easy to maintain solution.
While I was write I realised that you can also use branch rule to run JQL based on that issue key and use a variable to store the value, basically you need some way to reach that issue to fetch its fields.
I hope it helps.
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ravi! You are right. I needed to create that link to get the values from another ticket. Your advise helped me to find the solution. I used 'Lookup Issues' to get the ticket using JQL query. I could then fetch the details (summary) using below Json:
{{#lookupIssues}}
{{summary}}
{{/}}
However, there is a limitation as we can only fetch limited fields value. For example, custom fields value cannot be fetched.
https://support.atlassian.com/jira-software-cloud/docs/automation-actions/#Automationactions-Lookupissues
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.
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.