diff --git a/src/Context.cpp b/src/Context.cpp index 3f2044a83..ff4f6dc27 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -251,8 +251,7 @@ int Context::dispatch (std::string &out) else if (cmd.command == "" && sequence.size ()) { rc = handleModify (out); } - // Command that display IDs and therefore need TDB::gc first. - else if (cmd.command == "next") { if (!inShadow) tdb.gc (); rc = handleReportNext (out); } + // Commands that display IDs and therefore need TDB::gc first. else if (cmd.validCustom (cmd.command)) { if (!inShadow) tdb.gc (); rc = handleCustomReport (cmd.command, out); } // If the command is not recognized, display usage. diff --git a/src/main.h b/src/main.h index 5ce0e339f..8de612b09 100644 --- a/src/main.h +++ b/src/main.h @@ -99,7 +99,6 @@ int shortUsage (std::string &); int longUsage (std::string &); int handleInfo (std::string &); int handleReportSummary (std::string &); -int handleReportNext (std::string &); int handleReportHistoryMonthly (std::string &); int handleReportHistoryAnnual (std::string &); int handleReportGHistoryMonthly (std::string &); diff --git a/src/report.cpp b/src/report.cpp index ff563f7e3..4d370b11d 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -742,74 +742,6 @@ int handleReportSummary (std::string &outs) return rc; } -//////////////////////////////////////////////////////////////////////////////// -// A summary of the most important pending tasks. -// -// For every project, pull important tasks to present as an 'immediate' task -// list. This hides the overwhelming quantity of other tasks. -// -// Present at most three tasks for every project. Select the tasks using -// these criteria: -// - due:< 1wk, pri:* -// - due:*, pri:H -// - pri:H -// - due:*, pri:M -// - pri:M -// - due:*, pri:L -// - pri:L -// - due:*, pri:* <-- everything else -// -// Make the "three" tasks a configurable number -// -int handleReportNext (std::string &outs) -{ - // Load report configuration. - std::string columnList = context.config.get ("report.next.columns"); - std::string labelList = context.config.get ("report.next.labels"); - std::string sortList = context.config.get ("report.next.sort"); - std::string filterList = context.config.get ("report.next.filter"); - - std::vector filterArgs; - split (filterArgs, filterList, ' '); - { - Cmd cmd ("next"); - Task task; - Sequence sequence; - Subst subst; - Filter filter; - context.parse (filterArgs, cmd, task, sequence, subst, filter); - - context.sequence.combine (sequence); - - // Allow limit to be overridden by the command line. - if (!context.task.has ("limit") && task.has ("limit")) - context.task.set ("limit", task.get ("limit")); - - foreach (att, filter) - context.filter.push_back (*att); - } - - // Get all the tasks. - std::vector tasks; - context.tdb.lock (context.config.getBoolean ("locking")); - handleRecurrence (); - context.tdb.load (tasks, context.filter); - context.tdb.commit (); - context.tdb.unlock (); - - // Restrict to matching subset. - gatherNextTasks (tasks); - - return runCustomReport ( - "next", - columnList, - labelList, - sortList, - filterList, - tasks, - outs); -} - //////////////////////////////////////////////////////////////////////////////// // Year Month Added Completed Deleted // 2006 November 87 63 14