package => [qw(set_package)],
block => [qw(set_blocks)],
merge => [qw(set_merged)],
- tag => [qw(set_tag)],
+ tag => [qw(set_tag valid_usertag)],
clone => [qw(clone_bug)],
archive => [qw(bug_archive bug_unarchive),
],
my @bugs = @{$info{bugs}};
my $action = "$config{bug} unarchived.";
my @files_to_remove;
+ ## error out if we're unarchiving unarchived bugs
+ for my $data (@{$info{data}}) {
+ if (not defined $data->{archived} or
+ not $data->{archived}
+ ) {
+ __end_control(%info);
+ croak("Bug $data->{bug_num} was not archived; not unarchiving it.");
+ }
+ }
for my $bug (@bugs) {
print {$debug} "$param{bug} removing $bug\n";
my $dir = get_hashname($bug);
__end_control(%info);
}
+=head2 valid_usertag
+
+ valid_usertag
+
+This checks if the usertag contains valid characters or not.
+
+=cut
+
+sub valid_usertag {
+ my $usertag = shift;
+ return $usertag =~ m/^[a-zA-Z0-9.+\@-]+$/;
+}
+
+
=head2 append_action_to_log
append_action_to_log