ticketstate

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func ListTicketStates(ctx context.Context, db *sql.DB) ([]pkgplugin.TicketStateInfo, error)

ListTicketStates returns all valid ticket states with their type info, ordered by id (the table has no sort_order column).

func StateIsPending

func StateIsPending(ctx context.Context, db *sql.DB, stateID int64) (bool, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL