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.getParentIssue(issue)

Category

issue

Note

Note: The release of JMCF for Jira Cloud 3.0 introduced the ability to access data from other issues through the getParentIssue, getChildIssues, and getLinkedIssues APIs. While access to fields on related issues is now possible, updates to any related issue fields will not trigger a recalculation of the scripted field!

Description

Excerpt
nameGet the

Get the Parent issue for a given issue.

Parameters

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
headingmultiple0false
multiplewidthfalse100%
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.

Returns

Info

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

Returns an issue object.

Examples

Return the Affects versions and Fix versions of the Parent issue.

Code Block
const parentIssue = await api.issue.getParentIssue(issue)
const parentVers = await api.issue.getFields(parentIssue,["versions","fixVersions"])
return json.stringify(parentVers)

Returns:

Code Block
 {
  "versions":[],
  "fixVersions":
  [
    {
      "self":"https://api.atlassian.com/ex/jira/<id>/rest/api/2/version/10000",
      "id":"10000",
      "description":"",
      "name":"2.1",
      "archived":false,
      "released":false
    }
  ]
}

You are viewing the documentation for Jira Cloud.

On this page

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