fixed => [qw(set_found set_fixed)],
package => [qw(set_package)],
block => [qw(set_blocks)],
+ tag => [qw(set_tag)],
archive => [qw(bug_archive bug_unarchive),
],
log => [qw(append_action_to_log),
my %tag_added = ();
my %tag_removed = ();
my %fixed_removed = ();
- my @old_tags = split /\,\s*/, $data->{tags};
+ my @old_tags = split /\,\s*/, $data->{keywords};
my %tags;
@tags{@old_tags} = (1) x @old_tags;
my $reopened = 0;
print {$transcript} "Unknown tag(s): ".join(', ',@bad_tags).".\n";
print {$transcript} "These tags are recognized: ".join(', ',@{$config{tags}}).".\n";
}
- $data->{tags} = join(', ',keys %tags); # double check this
+ $data->{keywords} = join(', ',keys %tags); # double check this
my @changed;
push @changed, 'added tag(s) '.english_join([keys %tag_added]) if keys %tag_added;
my @tags = split /[\s,]+/, $tags;
# this is an array of hashrefs which contain two elements, the
# first of which is the array of tags, the second is the
- # option to pass to set_tags (we use a hashref here to make it
+ # option to pass to set_tag (we use a hashref here to make it
# more obvious what is happening)
- my @tag_operations = {tags => [],
- option => []
- };
+ my @tag_operations;
my $alter_type = '=';
my @badtags;
for my $tag (@tags) {
push @badtags, $tag;
next;
}
+ if (not @tag_operations) {
+ @tag_operations = {tags => [],
+ option => []
+ };
+ }
push @{$tag_operations[-1]{tags}},$tag;
}
if (@badtags) {
}
eval {
for my $operation (@tag_operations) {
- set_tags(@common_control_options,
- bug => $ref,
- tags => [@{$operation->{$tags}}],
- warn_on_bad_tags => 0, # don't warn on bad tags,
- # 'cause we do that above
- @{$operation->{option}},
- );
+ set_tag(@common_control_options,
+ bug => $ref,
+ tag => [@{$operation->{tags}}],
+ warn_on_bad_tags => 0, # don't warn on bad tags,
+ # 'cause we do that above
+ @{$operation->{option}},
+ );
}
};
if ($@) {
# -*- mode: cperl;-*-
# $Id: 05_mail.t,v 1.1 2005/08/17 21:46:17 don Exp $
-use Test::More tests => 102;
+use Test::More tests => 111;
use warnings;
use strict;
status_key => 'owner',
status_value => '',
},
+ tag => {command => 'tag',
+ value => ' = patch',
+ status_key => 'keywords',
+ status_value => 'patch',
+ },
+ untag => {command => 'tag',
+ value => ' - patch',
+ status_key => 'keywords',
+ status_value => '',
+ },
+ plustag => {command => 'tag',
+ value => ' + patch',
+ status_key => 'keywords',
+ status_value => 'patch',
+ },
);
# In order for the archive/unarchive to work, we have to munge the summary file slightly