Package: bugs.debian.org Tags: patch X-Debbugs-Cc: mat...@debian.org Hi, While the control server has tag and usertag as aliases for tags and usertags respectively, there are no equivalent aliases for the submit pseudo-headers. I have attached a patch which hopefully fixes that.
Regards, James
>From 69f18ccc2ba287e2d9573cfbbf0bfbb2447deeb1 Mon Sep 17 00:00:00 2001 From: James Clarke <jrt...@debian.org> Date: Wed, 26 Apr 2017 11:53:39 +0100 Subject: [PATCH] Accept singular Tag: and Usertag: pseudo-headers like control does for its commands --- scripts/process | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/process b/scripts/process index 716e0a5..607fd2d 100755 --- a/scripts/process +++ b/scripts/process @@ -648,6 +648,8 @@ if ($ref<0) { # new bug report $data->{keywords}= $pheader{'keywords'}; } elsif (defined($pheader{'tags'})) { $data->{keywords}= $pheader{'tags'}; + } elsif (defined($pheader{'tag'})) { + $data->{keywords}= $pheader{'tag'}; } if (length($data->{keywords})) { my @kws; @@ -685,7 +687,8 @@ if ($ref<0) { # new bug report $data->{msgid} = $header{'message-id'}; writebug($ref, $data); # Deal with usertags - if (exists $pheader{usertags}) { + my $usertags = $pheader{usertags} || $pheader{usertag}; + if (defined($usertags)) { my $user = $replyto; $user = $pheader{user} if exists $pheader{user}; $user =~ s/,.*//; @@ -693,10 +696,10 @@ if ($ref<0) { # new bug report $user =~ s/[(].*[)]//; $user =~ s/^\s*(\S+)\s+.*$/$1/; if ($user ne '' and Debbugs::User::is_valid_user($user)) { - $pheader{usertags} =~ s/(?:^\s+|\s+$)//g; + $usertags =~ s/(?:^\s+|\s+$)//g; my %user_tags; read_usertags(\%user_tags,$user); - for my $tag (split /[,\s]+/, $pheader{usertags}) { + for my $tag (split /[,\s]+/, $usertags) { if ($tag =~ /^[a-zA-Z0-9.+\@-]+/) { my %bugs_with_tag; @bugs_with_tag{@{$user_tags{$tag}||[]}} = (1) x @{$user_tags{$tag}||[]}; -- 2.12.2