Documentation
¶
Overview ¶
Package jql builds and composes Jira Query Language strings from structured inputs. It is pure string logic — no cobra, config, or I/O — so the jql/search/issue command layers and shell completion can all share one query builder without import cycles.
Index ¶
Constants ¶
const DefaultIssueListJQL = "updated >= -365d ORDER BY updated DESC"
DefaultIssueListJQL is the bounded default query used when an issue list is requested with no filters and no explicit sort. It is owned here, in the query domain, and consumed by the Jira issue service as its List default.
Variables ¶
This section is empty.
Functions ¶
func CombineClauses ¶
CombineClauses AND-joins two JQL fragments, dropping either side when blank.
func CompactStrings ¶
CompactStrings returns values with empty/whitespace-only entries dropped and the rest trimmed.
func IssueList ¶
func IssueList(raw string, builder BuildOptions) (string, error)
IssueList combines a raw JQL string with the builder's structured filters. A non-empty raw query is parenthesized and AND-ed beneath the filters. The raw query's own top-level ORDER BY always wins; when it has none, the builder's --order-by is applied (an empty or "none" order-by adds nothing). An empty raw query falls back to Build.
func ParenthesizeIfTopLevelOR ¶
ParenthesizeIfTopLevelOR wraps query in parentheses only when it contains a top-level OR, so AND-composition with another clause keeps the original precedence.
func SplitTopLevelOrderBy ¶
SplitTopLevelOrderBy splits query into the filter portion and a leading-space " ORDER BY ..." suffix (empty when there is no top-level ORDER BY).
Types ¶
type BuildOptions ¶
type BuildOptions struct {
Projects []string
Keys []string
Epics []string
Assignee string
Reporter string
Statuses []string
Priorities []string
Labels []string
IssueTypes []string
Updated string
Created string
Resolved string
OrderBy string
Descending bool
}
BuildOptions captures the structured filters that compose into a JQL query.
func (BuildOptions) Build ¶
func (o BuildOptions) Build() (string, error)
Build renders the options into a complete JQL query (with ORDER BY). With no filters and no explicit sort it returns the default bounded issue list.