jirafields

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package jirafields classifies and discovers Jira custom fields for the mirror. Pure functions only — no network, no database.

Split from internal/fields so store can import the source-neutral helpers without pulling Jira REST types or atlhttp onto its dependency graph (docs/ARCHITECTURE.md:79).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Classify

func Classify(f jira.FieldInfo) (role, kind string, ok bool)

Classify maps a Jira field schema onto a display role and editor kind. ok=false marks fields gadak should never surface (plugin plumbing, ranks).

func Discover

func Discover(catalog []jira.FieldInfo, fill map[string]int, prior []config.FieldSpec) []config.FieldSpec

Discover groups the custom-field catalog by normalized display name, keeps the groups the mirror has actually seen filled, and returns specs ordered by total fill count descending. Prior Auto:false specs are preserved; Auto:true prior entries donate aliases for stability.

func EditKind

func EditKind(m jira.FieldMeta) string

EditKind maps a Jira field schema onto the editors the UI has. A field whose schema is none of them has no editor and is left out of editmeta. textarea is deliberately empty: Cloud v3 stores it as ADF, not a string.

func FieldMetaFromCreate added in v0.17.0

func FieldMetaFromCreate(f jira.CreateFieldMeta) jira.FieldMeta

FieldMetaFromCreate projects a createmeta list row onto the editmeta shape ResolveEditable consumes, so create --field uses the same interpreter.

func ResolveEditable added in v0.17.0

func ResolveEditable(candidates []string, meta map[string]jira.FieldMeta, fallbackKind string) (id, kind string, ok bool)

ResolveEditable is the editmeta field-key interpreter: first candidate present in meta whose schema EditKind understands, or whose fallbackKind (the configured spec kind) can stand in. CLI edit, REST GET/PATCH fields, `gadak issue --editmeta`, and create --field all go through here.

Types

This section is empty.

Jump to

Keyboard shortcuts

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