huskies: merge 1026
This commit is contained in:
@@ -250,15 +250,17 @@ pub(crate) fn create_item_in_backlog(
|
||||
if slugify_name(name).is_empty() {
|
||||
return Err("Title must contain at least one alphanumeric character.".to_string());
|
||||
}
|
||||
if acceptance_criteria.is_empty() {
|
||||
return Err("At least one acceptance criterion is required.".to_string());
|
||||
}
|
||||
const VALID_TYPES: &[&str] = &["story", "bug", "spike", "refactor"];
|
||||
const VALID_TYPES: &[&str] = &["story", "bug", "spike", "refactor", "epic"];
|
||||
if !VALID_TYPES.contains(&item_type) {
|
||||
return Err(format!(
|
||||
"Invalid item type '{item_type}': must be one of story, bug, spike, refactor."
|
||||
"Invalid item type '{item_type}': must be one of story, bug, spike, refactor, epic."
|
||||
));
|
||||
}
|
||||
// Epics use success_criteria (optional); the acceptance_criteria check is
|
||||
// only meaningful for pipeline work items.
|
||||
if item_type != "epic" && acceptance_criteria.is_empty() {
|
||||
return Err("At least one acceptance criterion is required.".to_string());
|
||||
}
|
||||
|
||||
let item_number = next_item_number(root)?;
|
||||
let item_id = format!("{item_number}");
|
||||
|
||||
Reference in New Issue
Block a user