mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
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:
parent
e2e0951c81
commit
63804b5652
7 changed files with 311 additions and 4 deletions
|
@ -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>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue