Skip to main content

split_item

Function split_item 

Source
pub async fn split_item(
    project_dir: &Path,
    source: &ItemId,
    spec: SplitSpec,
) -> Result<SplitOutcome>
Expand description

Split the PBI source into the new PBIs described by spec.

Each new PBI is appended to the backlog with the first workflow column as its status, exactly as crate::service::add_item does. When spec.relationship is SplitRelationship::Child the source becomes the parent of every new PBI; when it is SplitRelationship::Dependency the source gains a dependency on every new PBI. Splitting cannot introduce a cycle because the new items carry no other edges, so no cycle warning is produced.

Return Error::NotInitialized for an uninitialized board, Error::NotFound when source is absent, or Error::EmptyTitle when spec.titles is empty or contains a blank title.