add

gest iteration add: add a task to an iteration.

struct Command

source

pub struct Command

Add a task to an iteration.

Field Type Description
iteration String The iteration ID or prefix.
task Option<String> The task ID or prefix (conflicts with --batch).
batch bool Read NDJSON task records from stdin (one JSON object per line).
phase Option<u32> The phase to add the task to (defaults to max existing + 1; conflicts with --batch).
output json::Flags The output mode: normal, --json, --quiet or --raw.

Implements FromArgMatches, Args, Debug.

Command::call

source

pub async fn call(&self, context: &AppContext) -> Result<(), Error>

Attach the resolved task(s) to the iteration.

Parameter Type Description
context &AppContext the application context: settings, store and current project
returns Result<(), Error> Ok(()) when the command succeeds, or the error that stopped it.

Command::call_batch

source

async fn call_batch(&self, context: &AppContext) -> Result<(), Error>

Add one task for each NDJSON line on stdin to the iteration, under one recorded transaction.

A record with no phase takes the next phase after the iteration’s highest, counting up for each such record.

Parameter Type Description
context &AppContext the application context: settings, store and current project
returns Result<(), Error> Ok(()) once the count is printed, or the first error; tasks added before it stay added.

struct BatchRecord

source

struct BatchRecord

A single task record in NDJSON batch mode.

Field Type Description
phase Option<u32> Phase override (auto-increments from max when absent).
task String Task ID or prefix to resolve.

Implements Debug, Deserialize<'de>.