Skip to main content
TIMELINE_FIRST_END_AT
Tom Williams avatar
Written by Tom Williams
Updated over a week ago

Function: TIMELINE_FIRST_END_AT

Syntax: TIMELINE_FIRST_END_AT(timeline_field, event|event_list)

Description: Returns the first end timestamp (exit timestamp) for a (list of) timeline event(s). This operator is currently used with the workflow_timeline field to retrieve the timestamp of when an issue exited a specific workflow status for the first time. More timeline fields will be made available in the future.

Timeline events can be open or closed. An event is open when the item is currently in that state (e.g. the issue is currently in the workflow status In Progress). Open events have a start_at but no end_at. On the other side, closed events describe states that happened in the past and have both a start_at and an end_at.

See the section Structure of timeline fields for a detailed example of timeline.

Sample usage:

  • TIMELINE_FIRST_END_AT(workflow_timeline, "In Progress") returns the timestamp of the first time the issue exited the workflow status In Progress.

  • TIMELINE_FIRST_END_AT(workflow_timeline, ["In Progress", "Staging"]) / DAY() returns the timestamp of the first time the issue exited the workflow status In Progress or Staging, whichever is first.
    โ€‹

Structure of timeline fields:

Timeline fields (e.g. workflow_timeline) are arrays of timeline events. Each timeline event represents a transient state between two transitions (e.g. time spent in the In Progress workflow status). TIMELINE_* operators are used to ease the manipulation of timeline events.

Timeline fields can be displayed in reports and look like this:

[
{
"name": "To Do",
"end_at": "2023-03-31T14:04:40Z",
"name_id": "10002",
"start_at": "2022-10-07T13:39:19Z"
},
{
"name": "In Progress",
"end_at": "2024-01-15T14:10:06Z",
"name_id": "10003",
"start_at": "2023-03-31T14:04:40Z"
},
{
"name": "In Review",
"end_at": "2024-01-15T14:10:10Z",
"name_id": "10004",
"start_at": "2024-01-15T14:10:06Z"
},
{
"name": "Staging",
"end_at": null,
"name_id": "10005",
"start_at": "2024-01-15T14:10:10Z"
}
]

Did this answer your question?