]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 331007 - alias_in_use doesn't acknowledge that you could remove the alias from...
authorSimon Green <mail@simon.green>
Sun, 30 Oct 2016 04:53:25 +0000 (14:53 +1000)
committerSimon Green <mail@simon.green>
Sun, 30 Oct 2016 04:53:25 +0000 (14:53 +1000)
Bugzilla/Bug.pm
template/en/default/global/user-error.html.tmpl

index a41e4f1aa8171966480056df1e772152bdf68f59..46b16ffd6c80be804dd91501995f18bf5a5138b9 100644 (file)
@@ -1445,7 +1445,7 @@ sub _check_alias {
             && (!ref $invocant || $other_bug->id != $invocant->id))
         {
             ThrowUserError("alias_in_use", { alias => $alias,
-                                             bug_id => $other_bug->id });
+                                             other_bug => $other_bug });
         }
     }
 
index d1724635a9f6bbe7919cca8ce6a8acb2f3f3fc5c..2bbc07bc90ed1e81b8474fe4dcea07db6c671537 100644 (file)
 
   [% ELSIF error == "alias_in_use" %]
     [% title = "Alias In Use" %]
-    [% IF user.can_see_bug(bug_id) %]
-      [% terms.Bug %] [%+ bug_id FILTER bug_link(bug_id) FILTER none %]
+    [% IF user.can_see_bug(other_bug.id) %]
+      [% terms.Bug %] [%+ other_bug.id FILTER bug_link(other_bug.bug_id) FILTER none %]
+      is currently using the alias <em>[% alias FILTER html %]</em>.
+      Please choose another alias[% IF other_bug.check_can_change_field('alias', 0, 1) %] or visit that [% terms.bug %] and change its alias[% END %].
     [% ELSE %]
-      Another [% terms.bug %]
+      The alias <em>[% alias FILTER html %]</em> is already used by another
+      [% terms.bug %] you are not allowed to see. Please choose another alias.
     [% END %]
-    has already taken the alias <em>[% alias FILTER html %]</em>.
-    Please choose another alias.
 
   [% ELSIF error == "alias_is_numeric" %]
     [% title = "Alias Is Numeric" %]