huskies: merge 984
This commit is contained in:
@@ -487,6 +487,15 @@ fn project_stage_for_view(
|
||||
archived_at: Utc::now(),
|
||||
reason: ArchiveReason::Completed,
|
||||
}),
|
||||
"abandoned" => Some(Stage::Abandoned { ts: Utc::now() }),
|
||||
"superseded" => Some(Stage::Superseded {
|
||||
ts: Utc::now(),
|
||||
superseded_by: crate::pipeline_state::StoryId(resume_to.unwrap_or("").to_string()),
|
||||
}),
|
||||
"rejected" => Some(Stage::Rejected {
|
||||
ts: Utc::now(),
|
||||
reason: resume_to.unwrap_or("").to_string(),
|
||||
}),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
@@ -504,7 +513,14 @@ pub fn dep_is_done_crdt(dep_number: u32) -> bool {
|
||||
let prefix = format!("{dep_number}_");
|
||||
read_all_typed().into_iter().any(|item| {
|
||||
(item.story_id.0 == exact || item.story_id.0.starts_with(&prefix))
|
||||
&& matches!(item.stage, Stage::Done { .. } | Stage::Archived { .. })
|
||||
&& matches!(
|
||||
item.stage,
|
||||
Stage::Done { .. }
|
||||
| Stage::Archived { .. }
|
||||
| Stage::Abandoned { .. }
|
||||
| Stage::Superseded { .. }
|
||||
| Stage::Rejected { .. }
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -520,7 +536,13 @@ pub fn dep_is_archived_crdt(dep_number: u32) -> bool {
|
||||
let prefix = format!("{dep_number}_");
|
||||
read_all_typed().into_iter().any(|item| {
|
||||
(item.story_id.0 == exact || item.story_id.0.starts_with(&prefix))
|
||||
&& matches!(item.stage, Stage::Archived { .. })
|
||||
&& matches!(
|
||||
item.stage,
|
||||
Stage::Archived { .. }
|
||||
| Stage::Abandoned { .. }
|
||||
| Stage::Superseded { .. }
|
||||
| Stage::Rejected { .. }
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user