Skip to end of banner
Go to start of banner

getIssueFields

Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 5 Next »

Description

Returns a map with all standard and custom fields of an issue. The map contains pairs of field name and field values.

Parameters

Return Type

String []

The return value is a string array containing all fields values for the selected issue. Each value can be retrieved from the array by key (the field id).

Examples

Example 1

string[] fields = getIssueFields("DEMO-1");
return fields["summary"];

Example 2

We can use the function to partially clone an issue by copying only some of the fields from the original issue:

string[] fields = getIssueFields("TP-1", true);
string issue = createIssue(fields["project"], fields["parent"], fields["issueType"], fields["summary"] + " - part 2");
%issue%.customfield_10000 = fields["customfield_10000"];
%issue%.description = "Partial clone of issue TP-1";
return issue;

See also

Filter by label

There are no items with the selected labels at this time.

We've encountered an issue exporting this macro. Please try exporting this page again later.
  • No labels