Show and handle due and wait dates
This commit is contained in:
parent
243ebf67b1
commit
1d050462ca
1 changed files with 27 additions and 0 deletions
|
@ -37,6 +37,12 @@ fn print_task_short(task: &Task) -> String {
|
||||||
if let Some(project) = task.project() {
|
if let Some(project) = task.project() {
|
||||||
info.push(format!("{}", project));
|
info.push(format!("{}", project));
|
||||||
}
|
}
|
||||||
|
if let Some(due) = task.due() {
|
||||||
|
info.push(format!("due: {}", **due));
|
||||||
|
}
|
||||||
|
if let Some(wait) = task.wait() {
|
||||||
|
info.push(format!("wait: {}", **wait));
|
||||||
|
}
|
||||||
info.push(prio_name(task.priority()).into());
|
info.push(prio_name(task.priority()).into());
|
||||||
info.join(" | ")
|
info.join(" | ")
|
||||||
}
|
}
|
||||||
|
@ -52,6 +58,12 @@ fn print_task(task: &Task) -> String {
|
||||||
info.push(format!("tags: +{}", tags.join(", +")));
|
info.push(format!("tags: +{}", tags.join(", +")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if let Some(due) = task.due() {
|
||||||
|
info.push(format!("due: {}", **due));
|
||||||
|
}
|
||||||
|
if let Some(wait) = task.wait() {
|
||||||
|
info.push(format!("wait: {}", **wait));
|
||||||
|
}
|
||||||
info.push(format!("priority: {}", prio_name(task.priority())));
|
info.push(format!("priority: {}", prio_name(task.priority())));
|
||||||
info.join("\n")
|
info.join("\n")
|
||||||
}
|
}
|
||||||
|
@ -482,6 +494,7 @@ What's the progress?",
|
||||||
("Split: Give this tasks subtasks", "split"),
|
("Split: Give this tasks subtasks", "split"),
|
||||||
("Depend: Set dependency", "depend"),
|
("Depend: Set dependency", "depend"),
|
||||||
("Wait: Set wait time", "postpone"),
|
("Wait: Set wait time", "postpone"),
|
||||||
|
("Due: Set a deadline", "due"),
|
||||||
("Tag: Add a tag", "tag"),
|
("Tag: Add a tag", "tag"),
|
||||||
("Clear tags", "clear_tags"),
|
("Clear tags", "clear_tags"),
|
||||||
("Manual: I have to change something by hand", "manual"),
|
("Manual: I have to change something by hand", "manual"),
|
||||||
|
@ -561,6 +574,20 @@ What's the progress?",
|
||||||
"prio" => {
|
"prio" => {
|
||||||
self.select_priority(uuid)?;
|
self.select_priority(uuid)?;
|
||||||
}
|
}
|
||||||
|
"due" => {
|
||||||
|
str2cmd(&format!(
|
||||||
|
"task {} mod due:{}",
|
||||||
|
uuid,
|
||||||
|
self.dialog.input_line(
|
||||||
|
format!(
|
||||||
|
"Select a deadline for {}",
|
||||||
|
task_name
|
||||||
|
),
|
||||||
|
vec!["tomorrow"],
|
||||||
|
)?
|
||||||
|
)).output()?;
|
||||||
|
self.cache.refresh()?;
|
||||||
|
}
|
||||||
"postpone" => {
|
"postpone" => {
|
||||||
str2cmd(&format!(
|
str2cmd(&format!(
|
||||||
"task {} mod wait:{}",
|
"task {} mod wait:{}",
|
||||||
|
|
Loading…
Reference in a new issue