fieldmap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package fieldmap maps tenant-specific custom fields onto canonical prioritization fields (MoSCoW, RICE). Some PM-tool tenants — Aha workspaces in particular — store MoSCoW and RICE components as custom fields; which fields, and with what value vocabulary, varies per tenant. A Mapping captures that per-tenant configuration (typically loaded from a JSON file) and Apply enriches canonical Items with it after fetch, before storage or export.

Index

Constants

View Source
const (
	MoSCoWMustHave   = "must_have"
	MoSCoWShouldHave = "should_have"
	MoSCoWCouldHave  = "could_have"
	MoSCoWWontHave   = "wont_have"
)

canonical MoSCoW values (matching prism-roadmap's prioritization vocabulary; omniroadmap-core's Item.MoSCoW uses the same strings).

View Source
const (
	KanoMustBe       = "must-be"
	KanoPerformance  = "performance"
	KanoAttractive   = "attractive"
	KanoIndifferent  = "indifferent"
	KanoReverse      = "reverse"
	KanoQuestionable = "questionable"
)

canonical Kano Model categories (matching prism-roadmap's KanoCategory vocabulary; omniroadmap-core's Item.Kano uses the same strings).

Variables

This section is empty.

Functions

func Apply

func Apply(items []provider.Item, m *Mapping)

Apply enriches items in place, populating Item.MoSCoW and Item.RICE from Item.CustomFields per the mapping. Items whose mapped fields are absent are left untouched. A nil mapping is a no-op.

Types

type FieldRule

type FieldRule struct {
	// Key is the custom field key to read from Item.CustomFields.
	Key string `json:"key"`

	// Values optionally normalizes raw field values to canonical ones,
	// e.g. {"Must": "must_have", "M": "must_have"}. Matching is
	// case-insensitive on the raw value. When empty, the raw value is used
	// as-is (after lowercasing/underscoring for MoSCoW).
	Values map[string]string `json:"values,omitempty"`
}

FieldRule selects a custom field by key and optionally normalizes its values.

type Mapping

type Mapping struct {
	// Description is optional free-text documentation (e.g. which tenant
	// this mapping belongs to).
	Description string `json:"description,omitempty"`

	MoSCoW *FieldRule `json:"moscow,omitempty"`
	Kano   *FieldRule `json:"kano,omitempty"`

	// RICE component rules. Values read through these are coerced to
	// numbers (raw numeric custom fields, or numeric strings; Values
	// normalization applies first, so e.g. {"High": "2.0"} works).
	Reach      *FieldRule `json:"reach,omitempty"`
	Impact     *FieldRule `json:"impact,omitempty"`
	Confidence *FieldRule `json:"confidence,omitempty"`
	Effort     *FieldRule `json:"effort,omitempty"`
	Score      *FieldRule `json:"score,omitempty"`
}

Mapping is a per-tenant configuration mapping custom fields to canonical prioritization fields. Nil rules mean "this tenant doesn't store that component".

func Load

func Load(path string) (*Mapping, error)

Load reads a Mapping from a JSON file.

Jump to

Keyboard shortcuts

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