diff --git a/src/commands/CmdHistory.cpp b/src/commands/CmdHistory.cpp index 947c41df4..c57802607 100644 --- a/src/commands/CmdHistory.cpp +++ b/src/commands/CmdHistory.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -55,10 +56,11 @@ int CmdHistoryMonthly::execute (std::string& output) std::map completedGroup; // Completions by month std::map deletedGroup; // Deletions by month - // Scan the pending tasks. + // Apply filter. handleRecurrence (); + Filter filter; std::vector filtered; - filter (filtered); + filter.subset (filtered); context.tdb2.commit (); std::vector ::iterator task; @@ -209,10 +211,11 @@ int CmdHistoryAnnual::execute (std::string& output) std::map completedGroup; // Completions by month std::map deletedGroup; // Deletions by month - // Scan the pending tasks. + // Apply filter. handleRecurrence (); + Filter filter; std::vector filtered; - filter (filtered); + filter.subset (filtered); context.tdb2.commit (); std::vector ::iterator task; @@ -360,10 +363,11 @@ int CmdGHistoryMonthly::execute (std::string& output) std::map completedGroup; // Completions by month std::map deletedGroup; // Deletions by month - // Scan the pending tasks. + // Apply filter. handleRecurrence (); + Filter filter; std::vector filtered; - filter (filtered); + filter.subset (filtered); context.tdb2.commit (); std::vector ::iterator task; @@ -553,10 +557,11 @@ int CmdGHistoryAnnual::execute (std::string& output) std::map completedGroup; // Completions by month std::map deletedGroup; // Deletions by month - // Scan the pending tasks. + // Apply filter. handleRecurrence (); + Filter filter; std::vector filtered; - filter (filtered); + filter.subset (filtered); context.tdb2.commit (); std::vector ::iterator task;