TW-1827: Extract annotations from a task
- Thanks to Ryan.
This commit is contained in:
@@ -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 ();
|
||||
|
||||
Reference in New Issue
Block a user