Edit time-tracking session data | ION Factory OS

The manual for the New ION Experience has been released.

Check it out!

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sessions can be edited via the API or through a run step as seen here! Time Tracking

Overview

There are many situations that may necessitate changing the check-in or check-out time for a given session. Use the information below to update check-in/check-out data via the API.

Changing Check-in Times Tutorial

Changing Check-in Times Tutorial

Steps

1) Get the session id and information

Use a query similar to this to get sessions. This one is querying for the last 5 sessions in the database, so you may want to query by user or some other parameter instead.

{
  sessions (last: 5){
    edges {
      node {
        id
        _etag
        runStep {
          runId
          position
        }
        checkIn
        checkOut
        createdBy {
          email
        }
      }
    }
  }
}

2) Update the session data

Once you have the id and etag, use this mutation and input to modify the session data.

mutation UpdateSession($input: UpdateSessionInput!) {
  updateSession(input: $input) {
    session {
      checkIn
      checkOut
      id
    }
  }
}
{
  "input": {
    "id": <from previous step>,
    "etag": <from previous step>,
    "checkIn": <use your own value here>,
    "checkOut": <use your own value here>
  }
}