mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1827: Extract annotations from a task
- Thanks to Ryan.
This commit is contained in:
parent
fdd55bc422
commit
5206b4a84b
7 changed files with 40 additions and 0 deletions
|
@ -167,6 +167,7 @@ bool getDOM (const std::string& name, Variant& value)
|
|||
// <date>.second
|
||||
//
|
||||
// Annotations (entry is a date):
|
||||
// annotations.count
|
||||
// annotations.<N>.entry
|
||||
// annotations.<N>.description
|
||||
//
|
||||
|
@ -298,6 +299,12 @@ bool getDOM (const std::string& name, const Task& task, Variant& value)
|
|||
}
|
||||
}
|
||||
|
||||
if (ref.data.size () && size == 2 && elements[0] == "annotations" && elements[1] == "count")
|
||||
{
|
||||
value = Variant (static_cast<int> (ref.getAnnotationCount ()));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ref.data.size () && size == 3 && elements[0] == "annotations")
|
||||
{
|
||||
auto annos = ref.getAnnotations ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue