- Zero-length command line project was being compared to a zero-length
  truncated task project, and always matching.  Thanks to John Florian.
This commit is contained in:
Paul Beckingham 2009-07-12 14:27:26 -04:00
parent ab3de212bf
commit b02c11be0e
2 changed files with 10 additions and 2 deletions

View file

@ -670,8 +670,16 @@ void Context::autoFilter (Task& t, Filter& f)
// Projects are matched left-most.
else if (att->first == "project" && att->second.mod () == "")
{
f.push_back (Att ("project", "startswith", att->second.value ()));
if (att->second.value () != "")
{
f.push_back (Att ("project", "startswith", att->second.value ()));
debug ("auto filter: " + att->first + ".startswith:" + att->second.value ());
}
else
{
f.push_back (Att ("project", "is", att->second.value ()));
debug ("auto filter: " + att->first + ".is:" + att->second.value ());
}
}
// The limit attribute does not participate in filtering, and needs to be

View file

@ -30,7 +30,7 @@
#define FEATURE_TDB_OPT 1 // TDB Optimization reduces file I/O.
#define FEATURE_NEW_ID 1 // Echoes back new id.
#define FEATURE_SHELL 1 // Interactive shell.
#define FEATURE_NCURSES_COLS 1 // Shortcut that avoids WINDOW.
#define FEATURE_NCURSES_COLS 1 // Shortcut that avoids WINDOW.
#include <string>
#include <vector>