Jira automation - Data Center and Server (Latest), Examples of using smart values with dates, Examples of using smart values with lists, Examples of using math expression smart values, Examples of using smart values with text strings. Available anywhere smart values are supported, to access the value of a field that has changed. Jira smart values in automation rules. In the below example, we list each fix version that the issue has been added to, followed by the version's release date, in bullet point form. If a customer has not responded to an issue in 5 days, close the issue and leave a comment. action: log to the audit file this value. Learn more about date and time smart values. {{issue.Request Type.currentStatus.status}} - Returns the status of the current request. Used with: the Clone issue, Create issue, and Create sub-tasks actions. https://bitbucket.org/account/repo. this is only available for some triggers. Learn about the concepts and procedures related to automation in Jira Cloud. Do more to earn more! For example, you might count how many issues have a priority of 'highest' and then send an alert. You could then use this to count the number of issues returned. A build represents the process in which files are converted into their final consumable form. {addedfieldChange.valueIds}} - Returns the id/ids of new value/values added. Now whenever this field changes in Jira, this automation rule kicks in. It is better to use this than name as it cannot be changed. This smart value only works for issues that have been added to an epic. And the rule itself? 2020-07-20T07:00:00.0+0000. You could then use this to count the number of issues returned. The trigger for automation is starting a new sprint (trigger = start sprint). role. Smart values are one of the most potent ways to do so. When we use this trigger, we can use the {{webhookData}} smart value to represent the POST payload - we'll focus on this here. Multiple comments on the active issue (this example is explained in detail inhow to use smart values), Components of an issue as a list. {{attachment.author}}: Returnsthe user who added the attachment. Examples of using smart values with text strings. For smart values related to the Insight feature in Jira Service Management, see Jira smart values - Assets. Accesses information for the current running rule. {{issue.url}} - Returns the URL of the issue. This re-fetches the latest state of the issue from Jira. {{attachment.mimeType}}: Returnsthe file format of the attachment. This is more than enough for the interfce to update the issue over API and when it is finished, my automation will jump in and continue. In this case, we want to perform an action on the parent of the sub-task so in the dropdown menu, we choose Parent. You can also trigger rules to run from third party services like Bitbucket or GitHub. For example if a rule has both a Create branch in GitHub action and a Create branch in GitLab action, the details of the most recent branch will be returned. [Custom Field].id}} - Returns the unique id for the field assigned by Jira. However, you can now change the rule actor for your automation rules. The following example sums all of the story points for issues returned from the JQL search. Field value changed Available in Server Lite: No Through the dot notation you can access fields like issue type, status and custom fields (details on how you can use these to interact with Jira's REST api are here) {{version.description}} - Returns the version's description. {{issue.Customer Request Type}} - Returns the customer request type for older Jira instances. View topic Examples of using math expression smart values Note that repository contains additional nested smart values. Which Jira-server version supports the use of smart value: "{{#if }} text {{/}}, or is this a Jira-cloud only functionality ? {{sprint.isStarted}} - Returnstrue if the sprint has started, andfalse if not. General triggers These triggers can be used across all Jira products. Smart values are variables that you can use in automation action configuration parameters. {{createdBranches.repository}} - accesses details of the branches' repositories, {{createdBranches.repository.id}} - returns the IDs of each repository, {{createdBranches.repository.name}} - returns the names of each repository. all fields available to{{issue}}are available here as well. In Linux/Mac OS, use a jq command, such as: In Windows, we can use Powershell's ConvertFrom-Json: Working with incoming webhook data in Automation for Jira. The "Request Type" prefix may be"Customer Request Type" in older instances of Jira. {{pullRequest.sourceBranch}} returns the name of the source branch, e.g. {{issue.comments.first.body}} - Returns the body of the first comment. FR Jira Dev Aug 05, 2021 I currently have an Automation workflow that creates multiple tasks and subtasks. {{versions.description}}- Returns the description of the affects version. {{fieldChange.from}}- Returns the previous raw value, e.g. Note that this will return an encoded URL; everything after bitbucket.org/ will look different from what you see here. Every rule starts with a trigger. Smart values - syntax and formatting; Jira smart values - issues; Jira smart values - conditional logic; . Examples of using math expression smart values. {{issue.watchers.displayName}} - Returns the watcher's display name. In the dropdown menu, you simply choose the field you want to work on, including custom fields and then edit. Learn more about user smart values. {{approval.decision}} - Returns the final decision of the approval. If multiple values are changed, use # to iterate over these. Send a daily Slack message with a list of issues still open in the Sprint. In the dropdown menu, you simply choose the field you want to work on, including custom fields and then edit. for a select field. {{comment.visibility.value}} - Returns the comment restriction label if any, e.g. For example, checking that all sub-tasks of a parent issue are resolved. Again say it aloud: Whenever the field value changes for story points AND it is a sub-taskTHEN for the parent of the sub-task. Learn how to integrate your source code management tool with Jira Cloud, Visit the marketplace to integrate your build or deployment tool with Jira Cloud. What goes around comes around! {{comment.visibility.type}} - Returns the comment restriction type if any, e.g. Can be combined with other date smart values. when setting multiple Fix Versions) then you can iterate over these using the{{#changelog.fixVersion}}{{toString}}{{/changelog.fixVersion}}expression. However sometimes the two fields holds the same person, resulting in an email with twice the same name. To get a property in it, we should use{{webhookData.someValue.childValue}}. You can also use this withlists. There is a feature request for it though - check outAUT-648. Wonderful :). The Atlassian Community can help you and your team get more value out of Atlassian products and practices. Returns the value of the Jira Service Managements scale custom field. {{commit.message}} returns the commit message, e.g. {{version.released}} - Returnstrue if the version is released, andfalse if not. {{issue.resolution}} - Returns the issue's resolution. If it has a time you may need to strip off the time part for the comparison by changing the format: {{triggerIssue.customfield_10043.jqlDate}}. Automation is a great way to reduce the manual work of keeping story points up to date. Because this smart value deals with multiple items (i.e: issues can have many fix versions), it can be used with the#symbol to apply the rule to each individual fix version. See all smart values that access and manipulate Jira issue data such as sprint, parent, or version. There is no Jira smart value referring to approval name (so that we can differentiate when there are multiple approvals in a workflow). {{approval}} - Returns the name of the approval. {{deletedFieldChanged.fieldType}} - Returns the fieldType of the field that has changed due to deletion of a value. On successful request, you will be able access webhook response data using the following smart values: The worklog entry that has just been logged against an issue. : To do,In progress, orDone). {{sprint.name}} - Returns the sprint name. [xxx].size}}: Returnsthe file size of a specific attachment. Otherwise, register and sign in. Syntax example The smartvalue { {webhookData}} gets the root of the JSON payload. {{version.startDate}} - Returns the version's start date. Used with: the Send web request action (Wait for response enabled). {{issue.comments.size}} - Returns the number of comments on the issue. On successful request, you will be able access webhook response data using the available smart values. Your smart value must identify a specific attachment for this to work. Challenges come and go, but your rewards stay with you. The smartvalue{{webhookData}}gets the root of the JSON payload. In this case, we want to choose the Field value changed trigger. issue The active issue. {{issue.comments.reverse.body}} - Returns the issue's comments, in reverse order. They allow you to access . Join the Kudos program to earn points and save your progress. These smart values are only available for the Build successful, Build failed and Build status changed development triggers. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. See all smart values used to insert conditional logic such as if/equals/and statements into comments and other text fields. Because this smart value deals with multiple items (i.e: issues can have many fix versions), it can be used with the#symbol to apply the rule to each individual fix version. Step 2: Save the Issue generated trigger. In this way, approval returns two different values depending on the trigger being Approval required or Approval completed - https://support . For example if a rule has both a Create branch in GitHub action and a Create branch in GitLab action, {{createdBranches}} will return the values of both branches as a list. I've not been able to find such kind of information. You're on your way to the next level! Smart values allow you to access and manipulate a wide range of issue data within your site. Possible states include pending, in_progress, successful, failed, cancelled, rolled_back, or unknown. {{build.refs}} returns the refs of the build, e.g. Connect thousands of apps for all your Atlassian products, Run a world-class agile software organization from discovery to delivery and operations, Enable dev, IT ops, and business teams to deliver great service at high velocity, Empower autonomous teams without losing organizational alignment, Great for startups, from incubator to IPO, Get the right tools for your growing business, Docs and resources to build Atlassian apps, Compliance, privacy, platform roadmap, and more, Stories on culture, tech, teams, and tips, Training and certifications for all skill levels, A forum for connecting, sharing, and learning. Simply combine these components to create rules that can do anything from auto-closing old issues to notifying specific teams when a release has been shipped. {{deletedFieldChanged.field}} - Returns the field that value has changed due to deletion of a value. Here you can access any issue property. Properties are frequently used by add-ons and integrations to store values. You were right, the rule was running too quickly, so the field was empty.I modify de trigger to give it time, and got the result expected. ISSUE-12: Fix bugs, {{pullRequest.url}} returns the absolute URL of the pull request, e.g.https://bitbucket.org/pull-request/182. {{branch.repository.url}} returns the URL, e.g.