Bug Fix - #203
- 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:
@@ -669,10 +669,18 @@ void Context::autoFilter (Task& t, Filter& f)
|
|||||||
|
|
||||||
// Projects are matched left-most.
|
// Projects are matched left-most.
|
||||||
else if (att->first == "project" && att->second.mod () == "")
|
else if (att->first == "project" && att->second.mod () == "")
|
||||||
|
{
|
||||||
|
if (att->second.value () != "")
|
||||||
{
|
{
|
||||||
f.push_back (Att ("project", "startswith", att->second.value ()));
|
f.push_back (Att ("project", "startswith", att->second.value ()));
|
||||||
debug ("auto filter: " + att->first + ".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
|
// The limit attribute does not participate in filtering, and needs to be
|
||||||
// specifically handled in handleCustomReport.
|
// specifically handled in handleCustomReport.
|
||||||
|
|||||||
Reference in New Issue
Block a user