Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties



Status
Tech review

Status
titletodo

Style guide

Status
titletodo



Status
titletodo

Status
colourYellow
titleReady for review

Status
colourGreen
titledone

Status
colourRed
titleflagged


Panel

On this page

Table of Contents
exclude(On this page).*
stylecircle
typeflat
separatorpipe




Overview

One of the most important features of JWT is the easy accessibility to Jira data stored in system fields, custom fields and a significant number of other virtual fields that are made available by the JWT implementation.

You can access, validate, do mathematical calculations and manipulate the values found in these fields through the use of field codes 

UI Text Box
typeinfo

A field code is a unique identifier (key) that can be used in any parser expression. At the same time a field code is a safety feature that makes your expressions immune to custom field renaming

Field codes are available for:

  • readable fields
  • writable fields
  • virtual fields
  • issue, project and user properties



 Field code notation

Depending on the context in which they are being used, field codes will contain a prefix following this notation{origin.field}.

What is a context?

A context basically determines where JWT will pull data from. Available contexts (or origins) in JWT are:

ContextDescriptionExample
issue

The issue that currently being processed by a workflow function or automation rule.

UI Text Box
typetip

The most commonly used context in JWT.


%{issue.description

The description of the current issue.

parent

The parent of the issue that is processed by a workflow post function or an automation rule.

(warning) Only valid for sub-tasks.

%{parent.summary}

The summary of the parent issue.

seed.issue

Seed issues of the issue that is processed by a workflow post function or an automation rule. More info...

%{seed.issue.summary}

The summary of a seed issue.

issue.project

systemSome data does not have an issue context (e.g. the currently logged in user or the system date and time).

%{system.currentUser}

The current user (e.g. executing the post function).





UI Expand
titleAdditional contexts for automation rules

These additional contexts are available for automation rules:

ContextDescriptionExample
triggerThe issue, user, version, component or project event that triggers the execution of the rule.

%{trigger.issue.description}

The description of the issue triggering the automation rule.

selectorThe issue currently being processed by a selector (e.g. an issue returned by a JQL query).

%{selector.issue.cf10021}

The value of the custom field with the ID 10021 from the issue currently being processed by a selector.

The prefix is a referential part of the field code and will be inserted into the expression whenever you select a field from a dropdown list (as shown below).   

INSERT SCREENCAST


Info

The additional contexts can be used in combination with the standard contexts (e.g. parent, seed).

Example: %{trigger.parent.summary}



ui-text-boxexpand
info
titletypeField codes in the documentation

Wherever field codes are used in the documentation, they will be notated with three periods (...)  instead of a prefix. 

  • %{...summary} 

  • %{...cf10021}

  •   {...duedate}


UI Text Box
typeinfo

Field codes for Jira standard or system fields will display the attribute in a legible form like %{trigger.issue.summary}.

All selected  for Jira standard or system fields will display the attribute in a legible form like %{trigger.issue.summary}.All selected custom fields will be notated like %{trigger.issue.cfnnnnn} where nnnnn contains the Jira custom field ID.
Once an expression has been saved, the real name will be displayed in the configuration element.

The purpose of using the cfnnnnn notation is quite simple - custom fields can be renamed .


Numbers vs. text (strings)

Field codes must always be enclosed by curly brackets {} but if they are used for text-strings, the brackets must be preceded by a percent sign %

  • Number fields can be referenced as numbers using the following notation: {issue.somenumberfield}. ((info) no preceding % sign)
    • If a field is not set or does not return a number (e.g. a text field ), it is evaluated to null.
  • String fields: Any field type or data type is susceptible of being transformed to text, so any field can be referenced as a text-string value using the following notation: %{issue.somefield}.
    • If a field has no value (null), an empty string will be returned.
  • Cascading Select fields are treated as string fields, where i is the index that represents the level to be accessed. (i = 0 is used for base level) are notated as %{issue.somefield.i}


UI Text Box
typetip

A complete list of all available data types can be found here.

UI Expand
titleField codes in the documentation

Wherever field codes are used in the documentation, they will be notated with three periods (...)  instead of a prefix. 

  • %{...summary} 

  • %{...cf10021}

  •   {...duedate}





    Readable fields

    The list below contains all fields that can be read by JWT.

    Issue-related fields


    Field nameField codeTypeOutputExample output
    Affects version/s

    {issue.versions.id}

    Status
    subtletrue
    colourBlue
    titlenumber []

    Comma separated list of version IDs

    10010,10020,10030

    Number of affects version/s

    {issue.versions.length}

    Status
    colourBlue
    titlenumber

    Number of affected versions in current issue3
    Assignee

    %{issue.assignee}

    Status
    colourGrey
    titleuser

    The Atlassian account ID of the user who has the issue assigned10007
    Assignee's full name

    %{issue.assignee.displayName}

    Status
    colourYellow
    titlestring

    Name and surname of the user who currently has the issue assignedAlbert Einstein
    Assignee's email

    %{issue.assignee.email}

    Status
    colourYellow
    titlestring

    Email address of the user who currently has the issue assignedalbert.einstein@yahoo.com
    Attachments

    %{issue.attachments}

    Status
    colourGrey
    titleattachment []

    Comma separated list of file names of all files attached to the issuefile1.txt,readme.pdf,screenshot.png
    Number of attachments

    {issue.attachments.length}

    Status
    colourBlue
    titlenumber

    Number of files attached to current issue3
    Custom field%{issue.cf10100}

    Status
    colourYellow
    titlestring

    Value of the given custom field as a string.
    All custom fields will be notated like this %{issue.cfnnnnn} where nnnnn contains the Jira custom field id, that can be determined of the Jira custom field administration
    Your customfield value

    Custom field{issue.cf10133}

    Status
    colourBlue
    titlenumber

    Value of the given custom field as a number.
    All custom fields will be notated like this{issue.cfnnnnn} where nnnnn contains the Jira custom field id, that can be determined of the Jira custom field administration
    47
    Component/s

    %{issue.components}

    Status
    colourGrey
    titlecomponent []

    Comma separated list of component namesWeb Site,Authenticator,Statistics
    Component/s ID

    {issue.components.id}

    Status
    subtletrue
    colourBlue
    titlenumber []

    Comma separated list of component IDs10010,10020,10030
    Component/s leads

    %{issue.components.leads}

    Status
    colourGrey
    titleuser []

    Comma separated list of the Atlassian account IDs of the leads for the components557068:145e0983-5707-439c-80e4-1160dd57g114,777068:145e0983-5707-439c-80e4-1160dd57x554,765428:168p0983-5987-444e-80e4-1160dd57g114
    Date and time of creation

    %{issue.created}

    Status
    colourGrey
    titledate_time

    Date and time when issue has been created.

    It's formatted as follows: YYYY-MM-DDTH24:MM:SS.msTZ 

    2019-04-01T14:19:07.060+0200
    Creator

    %{issue.creator}

    Status
    colourGrey
    titleuser

    Atlassian account ID of the user who actually creates the issue in JIRA765428:168p0983-5987-444e-80e4-1160dd57g114
    Creator's full name

    %{issue.creator.displayName}

    Status
    colourYellow
    titlestring

    Name and surname of the user who actually created the issue in JIRARichard Feynman
    Creator's email

    %{issue.creator.email}

    Status
    colourYellow
    titlestring

    Email address of the user who actually created the issue in JIRArichard.feynman@gmail.com
    Description

    %{issue.description}

    Status
    colourYellow
    titlestring

    Issue descriptionTake your Jira to the next level by using JWT for Jira Cloud
    Due date

    %{issue.dueDate}

    Status
    colourGrey
    titledate

    Field that stores a date with no time part and is used to schedule issues. 

    It's formatted as follows: YYYY-MM-DD

    2019-10-22
    Environment

    %{issue.environment}

    Status
    colourYellow
    titlestring

    Field to describe the environment where the issue has occurredTake your Jira to the next level by using JWT for Jira Cloud
    Fix version/s

    %{issue.fixVersions}

    Status
    colourGrey
    titleversion []

    Comma separated list of fix version names1.0,2.0,2.1
    Fix version/s ID

    {issue.fixVersions.id}

    Status
    subtletrue
    colourBlue
    titlenumber []

    Comma separated list of fix versions IDs10010,10020,10030
    Number of fix version/s

    {issue.fixVersions.length}

    Status
    colourBlue
    titlenumber

    Number of fixed versions in current issue5
    Issue ID

    {issue.id}

    Status
    colourBlue
    titlenumber

    ID of the current issue10001
    Issue key

    %{issue.key}

    Status
    colourYellow
    titlestring

    Issue key of the current issueCRM-25
    Issue type

    %{issue.issueType}

    Status
    colourGrey
    titleissue type

    Name of issue's Issue Type in the user's language set in his profile

    Improvement 

    Issue type ID

    {issue.issueType.id}

    Status
    colourBlue
    titlenumber

    ID of issue's Issue Type

    10056

    Labels

    %{issue.labels}

    Status
    colourGrey
    titlelabels []

    Comma separated list with all the labels of the issueweb,customer,java,mobile
    Number of labels

    {issue.labels.length}

    Status
    colourBlue
    titlenumber

    Number of labels in current issue4
    Last comment

    %{issue.lastComment}

    Status
    colourYellow
    titlestring

    Last comment entered in the issueTake your Jira to the next level by using JWT for Jira Cloud
    Last commenter

    %{issue.lastComment.author}

    Status
    colourGrey
    titleuser

    Atlassian account ID of the user who entered the last comment in the issue557068:145e0983-5707-439c-80e4-1160dd57g114
    Issue status

    %{issue.status}

    Status
    colourGrey
    titlestatus

    Name of current status of the issuein the user's language set in his profileOpen
    Issue status ID%{issue.status.id}

    Status
    colourBlue
    titlenumber

    ID of current status of the issue10100
    Issue status category

    %{issue.status.category}

    Status
    colourGrey
    titlestatus category

    Name of the category in the user's language set in his profileDone
    Previous issue status

    %{issue.status.previous}

    Status
    colourGrey
    titlestatus

    Name of the status the issue was just before current one

    The name is shown in the user's language set in his profile

    Closed 
    Keys of linked issues

    %{issue.links}

    Status
    subtletrue
    colourYellow
    titlestring []

    Comma separated list of issue keysCRM-13,HR-25,SD-12
    Number of linked issues

    {issue.links.length}

    Status
    colourBlue
    titlenumber

    Number of issues linked to current issue3
    Original estimate (minutes)

    {issue.originalEstimate}

    Status
    colourBlue
    titlenumber

    Time originally estimated for the issue expressed in minutes

    It's a real number, so it may have a non-zero fractional part

    360
    Remaining estimate (minutes)

    {issue.remainingEstimate}

    Status
    colourBlue
    titlenumber

    Remaining time estimated for the issue expressed in minutes

    It's a real number, so it may have a non-zero fractional part

    270
    Total time spent (minutes)

    {issue.timeSpent}

    Status
    colourBlue
    titlenumber

    Work time currently spent at the issue expressed in minutes

    It's a real number, so it may have a non-zero fractional part

    90
    Priority

    %{issue.priority}

    Status
    colourGrey
    titlepriority

    Name of the priority in the user's language set in his profileCritical
    Priority ID

    {issue.priority.id}

    Status
    colourBlue
    titlenumber

    ID of the priority the issue belongs to10010
    Project

    %{issue.project}

    Status
    colourGrey
    titleproject

    Project Key of the project the issue belongs toHR
    Project ID

    {issue.project.id}

    Status
    colourBlue
    titlenumber

    Project ID of the project the issue belongs to10100
    Project key

    %{issue.project.key}

    Status
    colourYellow
    titlestring

    Project Key of the project the issue belongs to (identically to Project, i.e %{issue.project})HR
    Project name

    %{issue.project.name}

    Status
    colourYellow
    titlestring

    Name of the project the issue belongs toCustomer Relationship Management
    Project description

    %{issue.project.description}

    Status
    colourYellow
    titlestring

    Field description of the project the issue belongs toTake your Jira to the next level by using JWT for Jira Cloud
    Project URL

    %{issue.project.url}

    Status
    colourYellow
    titlestring

    Field URL of the project the issue belongs tohttps://www.decadis.de/x
    Project category

    %{issue.project.category}

    Status
    colourYellow
    titlestring

    Name of the Category of the project the issue belongs toTake your Jira to the next level by using JWT for Jira Cloud
    Project lead

    %{issue.project.lead}

    Status
    colourGrey
    titleuser

    Atlassian account ID of the user who leads the project the issue belongs to557068:145e0983-5707-439c-80e4-1160dd57g114
    Project lead's full name

    %{issue.project.lead.displayName}

    Status
    colourYellow
    titlestring

    Name and surname of the user who leads the project the issue belongs toGalileo Galilei
    Project lead's email

    %{issue.project.lead.email}

    Status
    colourYellow
    titlestring

    Email address of the user who leads the project the issue belongs togalileo.galilei@me.com
    Reporter

    %{issue.reporter}

    Status
    colourGrey
    titleuser

    Atlassian account ID of the user who reported the issue557068:145e0983-5707-439c-80e4-1160dd57g114
    Reporter's full name

    %{issue.reporter.displayName}

    Status
    colourYellow
    titlestring

    Name and surname of the user who created the issueAlbert Einstein
    Reporter's email

    %{issue.reporter.email}

    Status
    colourYellow
    titlestring

    Email address of the user who created the issuealbert.einstein@yahoo.com
    Resolution

    %{issue.resolution}

    Status
    colourGrey
    titleresolution

    The name of the resolution currently set at the issue. The name of the resolution is shown in the user's language set in his profileWon't fix

    Date and time of resolution

    %{issue.resolutionDate}

    Status
    colourGrey
    titledate_time

    Date and time of the most recent update of field Resolution.

    It's formatted as follows: YYYY-MM-DDTH24:MM:SS.msTZ 

    2019-04-01T14:19:07.060+0200
    Security level

    %{issue.securityLevel}

    Status
    colourGrey
    titlesecurity

    Name of the security level the issue currently hasClassified
    Security level ID

    {issue.securityLevel.id}

    Status
    colourBlue
    titlenumber

    ID of the security level the issue currently has10001
    Keys of sub-tasks

    %{issue.subtasks}

    Status
    subtletrue
    colourYellow
    titlestring []

    Comma separated list of issue keysCRM-23,CRM-26,CRM-31
    Number of sub-tasks

    {issue.subtasks.length}

    Status
    colourBlue
    titlenumber

    Number of subtasks of current issue3
    Summary

    %{issue.summary}

    Status
    colourYellow
    titlestring

    The issue summaryTake your Jira to the next level by using JWT for Jira Cloud
    Available transitions

    %{issue.transitions.achievable}

    Status
    colourYellow
    titlestring

    A comma separated list with the names of transitions with origin in current issue status

    Start Progress,Resolve Issue,Close Issue


    Date and time of last update

    %{issue.updated}

    Status
    colourGrey
    titledate_time

    Date and time of the most recent issue update

    It's formatted as follows: YYYY-MM-DDTH24:MM:SS.msTZ

    2019-04-01T14:19:07.060+0200
    Number of votes received

    {issue.votes}

    Status
    colourBlue
    titlenumber

    Number of votes received by the issue5
    Date and time of latest status change

    %{issue.lastStatusChange}

    Status
    colourGrey
    titledate_time

    Date and time of the most recent status change in the issue. 

    It's formatted as follows: YYYY-MM-DDTH24:MM:SS.msTZ

    2019-04-01T14:19:07.060+0200


    Watchers

    %{issue.watcher}

    Status
    colourGrey
    titleuser []

    Comma separated list of Atlassian account IDs of current watchers of the issue557068:145e0983-5707-439c-80e4-1160dd57g114,777068:145e0983-5707-439c-80e4-1160dd57x554