board

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package board groups tasks into columns by a specified field.

Supported grouping fields are status, priority, effort, type, group, and tag. Column ordering follows natural conventions for each field type; for effort it follows the project's configured vocabulary, supplied as an github.com/driangle/taskmd/sdk/go/effort.Scale.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReorderKeys

func ReorderKeys(gr *GroupResult, order []string)

ReorderKeys reorders the group result keys to match the given order. Keys present in order come first (in order), remaining keys follow alphabetically. This is useful for phase grouping where the order comes from configuration.

Types

type GroupResult

type GroupResult struct {
	Keys   []string
	Groups map[string][]*model.Task
}

GroupResult holds ordered group keys and the grouped tasks map.

func GroupTasks

func GroupTasks(tasks []*model.Task, field string, efforts effort.Scale) (*GroupResult, error)

GroupTasks groups tasks by the specified field.

efforts supplies the project's effort vocabulary, which sets the column order when grouping by effort. Pass effort.Scale{} for the default vocabulary.

type JSONGroup

type JSONGroup struct {
	Group string     `json:"group"`
	Count int        `json:"count"`
	Tasks []JSONTask `json:"tasks"`
}

JSONGroup is the JSON representation of a board group.

func ToJSON

func ToJSON(gr *GroupResult) []JSONGroup

ToJSON converts a GroupResult to a JSON-serializable slice.

type JSONTask

type JSONTask struct {
	ID       string   `json:"id"`
	Title    string   `json:"title"`
	Status   string   `json:"status"`
	Priority string   `json:"priority,omitempty"`
	Effort   string   `json:"effort,omitempty"`
	Type     string   `json:"type,omitempty"`
	Phase    string   `json:"phase,omitempty"`
	Tags     []string `json:"tags,omitempty"`
}

JSONTask is the JSON representation of a task within a board group.

Jump to

Keyboard shortcuts

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