Implement 'ta import'
Tests include "TODO" notes for data not handled by TaskChampion, including links to the associated GitHub issues.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use super::tag::{SyntheticTag, TagInner};
|
||||
use super::{Annotation, Status, Tag, Timestamp};
|
||||
use super::{Annotation, Priority, Status, Tag, Timestamp};
|
||||
use crate::replica::Replica;
|
||||
use crate::storage::TaskMap;
|
||||
use chrono::prelude::*;
|
||||
@@ -118,6 +118,13 @@ impl Task {
|
||||
.unwrap_or("")
|
||||
}
|
||||
|
||||
pub fn get_priority(&self) -> Priority {
|
||||
self.taskmap
|
||||
.get(Prop::Status.as_ref())
|
||||
.map(|s| Priority::from_taskmap(s))
|
||||
.unwrap_or(Priority::M)
|
||||
}
|
||||
|
||||
/// Get the wait time. If this value is set, it will be returned, even
|
||||
/// if it is in the past.
|
||||
pub fn get_wait(&self) -> Option<DateTime<Utc>> {
|
||||
|
||||
Reference in New Issue
Block a user