The time tracking column represents the total time spent on a task. You can filter and read the time tracking column via the API, but you currently cannot update or clear it.

Filtering the time tracking column

Using the items_page object, you can easily filter a board's items by specific columns or column values. The table below contains the time tracking column's supported operators and compare values.

OperatorsCompare values
any_of
  • 1 (time tracker paused or empty)
  • 2 (time tracker running)
  • not_any_of
  • 1 (time tracker paused or empty)
  • 2 (time tracker running)
  • Examples

    The following example returns all items on the specified board with a running time tracker.

    query {
      boards (ids: 1234567890) {
        items_page (query_params: {rules: [{column_id: "time_tracking", compare_value: [2], operator:any_of}]}) {
          items {
            id
            name
          }
        }
      }
    }
    

    Reading the time tracking column

    You can query the time tracking column using the column_values object that enables you to return column-specific subfields by sending a fragment in your query. Values for the time tracking column are of the TimeTrackingValue type.

    query {
      items (ids:[1234567890, 9876543210]) {
        column_values {
          ... on TimeTrackingValue {
            running
            started_at
          }
        }
      }
    }
    

    Fields

    FieldDescription
    column Column!The column the value belongs to.
    duration IntThe total duration of the time tracker in seconds.
    history [TimeTrackingHistoryItem!]!The column's history.
    id ID!The column's unique identifier.
    running BooleanReturns true if the time tracker is currently running.
    started_at DateThe date the time tracker started.
    text StringThe column's value as text. This field will return "" if the column has an empty value.
    type ColumnType!The column's type.
    updated_at DateThe column's last updated date.
    value JSONThe column's JSON-formatted raw value.

    📘

    Join our developer community!

    We've created a community specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