Skip to main content

Activity Events > Duration

Arnaud Lachaume avatar
Written by Arnaud Lachaume
Updated over 2 weeks ago

Dataset: Activity Events

Entity: Activity Events

Field ID: duration

Type: Integer (positive, negative)

Description: The duration, in seconds, associated with the WORK_LOGGED event. NULL for any other event action.

The duration will be positive when time is logged on an issue/PR and negative when time is removed.

Source: Applications support the following events

  • Github: CREATED, CLOSED, REOPENED, MERGED, REVIEWER_ASSIGNED, REVIEWER_UNASSIGNED, USER_ASSIGNED, USER_UNASSIGNED

  • GitLab: CREATED, CLOSED, REOPENED, MERGED, REVIEWER_ASSIGNED, REVIEWER_UNASSIGNED, USER_ASSIGNED, USER_UNASSIGNED, WORK_LOGGED

  • Bitbucket: CREATED, CLOSED, MERGED, REVIEWER_ASSIGNED, REVIEWER_UNASSIGNED

  • Azure DevOps: CREATED, CLOSED, MERGED, REVIEWER_ASSIGNED, REVIEWER_UNASSIGNED

  • Jira: CREATED, CLOSED, REOPENED, USER_ASSIGNED, USER_UNASSIGNED, WORK_LOGGED, WORKFLOW_STATUS_UPDATED

  • ClickUp: CREATED, CLOSED. ClickUp does not expose an events API. Keypup generates these two events based on the issue timestamps (date_created & date_closed)

  • Trello: CREATED, CLOSED, REOPENED, USER_ASSIGNED, USER_UNASSIGNED, WORKFLOW_STATUS_UPDATED

Transformation logic: N/A

From:

Github (Timeline Items)

N/A

Gitlab (Discussions, State Events)

Extracted from system discussion content.

Bitbucket (Activity)

N/A

Azure DevOps (PR Threads)

N/A

Jira (Changelog, Worklog)

Worklog: timeSpentSeconds

ClickUp (Issue timestamps)

N/A

Trello (Actions)

N/A

Reporting Use Cases

The Duration field from the Activity Events dataset captures the amount of time logged for WORK_LOGGED events, making it the central element for any time-tracking analysis. As a numeric value representing seconds, it is designed to be aggregated and used in calculations to understand where effort is being spent.

  • Filtering for Analysis: You can use this field to analyze specific time-logging patterns.

    • To find unusually large blocks of logged time, you could use a filter like Duration > 8 * HOUR().

    • Since this field is only present for time logging events, a filter where Duration is not null is an effective way to create a report that focuses exclusively on WORK_LOGGED activities.

  • Reporting on Time Spent: The primary use of this field is to sum the logged time to understand effort distribution.

    • To see how many hours each team member has logged, you can create a bar chart with Author as the dimension and a custom metric SUM(duration) / HOUR().

    • You can also analyze where this time is going. By using a dimension like Parent Type, you can see the breakdown of hours logged against "issues" versus "pull requests".

  • Custom Formulas for Detailed Analysis: By combining this field with attributes from the parent item, you can create highly specific reports.

    • To measure the effort spent specifically on bug fixes, you could create a KPI with the custom formula SUM_IF(CONTAINS(parent_metatags, "bug"), duration) / HOUR(). This isolates and sums up only the time logged on items categorized as bugs.

Did this answer your question?