šŸš€ Effective since April 2020 and JWT version 2.9.0 Automation Toolbox for Jira is fully integrated into our top rated app Jira Workflow Toolbox (JWT)šŸš€

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

Compare with Current View Page History

« Previous Version 10 Next »


Automation Toolbox for JiraĀ provides a set of special fields called Virtual Fields, making the most interesting properties of issues, projects and usersĀ accessible to every feature in the app. Virtual fields may be read and written by Automation Toolbox for Jira in the same way ordinary custom fields are.

Writable virtual fields

When a value is written into these fields, a feature or system field of the issue the field belongs to will be modified. These fields are also readable.

Field NameField codeEffect of WritingAllowed String ValuesAllowed Numeric ValuesExamples
Summary

summary

Sets issue Summarytext string trimmed to 255 charactersnumbers are cast to string-
DescriptiondescriptionSets issue Descriptionunlimited text stringnumbers are cast to string-
AssigneeassigneeAssigns the issue to a useruser name (not user's full name)n/a-
ReporterreporterUpdates issue Reporter to a different useruser name (not user's full name)n/a-
Due date

dueDate

Sets issue's system field Due Datedate-time in format defined at jira.date.time.picker.java.format, or as in JQL (yyyy/MM/dd HH:mm, yyyy-MM-dd HH:mm, yyyy/MM/dd, yyyy-MM-dd, or relative to current time using "w" (weeks), "d" (days), "h" (hours) or "m" (minutes)number of minutes relative to current time.2014-03-25 : date example

2015-01-31 14:35 : date with time example

- 4d 1h : 4 days and 1 hour before current time.

2w, 3d, 4h, 5m : 2 weeks, 3 days, 4 hours and 5 minutes after current time.

PrioritypriorityUpdates the issue Priorityname of a Priority (e.g., Blocker, Critical, Major,...)(0 = highest priority, 1 = second highest,... n = lowest
Original estimate (minutes)originalEstimateSets original estimatecast from string to number will be attemptednumber of minutes30 : sets Original estimate to 30 minutes.

Original estimate (minutes) can be increased or decreased using expression parserĀ  with formulas like: {00024} + 60 for increasing remaining estimate in 1 hour, or {00024} - {10000} for decreasing remaining estimate by the amount of minutes stored in custom field with code {10000}.
Remaining estimate (minutes)estimateSets remaining estimatecast from string to number will be attemptednumber of minutes30 : sets Remaining estimate to 30 minutes.

Remaining estimate (minutes) can be increased or decreased using expression parser with formulas like: {00024} + 60 for increasing remaining estimate in 1 hour, or {00024} - {10000} for decreasing remaining estimate by the amount of minutes stored in custom field with code {10000}.
Total time spent (minutes)timeSpentSets time spent.+cast from string to number will be attemptednumber of minutes30 : sets Time spent to 30 minutes.

Total time spent (minutes) can be increased or decreased using expression parserĀ  with formulas like: {00024} + 60 for increasing remaining estimate in 1 hour, or {00024} - {10000} for decreasing remaining estimate by the a mount of minutes stored in custom field with code {10000}.
Add to time spent (minutes)addTimeSpentAdds a number of minutes to current value of field "Total time spent (minutes)"cast from string to number will be attemptednumber of minutes60 : increases time spent in 1 hour.

ComponentscomponentSets issue ComponentsComma separated list of component names.

Prefixes + and - can be used to add or remove (check or uncheck) single values or set of values.
n/a+ Web Site, User Management : adds the components Web Site and User Management to current issue, provided they exist in the project.

- Library A, Component B : removes the components Library A and Component B from current issue, provided they exist in the project.
Fixed versionsfixVersionSets Fixed versionsComma separated list of version names.

Prefixes + and - can be used to add or remove (check or uncheck) single values or set of values.
numbers are cast to string+ 1.0, 1.1 : adds versions 1.0 and 1.1 to field Fixed versions.

- 2.0, 2.2 : removes versions 2.0 and 2.2 from field Fixed versions.
Affected versionsversionSets Affected versionsComma separated list of version names.

Prefixes + and - can be used to add or remove (check or uncheck) single values or set of values.
numbers are cast to string+ 1.0, 1.1 : adds versions 1.0 and 1.1 to field Affected versions.

- 2.0, 2.2 : removes versions 2.0 and 2.2 from field Affected versions.
EnvironmentenvironmentSets issue Environmentunlimited text stringnumbers are cast to string-
Issue statusstatusWill make the issue progress through the workflow to the written status, provided there is transition in the workflow from current status to the written status. It requires that all conditions and validations in the transition are satisfied.name of a Status (e.g., Open, In Progress, Resolved,...)n/aResolved : will search for a transition from current issue's status to Resolved status. If conditions are satisfied, it will try to execute the transition. Then if validators are satisfied in that transition are satisfied, it will be executed, resulting in moving issue to Resolved status. Every post-function in the executed transition is also executed.

ResolutionresolutionSets issue Resolutionname of issue Resolution (e.g., Fixed, Won't Fix, Duplicate, Incomplete,...)n/a-
LabelslabelsSets LabelsComma separated list of labels. If label doesn't exist it is created.

Prefixes + and - can be used to add or remove (check or uncheck) single values or set of values.
numbers are cast to string+ jira, plugin : adds labels "jira" and "plugin" to the issue.

- scrum, web : removes labels "scrum" and "web" from the issue.
Attachments (only new attachments will be added)attachmentsAddAdds new attachments coming from another issue keeping current attachments. Rejects duplicated attachments.Comma or blank separated list of issue keys whose attachments will be copied to current issue.n/aCMR-1 : adds to current issue the attachments in issue CRM-1 except if attachments are already in current issue.

CRM-2, HR-34, HR-50 : adds to current issue the attachments in issues CRM-2, HR-34 and HR-50 except if attachments are already in current issue.
Attachments with detailsattachment.detailsText stringComma separated list of file names with its mime types and sizes in Kbytes, for every file attached to the issue.
file1.txt (text/plain, 5.14 KB), readme.pdf (application/pdf, 179.8 KB), screenshot.png (image/png, 5.449 KB)
Security levelsecurityLevelSets issue Security Levelname of a Security Leveln/aPublic : sets security level to Public, provided this security level exists in the Security Scheme of the project.

Reserved : sets security level to Reserved, provided this security level exists in the Security Scheme of the project.
Last commentlastCommentUpdates the last comment added to the issue if it existsunlimited text string

Optionally parameter visibility can be added for setting comment visibility. To do it add : {visibility=visibility_value} at the end of the text. This parameter permits same values as "Last comment's visibility restriction".
numbers are cast to stringWARNING: When writing into this field, please add your writer post-function AFTER "Add a comment to an issue if one is entered during a transition." post-function, since otherwise updated comment will be the one before last, instead of the last one.
Last comment's visibility restriction

lastComment.visibilityUpdates the visibility of the last comment in the issue if it exists. Can be used to set the visibility of a comment introduced with virtual field New commentname of a Project Role or name of a Group.

In Jira Service Desk it also admits values public and internal (without doble quotes), or alternatively jsd_public and jsd_internal to avoid name collision with existing project roles and user groups.

n/aDevelopers : for setting visibility to project role or group with name Developers.

jsd_internal : for setting JSD internal visibility.

jira-developers : for setting visibility to "jira-developers" user group.
WatcherswatcherSets watchers of an issue. Can be used to add or remove watchers to linked issues, sub-tasks or issues returned by JQL, but requires to use operator '+' and '-'. Also can be used to copy watchers between issues.comma separated list of user names, group names or project roles names.

Prefixes + and - can be used to add or remove single users or set of users.
n/aalbert, richard, john : sets 3 users as watchers replacing current ones.

+ Developers, Administrators : adds every user in project roles or groups Developers and Administrators to current watchers.

- Testers, Administrators, + albert, richard : removes users in project roles or groups Testers and Administrators and adds users albert and richard as watchers.


Values returned when reading virtual fields


Field nameField CodeTypeValue returned when cast to stringExamples
SummarysummaryText stringIssue summary.-
DescriptiondescriptionText stringIssue description.-
AssigneeassigneeUserThe name of the user who has the issue assigned.albert.einstein
Assignee's full nameassignee.fullNameText stringName and surname of the user who currently has the issue assignedAlbert Einstein
Assignee's emailassignee.emailText stringEmail address of the user who currently has the issue assignedalbert.einstein@yahoo.com
ReporterreporterUserThe name of the user who reported the issue. This field is editable, while Creator field isn't.albert.einstein
Reporter's full namereporter.fullNameText stringName and surname of the user who created the issueAlbert Einstein
Reporter's emailreporter.emailText stringEmail address of the user who created the issuealbert.einstein@yahoo.com
CreatorcreatorUserUser name of the user who actually creates the issue in JIRA. This field, unlike Reporter, can't be edited.richard.feynman
Creator's full namecreator.fullNameText stringName and surname of the user who actually created the issue in JIRARichard Feynman
Creator's emailcreator.emailText stringEmail address of the user who actually created the issue in JIRArichard.feynman@gmail.com
Current usercurrentUserUserName of the user who is executing the transition.isaac.newton
Current user's full namecurrentUserFullNameText stringName and surname of the user who is executing the transition.Isaac Newton
Current user's emailcurrentUserEmailText stringEmail address of the user who leads the project the issue belongs to.albert.einstein@yahoo.com, isaac.newton@gmail.com
Current date and timecurrentDateTimeDate and TimeCurrent date and time of JIRA server's clock. When cast to string format defined at jira.date.time.picker.java.format is used.19/Mar/14 1:38 PM for jira.date.time.picker.java.format = dd/MMM/yy h:mm a

Date and time of creationcreatedDate and timeDate and time when issue has been created. When cast to string format defined at jira.date.time.picker.java.format is used.19/Mar/14 1:38 PM for jira.date.time.picker.java.format = dd/MMM/yy h:mm a


Date and time of last updateupdatedDate and timeDate and time of the most recent issue update. When cast to string format defined at jira.date.time.picker.java.format is used.19/Mar/14 1:38 PM for jira.date.time.picker.java.format = dd/MMM/yy h:mm a
Date and time of latest status changelastStatusChangeDate and timeDate and time of the most recent status change in the issue. When cast to string format defined at jira.date.time.picker.java.format is used.19/Mar/14 1:38 PM for jira.date.time.picker.java.format = dd/MMM/yy h:mm a

Useful to find out for how much time is the issue in current status using expression: {00057} - {000158}, where {00057} = Current date and time and {000158} is Date and time of latest status change.


Due datedueDateDateField that can store a date with no time part, and is used to schedule issues. When cast to string format defined at jira.date.time.picker.java.format is used.19/Mar/14 for jira.date.time.picker.java.format = dd/MMM/yy h:mm a, since this field doesn't store time part.
Date and time of resolutionresolutionDateDate and timeDate and time of the most recent update of field Resolution. When cast to string format defined at jira.date.time.picker.java.format is used.19/Mar/14 1:38 PM for jira.date.time.picker.java.format = dd/MMM/yy h:mm a
PrioritypriorityPriorityName of the priority in Default language configured in the JIRA instanceBlocker
Critical
Major
Original estimate (minutes)originalEstimateNumberTime originally estimated for the issue expressed in minutes. It's a real number, so it may have a non-zero fractional part.-
Remaining estimate (minutes)estimateNumberRemaining time estimated for the issue expressed in minutes. It's a real number, so it may have a non-zero fractional part.-
Total time spent (minutes)timeSpentNumberWork time currently spent at the issue expressed in minutes. It's a real number, so it may have a non-zero fractional part.-
Work logged in transition (minutes)transition.worklogNumberNumber of minutes logged in current transition screen.This field can be used to enforce logging some time in transition screen.


ComponentscomponentComponentsComma separated list of component namesWeb Site, Authenticator, Statistics
Components leaderscomponent.leadsMulti userComma separated list of user namesalbert.einstein@yahoo.com, richard.feynman@gmail.com
Fixed versionsfixVersionVersionsComma separated list of fixed versions1.0, 2.0, 2.1
Fixed versions with detailsfixVersion.detailsText stringA text with a line for each fixed versions. Each line contains the following information separated by characters '#': name of version, description, release date and archive situation1.0 # First release # RELEASED ON 28/Mar/14 12:00 AM # ARCHIVED
Number of fixed versionsfixVersion.countNumberNumber of fixed versions in current issue.-
Affected versionsversionVersionsComma separated list of fixed versions1.0, 2.0, 2.1
Affected versions with detailsversion.detailsText stringA text with a line for each affected versions. Each line contains the following information separated by characters '#': name of version, description, release date and archive situation1.0 # First release # RELEASED ON 28/Mar/14 12:00 AM # ARCHIVED
Number of affected versionsversion.countNumberNumber of affected versions in current issue.-
Number of votes receivedvotesNumberNumber of votes received by the issue.-
Keys of subtaskssubtasksText stringComma separated list of issue keys.CRM-23, CRM-26, CRM-31
Number of subtaskssubtasks.countNumberNumber of subtasks of current issue.-
Keys of linked issueslinkedIssuesText stringComma separated list of issue keys.CRM-13, HR-12, SDESK-45
Number of linked issueslinkedIssues.countNumberNumber of issues linked to current issue.-
EnvironmentenvironmentStringField to describe the environment where the issue has occurred.-
AttachmentsattachmentAttachmentsComma separated list of file names of all files attached to the issue.file1.txt, readme.pdf, screenshot.png

Number of attachmentsattachment.countNumberNumber of files attached to current issue.-
LabelslabelsLabelsBlank separated list with all the labels of the issue.web customer java mobile
Number of labelslabels.countNumberNumber of labels in current issue.-
Issue keykeyText stringIssue keyCRM-25
HR-52
SDESK-1
Issue typeissueTypeIssue typeName of issue's Issue Type in Jira's default languageBug
Improvement
New Feature
Task


Issue statusstatusIssue statusName of current status of the issue in Jira's default language.Open
In Progress
Resolved
Issue status category

statusCategoryStatus categoryName of the category in Jira's default language.To Do
In Progress
Done
Previous issue status

status.previousIssue statusName of the status the issue was just before current one. The name is shown in Jira's default language.Open
In Progress
Closed
Previous issue status categorystatusCategory.previousStatus categoryName of the category of the status the issue was just before current one. The name is shown in Jira's default language.To Do
In Progress
Done
Available transitions

transitions.achievableText stringA comma separated list with the names of transitions with origin in current issue status.If current issue is in Open status of classic Jira workflow, then field Available transitions will return: Start Progress, Resolve Issue, Close Issue
Available target statuses

status.achievableText stringA comma separated list with the names of target status of those transitions with origin in current issue status.If current issue is in Open status of classic Jira workflow, then field Available target statuses will return: In Progress, Resolved, Closed
ResolutionresolutionResolutionThe name of the resolution currently set at the issue, or empty string if Resolution is not set. The name of the resolution is shown in Jira's default language.Resolved
Won't fix
Cancelled
Security levelsecurityLevelSecurity levelName of the security level the issue currently has.Classified
Last commentlastCommentText stringLast comment entered in the issue.-
Last comment's visibility restrictionlastComment.visibilityText string

Name of a group or project role the visibility of the last comment entered in the issue is restricted to. If no restriction is applied to the comment, this field is returns an empty string. For Service Desk's special Internal visibility restriction, string "Internal" is returned. This field can be used to check visibility restriction of field entered in transition when it exists.

When using a post-function for setting this field in order to set visibility restrictions over the comment entered in the transition screen, always insert the post-function after post-function "Add a comment to an issue if one is entered during a transition.", like in this example:

-
Last commenter
(since version 2.1.33)
lastComment.authorUserName of the user who entered the last comment in the issue.galileo.galilei
Transition's commenttransition.commentText stringComment entered in transition screen. This field can be used to make comment mandatory in transition screen, or to validate the content of comment entered in a transition.-
WatcherswatcherMulti-userComma separated list of user names of current watchers of the issue.albert.einstein, richard.feynman, galileo.galilei
Project keyproject.keyText stringProject Key of the project the issue belongs to.CRM, HR, SDESK
Project nameproject.nameText stringName of the project the issue belongs to.Customer Relationship Management
Project descriptionproject.descriptionText stringField Description of the project the issue belongs to.-
Project URLproject.urlText stringField URL of the project belongs to.https://www.decadis.de
Project categoryproject.categoryText stringName of the Category of the project the issue belongs to.-
Project leaderproject.leadUserName of the user who leads the project the issue belongs to.galileo.galilei
Project leader's full nameproject.leadFullNameText stringName and surname of the user who leads the project the issue belongs to.Galileo Galilei
Project leader's emailproject.leadEmailText stringEmail address of the user who leads the project the issue belongs to.galileo.galilei@me.com
Rest of issues in the projectremainingIssuesInProjectText stringComma separated list of issue keys in the project except current issue's key.CRM-1, CRM-2, CRM-3, CRM-4
Workflow schemeworkflowSchemeText stringThe name of the workflow scheme of the project current issue belongs to.-
JIRA base URLbaseUrlText stringReturns the base URL of current JIRA instance.-
Sprint IDsprintIdText stringThe internal ID for the sprint of current issue. This value can be used for setting field Sprint in other issues.-
Sprint Start DatesprintStartDateDateSprint's start date.-
Sprint End DatesprintEndDateDateSprint's end date.-

For every virtual and custom field in a sub-task, there is also another virtual field representing the same field in its parent issue, making it very easy to read and write parent's issue fields.