Pre-defined custom fields
This page explains how to access the value of Pre-defined custom fields using Groovy. You can access them using the getters of the Issue interface.
'xxxxx' in the custom fields detailed below is the ID of the custom field. Click here to know how to find the ID of the custom fields.
In this page:
Capture for JIRA fields
Capture for JIRA Browser
Field name:
Capture for JIRA BrowserDescription: The Capture for JIRA Browser field is a multi-line text field describing the browser of the page captured.
Accessing the Capture for JIRA Browser field: You can access the Capture for JIRA Browser field using any of the following getters of the Issue interface:
get("Capture for JIRA Browser") or get("customfield_xxxxx") that returns a String
Example: Capture for JIRA Browser field of the issue:
issue.get("Capture for JIRA Browser")
getAsString("Capture for JIRA Browser") or getAsString("customfield_xxxxx") that returns a String
representing the browser of the page captured:Example: Capture for JIRA Browser field of the issue:
issue.getAsString("Capture for JIRA Browser")
Capture for JIRA Document Mode
Field name:
Capture for JIRA Document ModeDescription: The Capture for JIRA Document Mode field is a multi-line text field describing the document mode of the page captured.
Accessing the Capture for JIRA Document Mode field: You can access the Capture for JIRA Document Mode field using any of the following methods of Issue interface:
get("Capture for JIRA Document Mode") or get("customfield_xxxxx")
that returns a StringExample: Capture for JIRA Document mode field of the issue:
issue.get("Capture for JIRA Document Mode")
getAsString("Capture for JIRA Document Mode") or getAsString("customfield_xxxxx") that returns a String
representing the document mode of the page captured:Example: Capture for JIRA Document mode field of the issue:
issue.getAsString("Capture for JIRA Document Mode")
Capture for JIRA jQuery Version
Field name:
Capture for jQuery VersionDescription: The Capture for JIRA jQuery Version field is a multi-line text field describing the jQuery version of the page captured.
Accessing the Capture for JIRA jQuery Version field: You can access the Capture for JIRA jQuery Version field using any of the following getters of the Issue interface:
get("Capture for JIRA jQuery Version") or get("customfield_xxxxx") that returns a String
Example: Capture for JIRA jQuery Version field of the issue:
issue.get("Capture for JIRA jQuery Version")
getAsString("Capture for JIRA jQuery Version") or getAsString("customfield_xxxxx") that returns a String
representing the jQuery version of the page captured:Example: Capture for JIRA jQuery Version field of the issue:
issue.getAsString("Capture for JIRA jQuery Version")
Capture for JIRA Operating System
Field name:
Capture for JIRA Operating SystemDescription: The Capture for JIRA Operating system field is a multi-line text field describing the operating system of the page captured.
Accessing the Capture for JIRA Operating System field: You can access the Capture for JIRA Operating System field using any of the following methods of Issue interface:
get("Capture for JIRA Operating System") or get("customfield_xxxxx") that returns a String
Example: Capture for JIRA Operating System field of the issue:
issue.get("Capture for JIRA Operating System")
getAsString("Capture for JIRA Operating System") or getAsString("customfield_xxxxx") that returns a String
representing the browser of the page captured:Example: Capture for JIRA Operating System field of the issue:
issue.getAsString("Capture for JIRA Operating System")
Capture for JIRA Screen Resolution
Field name:
Capture for JIRA Screen ResolutionDescription: The Capture for JIRA Screen Resolution field is a multi-line text field describing the screen resolution of the page capture.
Accessing the Capture for Screen resolution field: You can access the Capture for Screen Resolution field using any of the following methods of Issue interface:
get("Capture for JIRA Screen Resolution") or get("customfield_xxxxx")
that returns a String:Example: Capture for JIRA Screen resolution field of the issue:
issue.get("Capture for JIRA Screen Resolution")
getAsString("Capture for JIRA Screen Resolution") or getAsString("customfield_xxxxx")
that returns a Stringrepresenting the screen resolution of the page captured:Example: Capture for JIRA Screen resolution field of the issue:
issue.getAsString("Capture for JIRA Screen Resolution")
Capture for JIRA URL
Field name:
Capture for JIRA URLDescription: The Capture for JIRA URL field is a string representation of a multi-line text describing the URL of the page captured.
Accessing the Capture for JIRA URL field: You can access the Capture for JIRA URL field using any of the following getters of the Issue interface:
get("Capture for JIRA URL") or get("customfield_xxxxx") that returns a String
Example: Capture for JIRA URL field of the issue:
issue.get("Capture for JIRA URL")
getAsString("Capture for JIRA URL") or getAsString("customfield_xxxxx") that returns a String
representing the URL of the page captured:Example: Capture for JIRA URL field of the issue:
issue.getAsString("Capture for JIRA URL")
Capture for JIRA User Agent
Field name:
Capture for JIRA User AgentDescription: The Capture for JIRA User agent field is a multi-line text field describing the user agent of the page captured.
Accessing the Capture for JIRA User Agent field: You can access the Capture for JIRA User Agent field using any of the following getters of the Issue interface:
get("Capture for JIRA User Agent") or get("customfield_xxxxx") that returns a String
Example: Capture for JIRA User Agent field of the issue:
issue.get("Capture for JIRA User Agent")
getAsString("Capture for JIRA User Agent") or getAsString("customfield_xxxxx") that returns a String
representing the user agent of the page captured:Example: Capture for JIRA User Agent field of the issue:
issue.getAsString("Capture for JIRA User Agent")
Raised during
Field name:
Raised duringDescription: The Raised during field is a string representing the ID of the session the issue was raised in.
Accessing the Raised during field: You can access the Raised during field using any of the following getters of the Issue interface:
get("Raised during") or get("customfield_xxxxx") that returns a String
Example: The issue is raised during:
issue.get("Raised during")
getAsString("Raised during") or getAsString("customfield_xxxxx") that returns a String
representing the ID of the session the issue was raised in:Example: The issue is raised during:
issue.getAsString("Raised during")
Test sessions
Field name:
Test sessionsDescription: The Test sessions field is a string representing the ID's of the sessions the issue belongs to.
Accessing the Test Sessions field: You can access the Test Sessions field using any of the following getters of the Issue interface:
get("Test sessions") or get("customfield_xxxxx")
that returns a StringExample: Test Sessions the issue belongs to:
issue.get("Test sessions")
getAsString("Test sessions") or getAsString("customfield_xxxxx") that returns a String
representing the ID's of the sessions the issue belongs to:Example: Test Sessions the issue belongs to:
issue.getAsString("Test sessions")
Testing status
Field name:
Testing statusDescription: The Testing status field is a string representing the status of the all the sessions the issue belongs to.
Accessing the Testing status field: You can access the Testing status field using any of the following getters of the Issue interface:
get("Testing status") or get("customfield_xxxxx") that returns a String
Example: Testing status field of the issue:
issue.get("Testing status")
getAsString("Testing status") or getAsString("customfield_xxxxx") that returns a String
representing the sessions the issue belongs to:Example: Testing status field of the issue:
issue.getAsString("Testing status")
Jira Software fields
Epic Color
Field name:
Epic ColorDescription: The Epic Color field is a multi-line text field describing the color of the Epic.
Accessing the Epic Color field: You can access the Epic color field using any of the following getters of the Issue interface:
get("Epic Color") or get("customfield_xxxxx") that returns a String
Example: Epic Color field of the issue:
issue.get("Epic Color")
getAsString("Epic Color") or getAsString("customfield_xxxxx") that returns a String
representing the color of the Epic:Example: Epic Color field of the issue:
issue.getAsString("Epic Color")
Epic Link
Field name:
Epic LinkDescription: The Epic link field is an object representing the Epic of the current issue.
Accessing the Epic Link field: You can access the Epic Link using any of the following getters of the Issue interface:
get("Epic Link") or get("customfield_xxxxx") that returns an Issue
Example: Epic Link field of the issue:
issue.get("Epic Link")
getAsString("Epic Link") or getAsString("customfield_xxxxx") that returns an String representing the key of the Epic the issue belongs to:
Example: Epic Link field of the issue:
issue.getAsString("Epic Link")
Epic Name
Field name:
Epic NameDescription: The Epic Name field is a multi-line text field describing the name of the Epic.
Accessing the Epic Name field: You can access the Epic Name field using any of the following getters of the Issue interface:
get("Epic Name") or get("customfield_xxxxx") that returns a String
Example: Epic Name field of the issue:
issue.get("Epic Name")
getAsString("Epic Name") or getAsString("customfield_xxxxx") that returns a String
representing the name of the Epic:Example: Epic Name field of the issue:
issue.getAsString("Epic Name")
Epic Status
Field name:
Epic StatusDescription: The Epic Status field is a multi-line text field representing the status of the Epic.
Accessing the Epic Status field: You can access the Epic status field using any of the following getters of the Issue interface:
get("Epic Status") or get("customfield_xxxxx") that returns a String
Example: Epic status field of the issue:
issue.get("Epic Status")
getAsString("Epic Status") or getAsString("customfield_xxxxx") that returns a String
representing the status of the Epic:Example: Epic status field of the issue:
issue.getAsString("Epic Status")
Rank
Field name:
RankDescription: The Rank field is a string representing the priority of the issue at a more granular level than issue priorities in Jira.
Accessing the Rank field: You can access the Rank field using any of the following getters of the Issue interface:
get("Rank") or get("customfield_xxxxx") that returns a LexoRank.
Example: Rank of the parent issue
issue.getParentObject()?.get("Rank")
getAsString("Rank") or getAsString("customfield_xxxxx") that returns a LexoRank representing the Rank of the issue:
Example: Rank of the parent issue
issue.getParentObject()?.getAsString("Rank")
Sprint
Field name:
SprintDescription: The Sprint field is a collection of objects. Each object represents a Sprint.
Accessing the Sprint field: You can access the Sprint field using any of the following getters of the Issue interface:
get("Sprint") or get("customfield_xxxxx") that returns a Collection
<Sprint>Example: First active Sprint the issue belongs to:
issue.get("Sprint").find(){ it.getState() == "ACTIVE" }
Example: All the Sprint names the issue belongs to:
def names = [] issue.get("Sprint").each(){ names += it.getName() } names.join(",")
getAsString("Sprint") or getAsString("customfield_xxxxx") that returns a String
with comma separated Sprint IDsExample: Sprints the issue belongs to:
issue.getAsString("Sprint")
Story Points
Field name:
Story PointsDescription: The Story Points field is a number representing the story points.
Accessing the Story Points field: You can access the Story points field using any of the following getters of the Issue interface:
get("Story Points") or get("customfield_xxxxx") that returns a Double
Example: Story points of the story:
issue.get("Story Points")
Example: Increase the story points by 10:
if(issue.get("Story Points")) { issue.get("Story Points") + 10 }
getAsString("Story Points") or getAsString("customfield_xxxxx") that returns a String representing the Story points
Example: Story points of the issue:
issue.getAsString("Story Points")
Jira Service Desk fields
Approvals
Field name: Approvals
Description: The Approvals field is a collection of objects. Each object represents an Approval
.Accessing the Approvals field: You can access the Approvals field using get("Approvals").getApprovals() or get("customfield_xxxxx").getApprovals() method of the Issue interface that returns a Collection<Approvals
>Example: Approvals on the issue:
if(issue.get("Approvals").getApprovals()) { issue.get("Approvals").getApprovals().first().getName() }
Approvers
Field name:
ApproversDescription: The Approvers field is an array of objects. Each object represents an ApplicationUser.
Accessing the Approvers field: You can access the Approvers field using any of the following getters of the Issue interface:
get("Approvers") or get("customfield_xxxxx") that returns a
Collection<ApplicationUser>:Example: Names of all approvers who approved the issue:
def names = [] issue.get("Approvers").each(){ names += it.getName() } names.join(",")
getAsString("Approvers") or getAsString("customfield_xxxxx") that returns a
Stringwith comma separated Approvers usernames:
