delete
gest task delete: delete a task and all of its dependent rows.struct Command
pub struct CommandDelete a task and all of its dependent rows.
| Field | Type | Description |
|---|---|---|
id |
String | The task ID or prefix. |
force |
bool | Remove the task from every iteration it belongs to before deleting. Without this flag the command refuses to delete a task that is still a member of one or more iterations so members of an active sprint are not removed by accident. |
output |
json::Flags | The output mode: normal, --json, --quiet or --raw. |
yes |
bool | Skip the interactive confirmation prompt. |
Implements FromArgMatches, Args, Debug.
Command::call
pub async fn call(&self, context: &AppContext) -> Result<(), Error>Confirm and cascade-delete the task along with its notes, tags, relationships, and iteration memberships, writing a tombstone file.
| 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. |
fn iteration_memberships
async fn iteration_memberships(conn: &libsql::Connection, task_id: &Id) -> Result<Vec<Id>, Error>Return every iteration id that currently holds this task in its
iteration_tasks join table.
| Parameter | Type | Description |
|---|---|---|
conn |
&libsql::Connection | the database connection |
task_id |
&Id | the full ID of the task |
| returns | Result<Vec<Id>, Error> | The iteration IDs, sorted, or the store error. |