Skip to main content

preview_task_edit

Function preview_task_edit 

Source
pub fn preview_task_edit(
    queue: &QueueFile,
    done: Option<&QueueFile>,
    task_id: &str,
    key: TaskEditKey,
    input: &str,
    now_rfc3339: &str,
    id_prefix: &str,
    id_width: usize,
    max_dependency_depth: u8,
) -> Result<TaskEditPreview>
Expand description

Preview task edit changes without applying them.

Clones the queue, applies the edit to the clone, validates the result, and returns a preview describing what would change.

§Arguments

  • queue - The queue file containing the task to edit
  • done - Optional done file for validation
  • task_id - ID of the task to edit
  • key - Field to edit
  • input - New value for the field
  • now_rfc3339 - Current timestamp for updated_at
  • id_prefix - Task ID prefix for validation
  • id_width - Task ID width for validation
  • max_dependency_depth - Maximum dependency depth for validation

§Returns

A TaskEditPreview describing the changes that would be made.