mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
bin/tau: fix assign,project vectors, and fix viewing in print_task_info
This commit is contained in:
@@ -88,13 +88,13 @@ pub fn task_from_cli_values(values: Vec<String>) -> Result<CliBaseTask> {
|
||||
}
|
||||
|
||||
if field[0].starts_with("project") {
|
||||
project.push(field[1].into());
|
||||
project = field[1].split(',').map(|s| s.into()).collect();
|
||||
}
|
||||
if field[0].starts_with("desc") {
|
||||
desc = Some(field[1].into());
|
||||
}
|
||||
if field[0].starts_with("assign") {
|
||||
assign.push(field[1].into());
|
||||
assign = field[1].split(',').map(|s| s.into()).collect();
|
||||
}
|
||||
if field[0].starts_with("due") {
|
||||
due = due_as_timestamp(&field[1])
|
||||
|
||||
@@ -73,16 +73,16 @@ pub fn print_task_info(taskinfo: TaskInfo) -> Result<()> {
|
||||
let due = timestamp_to_date(taskinfo.due.unwrap_or(0), "date");
|
||||
let created_at = timestamp_to_date(taskinfo.created_at, "datetime");
|
||||
let mut table = table!([Bd => "ref_id", &taskinfo.ref_id],
|
||||
["id", &taskinfo.id.to_string()],
|
||||
[Bd =>"owner", &taskinfo.owner],
|
||||
[Bd =>"title", &taskinfo.title],
|
||||
["desc", &taskinfo.desc.to_string()],
|
||||
[Bd =>"assign", taskinfo.assign.join(", ")],
|
||||
["project", taskinfo.project.join(", ")],
|
||||
[Bd =>"due", due],
|
||||
["rank", &taskinfo.rank.to_string()],
|
||||
[Bd =>"created_at", created_at],
|
||||
["current_state", current_state]);
|
||||
["id", &taskinfo.id.to_string()],
|
||||
[Bd =>"owner", &taskinfo.owner],
|
||||
["title", &taskinfo.title],
|
||||
[Bd =>"desc", &taskinfo.desc.to_string()],
|
||||
["assign", taskinfo.assign.join(", ")],
|
||||
[Bd =>"project", taskinfo.project.join(", ")],
|
||||
["due", due],
|
||||
[Bd =>"rank", &taskinfo.rank.to_string()],
|
||||
["created_at", created_at],
|
||||
[Bd =>"current_state", current_state]);
|
||||
|
||||
table.set_format(
|
||||
format::FormatBuilder::new()
|
||||
|
||||
Reference in New Issue
Block a user