Documentation
¶
Overview ¶
Package parenthint is the single owner of parent-rejection detection and the mirror hierarchy hint that follows it (CLI create/edit and REST PUT parent / POST create). Both surfaces call Wrap so a new path cannot inherit the bare origin 400.
The field key differs by verb, and both shapes were measured against a real Cloud site on 2026-08-21: POST /issue answers with `parent` AND `parentId`, PUT /issue/{key} answers with `pid`. The messages themselves are localized per account, so the keys are the only stable part. GDK-424 tested `parent` inline in the create path, which could never have matched the edit path (GDK-525).
The hint names CLI --parent because that wording is the existing contract (GDK-330); REST appends the same sentence rather than a second copy. This package does not compose HTTP status.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hint ¶
Hint reads the rejected parent from the mirror and states the hierarchy rule Jira's 400 leaves out. Best-effort: no querier, no row, or any error returns "" and the origin error stands alone.
Types ¶
type Hinted ¶
type Hinted struct {
Hint string
// contains filtered or unexported fields
}
Hinted wraps an origin error with the mirror hierarchy sentence. Unwrap keeps the origin error matchable; Error appends the hint the same way the CLI used to (origin + newline + hint).
type Querier ¶
type Querier interface {
QueryRow(query string, args ...any) *sql.Row
Query(query string, args ...any) (*sql.Rows, error)
}
Querier is the mirror read the hint needs. *sql.DB (CLI openReadOnly) and *store.DB (REST's existing connection) both satisfy it; this package never opens a connection of its own.