Documentation
¶
Overview ¶
Package ticketstate provides shared ticket-state operations used by both core API handlers and the plugin HostAPI, so state-change semantics live in exactly one place.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeTicketStatus ¶
func ChangeTicketStatus(ctx context.Context, db *sql.DB, ticketID, stateID, userID int64, untilTime int64) error
ChangeTicketStatus changes a ticket's state with core semantics: pending-type states require untilTime > 0; non-pending states clear until_time. Mirrors handleAgentTicketStatus in internal/api exactly.
func ListTicketStates ¶
ListTicketStates returns all valid ticket states with their type info, ordered by id (the table has no sort_order column).
func StateIsPending ¶
StateIsPending reports whether a ticket state is a pending-type state. Pending detection is by type name (prefix "pending", case-insensitive) — no hardcoded state ids: live deployments carry custom states whose ids do not match the seed migration numbering. Returns an error when the state does not exist or is invalid.
Types ¶
This section is empty.