huskies: merge 891
This commit is contained in:
@@ -32,14 +32,19 @@ pub(crate) fn find_story_by_number(
|
||||
// initialised (e.g. in unit tests or very early startup).
|
||||
if let Some(items) = crate::crdt_state::read_all_items() {
|
||||
for item in items {
|
||||
if item.story_id.split('_').next().unwrap_or("") == number {
|
||||
if item.story_id().split('_').next().unwrap_or("") == number {
|
||||
let path = project_root
|
||||
.join(".huskies")
|
||||
.join("work")
|
||||
.join(&item.stage)
|
||||
.join(format!("{}.md", item.story_id));
|
||||
let content = crate::db::read_content(&item.story_id);
|
||||
return Some((item.story_id, item.stage, path, content));
|
||||
.join(item.stage_str())
|
||||
.join(format!("{}.md", item.story_id()));
|
||||
let content = crate::db::read_content(item.story_id());
|
||||
return Some((
|
||||
item.story_id().to_string(),
|
||||
item.stage_str().to_string(),
|
||||
path,
|
||||
content,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +58,7 @@ pub(crate) fn find_story_by_number(
|
||||
continue;
|
||||
}
|
||||
let stage_dir = crate::crdt_state::read_item(&id)
|
||||
.map(|v| v.stage)
|
||||
.map(|v| v.stage_str().to_string())
|
||||
.unwrap_or_else(|| "1_backlog".to_string());
|
||||
let path = project_root
|
||||
.join(".huskies")
|
||||
|
||||
Reference in New Issue
Block a user