Bug 890165 - Buglist for single component should offer "File a new bug in the XYZ component" instead of "File a new bug in the XYZ product"
r=glob, a=glob git-svn-id: svn://10.0.0.236/trunk@265100 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
18787e4f04
commit
f9f7952fc6
@ -1 +1 @@
|
|||||||
8803
|
8804
|
||||||
@ -766,6 +766,7 @@ my $time_info = { 'estimated_time' => 0,
|
|||||||
|
|
||||||
my $bugowners = {};
|
my $bugowners = {};
|
||||||
my $bugproducts = {};
|
my $bugproducts = {};
|
||||||
|
my $bugcomponents = {};
|
||||||
my $bugstatuses = {};
|
my $bugstatuses = {};
|
||||||
my @bugidlist;
|
my @bugidlist;
|
||||||
|
|
||||||
@ -798,6 +799,7 @@ foreach my $row (@$data) {
|
|||||||
# Record the assignee, product, and status in the big hashes of those things.
|
# Record the assignee, product, and status in the big hashes of those things.
|
||||||
$bugowners->{$bug->{'assigned_to'}} = 1 if $bug->{'assigned_to'};
|
$bugowners->{$bug->{'assigned_to'}} = 1 if $bug->{'assigned_to'};
|
||||||
$bugproducts->{$bug->{'product'}} = 1 if $bug->{'product'};
|
$bugproducts->{$bug->{'product'}} = 1 if $bug->{'product'};
|
||||||
|
$bugcomponents->{$bug->{'component'}} = 1 if $bug->{'component'};
|
||||||
$bugstatuses->{$bug->{'bug_status'}} = 1 if $bug->{'bug_status'};
|
$bugstatuses->{$bug->{'bug_status'}} = 1 if $bug->{'bug_status'};
|
||||||
|
|
||||||
$bug->{'secure_mode'} = undef;
|
$bug->{'secure_mode'} = undef;
|
||||||
@ -930,6 +932,20 @@ if ($one_product && $user->can_enter_product($one_product)) {
|
|||||||
$vars->{'one_product'} = $one_product;
|
$vars->{'one_product'} = $one_product;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# See if there's only one component in all the results (or only one component
|
||||||
|
# that we searched for), which allows us to provide more helpful links.
|
||||||
|
my @components = keys %$bugcomponents;
|
||||||
|
my $one_component;
|
||||||
|
if (scalar(@components) == 1) {
|
||||||
|
$vars->{one_component} = $components[0];
|
||||||
|
}
|
||||||
|
# This is used in the "Zarroo Boogs" case.
|
||||||
|
elsif (my @component_input = $cgi->param('component')) {
|
||||||
|
if (scalar(@component_input) == 1 and $component_input[0] ne '') {
|
||||||
|
$vars->{one_component}= $cgi->param('component');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# The following variables are used when the user is making changes to multiple bugs.
|
# The following variables are used when the user is making changes to multiple bugs.
|
||||||
if ($dotweak && scalar @bugs) {
|
if ($dotweak && scalar @bugs) {
|
||||||
if (!$vars->{'caneditbugs'}) {
|
if (!$vars->{'caneditbugs'}) {
|
||||||
|
|||||||
@ -313,10 +313,16 @@
|
|||||||
[% BLOCK enter_bug_link %]
|
[% BLOCK enter_bug_link %]
|
||||||
<a href="enter_bug.cgi
|
<a href="enter_bug.cgi
|
||||||
[%- IF one_product.defined %]?product=
|
[%- IF one_product.defined %]?product=
|
||||||
[%- one_product.name FILTER uri %][% END %]">File
|
[%- one_product.name FILTER uri %]
|
||||||
|
[%- IF one_component.defined %]&component=
|
||||||
|
[%- one_component FILTER uri %][% END %][% END %]">File
|
||||||
a new [% terms.bug %]
|
a new [% terms.bug %]
|
||||||
[% IF one_product.defined %]
|
[% IF one_product.defined %]
|
||||||
in the "[% one_product.name FILTER html %]" product
|
in the
|
||||||
|
[% IF one_component.defined %]
|
||||||
|
"[% one_component FILTER html %]" component of the
|
||||||
|
[% END %]
|
||||||
|
"[% one_product.name FILTER html %]" product
|
||||||
[% END %]</a>
|
[% END %]</a>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user