1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#[allow(clippy::wildcard_imports)]
use super::*;
/// `tix wip`'s subcommands (mission `configurable-wip-limits-01M3C6WX`, WP04).
///
/// The CLI parses and routes; the policy service owns every evaluation, and the
/// schema's own validation decides whether a configuration is acceptable. Nothing
/// here decides what a limit *means*.
#[derive(Debug, Clone, Subcommand)]
pub enum WipAction {
/// Show the configured limits, their units, and the current usage
Show {
/// Board name; default is the active board
#[arg(long, value_name = "BOARD")]
board: Option<String>,
},
/// Set or update one column's limit
///
/// Only the flags you name change, exactly as `tix recurring edit` works, so
/// `tix wip set "in progress" --max-items 4` keeps the column's estimate
/// ceiling, unit and policy.
Set {
/// Column name, as `[kanban.<board>.columns]` spells it
column: String,
/// The most cards the column may hold
#[arg(long, value_name = "N")]
max_items: Option<u32>,
/// The most estimate the column's cards may add up to
#[arg(long, value_name = "N")]
max_estimate: Option<u32>,
/// The unit `--max-estimate` counts in; it must be declared with `tix wip unit`
#[arg(long, value_name = "UNIT")]
unit: Option<String>,
/// What exceeding the limit does: `warn` or `block`
#[arg(long, value_name = "warn|block")]
policy: Option<String>,
/// Keep the numbers but enforce nothing
#[arg(long)]
disabled: bool,
/// Board name; default is the active board
#[arg(long, value_name = "BOARD")]
board: Option<String>,
},
/// Remove one column's limit
Unset {
/// Column name
column: String,
/// Board name; default is the active board
#[arg(long, value_name = "BOARD")]
board: Option<String>,
},
/// Declare an estimate unit, or remove one
///
/// A unit is a name and its factor to the board's base unit: with `d = 1` and
/// `w = 5`, an issue estimated `1w` counts as `5d`. A unit the board does not
/// declare is a `missing_conversion` refusal wherever it is used, never a zero.
Unit {
/// Unit name, e.g. `d`
name: String,
/// The factor to the board's base unit (at least 1)
factor: Option<u32>,
/// Remove the unit instead of declaring it
#[arg(long)]
remove: bool,
/// Board name; default is the active board
#[arg(long, value_name = "BOARD")]
board: Option<String>,
},
}