I'm trying to automate creating new task when another task is transitioned to done. Within the "done" task is a custom field that I want incremented up one and included in the new task's custom field.
My steps so far:
What's Left:
If anyone could assist I would be extremely grateful. I haven't been able to find information on how to store info from an automation triggered issue then increment and place it within the new issue.
Hi @Kasper Ramstafer and welcome to the community!
You would use this in the Annual field for the Create Issue action:
{{#=}}{{triggerIssue.annual}}+1{{/}}
Hi @Kasper Ramstafer -- Welcome to the Atlassian Community!
Adding to Mark's answer...
There are built-in math functions for add, substract, etc.: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
So you could also use {{triggerIssue.annual.plus(1)}}
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.
Thank you both for your quick responses! It looks like this has worked for me! Quick follow up question if the custom field is two words like Annual Rate would you use quotation marks for the code? Example: {{#=}}{{triggerIssue."Annual Rate"}}+1{{/}} or would it just be all one word?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would be like this:
{{#=}}{{triggerIssue.Annual Rate}}+1{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Smart values are name, spacing, and case sensitive. When in doubt of the smart value for a field (or if a field is even supported) please try this how-to article.
Essentially you identify an example issue with your field, call the REST API from a browser, and search for your field on the page to learn its smart value.
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
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.