Bug - #489 - tags.none: is not filtering tagless tasks
- Context::autoFilter was suppressing 'tags' filter terms due to the +tag/-tag syntax, which we now know only augments attribute modifiers, and doesn't replace them.
This commit is contained in:
@@ -72,6 +72,7 @@
|
|||||||
after a due date (thanks to T. Charles Yun).
|
after a due date (thanks to T. Charles Yun).
|
||||||
+ Fixed bug #480, which didn't properly support @ characters in tags. This
|
+ Fixed bug #480, which didn't properly support @ characters in tags. This
|
||||||
also now supports $ and #.
|
also now supports $ and #.
|
||||||
|
+ Fixed bug #489, which caused the filter 'tags.none:' to fail.
|
||||||
+ Fixed problem with command line configuration overrides that had no
|
+ Fixed problem with command line configuration overrides that had no
|
||||||
values.
|
values.
|
||||||
+ Fixed problem with the 'undo' command not observing the rc.color or the
|
+ Fixed problem with the 'undo' command not observing the rc.color or the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// taskwarrior - a command line task list manager.
|
// taskwarrior - a command line task list manager.
|
||||||
//
|
//
|
||||||
// Copyright 2006 - 2010, Paul Beckingham.
|
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify it under
|
// This program is free software; you can redistribute it and/or modify it under
|
||||||
@@ -839,11 +839,8 @@ void Context::autoFilter (Att& a, Filter& f)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// The mechanism for filtering on tags is +/-<tag>.
|
// Note: Tags are handled via the +/-<tag> syntax, but also via attribute
|
||||||
// Do not handle here - see below.
|
// modifiers.
|
||||||
else if (a.name () == "tags")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generic attribute matching.
|
// Generic attribute matching.
|
||||||
else
|
else
|
||||||
|
|||||||
62
src/tests/bug.489.t
Executable file
62
src/tests/bug.489.t
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#! /usr/bin/perl
|
||||||
|
################################################################################
|
||||||
|
## taskwarrior - a command line task list manager.
|
||||||
|
##
|
||||||
|
## Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
|
||||||
|
## All rights reserved.
|
||||||
|
##
|
||||||
|
## This program is free software; you can redistribute it and/or modify it under
|
||||||
|
## the terms of the GNU General Public License as published by the Free Software
|
||||||
|
## Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
## version.
|
||||||
|
##
|
||||||
|
## This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
## FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
## details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License along with
|
||||||
|
## this program; if not, write to the
|
||||||
|
##
|
||||||
|
## Free Software Foundation, Inc.,
|
||||||
|
## 51 Franklin Street, Fifth Floor,
|
||||||
|
## Boston, MA
|
||||||
|
## 02110-1301
|
||||||
|
## USA
|
||||||
|
##
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Test::More tests => 7;
|
||||||
|
|
||||||
|
# Create the rc file.
|
||||||
|
if (open my $fh, '>', 'bug.rc')
|
||||||
|
{
|
||||||
|
print $fh "data.location=.\n";
|
||||||
|
|
||||||
|
close $fh;
|
||||||
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
|
}
|
||||||
|
|
||||||
|
# Bug #489 - tags.none: is not filtering tagless tasks
|
||||||
|
qx{../task rc:bug.rc add with +tag};
|
||||||
|
qx{../task rc:bug.rc add without};
|
||||||
|
my $output = qx{../task rc:bug.rc list tags.none:};
|
||||||
|
unlike ($output, qr/with /, 'tags.none: skips tagged');
|
||||||
|
like ($output, qr/without/, 'tags.none: finds tagless');
|
||||||
|
|
||||||
|
# Cleanup.
|
||||||
|
unlink 'pending.data';
|
||||||
|
ok (!-r 'pending.data', 'Removed pending.data');
|
||||||
|
|
||||||
|
unlink 'completed.data';
|
||||||
|
ok (!-r 'completed.data', 'Removed completed.data');
|
||||||
|
|
||||||
|
unlink 'undo.data';
|
||||||
|
ok (!-r 'undo.data', 'Removed undo.data');
|
||||||
|
|
||||||
|
unlink 'bug.rc';
|
||||||
|
ok (!-r 'bug.rc', 'Removed bug.rc');
|
||||||
|
|
||||||
|
exit 0;
|
||||||
Reference in New Issue
Block a user