huskies: merge 1010
This commit is contained in:
@@ -398,6 +398,11 @@ pub(super) fn extract_item_view(item: &PipelineItemCrdt) -> Option<PipelineItemV
|
||||
_ => None,
|
||||
};
|
||||
|
||||
let plan_state_str = match item.plan_state.view() {
|
||||
JsonValue::String(s) if !s.is_empty() => Some(s),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
let stage = project_stage_for_view(
|
||||
&stage_str,
|
||||
&story_id,
|
||||
@@ -405,6 +410,7 @@ pub(super) fn extract_item_view(item: &PipelineItemCrdt) -> Option<PipelineItemV
|
||||
resume_to.as_deref(),
|
||||
claim_agent.as_deref(),
|
||||
claim_ts_secs,
|
||||
plan_state_str.as_deref(),
|
||||
)?;
|
||||
|
||||
Some(PipelineItemView {
|
||||
@@ -440,8 +446,11 @@ fn project_stage_for_view(
|
||||
resume_to: Option<&str>,
|
||||
claim_agent: Option<&str>,
|
||||
claim_ts_secs: Option<u64>,
|
||||
plan_state_str: Option<&str>,
|
||||
) -> Option<crate::pipeline_state::Stage> {
|
||||
use crate::pipeline_state::{AgentClaim, AgentName, ArchiveReason, BranchName, GitSha, Stage};
|
||||
use crate::pipeline_state::{
|
||||
AgentClaim, AgentName, ArchiveReason, BranchName, GitSha, PlanState, Stage,
|
||||
};
|
||||
use chrono::{DateTime, TimeZone, Utc};
|
||||
use std::num::NonZeroU32;
|
||||
|
||||
@@ -470,7 +479,10 @@ fn project_stage_for_view(
|
||||
Box::new(
|
||||
resume_to
|
||||
.and_then(Stage::from_dir)
|
||||
.unwrap_or(Stage::Coding { claim: None }),
|
||||
.unwrap_or(Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
}),
|
||||
)
|
||||
};
|
||||
|
||||
@@ -489,7 +501,10 @@ fn project_stage_for_view(
|
||||
match clean {
|
||||
"upcoming" => Some(Stage::Upcoming),
|
||||
"backlog" => Some(Stage::Backlog),
|
||||
"coding" => Some(Stage::Coding { claim }),
|
||||
"coding" => Some(Stage::Coding {
|
||||
claim,
|
||||
plan: PlanState::from_str(plan_state_str.unwrap_or("")),
|
||||
}),
|
||||
"qa" => Some(Stage::Qa),
|
||||
"blocked" => Some(Stage::Blocked {
|
||||
reason: String::new(),
|
||||
|
||||
Reference in New Issue
Block a user