mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Support custom priority
This commit is contained in:
parent
6d542a2ffa
commit
4550aeff8f
3 changed files with 8 additions and 6 deletions
|
@ -17,7 +17,6 @@ use task_hookrs::date::Date;
|
|||
use task_hookrs::import::import;
|
||||
use task_hookrs::status::TaskStatus;
|
||||
use task_hookrs::task::Task;
|
||||
use task_hookrs::uda::UDAValue;
|
||||
use uuid::Uuid;
|
||||
|
||||
use unicode_segmentation::Graphemes;
|
||||
|
@ -1338,7 +1337,7 @@ impl TTApp {
|
|||
add_tag(&mut task, "PROJECT".to_string());
|
||||
}
|
||||
if task.priority().is_some() {
|
||||
add_tag(&mut task, "PROJECT".to_string());
|
||||
add_tag(&mut task, "PRIORITY".to_string());
|
||||
}
|
||||
if task.due().is_some() {
|
||||
add_tag(&mut task, "DUE".to_string());
|
||||
|
|
|
@ -197,6 +197,10 @@ impl TaskReportTable {
|
|||
},
|
||||
"status.short" => task.status().to_string().chars().next().unwrap().to_string(),
|
||||
"status" => task.status().to_string(),
|
||||
"priority" => match task.priority() {
|
||||
Some(p) => p.to_owned(),
|
||||
None => "".to_string(),
|
||||
},
|
||||
"project" => match task.project() {
|
||||
Some(p) => p.to_string(),
|
||||
None => "".to_string(),
|
||||
|
@ -218,9 +222,8 @@ impl TaskReportTable {
|
|||
} else {
|
||||
let mut dt = vec![];
|
||||
for u in v {
|
||||
match tasks.iter().find(|t| t.uuid() == u) {
|
||||
Some(t) => dt.push(t.id().unwrap()),
|
||||
None => (),
|
||||
if let Some(t) = tasks.iter().find(|t| t.uuid() == u) {
|
||||
dt.push(t.id().unwrap())
|
||||
}
|
||||
}
|
||||
join(dt.iter().map(|i| i.to_string()), " ")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue