]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1071066 - For bugs with aliases, inline history displays the bug number rather...
authorKohei Yoshino <kohei.yoshino@gmail.com>
Wed, 3 Apr 2019 20:53:20 +0000 (16:53 -0400)
committerGitHub <noreply@github.com>
Wed, 3 Apr 2019 20:53:20 +0000 (16:53 -0400)
Bugzilla/Template.pm
extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
template/en/default/bug/activity/table.html.tmpl

index 4db8085bf73146895f801ae5323b66ed2d04b8a7..0ce6acf95047c125a215b2ae76c8daa60145d775 100644 (file)
@@ -771,11 +771,17 @@ sub create {
         1
       ],
 
-      bug_list_link => sub {
-        my ($buglist, $options) = @_;
-        return
-          join(", ", map(get_bug_link($_, $_, $options), split(/ *, */, $buglist)));
-      },
+      bug_list_link => [
+        sub {
+          my ($context, $options) = @_;
+          return sub {
+            my $buglist = shift;
+            return join(", ",
+              map { get_bug_link($_, $_, $options) } split(/\s*,\s*/, $buglist));
+          };
+        },
+        1
+      ],
 
       # In CSV, quotes are doubled, and any value containing a quote or a
       # comma is enclosed in quotes.
index fb2391c39e9b22c8a44036d2a1565bdbe91ae488..7d470e10728929081f3b811283107623315f6f23 100644 (file)
       CASE 'see_also';
         FOREACH see_also IN value;
           IF see_also.bug_id;
-            "$terms.bug $see_also.bug_id" FILTER bug_link(see_also.bug_id);
+            see_also.bug_id FILTER bug_link(see_also.bug_id, use_alias => 1);
           ELSE;
             %]
             <a href="[% see_also.url FILTER html %]" target="_blank" rel="noreferrer">[% see_also.url FILTER html %]</a>
           INCLUDE bug_modal/rel_time.html.tmpl ts=value;
 
         ELSIF change.buglist;
-          value FILTER bug_list_link;
+          value FILTER bug_list_link(use_alias => 1);
 
         ELSIF change.fieldname.match('^cf_(status|tracking)_') && value != '---';
           %]
index 97683590ba49008a7fc6ff26415af7371c0b98ab..55f7668892dfb9eea3185ae371ff77e279f01228 100644 (file)
                change.fieldname == 'dependson' ||
                change.fieldname == 'regresses' ||
                change.fieldname == 'regressed_by' %]
-        [% change_type FILTER bug_list_link FILTER none %]
+        [% change_type FILTER bug_list_link(use_alias => 1) FILTER none %]
+      [% ELSIF change.fieldname == 'see_also' %]
+        [% FOREACH url IN change_type.split(', ') %]
+          [% IF (matches = url.match("^${urlbase}show_bug\\.cgi\\?id=(\\d+)$")) %]
+            [% matches.0 FILTER bug_link(matches.0, use_alias => 1) FILTER none %]
+          [% ELSE %]
+            [% display_value(change.fieldname, url) FILTER html %]
+          [% END %]
+          [% ', ' UNLESS loop.last %]
+        [% END %]
       [% ELSIF change.fieldname == 'assigned_to' ||
                change.fieldname == 'reporter' ||
                change.fieldname == 'qa_contact' ||