> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ticket_status_history table

> This table contains the history of a tickets statuses. Each time a ticket changes status a copy of the previous status of the record will be saved

## ticket\_status\_history Table (261)

This table contains the history of a tickets statuses. Each time a ticket changes status a copy of the previous status of the record will be saved

## Fields

| Name           | Description                                                                                           | Type                                     | Nullable |
| -------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------- | :------: |
| id             | The primary key (auto-incremented)                                                                    | PK                                       |    No    |
| ticket\_id     | Reference to a ticket                                                                                 | FK [ticket](./ticket.mdx)                |    No    |
| ticket\_status | User defined ticket status                                                                            | FK [ticket\_status](./ticket-status.mdx) |    No    |
| timespan       | The time (seconds) the ticket was in that status. Calculated based on priority\&apos;s timeframe.     | Int                                      |    Yes   |
| real\_timespan | The time (seconds) the ticket was in that status. Not calculated based on priority\&apos;s timeframe. | Int                                      |    Yes   |
| from\_datetime |                                                                                                       | DateTime                                 |    Yes   |
| to\_datetime   |                                                                                                       | DateTime                                 |    Yes   |

<img src="https://mintcdn.com/superofficeas/8-OIGQQJR0VGDXy_/media/loc/en/database/tables/ticket_status_history.png?fit=max&auto=format&n=8-OIGQQJR0VGDXy_&q=85&s=89485651e5c41a0fe5e2f63909bfc558" alt="ticket_status_history table relationship diagram" width="711" height="59" data-path="media/loc/en/database/tables/ticket_status_history.png" />

## Indexes

| Fields         | Types | Description |
| -------------- | ----- | ----------- |
| ticket\_id     | FK    | Index       |
| ticket\_status | FK    | Index       |

## Relationships

| Table                             | Description                                                                              |
| --------------------------------- | ---------------------------------------------------------------------------------------- |
| [ticket](./ticket)                | This table contains the tickets (requests) of the system. Its purpose should be evident. |
| [ticket\_status](./ticket-status) | This table user defined ticket status values.                                            |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [ticket_status table](/en/database/tables/ticket-status.md)
- [ticket_type_status table](/en/database/tables/ticket-type-status.md)
- [ticket table](/en/database/tables/ticket.md)
- [History table](/en/database/tables/history.md)
- [Ticket table](/en/api/bulk-operations/bulk-update/reference/ticket-table.md)
- [project table](/en/database/tables/project.md)
