Documentation
¶
Overview ¶
Package workflow provides workflow stage mapping for JIRA statuses.
Index ¶
- type Config
- type CycleTimeConfig
- type IssueHistory
- type Mapper
- func (m *Mapper) GetCycleTimeStages() (start, end string)
- func (m *Mapper) GetStage(status string) string
- func (m *Mapper) GetStageNames() []string
- func (m *Mapper) GetStageOrder(stageName string) int
- func (m *Mapper) GetStages() []Stage
- func (m *Mapper) IsCompleted(status string) bool
- func (m *Mapper) MapIssueHistory(issue jira.IssueWithHistory) IssueHistory
- func (m *Mapper) TimeInStage(history IssueHistory) map[string]time.Duration
- type Stage
- type StageTransition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Stages []Stage
CycleTime CycleTimeConfig
}
Config holds the complete workflow configuration.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a sensible default workflow configuration.
type CycleTimeConfig ¶
type CycleTimeConfig struct {
Started string // Stage name where cycle time starts
Completed string // Stage name where cycle time ends
}
CycleTimeConfig defines which stages mark the start and end of cycle time.
type IssueHistory ¶
type IssueHistory struct {
Key string
Type string
Summary string
Created time.Time
Completed *time.Time
CurrentStage string
Transitions []StageTransition
// Raw JIRA fields preserved for export
Assignee string
Priority string
Labels []string
EpicKey string
}
IssueHistory represents an issue with its workflow history.
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper maps JIRA statuses to workflow stages.
func (*Mapper) GetCycleTimeStages ¶
GetCycleTimeStages returns the start and end stages for cycle time calculation.
func (*Mapper) GetStageNames ¶
GetStageNames returns stage names in workflow order.
func (*Mapper) GetStageOrder ¶
GetStageOrder returns the order of a stage (lower = earlier in workflow).
func (*Mapper) IsCompleted ¶
IsCompleted returns true if the status maps to the "done" category.
func (*Mapper) MapIssueHistory ¶
func (m *Mapper) MapIssueHistory(issue jira.IssueWithHistory) IssueHistory
MapIssueHistory converts a JIRA issue with status transitions to workflow stage history.
func (*Mapper) TimeInStage ¶
func (m *Mapper) TimeInStage(history IssueHistory) map[string]time.Duration
TimeInStage calculates how long an issue spent in each stage.
type Stage ¶
type Stage struct {
Name string // Stage name (e.g., "In Progress", "Done")
Statuses []string // JIRA status names that map to this stage
Category string // Category: "todo", "in_progress", "done"
Order int // Position in workflow (0 = earliest, higher = later)
}
Stage represents a workflow stage that groups multiple JIRA statuses.