Our new Appfire Documentation Space is now live!
Take a look here! If you have any questions please email support@appfire.com
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. To understand how to write values into the writable custom fields see Raw value/text input for fields and Groovy expression input for fields.
'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 Browser
Description: 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 aString
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 aString
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 Mode
Description: 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 aString
Example: 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 aString
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 Version
Description: 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 aString
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 aString
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 System
Description: 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 aString
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 aString
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 Resolution
Description: 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 aString:
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 aString
representing 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 URL
Description: 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 aString
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 aString
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 Agent
Description: 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 aString
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 aString
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 during
Description: 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 aString
Example: The issue is raised during:
issue.get("Raised during")
getAsString("Raised during") or getAsString("customfield_xxxxx")
that returns aString
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 sessions
Description: 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 aString
Example: Test Sessions the issue belongs to:
issue.get("Test sessions")
getAsString("Test sessions") or getAsString("customfield_xxxxx")
that returns aString
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 status
Description: 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 aString
Example: Testing status field of the issue:
issue.get("Testing status")
getAsString("Testing status") or getAsString("customfield_xxxxx")
that returns aString
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 Color
Description: 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 aString
Example: Epic Color field of the issue:
issue.get("Epic Color")
getAsString("Epic Color") or getAsString("customfield_xxxxx")
that returns aString
representing the color of the Epic:Example: Epic Color field of the issue:
issue.getAsString("Epic Color")
Epic Link
Field name:
Epic Link
Description: 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 anIssue
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 Name
Description: 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 aString
Example: Epic Name field of the issue:
issue.get("Epic Name")
getAsString("Epic Name") or getAsString("customfield_xxxxx")
that returns aString
representing the name of the Epic:Example: Epic Name field of the issue:
issue.getAsString("Epic Name")
Epic Status
Field name:
Epic Status
Description: 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 aString
Example: Epic status field of the issue:
issue.get("Epic Status")
getAsString("Epic Status") or getAsString("customfield_xxxxx")
that returns aString
representing the status of the Epic:Example: Epic status field of the issue:
issue.getAsString("Epic Status")
Rank
Field name:
Rank
Description: 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:
Sprint
Description: 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 aCollection<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 aString
with comma separated Sprint IDsExample: Sprints the issue belongs to:
issue.getAsString("Sprint")
Story Points
Field name:
Story Points
Description: 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 aDouble
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 pointsExample: 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 aCollection
<Approval>
Example: Approvals on the issue:
if(issue.get("Approvals").getApprovals()) { issue.get("Approvals").getApprovals().first().getName() }
Approvers
Field name:
Approvers
Description: 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 aCollection
<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 aString
with comma separated Approvers usernames:Example: Names of all approvers who approved the issue:
issue.getAsString("Approvers")
Customer Request Type
Field name:
Customer Request Type
Description: The Customer Request Type field represents an object describing the information about the Service Desk used to create the ticket.
- Accessing the Customer request type field: You can access the Customers Request Type field using any of the following getters of the Issue interface:
get("Customer Request Type") or get("customfield_xxxxx")
that returns VpOriginExample: Customer request type:
issue.get("Customer Request Type")?.getRequestTypeKey()
getAsString("Customer Request Type") or getAsString("customfield_xxxxx")
that returns aString
representing the request type name:Example: Customer request type:
issue.getAsString("Customer Request Type")
To get the Customer Request Type name as displayed on the issue view, you can use the following snippet:
import com.atlassian.servicedesk.api.requesttype.RequestTypeService def requestTypeService = getComponent(RequestTypeService) def sourceIssueRequestTypeQuery = requestTypeService.newQueryBuilder().issue(issue.id).build() def requestTypeEither = requestTypeService.getRequestTypes(currentUser, sourceIssueRequestTypeQuery) if (requestTypeEither.isLeft()) { log.warn "${requestTypeEither.left().get()}" return false } return requestTypeEither.right.results[0].name
Organizations
Field name:
Organizations
Description: The Organizations field represents an array of Strings describing the Organizations the issue belongs to
- Accessing the Organizations field: You can access the Organizations field using any of the following getters of the Issue interface:
get("Organizations") or get("customfield_xxxxx")
that returns aCollection<Organization
>Example: Number of Organizations the issue belongs to:
issue.get("Organizations")?.size()
Names of the Organizations:
issue.get("Organizations")?.join(",")
getAsString("Organizations") or getAsString("customfield_xxxxx")
that returns a String with comma separated Organization ID's:Example: Names of Organizations:
issue.getAsString("Organizations")
Request participants
Field name:
Request participants
Description: The Request Participants is an array of objects. Each object represents an
ApplicationUser.
- Accessing the Request Participants field: You can access the Request participants field using any of the following getters of the Issue interface:
get("Request Participants") or get("customfield_xxxxx")
that returns aCollection
<ApplicationUser
>Example: Name of the first participant:
if(issue.get("Request participants")) { issue.get("Request participants").first().getName() }
Example: is a specific user in the participants list?
issue.get("Request participants").find(){ it.getName() == "JohnDoe" }!=null
getAsString("Request Participants") or getAsString("customfield_xxxxx")
that returns aString
with comma separated usernames:Example: Name of all the participants:
issue.getAsString("Request participants")
Satisfaction
Field name:
Satisfaction
Description: The Satisfaction field is an object describing the request feedback in Service Desk requests.
Accessing the Satisfaction field: You can access the Satisfaction field using any of the following getters of the Issue interface:
get("Satisfaction") or get("customfield_xxxxx")
that returns a RequestFeedbackCFValueExample: Rating on the service
issue.get("Satisfaction")?.getRate()
getAsString("Satisfaction") or getAsString("customfield_xxxxx")
that returns a String representing the rating of satisfactionExample: Rating on the service
issue.getAsString("Satisfaction")
Satisfaction date
Field name:
Satisfaction date
Description: The Satisfaction date field is a Timestamp representing the date of feedback provided by the customer.
Accessing the Satisfaction date field: You can access the Satisfaction date field using any of the following getters of the Issue interface:
get("Satisfaction date") or get("customfield_xxxxx")
that returns aTimestamp
Example: Satisfaction date of the issue:
issue.get("Satisfaction date")
getAsString("Satisfaction date") or getAsString("customfield_xxxxx")
that returns aString
representing the date of satisfaction:
Example: Satisfaction date of the issue:
issue.getAsString("Satisfaction date")
To manipulate the date see here
Time to resolution
Field name:
Time to resolution
Description: The Time to resolution field is an object representing a SLA value.
Accessing the Time to resolution field: You can access the Time to resolution field using any of the following getters of the Issue interface:
get("Time to resolution") or get("customfield_xxxxx")
that returns a SLA Value:Example: Start time of the last completed cycle of the 'Time to resolution' SLA:
issue.get("Time to resolution")?.getLastCompletedCycle()?.get()?.getStartTime()
getAsString("Time to resolution") or getAsString("customfield_xxxxx")
that returns aString
representing the SLA Value:Example: Start time of the last completed cycle of the 'Time to resolution' SLA:
issue.getAsString("Time to resolution")
getAsJsonData("Time to resolution") or getAsJsonData("customfield_xxxxx")
that returns the JSON version of the field being accessed.Example: To check whether the Time to resolution SLA has been breached:
issue.getAsJsonData("Time to resolution").getData()?.getOngoingCycle()?.getBreached()
You can access any other SLA field in a similar way as shown above.
Portfolio for Jira fields
Parent Link
- Field Name: Parent Link
Description: The Parent link field is an object representing the Initiative of the current Epic. It returns
com.atlassian.rm.jpo.env.issues.SimpleIssueAttributes.
Accessing the Parent Link field: You can access the Parent Link field using
getAsString("Parent Link") or
that returns agetAsString("customfield_xxxxx")
String
representing the key of the Initiative the Epic belongs to.Example: Fetch the issue object of the Initiative the Epic belongs to:
def initiativeKey = issue.getAsString("Parent Link"); if (initiativeKey==null) return null; return com.atlassian.jira.component.ComponentAccessor.getIssueManager().getIssueObject(initiativeKey);
Tempo fields
Iteration
Field name:
Iteration
Description: The Iteration field is a Tempo planner field
- Accessing the Iteration field: You can access the Iteration field using any of the following getters of the Issue interface:either the
get("Iteration") or get("customfield_xxxxx")
that returns aString:
Example: Iteration:
issue.get("Iteration")
get("Iteration") or get("customfield_xxxxx")
that returns aString
representing the Iteration:
Example: Iteration:
issue.getAsString("Iteration")
Team
Field name:
Team
Description: The Team field is a string representing the ID of the tempo team.
- Accessing the Team field: You can access the Team field using any of the following getters of the Issue interface:either the
get("Team") or get("customfield_xxxxx")
that returns aString:
Example: Tempo team the issue belongs to:
issue.get("Team")
getAsString("Team") or getAsString("customfield_xxxxx")
that returns aString
representing the ID of the Team:Example: Tempo team the issue belongs to:
issue.getAsString("Team")
Tempo Account
Field name:
Account
Description: The Tempo Account field is an object representing the Tempo account the issue belongs to:
- Accessing the Account field: You can access the Tempo Account field using any of the following getters of the Issue interface:
get("Account") or get("customfield_xxxxx")
that returns anAccount:
Example: Tempo account the issue belongs to:
issue.get("Account")
getAsString("Account") or getAsString("customfield_xxxxx")
that returns anString
representing the ID of the Account:Example: Tempo account the issue belongs to:
issue.getAsString("Account")