TaskValidator.Core.Task (TaskValidator v0.9.2)
View SourceCore domain model representing a task in the task list.
This struct encapsulates all task-related data and provides a clear contract for working with tasks throughout the validation system.
Summary
Functions
Adds a subtask to the task.
Checks if the task is completed.
Determines the category based on the task ID number.
Extracts the prefix from a task ID (e.g., "SSH" from "SSH0001").
Gets the parent task ID for a subtask.
Checks if the task is in progress.
Checks if the task is a main task.
Creates a new main task.
Creates a new subtask.
Checks if the task is a subtask.
Types
@type t() :: %TaskValidator.Core.Task{ category: atom() | nil, content: [String.t()], description: String.t(), id: String.t(), line_number: non_neg_integer(), parent_id: String.t() | nil, prefix: String.t() | nil, priority: String.t(), review_rating: String.t() | nil, status: String.t(), subtasks: [t()], type: task_type() }
@type task_type() :: :main | :subtask
Functions
Adds a subtask to the task.
Checks if the task is completed.
Determines the category based on the task ID number.
Extracts the prefix from a task ID (e.g., "SSH" from "SSH0001").
Gets the parent task ID for a subtask.
Checks if the task is in progress.
Checks if the task is a main task.
@spec new_main_task( String.t(), String.t(), String.t(), String.t(), [String.t()], non_neg_integer() ) :: t()
Creates a new main task.
@spec new_subtask( String.t(), String.t(), String.t(), [String.t()], non_neg_integer(), String.t() ) :: t()
Creates a new subtask.
Checks if the task is a subtask.