Jira smart values - development

The following smart values are available to access and format development information from a connected source code management tool.

Check out some common DevOps automation rules where you can use these smart values. Go to templates.

{{branch}}

Connect your source code management, build or deployment tool to use these smart values.

A branch represents an independent line of development.

These smart values are only available for the Branch created development trigger.

  • {{branch.name}} returns the name of the branch, e.g. TEST-123-some-feature

  • {{branch.url}} returns the URL of the branch, e.g. https://bitbucket.org/account/repo/TEST-123-some-feature

  • {{branch.repository}} returns information related to the repository the branch belongs to. Note that repository contains additional nested smart values.

    • {{branch.repository.name}} returns the name of the repository.

    • {{branch.repository.url}} returns the URL, e.g. https://bitbucket.org/account/repo/TEST-123-some-feature. Note that this will return an encoded URL; everything after bitbucket.org/ will look different from what you see here.

{{createdBranch}}

  • Used with: Create branch in Bitbucket, Create branch in GitHub, and Create branch in GitLab actions.

Access information related to the last branch that was created. 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.

  • {{createdBranch.name}} - returns the name of the branch

  • {{createdBranch.url}} - returns the URL of the branch

  • {{createdBranch.product}} - returns the product that the branch was created in (for example, Bitbucket).

  • {{createdBranch.repository}} - accesses details of the branch’s repository

    • {{createdBranch.repository.id}} - returns the repository’s ID

    • {{createdBranch.repository.name}} - returns the repository’s name

    • {{createdBranch.repository.url}} - returns the repository’s URL.

{{createdBranches}}

  • Used with: Create branch in Bitbucket, Create branch in GitHub, and Create branch in GitLab actions.

