History Functions
The history function allows you to view historical field values for Jira fields and use them in formulas. To show the history of a field, use the following format: <fieldName>History
Example:
statusHistory
→ returns a list of all the status changes that have occurred for an issue
History data is currently available for the following fields:
Status
Story Points
Parent
Project
Date fields
Time estimate fields
Custom numeric fields
Text fields: sprints, version, description, etc.
Narrowing the History
To narrow the history, use the History function along with Array functions.
Example:
statusHistory.LAST()
→ returns the last status the issue was in
Display a Field Value at a Specific Time
The following formula allows you to display the value in a specified field at a specific time.
WITH HISTORICAL_VALUE(field, fieldHistory, date) =
IF fieldHistory.IS_EMPTY() AND field : field
ELSE fieldHistory.FILTER($.time <= date).toText :
HISTORICAL_VALUE(duedate, duedateHistory, datetime("15/May/18 6:24 PM"))
To customize this formula:
Replace the duedate and duedateHistory with another field
Replace the date and time
For more examples of how the History function can be used, see Sample Formulas - History
History as a Variable
You can also find the history of a field by simply entering “History” as your variable:
Name a variable “History”
In the Source section, select the field you want the history of
Check the Use an array of historical data instead of the current value box
If you don’t check Use an array of historical data instead of the current value, Structure will interpret “History” as a standard variable and only return the current value of the Source field.