Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
width100%
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

api.issue.getField(issue, fieldName)

Category

issue

Description

Excerpt
nameGet the

Get the value of a field for the given Jira issue.

Parameters

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
width100%
enableSortingfalse

Parameter name

Type

Required

Description

issue

Object

Yes

Issue object

The issue of interest. For the current issue, use issue. For related issues, see getParentIssue, getChildIssue, or getLinkedIssues.

fieldName

String

Yes

Use double quotes (for example, “summary”). For custom fields, see Determining custom field IDs, below.

Returns

Info

Returns a Promise to the value; you must use await.

Exact return type matches the field being accessed.

Examples

Return a string of the Summary field value of the current issue.

Code Block
await api.issue.getField(issue, "summary") // “Implement SSO Login” 

Return a datetime of the Actual Start field of the current issue.

Code Block
await api.issue.getField(issue, "customfield_10008") // “2024-09-17T04:00:00.000-0400"

Return the Assignee of the current issue’s Parent.

Code Block
const parentIssue = await api.issue.getParentIssue(issue)
const assignedTo = await api.issue.getFields(parentIssue, "assignee") // Returns a User Object 

You are viewing the documentation for Jira Cloud.

On this page

Table of Contents
minLevel1
maxLevel2
include
outlinefalse
indent
styledisc
excludeSyntax|api.issue.getField(issue, fieldName)|Category|issue
typelist
class
printabletrue

Determining custom field IDs

Include Page
Custom Fields - Determining custom field IDs
Custom Fields - Determining custom field IDs