For example, you might count how many issues have a priority of 'highest' and then send an alert. All of the issues found by the trigger are then treated as a single bundle of issues. It looks like our Jira-server does not the{{#if }} statement :(, Get answers to your question from experts in the community, Share a use case, discuss your favorite features, or get input from the community, Smart value use of "{{#if }} does not seem to work, {{#if(issue.assignee.equals(issue.coordinator.accountId))}}. You could then use this to count the number of issues returned. If this issue is a sub-task, then parent refers to the parent issue. You can access an insight field's full name, key, or summary through the following smart values: You can access a Tempo Account field's properties through the following smart values: To test what your smart value returns, use the, The active issue. [Custom Field].description}} - Returns the text displayed below the custom field viewed in the Simple Search column. Join the Kudos program to earn points and save your progress. Solved: Smart value of trigger issue in automation Fix versions of an issue as a list. Jira smart values - development | Cloud automation Cloud | Atlassian Accesses information fromJira Service Managementrequests. You can access all fields of the parent. Learn more about automation triggers. In this way, approval returns two different values depending on the trigger being Approval required or Approval completed - https://support . That looks a little odd. I would like to use this in a reminder email, that is sent to two people, using as source two different people fields. These smart values are only available for the Deployment successful, Deployment failed and Deployment status changed developmenttriggers. A selection of smart values make Jira issue details readily available for Automation for Jira rules. {{build.name}} returns the name of the build, e.g. This value won't work for any other trigger, even if a comment was added as a result (e.g. Can you provide a screenshot of your result? These smart values are only available for the Pull request created, Pull request declined and Pull request mergedtriggers. This example returns an issue's previous type, after it has been changed. {{fieldChange}}only contains the first changed value. To get a concrete example, let's consider the payload below: Here are some examples of ways to test the JSON path to get the right data in the smart values, so you can get it right on your first try! {{rule.name}} - Returns the name of the rule that is currently running. A pull request represents proposed changes before they are integrated into an official project. You can access the current watchers of an issue. Smart values in Jira automation | Cloud automation Cloud | Atlassian {{commit.hash}} returns the SHA1 hash of the commit, e.g.4877576951f3eda43625d3345058e702dad3df0d. Note that this will return an encoded URL; everything after bitbucket.org/ will look different from what you see here. {{environment.name}} returns the use-provided name for the environment, e.g. E.g. Properties are frequently used by add-ons and integrations to store values, e.g. Learn more about user smart values. There should be a locked field named either "Request Type" or "Customer Request Type" there. A branch represents an independent line of development. You can check this by navigating to the "Custom fields" page in the. {{createdBranches.repository.url}} - returns the URLs of each repository. Also provides the customer portal URL for Jira Service Management issues. Smart values - syntax and formatting; Jira smart values - issues; Jira smart values - conditional logic; . {{pullRequest.sourceBranch}} returns the name of the source branch, e.g. {{createdBranch.repository}} - accesses details of the branchs repository, {{createdBranch.repository.id}} - returns the repositorys ID, {{createdBranch.repository.name}} - returns the repositorys name. These can be combined with other date and time smart values. I'll ask one of their team to update you here. These smart values are only available for the Branch created development trigger. For example, when setting multiple Fix Versions, then you can iterate over these using{{#changelog.fixVersion}}{{toString}}. Learn more about using smart values with sections and lists. {{issue.epic. Learn more about date and time smart values. I would like the value that enters the text field to be the name of the sprint that created the trigger. Field value changed Available in Server Lite: No Keep earning points to reach the top of the leaderboard. Smart values allow you to access issue data within Jira. Awesome! {{issue.parent.priority.name}} - Returns the priority of the subtasks's parent issue. Prints the issue key and its status (e.g. for a select field. Connect your source code management, build or deployment tool to use these smart values. {addedfieldChange.valueIds}} - Returns the id/ids of new value/values added. for a select field. {{issue.affectedServices.changeApprovers}} - Returns the account ID of all change approvers of the issue's services. Smart values are one of the most potent ways to do so. What goes around comes around! Examples of using smart values with text strings. {{version.archived}} - Returnstrue if the version is archived, andfalse if not. [xxx].size}}: Returnsthe file size of a specific attachment. Now whenever the story points of a sub-task changes, it will be reflected in the parent issue. This value supportsDate and Time functions. {{attachment.mimeType}}: Returnsthe file format of the attachment. Also provides the customer portal URL for Jira Service Management issues. For smart values related to the Insight feature in Jira Service Management, see Jira smart values - Assets. You can access an insight field's full name, key, or summary through the following smart values: You can access a Tempo Account field's properties through the following smart values: To test what your smart value returns, use the, The active issue. Learn more about using smart values with sections and lists. I recall there are suggestions in the backlog to add "wait until the prior step finishes" or "delay X seconds" actions. Jira smart values - JSON functions See all smart values that take issue fields and convert them into JSON format. A good tip for checking your progress is to say aloud what you have built so far: Whenever the field value changes for story points AND it is a sub-task. {{build.refs}} returns the refs of the build, e.g. 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, A list of issues generated by a trigger that runs a JQL search (, trigger when set to process in bulk). We do not currently support accessing fields within insight objects. Because this smart value deals with multiple items (i.e: issues can have many watchers), it can be used with the#symbol to apply the rule to each individual component. Note that repository contains additional nested smart values. Jira Software Automation: Basics & Common Use Cases - Atlassian In the dropdown menu, you simply choose the field you want to work on, including custom fields and then edit. Webhooks - Atlassian What third-party applications can I integrate with? 2 edit issue actions that need to 'add' to the value of a field instead of overwriting it). If this issue is in an Epic, then epic refers to the Epic issue. build#123, {{build.url}} returns the absolute URL of the build, e.g. Or you could count how many issues have the same label, same fixVersion, etc. {{changelog.status}} - Changelog information for theStatus field. You can access useful things like the previous status during a transition, Added by: Jira Triggers that contain a comment. In the project menu, click on Project Settings. Learn more about using smart values with sections and lists. {{addedfieldChange.values}} - Returns the new value/values added. {{issue.comments.last.body}} - Returns the body of the last comment. Examples of how you can use smart values to set the text value of an issues field, such as Summary or Description. Learn more about user smart values. See all smart values that are used to insert and format numerical values using math expressions. You can also use this with, . Learn more about list smart values. Learn how to use these to interact with Jiras REST API. Jira Automation: Get the Basics Right [2023] - iDalko If you're not using a Sprint Trigger, I don't believe it's possible to locate the active Sprint via smart values. Examples of how you can use smart values to access and format items in a list, such as checkboxes and labels. For example, you might count how many issues have a priority of 'highest' and then send an alert. For example, the smart value{{now.plusDays(5)}} references the current time and adds 5 days to it, while {{issue.summary}} will print off the summary of the issue. If this issue is in an Epic, then epic refers to the Epic issue. {{fieldChange}}only contains the first changed value. Learn more about list smart values. {{issue.Story Points estimate}} - Returns the issue's story point estimate (team-managed Jira Software Cloud only). {{attachment.author}}: Returnsthe user who added the attachment. For example,{{issue.affectedServices.changeApprovers.displayName}} will return their names. After a lot of searches, I found the answer on: https://community.atlassian.com/t5/Jira-questions/Store-Active-Sprint-in-New-Field-Using-Jira-Automation-Script/qaq-p/1695408. 2020-07-20T07:00:00.0+0000. {{issue.assignee.displayName}} - Returns the issue's assignee. See, This allows access to data that was sent along with the incoming webhook, Added by: Send web request with "Wait for response" checked. my-custom-prod-env, {{environment.type}} returns the environment type. {{attachment.author.timeZone}}: Returns the timezone the user is registered being in; this doesn't change dynamically based upon where the user logs in from, it is the timeZone registered in their user account. Here, we choose the Issue fields' condition and clarify that the issue type we are looking out for is a sub-task. Learn more about using smart values with sections and lists. These can be combined with other user smart values. {{pullRequest.destinationBranch}} returns the name of the destination branch, e.g.master, {{pullRequest.destinationBranch.url}} returns the URL of the destination branch, e.g. Used with: Create branch in Bitbucket, Create branch in GitHub, and Create branch in GitLab actions. {{version.released}} - Returnstrue if the version is released, andfalse if not. {{issue.timetracking.timespent}} - Returns the amount of time that has been logged on the issue in the Time spent field. The spacing format is mentioned in the following article: Smart-value-in-published-article-doesn-t-work. Added by: Send web request with "Wait for response" checkedOn successful request, you will be able access webhook response data using the following smart values: Multiple responses can be access via the following fields: Added by: Worklogged TriggerThe worklog entry that has just been logged against an issue. Triggers can be set to run manually, based on a condition you set or scheduled. Story points are integral for many agile teams. {{changelog.issuetype}} - Changelog information for theIssue type field. Any property used with the{{issue}}smart value can also be used with{{createdIssue}}. {{commit.repository.url}} returns the repositorys URL. Triggers will listen for events in Jira, such as when an issue is created or when a field value is changed. Returns the value of the Jira Service Managements scale custom field. With the 're-fetch issue data' action (which I seldom use), I noticed that this can put the automation execution on-hold for the whole 5 seconds! To test what your smart value returns, use themanual triggerwithlog actionand the result displays in theaudit log. Accesses information related to a file attachment on an issue. {{issue.fixVersions.name}} - Returns the name of the fix version. Learn more about user smart values. Used to access the values in an issue'sFix Versionsfield. In the dropdown menu, you simply choose the field you want to work on, including custom fields and then edit. The issue is not so much with the smart values itself, but with the {{#if }} statement. How releases get into the Release Center - Atlassian Community Or .displayName if accountId doe not work as hoped. Create an issue and update the Insight custom field with the object that have User attribute updated with portal only customer , and also add the portal only customer as reporter. {{createdBranches.product}} - returns the products that the branches were created in. global admin section. {{sprint.isStarted}} - Returnstrue if the sprint has started, andfalse if not. Do more to earn more! Join now to unlock these features and more. It may contain, for example, branches and tags names.This value is optional and may be an empty list. Examples of how you can use smart values to set the numerical value of an issues field in your Jira automation rules. When we use this trigger, we can use the { {webhookData}} smart value to represent the POST payload - we'll focus on this here. For more information on when issues is available, seeRun a rule against issues in bulk. {{version.description}} - Returns the version's description. Check out some common DevOps automation rules where you can use these smart values. It resets every quarter so you always have a chance! A representation of a release/version in Jira. {{issue.fixVersions.description}} - Returns the description of the fix version. 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, A list of issues generated by a trigger that runs a JQL search (, trigger when set to process in bulk). {{pullRequest.sourceBranch}} returns information related to the source branch for the pull request. {{issue.duedate}} - Returns theissue's due date. Keep earning points to reach the top of the leaderboard. See all smart values related to Assets in Jira Service Management Cloud. {{pullRequest.state}} returns the state the pull request is in - Open, Merged, or Declined. {{issue.status}} - Returns the issue's status, {{issue.status.name}} - Returns the issue's status, {{issue.summary}} - Returns the issue's summary, {{issue.versions}} - Returns the issue'sAffects versions. Learn more about using smart values with sections and lists. See all smart values related to user fields, such as Reporter or Assignee. This user must have the relevant permissions to trigger the rule, and complete any actions that may be performed. Returns the value of the Jira Service Managements rate custom field. Learn more about date and time smart values. 2020-07-20T07:00:00.0+0000. {{sprint.startDate}} - Returns the start date of the sprint. Jira smart values - issues To test what your smart value returns, use the manual trigger with log action and the result displays in the audit log. You're on your way to the next level! https://bitbucket.org/account/repo/TEST-123-some-feature. If multiple values are changed (e.g. This example shows the previous status id (for use in another Edit action). The following smart values are available to access and format development information from a connected source code management tool. Learn more about using smart values with sections and lists. 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. Some issue properties are more complex, and theyve been described in their own sections on this page. 2020-07-20T07:00:00.0+0000. https://bitbucket.org/account/repo. {{issue.epic.key}} - Returns the epic's key, e.g. Accesses information for the version that triggered the rule. You can specify a default value to prevent this. Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms. What goes around comes around! {{sprint.endDate}} -Returns the end date of the sprint. If I use a smart value of type: {{sprint.name}} the field returns me all the sprints that exist in the "sprint" field, including those that are already closed. {{worklog.visibility}} -available when the worklog is restricted, {{worklog.visibility.type}} -available when the worklog is restricted, {{worklog.visibility.value}} -available when the worklog is restricted. The "Request Type" prefix may be"Customer Request Type" in older instances of Jira. Jira smart values in automation rules. {{deletedFieldChanged.fieldType}} - Returns the fieldType of the field that has changed due to deletion of a value. In this template, we show you how to sum up the story points of all sub-tasks then update the parent issue with this value. The three properties above can also be added to this, for example,{{issue.affectedServices.dependentServices.tier}} will return the dependent services' tiers. action: Re-fetch issue (This will slow down the rule by reloading the newly created issue, as all of the data may not be ready when the rule runs.). {{version.id}} - Returns the version's ID. {{issue.affectedServices.dependentServices}}- Returns the list of services that this issue's services depend on. Smart values are variables that you can use in automation action configuration parameters. Accesses an insight field's full name, key, or summary. Added by: Webhook TriggerThis allows access to data that was sent along with the incoming webhookThe body of the Webhook request. {{issue.comments.first.body}} - Returns the body of the first comment. The issue smart values are used to access information related to the rules active issue, which is the issue the rule is currently acting on. Select the Issue fields condition from the New condition drop-down menu. If you've already registered, sign in. For example, you can use the following smart values to send a Slack message that includes the issue key and issue summary: { {issue.key}} { {issue.summary}} Check out how we use smart values in our Jira automation template library. In your site, the rule actor will be set as Automation app user. my-awesome-repository. {{issue.Request Type.requestType.name}} - Returns the customer request type. Is there any information on the web available about the "{{#if functionality)? In the example below, we have a custom field calledTeam Leader, and the value of thefield is currentlyAlana Grant. A build represents the process in which files are converted into their final consumable form. Possible states include pending, in_progress, successful, failed, cancelled, or unknown. Now whenever this field changes in Jira, this automation rule kicks in. Each of your rules will have an audit log that you can review to see when the rule was triggered, the final result of the execution, and any actions that may have been performed. For example, if a rule uses the Create feature flag in LaunchDarkly action multiple times, {{flags} will return the information for all feature flags created, as a list. In progress. You can check this by navigating to the "Custom fields" page in the. Affects version of an issue as a list. For example, checking that all sub-tasks of a parent issue are resolved. Are you looking for server documentation? 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. The type of event that triggered the rule. [Custom Field]}} - Returns the value in an epic's custom field. {{versions.released}}- Returnstrueif the affects version is released, andfalseif not. Which Jira-server version supports the use of smart value: "{{#if }} text {{/}}, or is this a Jira-cloud only functionality ? {addedfieldChange.field}} - Returns the field which has changed due to addition of a value. For example, you can set up your rule to only escalate an issue if it is high priority. They often contain sub-tasks, are stories that are part of a larger epic, or are simply linked to other issues using certain relationships. All properties available to{{issue}}are also available on this smart value. You can access all fields of the parent. Refers to the original issue when you branch the chain. [Custom Field].name}} - Returns the visible label displayed on the left of the field. : To do,In progress, orDone). Jira smart values - issues | Cloud automation Cloud - Atlassian Support Examples of using smart values with dates. Suggestion re: {{approval}} Smart Value and subfields - Atlassian 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. You could then use this to count the number of issues returned. Can be combined with other date and time smart values. The only situation where this is necessary, is where subsequent actions need to have visibility of the latest state of the issue (e.g. Triggers, conditions, and actions are the building blocks of automation. The option to created linked issues (and then pick the blocked option) exists, but only to pick the issue from the trigger value or the most recently created issue to create a link. However, you can now change the rule actor for your automation rules. You must be a registered user to add a comment. Approval required: accesses information when an issue that requires approval is created or updated, or when new approvers are added to an issue. Your image appears to show too many curly-brackets around the value. role. {{branch.repository.name}} returns the name of the repository. For example, {{attachment.first.size}} will return the file size of the first attachment. Similar to{{issue. Because this smart value deals with multiple items (i.e: issues can have many components), it can be used with the#symbol to apply the rule to each individual component. For example, you might count how many issues have a priority of 'highest' and then send an alert. Returns information related to the created feature flag. All of the issues found by the trigger are then treated as a single bundle of issues. {{issue.watchers.emailAddress}} - Returns the watcher's email address. The URL to access the issue. Now, I want to run automation even without a sprint trigger (scheduled trigger). Examples of using smart values with lists. Would be good and useful functionality to have. [JSDCLOUD-10088] Insights Automation: Object smart value - Atlassian We do not currently support accessing fields within insight objects. {{attachment.author.emailAddress}}: Returnsthe email address associated with the user name. Understand the general concepts and best practices of automation in Atlassian Cloud products.