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 ¶
- func Classify(f jira.FieldInfo) (role, kind string, ok bool)
- func Discover(catalog []jira.FieldInfo, fill map[string]int, prior []config.FieldSpec) []config.FieldSpec
- func EditKind(m jira.FieldMeta) string
- func FieldMetaFromCreate(f jira.CreateFieldMeta) jira.FieldMeta
- func ResolveEditable(candidates []string, meta map[string]jira.FieldMeta, fallbackKind string) (id, kind string, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Classify ¶
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 ¶
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.