You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 37 Next »

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 .  

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.

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

system Some 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).




Additional contexts for automation rules

These additional contexts are available for automation rules:

ContextDescriptionExample
trigger The 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.

selector The  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

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

Example: %{trigger.parent.summary}

Field 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}

Field codes 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}

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



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}

NUMBER []

Comma separated list of version IDs

10010,10020,10030

Number of affects version/s

{issue.versions.length}

NUMBER

Number of affected versions in current issue3
Assignee

%{issue.assignee}

USER

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

%{issue.assignee.displayName}

STRING

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

%{issue.assignee.email}

STRING

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

%{issue.attachments}

ATTACHMENT []

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

{issue.attachments.length}

NUMBER

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

STRING

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}

NUMBER

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}

COMPONENT []

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

{issue.components.id}

NUMBER []

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

%{issue.components.leads}

USER []

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}

DATE_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}

USER

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}

STRING

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

%{issue.creator.email}

STRING

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

%{issue.description}

STRING

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

%{issue.dueDate}

DATE

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}

STRING

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}

VERSION []

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

{issue.fixVersions.id}

NUMBER []

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

{issue.fixVersions.length}

NUMBER

Number of fixed versions in current issue5
Issue ID

{issue.id}

NUMBER

ID of the current issue10001
Issue key

%{issue.key}

STRING

Issue key of the current issueCRM-25
Issue type

%{issue.issueType}

ISSUE TYPE

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

Improvement 

Issue type ID

{issue.issueType.id}

NUMBER

ID of issue's Issue Type

10056

Labels

%{issue.labels}

LABELS []

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

{issue.labels.length}

NUMBER

Number of labels in current issue4
Last comment

%{issue.lastComment}

STRING

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

%{issue.lastComment.author}

USER

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

%{issue.status}

STATUS

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

NUMBER

ID of current status of the issue10100
Issue status category

%{issue.status.category}

STATUS CATEGORY

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

%{issue.status.previous}

STATUS

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}

STRING []

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

{issue.links.length}

NUMBER

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

{issue.originalEstimate}

NUMBER

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}

NUMBER

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}

NUMBER

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}

PRIORITY

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

{issue.priority.id}

NUMBER

ID of the priority the issue belongs to10010
Project

%{issue.project}

PROJECT

Project Key of the project the issue belongs toHR
Project ID

{issue.project.id}

NUMBER

Project ID of the project the issue belongs to10100
Project key

%{issue.project.key}

STRING

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

%{issue.project.name}

STRING

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

%{issue.project.description}

STRING

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}

STRING

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

%{issue.project.category}

STRING

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}

USER

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}

STRING

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

%{issue.project.lead.email}

STRING

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

%{issue.reporter}

USER

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

%{issue.reporter.displayName}

STRING

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

%{issue.reporter.email}

STRING

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

%{issue.resolution}

RESOLUTION

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}

DATE_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}

SECURITY

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

{issue.securityLevel.id}

NUMBER

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

%{issue.subtasks}

STRING []

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

{issue.subtasks.length}

NUMBER

Number of subtasks of current issue3
Summary

%{issue.summary}

STRING

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

%{issue.transitions.achievable}

STRING

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}

DATE_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}

NUMBER

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

%{issue.lastStatusChange}

DATE_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}

USER []

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

Component fields


Field nameField codeTypeOutputExample output
Affects version/s

{issue.versions.id}

NUMBER []

Comma separated list of version IDs

10010,10020,10030

Number of affects version/s

{issue.versions.length}

NUMBER

Number of affected versions in current issue3
Assignee

%{issue.assignee}

USER

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

%{issue.assignee.displayName}

STRING

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

%{issue.assignee.email}

STRING

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

%{issue.attachments}

ATTACHMENT []

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

{issue.attachments.length}

NUMBER

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

STRING

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}

NUMBER

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}

COMPONENT []

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

{issue.components.id}

NUMBER []

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

%{issue.components.leads}

USER []

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}

DATE_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}

USER

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}

STRING

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

%{issue.creator.email}

STRING

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

%{issue.description}

STRING

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

%{issue.dueDate}

DATE

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}

STRING

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}

VERSION []

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

{issue.fixVersions.id}

NUMBER []

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

{issue.fixVersions.length}

NUMBER

Number of fixed versions in current issue5
Issue ID

{issue.id}

NUMBER

ID of the current issue10001
Issue key

%{issue.key}

STRING

Issue key of the current issueCRM-25
Issue type

%{issue.issueType}

ISSUE TYPE

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

Improvement 

Issue type ID

{issue.issueType.id}

NUMBER

ID of issue's Issue Type

10056

Labels

%{issue.labels}

LABELS []

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

{issue.labels.length}

NUMBER

Number of labels in current issue4
Last comment

%{issue.lastComment}

STRING

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

%{issue.lastComment.author}

USER

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

%{issue.status}

STATUS

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

NUMBER

ID of current status of the issue10100
Issue status category

%{issue.status.category}

STATUS CATEGORY

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

%{issue.status.previous}

STATUS

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}

STRING []

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

{issue.links.length}

NUMBER

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

{issue.originalEstimate}

NUMBER

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}

NUMBER

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}

NUMBER

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}

PRIORITY

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

{issue.priority.id}

NUMBER

ID of the priority the issue belongs to10010
Project

%{issue.project}

PROJECT

Project Key of the project the issue belongs toHR
Project ID

{issue.project.id}

NUMBER

Project ID of the project the issue belongs to10100
Project key

%{issue.project.key}

STRING

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

%{issue.project.name}

STRING

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

%{issue.project.description}

STRING

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}

STRING

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

%{issue.project.category}

STRING

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}

USER

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}

STRING

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

%{issue.project.lead.email}

STRING

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

%{issue.reporter}

USER

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

%{issue.reporter.displayName}

STRING

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

%{issue.reporter.email}

STRING

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

%{issue.resolution}

RESOLUTION

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}

DATE_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}

SECURITY

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

{issue.securityLevel.id}

NUMBER

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

%{issue.subtasks}

STRING []

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

{issue.subtasks.length}

NUMBER

Number of subtasks of current issue3
Summary

%{issue.summary}

STRING

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

%{issue.transitions.achievable}

STRING

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}

DATE_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}

NUMBER

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

%{issue.lastStatusChange}

DATE_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}

USER []

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