Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

The availability of the users personal data may be impacted by the recent changes by Atlassian in order to meet GDPR compliance. See the following for more information:

This routine is available starting with katl-commons 2.5.13 / 2.6.5. Updated in 4.8.0.8 - added two new fields oldValueString and newValueString in the result.

This routine is available for Jira server and cloud deployment options.
Info
titleAvailability
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

lastFieldHistory(issueKey)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Returns the last change details (user, date, field, oldValue, newValue) from the selected issue's history.

Returns the last change details (user

...

, date

...

, field

...

, oldValue

...

, newValue

...

) from the selected issue's history.

Parameters

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

Parameter name

Type

Required

Description

issue key

String

Yes

Key of the selected issue.

Return

...

Type

string []

The return value is an array of strings, containing the following values in the specified order: the user who made the change, the date, the name of the field that has been modified, the old field value and the new field value.

...

JFieldChange

Examples

Example 1

Code Block
string[] lastChange = lastFieldHistory(key);
string ret = "Issue " + key + " was last changed on " + lastChange[1] + " by " + userFullName(lastChange[0]);
ret += ": Field " + lastChange[2] + " from >>from>>" + lastChange[3] + "<< to >><<to>>" + lastChange[4] + "<<";
return ret;

Result: Issue DEMO-5 was last changed on 2013-08-20 16:47:57 by Admin User: Field assignee from >>Admin User<< to >>Test User<<

Example

...

2

Code Block
JFieldChange last = lastFieldHistory("TEST -10");
runnerLog ("LFH:" + last.user + " Field:" + last.field + " Val:" + last.oldVal + " -> " + last.newVal);

Result: Issue DEMO-5 was last changed on 2013-08-20 16:47:57 by Admin User: Field assignee from >>Admin User<< to >>Test User<<

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "jira_fieldcustomfield_routine" and space = currentSpace ( )
labelsjiraarray_field_routineroutines