MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / addAnnotation

Method addAnnotation

src/Task.cpp:922–934  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// The timestamp is part of the name: annotation_1234567890:"..." Note that the time is incremented (one second) in order to find a unique timestamp.

Source from the content-addressed store, hash-verified

920// Note that the time is incremented (one second) in order to find a unique
921// timestamp.
922void Task::addAnnotation(const std::string& description) {
923 time_t now = time(nullptr);
924 std::string key;
925
926 do {
927 key = "annotation_" + format((long long int)now);
928 ++now;
929 } while (has(key));
930
931 data[key] = description;
932 ++annotation_count;
933 recalc_urgency = true;
934}
935
936////////////////////////////////////////////////////////////////////////////////
937void Task::removeAnnotations() {

Callers 3

executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected