]> git.donarmstrong.com Git - debbugs.git/commitdiff
Control: Add missing full stop at the end of "Changed" messages
authorFrank Lichtenheld <frank@lichtenheld.de>
Sun, 27 Mar 2016 15:01:46 +0000 (17:01 +0200)
committerDon Armstrong <don@donarmstrong.com>
Tue, 29 Mar 2016 00:06:47 +0000 (17:06 -0700)
This leads to broken links for at least the forwarded-to case.
(Closes: #782740)

Signed-off-by: Don Armstrong <don@donarmstrong.com>
Debbugs/Control.pm
t/07_bugreport.t

index 0878bda522f078bb29b1771f2843da14b53e17dc..49b902e62b00e6358550df57fd0efbb8ca0b98fc 100644 (file)
@@ -1116,7 +1116,7 @@ sub set_submitter {
        }
        else {
            if (defined $data->{originator} and length($data->{originator})) {
-               $action= "Changed $config{bug} submitter to '$param{submitter}' from '$data->{originator}'";
+               $action= "Changed $config{bug} submitter to '$param{submitter}' from '$data->{originator}'.";
                $notify_old_submitter = 1;
            }
            else {
@@ -1231,7 +1231,7 @@ sub set_forwarded {
                $action= "Unset $config{bug} forwarded-to-address";
            }
            elsif (defined $data->{forwarded} and length($data->{forwarded})) {
-               $action= "Changed $config{bug} forwarded-to-address to '$param{forwarded}' from '$data->{forwarded}'";
+               $action= "Changed $config{bug} forwarded-to-address to '$param{forwarded}' from '$data->{forwarded}'.";
            }
            else {
                $action= "Set $config{bug} forwarded-to-address to '$param{forwarded}'.";
@@ -1316,7 +1316,7 @@ sub set_title {
        }
        else {
            if (defined $data->{subject} and length($data->{subject})) {
-               $action= "Changed $config{bug} title to '$param{title}' from '$data->{subject}'";
+               $action= "Changed $config{bug} title to '$param{title}' from '$data->{subject}'.";
            } else {
                $action= "Set $config{bug} title to '$param{title}'.";
            }
index 80dfc9220f85150007388a7340ce0b575d043eee..78d89b1d0e1c060442b11793eaa831589476e40a 100644 (file)
@@ -1,7 +1,7 @@
 # -*- mode: cperl;-*-
 
 
-use Test::More tests => 14;
+use Test::More tests => 16;
 
 use warnings;
 use strict;
@@ -101,6 +101,10 @@ my @control_commands =
                             value   => 'https://foo.invalid/bugs?id=1',
                             regex   => qr{<strong>Set bug forwarded-to-address to &#39;<a href="https://foo\.invalid/bugs\?id=1">https://foo\.invalid/bugs\?id=1</a>&#39;\.},
                            },
+      forwarded_foo_2    => {command => 'forwarded',
+                            value   => 'https://foo.example/bugs?id=1',
+                            regex   => qr{<strong>Changed bug forwarded-to-address to &#39;<a href="https://foo\.example/bugs\?id=1">https://foo\.example/bugs\?id=1</a>&#39; from &#39;<a href="https://foo\.invalid/bugs\?id=1">https://foo\.invalid/bugs\?id=1</a>&#39;\.},
+                           },
       clone        => {command => 'clone',
                       value   => '-1',
                       regex   => qr{<strong>Bug <a href="bugreport.cgi\?bug=1">1</a> cloned as bug <a href="bugreport.cgi\?bug=2">2</a>},