You're on your way to the next level! 2 edit issue actions that need to 'add' to the value of a field instead of overwriting it). This applies to the legacy Insight app. {{deployment.environment}} returns information related to the deployment environment. 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. {{createdBranches.repository.url}} - returns the URLs of each repository. {{issue.comments.size}} - Returns the number of comments on the issue. For example, you might count how many issues have a priority of 'highest' and then send an alert. Use{{fieldChange.fromString}}and{{fieldChange.toString}}to access display values and{{fieldChange.from}}and{{fieldChange.to}}to access raw values (for a select field for example). 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. TEST-123-some-feature, {{repository.url}} returns the absolute URL of the repository, e.g. See all smart values that access and manipulate Jira issue data such as sprint, parent, or version. This smart value only works for issues that have been added to an epic. {{comment.properties. For example, if a rule is created that will comment on an issue when executed, the rule actor must have the Add comment permission, otherwise the rule will result in an error. You can access the current watchers of an issue. Properties are frequently used by add-ons and integrations to store values. You can set triggers to run on a schedule or as needed. Syntax example The smartvalue { {webhookData}} gets the root of the JSON payload. Learn more about list smart values. Learn how to use automation in Confluence Cloud, and see what components and variables you can use to build rules. all fields available to{{issue}}are available here as well. Learn about the concepts and procedures related to automation in Jira Cloud, Smart values allow you to access issue data within Jira. {{attachment.author.displayName}}: Returnsthe name displayed in your Jira instance. Accesses an insight field's full name, key, or summary. {{issue.epic.key}} - Returns the epic's key, e.g. {{issue.timetracking.timespent}} - Returns the amount of time that has been logged on the issue in the Time spent field. Or you could count how many issues have the same label, same fixVersion, etc. {{issue.parent.key}} - Returns the issue key of the subtask's parent issue. Do more to earn more! {{createdBranch.repository.url}} - returns the repositorys URL. An environment represents a distinct ecosystem where products are deployed to. 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 arehere). I'll mention the docs discrepancies to the person that maintains our documentation. - theIssue transitionedtrigger). https://bitbucket.org/account/repo/TEST-123-some-feature. Jira smart values in automation rules. {{branch.repository.url}} returns the URL, e.g. A build represents the process in which files are converted into their final consumable form. TEST-123-some-feature, {{pullRequest.sourceBranch.url}} returns the URL of the source branch, e.g.https://bitbucket.org/account/repo/TEST-123-some-feature. Allows access to data that was sent along with the incoming webhook, for example, the body of the webhook request. Affects version of an issue as a list. my-custom-prod-env, {{environment.type}} returns the environment type. {{issue.security.name}} - Returns the security level name. Learn more about date and time smart values. {{issue.updated}} - Returns the date the issue was updated. The problem with the interface was, that it worked in two steps - first the re-open transition and then the update of fields. Accesses information fromJira Service Managementrequests. The changed field value is available anywhere smart values are supported using the{{fieldChange}}substitution. {{issue.issueType.name}} -Returns the issue's type, for exampleStory,Bug, orTask. {{issue.Story Points estimate}} - Returns the issue's story point estimate (team-managed Jira Software Cloud only). Hi John, thanks a lot for your quick response. {{issue.affectedServices.changeApprovers}}, {{issue.affectedServices.changeApprovers.displayName}}, {{issue.affectedServices.dependentServices}}, {{issue.affectedServices.dependentServices.tier}}, {{issue.Request Type.currentStatus.status}}, {{comment.properties. After testing, disable both the HTTP dump and access logs to avoid performance issues. You can specify a default value to prevent this. Can you please assist us in working out the following issues? 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. {{approval.addedApprovers}} - Returns the set of approvers added to issue. Used to access information about an issue's epic. Learn more about user smart values, {{approval.completedDate}} - Returns completion date of approval. Send a daily Slack message with a list of issues still open in the Sprint. Seeaccesing multi-value fields, Added by: This is added any time an issue is added. Challenges come and go, but your rewards stay with you. . Examples of how you can use smart values to set the text value of an issues field, such as Summary or Description. {{attachment.mimeType}}: Returnsthe file format of the attachment. {{repository.name}} returns the name of the repository, e.g. Please share more details and screenshots in order to be able to help you. A commit represents an individual change to a file (or set of files). [Custom Field].name}} - Returns the visible label displayed on the left of the field. Connect your source code management, build or deployment tool to use these smart values. The problem with the interface was, that it worked in two steps - first the re-open transition and then the update of fields. You can check this by navigating to the "Custom fields" page in the. Examples of using math expression smart values. {{issue.url.customer}} - Returns the customer portal URL (forJira Service Management requests). Learn how to use these to interact with Jiras REST API. Learn more about using smart values with sections and lists. global admin section. They allow you to perform many tasks, such as editing an issue, sending a notification, or creating sub-tasks. You can find some automation templates to help you get started within the product library. - Any ideas on this one? [Custom Field].description}} - Returns the text displayed below the custom field viewed in the Simple Search column. build#123, {{build.url}} returns the absolute URL of the build, e.g. Smart values are one of the most potent ways to do so. You can access the current watchers of an issue. {{deletedFieldChanged.fieldType}} - Returns the fieldType of the field that has changed due to deletion of a value. my-awesome-repository. Seeaccesing multi-value fields.Properties for versions include:name, description, archived, released, releaseDate. {{issue.affectedServices.name}} - Returns the names of the issue's Affected services. For more information on when issues is available, see, Multiple comments on the active issue (this example is explained in detail in, Properties for versions include:name, description, archived, released, releaseDate, "Customer Request Type" in older instances of Jira. {{pullRequest.state}} returns the state the pull request is in - Open, Merged, or Declined. E.g. {{issue.Story Points}} - Returns the issue's story point estimate (company-managed Jira Software Cloud only). If multiple values are changed, use # to iterate over these. To test what your smart value returns, use themanual triggerwithlog actionand the result displays in theaudit log. You're on your way to the next level! The rule actor is the user who executes a rule. Learn more about using smart values with sections and lists. Triggers can be set to run on a schedule, and can be customized before being applied to a rule. Learn more about using smart values with sections and lists. https://bitbucket.org/commit/121212, {{commit.isMergeCommit}} returns True if commit is a merge commit, {{commit.timestamp}} returns the timestamp (UTC) the commit was created. {{version.name}} - Returns the version's name. 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. {{attachment.author.accountId}}: Returnsthe ID associated with the user name. In the example below, the issue's first affects version's release date is printed: Accesses the current watchers of an issue. Added by: Jira Triggers that edit an issue, All the fields that were changed. {{issue. What third-party applications can I integrate with? You can view the status of an automation rule to identify if the rule is currently active or not. When a PR is merged in Bitbucket/GitHub/GitLab, then transition the issue in Jira. For example, PROJ-123. Learn more about using smart values with sections and lists. Learn more about date smart values. For example, you might count how many issues have a priority of 'highest' and then send an alert. Can be combined with other user smart values. Because this smart value deals with multiple items (i.e: issues can have many Affects versions), it can be used with the#symbol to apply the rule to each individual component. Approval completed: accesses information for an approval when an approval step on an issue is accepted or declined. Triggers can be set to run manually, based on a condition you set or scheduled. Issue commented, Added by: Clone Issue Action, Create Issue Action, Create Sub-tasks Action, A list of issues that have been created in the rule, The type of event that triggered the rule such as: jira:issue_updated :issue_commented. {{issue. Visit the marketplace to integrate your build or deployment tool with Jira Cloud. 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. This smart value accesses the changelog, and a list of changes for each field. If a field or value doesn't exist, it will return an empty value:{{invalid reference}}. Examples of using smart values with dates. There should be a locked field named either "Request Type" or "Customer Request Type" there. What are conditions? Every rule starts with a trigger. {{versions.archived}}- Returnstrueif the affects version is archived, andfalseif not. I found both of these smart values seemed to work: If neither of these work for you, there are a few other options in those linked questions you can try :), {{sprint.name}} returns only the sprint that started and which triggered this automation event. It is better to use this than name as it cannot be changed. A condition refines the rule so it wont act too broadly. It resets every quarter so you always have a chance! The active issue. 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. {{sprint.originBoardId}} - Returns the ID of the board the sprint belongs to. 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. The "Request Type" prefix may be"Customer Request Type" in older instances of Jira. Possible states are production, staging, testing, development, and unknown, Used with: the Sprint created, Sprint started and Sprint completed triggers. The type of event that triggered the rule. Learn more about date and time smart values. Refers to the original issue that triggered the rule; used when you branch the chain. Acording with the documentation, Automation JQL condition suport smart values. role. To test what your smart value returns, use themanual triggerwithlog actionand the result displays in theaudit log. 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}}. These smart values can only be accessed through other root keys (e.g{{deployment.environment}}). {{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. Best practices for optimizing automation rules, View performance insights for automation rules, Connect your automation rule to another tool. The "Request Type" prefix may be"Customer Request Type" in older instances of Jira. Create and configure Jira automation rules, Branch automation rules to perform actions on related issues, Issue data (Automation format) payload for Send Web Request, Issue data (Jira format) payload for Send Web Request action, Limitations in team-managed projects for automation rules, Permissions required for Jira Cloud automation rules, Test a Jira automation rule using the Manual trigger, Transfer Jira automation rules from one user to another, Differences between Automation in Jira Server and Jira Cloud, Use Jira automation rules to modify issues, Convert wiki markup to HTML or plain text in Jira automation, Move an issue to another project using automation, Automation for Jira documentation for Jira Server. {{branch.repository}}). {{createdBranch.name}} - returns the name of the branch, {{createdBranch.url}} - returns the URL of the branch. Is there a smart value that returns me only the name of the trigger sprint or at least only the name of the open sprint? Exclusive to the Approval required trigger: {{approval.initiator}} - Returns account id of initiator of request. 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. Accesses the previous issue created in the rule. This means that when using automation, actions often need to apply, not only to the source issue that triggered the rule, but also to any issues that are related to the source issue. These smart values are only available for the Build successful, Build failed and Build status changed development triggers. for a select field. Check out how we use smart values in our Jira automation template library. 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}}. 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. Possible states include pending, in_progress, successful, failed, cancelled, rolled_back, or unknown. Create and configure Jira automation rules, Branch automation rules to perform actions on related issues, Issue data (Automation format) payload for Send Web Request, Issue data (Jira format) payload for Send Web Request action, Limitations in team-managed projects for automation rules, Permissions required for Jira Cloud automation rules, Test a Jira automation rule using the Manual trigger, Transfer Jira automation rules from one user to another, Differences between Automation in Jira Server and Jira Cloud, Examples of using math expression smart values, Examples of using smart values with dates, Examples of using smart values with lists, Examples of using smart values with text strings, Use Jira automation rules to modify issues, Convert wiki markup to HTML or plain text in Jira automation, Move an issue to another project using automation, Learn how to use these to interact with Jiras REST API. {{comment.properties}} - Accesses any comment property. You're on your way to the next level! Challenges come and go, but your rewards stay with you. Examples of using smart values with text strings. 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. {{issue.epic. : To do,In progress, orDone). If a condition fails, the rule will stop running and no actions following the condition will be performed. However sometimes the two fields holds the same person, resulting in an email with twice the same name. In automation configuration , use "Issue Created" trigger and use the log action to get the smart value below :- Are you looking for server documentation? Check out some common DevOps automation rules where you can use these smart values. Used with: the Clone issue, Create issue, and Create sub-tasks actions. 2020-07-20T07:00:00.0+0000. The only situation where this is necessary, is where subsequent actions need to have visibility of the latest state of the issue (e.g. Create a sample project and follow all of the breadcrumbs in the audit log of the rule details. Accesses the details of a subtask's parent issue. When we use this trigger, we can use the { {webhookData}} smart value to represent the POST payload - we'll focus on this here. You can check this by navigating to the "Custom fields" page in theglobal admin section. Find issues that have the same custom field date as trigger issue. 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. I suspect not. 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))}}. {{version.releaseDate}} - Returns the version's release date. When an issue is raised without an assignee, auto-assign to whoever created it. {{commit.shortHash}} returns the truncated SHA1 hash of the commit, e.g. Story points are integral for many agile teams. As a result of this design, the automation got initiated while triggered by a transition, however the data needed for the automation could not be yet updated. Thisshould not be usedsince it requires an expensive reload of issue data. You can also use this with, . when setting multiple Fix Versions) then you can iterate over these using the{{#changelog.fixVersion}}{{toString}}{{/changelog.fixVersion}}expression. When there are multiple fields that have changed, {{fieldChange}}only contains the first changed value. If you're not using a Sprint Trigger, I don't believe it's possible to locate the active Sprint via smart values. In the following example, we list each comment that an issue has, and include the author and creation date/time: In this example, we return the name of the person who added the last comment on an issue: Used to access the values in an issue's Components field. {{version.archived}} - Returnstrue if the version is archived, andfalse if not. 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. A deployment represents the process in which a product is released in an environment. Here you can access any issue property. Also provides the customer portal URL for Jira Service Management issues. {{branch.name}} returns the name of the branch, e.g. Triggers, conditions, and actions are the building blocks of automation. This is how you would return multiple responses using the smart value: Accesses information for a worklog entry that has just been logged against an issue. Accesses any issue property. They kick off the execution of your rules. What that error tells me one of three things is happening: Let's try this: immediately after your trigger, add two things: a) If the rule works after adding the re-fetch, the cause was #1, b) If the audit log does not show your date, it is either #2 or #3. Share the love by gifting kudos to your peers. 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. {{build.refs}} returns the refs of the build, e.g. Because this smart value deals with multiple items (i.e: issues usually have many comments), it can be used with the # symbol to apply the rule to each individual comment. All of the issues found by the trigger are then treated as a single bundle of issues. This example shows the previous status for issues that are transitioned. The Atlassian Community can help you and your team get more value out of Atlassian products and practices. {{pullRequest.sourceBranch}} returns information related to the source branch for the pull request. A representation of a release/version in Jira. Reviewing your audit logs is an effective way of debugging your rules. Step 3: Set up the condition like this: Change the field's value to Issue Type. In the example below, we have a custom field calledTeam Leader, and the value of thefield is currentlyAlana Grant. Field value changed Available in Server Lite: No OMGYou're right. I recall there are suggestions in the backlog to add "wait until the prior step finishes" or "delay X seconds" actions. You could then use this to count the number of issues returned. {{pullRequest.destinationBranch}} returns the name of the destination branch, e.g.master, {{pullRequest.destinationBranch.url}} returns the URL of the destination branch, e.g. This re-fetches the latest state of the issue from Jira. A build represents the process in which files are converted into their final consumable form. {{flags.name}} returns the name of the feature flag. Special conditions and actions are available to create powerful rules that can work across complex issue relationships. View the list of available triggers. What third-party applications can I integrate with? Examples of how you can use smart values to manipulate and format dates in your Jira automation rules. In this component, we use the following settings:The email address of the reporter is captured in the smart value {{reporter.emailAddress}}, but we need to use it in a URL and therefore will use the smart value {{reporter.emailAddress.urlEncode . The spacing format is mentioned in the following article: Smart-value-in-published-article-doesn-t-work. Here you can access any issue property. {{deletedFieldChanged.fieldId}} - Returns the fieldId of the field that has changed due to deletion of a value. Would be good and useful functionality to have. {{changelog.summary}} - Changelog information for theSummaryfield. We use the following smart-value to sum up story points from all sub-tasks: {{issue.subtasks.Story Points.sum}}. {{comment.internal}} - forJira Service Management comments, returns false if the comment is visible to customers. You can view the audit log of an individual rule, project-wide or at a global level. For example, when an issue is transitioned you can see what status the issue transitioned from. The comment that triggers the rule is stored in this smart value. See all smart values that can access and manipulate text fields, such as issue summary or comments. You could then use this to count the number of issues returned. See all smart values related to user fields, such as Reporter or Assignee. I've tested it on my instance and it yielded only 1 sprint (out of 3 that are ongoing). We will ensure the story points of the parent and sub-task always remain in sync. { {issue. {{issue.affectedServices.tier}} - Returns the tiers of the issue's Affected services. {{versions.releaseDate}}- Returns the affects version's release date. 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. Seeaccesing multi-value fields.Properties for versions include:name, description, archived, released, releaseDate. Accesses the values in an issue'sAffected services field. This is a list of metadata that can be associated with a build. {{issue.reporter.displayName}} - Returns the issue's reporter. If multiple values are changed (e.g. Join the Kudos program to earn points and save your progress. :{{issue.properties.some.value}}. I would like to use this in a reminder email, that is sent to two people, using as source two different people fields. {{issue.description}} - Returns the content in the issue'sDescriptionfield. View topic Find the smart value for a field Learn how to find the right Jira automation smart values for your issue fields in Jira Cloud. {{webhookResponse.status}} - response code e.g. To get a property in it, we should use{{webhookData.someValue.childValue}}. You must be a registered user to add a comment. This value won't work for any other trigger, even if a comment was added as a result (e.g. A repository represents a collection of files and associated metadata. If you've already registered, sign in. Please try just two around each side: Of note: what is the type of your field? Go to Jira administration console > System > Webhooks (in the Advanced section). {{issue.parent.epic.summary}} - Returns the summary of the parent issue's epic. Whenever you want to edit a field in Jira, use the Edit issue action. Join the Kudos program to earn points and save your progress. Learn more about working with related issues. This smart-value allows you to access project specific attributes: Jira Service Management specific request type object that you can grab information from. Understand the general concepts and best practices of automation in Atlassian Cloud products. Learn about the concepts and procedures related to automation in Jira Cloud. Wonderful :). {{issue.fixVersions.released}} - Returnstrue if the fix version is released, andfalseif not. Can be combined with other user-related smart values. Please raise suggestion ticket in our public tracker, https://jira.atlassian.com/projects/JIRAAUTOSERVER. {{issue.parent.priority.name}} - Returns the priority of the subtasks's parent issue. {{addedFieldChanged.fieldType}} - Returns the fieldType of the field that has changed due to addition of a value. This smart value requires an expensive reload of issue data and should only be used in situations where subsequent actions need to have visibility of the latest state of an issue, e.g. Issue commented, Added by: Clone Issue Action, Create Issue Action, Create Sub-tasks Action, A list of issues that have been created in the rule, The type of event that triggered the rule such as: jira:issue_updated :issue_commented. These smart values are only available for the Deployment successful, Deployment failed and Deployment status changed developmenttriggers. They allow you to automate tasks and make changes within your site. There should be a locked field named either "Request Type" or "Customer Request Type" there. This was something we have added since the split and I suspect that the server team has not caught up. Triggers: Triggers wait for defined events to take place in your Jira instance and will then execute the automation rule. [Custom Field].defaultValue}} - Returns the value displayed on first view of the field. 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. {{versions.description}}- Returns the description of the affects version. Or you could count how many issues have the same label, same fixVersion, etc. This can be almost anything you want. 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. A list of issues that have been created in the rule. Automation is a great way to reduce the manual work of keeping story points up to date. In this way, approval returns two different values depending on the trigger being Approval required or Approval completed - https://support . Use{{fieldChange.fromString}}and{{fieldChange.toString}}to access display values and{{fieldChange.from}}and{{fieldChange.to}}to access raw values (for a select field for example). Accesses a Tempo Account field's properties. Returns the value of the Jira Service Managements rate custom field. This re-fetches the latest state of the issue from Jira. In this case, we want to perform an action on the parent of the sub-task so in the dropdown menu, we choose Parent. Here, we choose the Issue fields' condition and clarify that the issue type we are looking out for is a sub-task. They allow you to access and manipulate almost any data in Jira. Smart values in Jira automation. Properties are frequently used by add-ons and integrations to store values, e.g. Any property used with the{{issue}}smart value can also be used with{{createdIssue}}. To prevent this, I thought let's use this construct: {{#if(issue.assignee.equals(issue.coordinator))}} Name 1,{{/}}. This value supportsDate and Time functions, e.g. {{issue. Join now to unlock these features and more. https://bitbucket.org/{7faf7dee-a29b-4faa-bbc2-d7128a6d3278}/{315a3ecb-1f18-4953-98ae-5890f93073b5}/addon/pipelines/home#!/results/7, {{build.state}} returns the state of the build.