From f8ab97a07e2970fb2adf67ca0cbdd9da10362d8c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 22 Jun 2015 14:46:47 -0400 Subject: [PATCH] CmdCustom: Converted from CLI to CLI2 --- src/commands/CmdCustom.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/commands/CmdCustom.cpp b/src/commands/CmdCustom.cpp index b3eda4222..da672e099 100644 --- a/src/commands/CmdCustom.cpp +++ b/src/commands/CmdCustom.cpp @@ -64,8 +64,6 @@ int CmdCustom::execute (std::string& output) std::string reportLabels = context.config.get ("report." + _keyword + ".labels"); std::string reportSort = context.config.get ("report." + _keyword + ".sort"); std::string reportFilter = context.config.get ("report." + _keyword + ".filter"); - if (reportFilter != "") - reportFilter = "( " + reportFilter + " )"; std::vector columns; split (columns, reportColumns, ','); @@ -81,9 +79,12 @@ int CmdCustom::execute (std::string& output) split (sortOrder, reportSort, ','); validateSortColumns (sortOrder); - // Add the report filter to any existing filter from the command line or - // context. - context.cli.addRawFilter (reportFilter); + // Add the report filter to any existing filter. + if (reportFilter != "") + { + context.cli2.addFilter (reportFilter); + context.cli2.prepareFilter (); + } // Apply filter. handleRecurrence ();