Access information related to all branches created in the rule, as a list. Learn more about list smart values.

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.

  • {{createdBranches.name}} - returns the names of the branches

  • {{createdBranches.url}} - returns the URLs of the branches

  • {{createdBranches.product}} - returns the products that the branches were created in.

  • {{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

    • {{createdBranches.repository.url}} - returns the URLs of each repository.

{{commit}}

Connect your source code management, build or deployment tool to use these smart values.

A commit represents an individual change to a file (or set of files).

These smart values are only available for the Commit created development trigger.

  • {{commit.hash}} returns the SHA1 hash of the commit, e.g.4877576951f3eda43625d3345058e702dad3df0d

  • {{commit.shortHash}} returns the truncated SHA1 hash of the commit, e.g. 4877576.

  • {{commit.message}} returns the commit message, e.g. awesome commit handles everything

  • {{commit.url}} returns the absolute URL of the commit, e.g. 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. This value supports Date and Time functions, e.g. 2020-07-20T07:00:00.0+0000

  • {{commit.repository}} returns the information related to the repository. Note that repository contains additional nested smart values.

    • {{commit.repository.name}} returns the name of the repository, e.g. my-awesome-repository.

    • {{commit.repository.url}} returns the repository’s URL.

 

{{flag}}

  • Used with: the Create feature flag in LaunchDarkly action.

Returns information related to the created feature flag. If more than one flag has been created throughout the rule, {{flag}} will return the most recently-created flag.

  • {{flag.key}} returns the key of the feature flag.

  • {{flag.name}} returns the name of the feature flag.

{{flags}}

  • Used with: the Create feature flag in LaunchDarkly action.

Returns information related to all feature flags created in throughout the rule or branch, as a list. 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. Learn more about list smart values

  • {{flags.key}} returns the key of the feature flag.

  • {{flags.name}} returns the name of the feature flag.

{{Pull request}}

Connect your source code management, build or deployment tool to use these smart values.

A pull request represents proposed changes before they are integrated into an official project.

These smart values are only available for the Pull request created, Pull request declined and Pull request merged triggers. Learn more about automation triggers.

  • {{pullRequest.title}} returns the title of the pull request, e.g. ISSUE-12: Fix bugs

  • {{pullRequest.url}} returns the absolute URL of the pull request, e.g.https://bitbucket.org/pull-request/182

  • {{pullRequest.state}} returns the state the pull request is in - Open, Merged, or Declined.

  • {{pullRequest.createdDate}} returns the time (UTC) when the pull request was created, e.g. 2020-07-20T07:00:00.0+0000. This value supports Date and Time functions. Available only for the pull request created trigger.

  • {{pullRequest.updatedDate}} returns the time (UTC) when the pull request was last updated (created, declined or merged), e.g. 2020-07-20T07:00:00.0+0000. This value supports Date and Time functions

  • {{pullRequest.sourceBranch}} returns information related to the source branch for the pull request.

    • {{pullRequest.sourceBranch}} returns the name of the source branch, e.g. 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

  • {{pullRequest.destinationBranch}} returns information related to the destination branch of the pull request.

    • {{pullRequest.destinationBranch}} returns the name of the destination branch, e.g.master

    • {{pullRequest.destinationBranch.url}} returns the URL of the destination branch, e.g. https://bitbucket.org/account/repo/TEST-123-some-feature

    • {{pullRequest.destinationBranch.repository}} returns information related to the destination branch’s repository. Note that repository contains additional nested smart values.

{{build}}

Connect your source code management, build or deployment tool to use these smart values.

A build represents the process in which files are converted into their final consumable form.

These smart values are only available for the Build successful, Build failed and Build status changed development triggers. Learn more about automation triggers.

  • {{build.name}} returns the name of the build, e.g. build#123

  • {{build.url}} returns the absolute URL of the build, e.g. 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. Possible states include pending, in_progress, successful, failed, cancelled, or unknown

  • {{build.refs}} returns the refs of the build, e.g. [feature/ISSUE-123-some-work, feature/ISSUE-456-more-work]. This is a list of metadata that can be associated with a build. It may contain, for example, branches and tags names.
    This value is optional and may be an empty list.

 

{{deployment}}

Connect your source code management, build or deployment tool to use these smart values.

A deployment represents the process in which a product is released in an environment.

These smart values are only available for the Deployment successful, Deployment failed and Deployment status changed development triggers. Learn more about automation triggers.

  • {{deployment.name}} returns a human-friendly deployment name, e.g. 7

  • {{deployment.url}} returns the absolute URL of the deployment, e.g. https://bitbucket.org/{6d6d87be-bdc2-42b5-ad8f-85cb915abc38}/{80c30dd6-2d2f-401c-ac33-8317adbc509d}/addon/pipelines/deployments#!/deployments/{888ba48c-0011-5a46-9d59-8da313851383}

  • {{deployment.state}} returns the state of the deployment. Possible states include pending, in_progress, successful, failed, cancelled, rolled_back, or unknown.

  • {{deployment.environment}} returns information related to the deployment environment. Note that environment contains additional nested smart values.

    • {{deployment.environment}} returns my-custom-prod-env

    • {{deployment.environment.type}} returns production

{{repository}}

Connect your source code management, build or deployment tool to use these smart values.

A repository represents a collection of files and associated metadata. These smart values can only be accessed through other root keys (e.g. {{branch.repository}}).

  • {{repository.name}} returns the name of the repository, e.g. TEST-123-some-feature

  • {{repository.url}} returns the absolute URL of the repository, e.g. https://bitbucket.org/account/repo. Note that this will return an encoded URL; everything after bitbucket.org/ will look different from what you see here

{{environment}}

Connect your source code management, build or deployment tool to use these smart values.

An environment represents a distinct ecosystem where products are deployed to. These smart values can only be accessed through other root keys (e.g{{deployment.environment}}).

  • {{environment.name}} returns the use-provided name for the environment, e.g. my-custom-prod-env

  • {{environment.type}} returns the environment type. Possible states are production, staging, testing, development, and unknown

{{sprint}}

Accesses information relating to the sprint that triggered the rule.

  • {{sprint.id}} - Returns the sprint ID.

  • {{sprint.name}} - Returns the sprint name.

  • {{sprint.isStarted}} - Returns true if the sprint has started, and false if not.

  • {{sprint.isClosed}} - Returns true if the sprint has closed, and false if not.

  • {{sprint.startDate}} - Returns the start date of the sprint.

  • {{sprint.endDate}} - Returns the end date of the sprint.

  • {{sprint.completeDate}} - Returns date the sprint was marked as complete.

  • {{sprint.originBoardId}} - Returns the ID of the board the sprint belongs to.

  • {{sprint.goal}} - Returns the sprint goal.

{{createdSprint}}

Access information related to the last sprint that was created in the rule.

  • {{createdsprint.id}} - Returns the sprint ID.

  • {{createdsprint.name}} - Returns the sprint name.

  • {{createdsprint.isStarted}} - Returns true if the sprint has started, and false if not.

  • {{createdsprint.isClosed}} - Returns true if the sprint has closed, and false if not.

  • {{createdsprint.startDate}} - Returns the start date of the sprint.

  • {{createdsprint.endDate}} - Returns the end date of the sprint.

  • {{createdsprint.completeDate}} - Returns date the sprint was marked as complete.

  • {{createdsprint.originBoardId}} - Returns the ID of the board the sprint belongs to.

  • {{createdsprint.goal}} - Returns the sprint goal.

{{createdSprints}}

Access information related to all sprints created in an automation rule, as a list. Learn more about list smart values

This will only be useful if you use the “Create sprint” action multiple times.

  • {{createdsprints.id}} - Returns the sprint IDs.

  • {{createdsprints.name}} - Returns the sprint names.

  • {{createdsprints.isStarted}} - Returns true if the sprint has started, and false if not.

  • {{createdsprints.isClosed}} - Returns true if the sprint has closed, and false if not.

  • {{createdsprints.startDate}} - Returns the start date of each sprint.

  • {{createdsprints.endDate}} - Returns the end date of each sprint.

  • {{createdsprints.completeDate}} - Returns date eac sprint was marked as complete.

  • {{createdsprints.originBoardId}} - Returns the ID of the board each sprint belongs to.

  • {{createdsprints.goal}} - Returns the each sprint goal.

{{version}}

Accesses information for the version that triggered the rule.

  • {{version.name}} - Returns the version's name.

  • {{version.id}} - Returns the version's ID.

  • {{version.description}} - Returns the version's description.

  • {{version.archived}} - Returns true if the version is archived, and false if not.

  • {{version.startDate}} - Returns the version's start date.

  • {{version.released}} - Returns true if the version is released, and false if not.

  • {{version.releaseDate}} - Returns the version's release date

  • {{version.project.key}} - Returns the project key of the project the version belongs to.

Additional Help