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:
Dustin J. Mitchell 2022-01-05 03:12:55 +00:00
parent e2e0951c81
commit 63804b5652
7 changed files with 311 additions and 4 deletions

View file

@ -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>> {