Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
6d02055d
Commit
6d02055d
authored
Dec 26, 2011
by
Matt Selsky
Committed by
Frédéric Buclin
Dec 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 399080: Remove the 'usebugaliases' parameter (turned on permanently)
r/a=LpSolit
parent
429534ee
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
18 additions
and
73 deletions
+18
-73
Bug.pm
Bugzilla/Bug.pm
+4
-7
BugFields.pm
Bugzilla/Config/BugFields.pm
+0
-6
Bug.pm
Bugzilla/WebService/Bug.pm
+5
-33
colchange.cgi
colchange.cgi
+0
-1
process_bug.cgi
process_bug.cgi
+1
-1
bugfields.html.tmpl
template/en/default/admin/params/bugfields.html.tmpl
+0
-3
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+2
-5
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+0
-4
show-multiple.html.tmpl
template/en/default/bug/show-multiple.html.tmpl
+2
-2
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+1
-3
fields.html.tmpl
template/en/default/pages/fields.html.tmpl
+0
-1
quicksearch.html.tmpl
template/en/default/pages/quicksearch.html.tmpl
+3
-6
Search.pm
xt/lib/Bugzilla/Test/Search.pm
+0
-1
No files found.
Bugzilla/Bug.pm
View file @
6d02055d
...
@@ -337,12 +337,11 @@ sub new {
...
@@ -337,12 +337,11 @@ sub new {
# If we get something that looks like a word (not a number),
# If we get something that looks like a word (not a number),
# make it the "name" param.
# make it the "name" param.
if
(
!
defined
$param
||
(
!
ref
(
$param
)
&&
$param
!~
/^\d+$/
))
{
if
(
!
defined
$param
||
(
!
ref
(
$param
)
&&
$param
!~
/^\d+$/
))
{
# But only if aliases are enabled.
if
(
$param
)
{
if
(
Bugzilla
->
params
->
{
'usebugaliases'
}
&&
$param
)
{
$param
=
{
name
=>
$param
};
$param
=
{
name
=>
$param
};
}
}
else
{
else
{
#
Aliases are off, and w
e got something that's not a number.
#
W
e got something that's not a number.
my
$error_self
=
{};
my
$error_self
=
{};
bless
$error_self
,
$class
;
bless
$error_self
,
$class
;
$error_self
->
{
'bug_id'
}
=
$param
;
$error_self
->
{
'bug_id'
}
=
$param
;
...
@@ -611,8 +610,7 @@ sub possible_duplicates {
...
@@ -611,8 +610,7 @@ sub possible_duplicates {
# C<rep_platform> - B<Required> The platform the bug was found against.
# C<rep_platform> - B<Required> The platform the bug was found against.
# C<version> - B<Required> The version of the product the bug was found in.
# C<version> - B<Required> The version of the product the bug was found in.
#
#
# C<alias> - An alias for this bug. Will be ignored if C<usebugaliases>
# C<alias> - An alias for this bug.
# is off.
# C<target_milestone> - When this bug is expected to be fixed.
# C<target_milestone> - When this bug is expected to be fixed.
# C<status_whiteboard> - A string.
# C<status_whiteboard> - A string.
# C<bug_status> - The initial status of the bug, a string.
# C<bug_status> - The initial status of the bug, a string.
...
@@ -1202,7 +1200,7 @@ sub _send_bugmail {
...
@@ -1202,7 +1200,7 @@ sub _send_bugmail {
sub
_check_alias
{
sub
_check_alias
{
my
(
$invocant
,
$alias
)
=
@_
;
my
(
$invocant
,
$alias
)
=
@_
;
$alias
=
trim
(
$alias
);
$alias
=
trim
(
$alias
);
return
undef
if
(
!
Bugzilla
->
params
->
{
'usebugaliases'
}
||
!
$alias
);
return
undef
if
(
!
$alias
);
# Make sure the alias isn't too long.
# Make sure the alias isn't too long.
if
(
length
(
$alias
)
>
20
)
{
if
(
length
(
$alias
)
>
20
)
{
...
@@ -3696,7 +3694,6 @@ sub choices {
...
@@ -3696,7 +3694,6 @@ sub choices {
# the ID of the bug if it exists or the undefined value if it doesn't.
# the ID of the bug if it exists or the undefined value if it doesn't.
sub
bug_alias_to_id
{
sub
bug_alias_to_id
{
my
(
$alias
)
=
@_
;
my
(
$alias
)
=
@_
;
return
undef
unless
Bugzilla
->
params
->
{
"usebugaliases"
};
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
trick_taint
(
$alias
);
trick_taint
(
$alias
);
return
$dbh
->
selectrow_array
(
return
$dbh
->
selectrow_array
(
...
...
Bugzilla/Config/BugFields.pm
View file @
6d02055d
...
@@ -72,12 +72,6 @@ sub get_param_list {
...
@@ -72,12 +72,6 @@ sub get_param_list {
},
},
{
{
name
=>
'usebugaliases'
,
type
=>
'b'
,
default
=>
0
},
{
name
=>
'use_see_also'
,
name
=>
'use_see_also'
,
type
=>
'b'
,
type
=>
'b'
,
default
=>
1
default
=>
1
...
...
Bugzilla/WebService/Bug.pm
View file @
6d02055d
...
@@ -383,14 +383,7 @@ sub history {
...
@@ -383,14 +383,7 @@ sub history {
# alias is returned in case users passes a mixture of ids and aliases
# alias is returned in case users passes a mixture of ids and aliases
# then they get to know which bug activity relates to which value
# then they get to know which bug activity relates to which value
# they passed
# they passed
if
(
Bugzilla
->
params
->
{
'usebugaliases'
})
{
$item
{
alias
}
=
$self
->
type
(
'string'
,
$bug
->
alias
);
$item
{
alias
}
=
$self
->
type
(
'string'
,
$bug
->
alias
);
}
else
{
# For API reasons, we always want the value to appear, we just
# don't want it to have a value if aliases are turned off.
$item
{
alias
}
=
undef
;
}
push
(
@return
,
\%
item
);
push
(
@return
,
\%
item
);
}
}
...
@@ -527,14 +520,7 @@ sub update {
...
@@ -527,14 +520,7 @@ sub update {
# alias is returned in case users pass a mixture of ids and aliases,
# alias is returned in case users pass a mixture of ids and aliases,
# so that they can know which set of changes relates to which value
# so that they can know which set of changes relates to which value
# they passed.
# they passed.
if
(
Bugzilla
->
params
->
{
'usebugaliases'
})
{
$hash
{
alias
}
=
$self
->
type
(
'string'
,
$bug
->
alias
);
$hash
{
alias
}
=
$self
->
type
(
'string'
,
$bug
->
alias
);
}
else
{
# For API reasons, we always want the alias field to appear, we
# just don't want it to have a value if aliases are turned off.
$hash
{
alias
}
=
$self
->
type
(
'string'
,
''
);
}
my
%
changes
=
%
{
$all_changes
{
$bug
->
id
}
};
my
%
changes
=
%
{
$all_changes
{
$bug
->
id
}
};
foreach
my
$field
(
keys
%
changes
)
{
foreach
my
$field
(
keys
%
changes
)
{
...
@@ -1573,10 +1559,6 @@ from the Bugzilla database to fetch. If it contains any non-numeric
...
@@ -1573,10 +1559,6 @@ from the Bugzilla database to fetch. If it contains any non-numeric
characters, it is considered to be a bug alias instead, and the bug with
characters, it is considered to be a bug alias instead, and the bug with
that alias will be loaded.
that alias will be loaded.
Note that it's possible for aliases to be disabled in Bugzilla, in which
case you will be told that you have specified an invalid bug_id if you
try to specify an alias. (It will be error 100.)
=item C<permissive> B<EXPERIMENTAL>
=item C<permissive> B<EXPERIMENTAL>
C<boolean> Normally, if you request any inaccessible or invalid bug ids,
C<boolean> Normally, if you request any inaccessible or invalid bug ids,
...
@@ -1825,8 +1807,7 @@ invalid bug error.
...
@@ -1825,8 +1807,7 @@ invalid bug error.
=item 100 (Invalid Bug Alias)
=item 100 (Invalid Bug Alias)
If you specified an alias and either: (a) the Bugzilla you're querying
If you specified an alias and there is no bug with that alias.
doesn't support aliases or (b) there is no bug with that alias.
=item 101 (Invalid Bug ID)
=item 101 (Invalid Bug ID)
...
@@ -1913,10 +1894,6 @@ from the Bugzilla database to fetch. If it contains any non-numeric
...
@@ -1913,10 +1894,6 @@ from the Bugzilla database to fetch. If it contains any non-numeric
characters, it is considered to be a bug alias instead, and the data bug
characters, it is considered to be a bug alias instead, and the data bug
with that alias will be loaded.
with that alias will be loaded.
Note that it's possible for aliases to be disabled in Bugzilla, in which
case you will be told that you have specified an invalid bug_id if you
try to specify an alias. (It will be error 100.)
=back
=back
=item B<Returns>
=item B<Returns>
...
@@ -1932,8 +1909,7 @@ C<int> The numeric id of the bug.
...
@@ -1932,8 +1909,7 @@ C<int> The numeric id of the bug.
=item alias
=item alias
C<string> The alias of this bug. If there is no alias or aliases are
C<string> The alias of this bug. If there is no alias, this will be undef.
disabled in this Bugzilla, this will be undef.
=item history
=item history
...
@@ -2035,9 +2011,7 @@ most-common database to use with Bugzilla, and MySQL is not case sensitive).
...
@@ -2035,9 +2011,7 @@ most-common database to use with Bugzilla, and MySQL is not case sensitive).
=item C<alias>
=item C<alias>
C<string> The unique alias for this bug. Note that you can search
C<string> The unique alias for this bug.
by alias even if the alias field is disabled in this Bugzilla, but
it's likely that there won't be any aliases set on bugs, in that case.
=item C<assigned_to>
=item C<assigned_to>
...
@@ -2534,8 +2508,7 @@ C<99999.99>.
...
@@ -2534,8 +2508,7 @@ C<99999.99>.
=item 100 (Invalid Bug Alias)
=item 100 (Invalid Bug Alias)
If you specified an alias and either: (a) the Bugzilla you're querying
If you specified an alias and there is no bug with that alias.
doesn't support aliases or (b) there is no bug with that alias.
=item 101 (Invalid Bug ID)
=item 101 (Invalid Bug ID)
...
@@ -2892,8 +2865,7 @@ C<int> The id of the bug that was updated.
...
@@ -2892,8 +2865,7 @@ C<int> The id of the bug that was updated.
=item C<alias>
=item C<alias>
C<string> The alias of the bug that was updated, if aliases are enabled and
C<string> The alias of the bug that was updated, if this bug has an alias.
this bug has an alias.
=item C<last_change_time>
=item C<last_change_time>
...
...
colchange.cgi
View file @
6d02055d
...
@@ -40,7 +40,6 @@ use Storable qw(dclone);
...
@@ -40,7 +40,6 @@ use Storable qw(dclone);
# Maps parameters that control columns to the names of columns.
# Maps parameters that control columns to the names of columns.
use
constant
COLUMN_PARAMS
=>
{
use
constant
COLUMN_PARAMS
=>
{
'useclassification'
=>
[
'classification'
],
'useclassification'
=>
[
'classification'
],
'usebugaliases'
=>
[
'alias'
],
'usetargetmilestone'
=>
[
'target_milestone'
],
'usetargetmilestone'
=>
[
'target_milestone'
],
'useqacontact'
=>
[
'qa_contact'
,
'qa_contact_realname'
],
'useqacontact'
=>
[
'qa_contact'
,
'qa_contact_realname'
],
'usestatuswhiteboard'
=>
[
'status_whiteboard'
],
'usestatuswhiteboard'
=>
[
'status_whiteboard'
],
...
...
process_bug.cgi
View file @
6d02055d
...
@@ -306,7 +306,7 @@ if (defined $cgi->param('newcc')
...
@@ -306,7 +306,7 @@ if (defined $cgi->param('newcc')
if
(
defined
$cgi
->
param
(
'id'
))
{
if
(
defined
$cgi
->
param
(
'id'
))
{
# Since aliases are unique (like bug numbers), they can only be changed
# Since aliases are unique (like bug numbers), they can only be changed
# for one bug at a time.
# for one bug at a time.
if
(
Bugzilla
->
params
->
{
"usebugaliases"
}
&&
defined
$cgi
->
param
(
'alias'
))
{
if
(
defined
$cgi
->
param
(
'alias'
))
{
$set_all_fields
{
alias
}
=
$cgi
->
param
(
'alias'
);
$set_all_fields
{
alias
}
=
$cgi
->
param
(
'alias'
);
}
}
}
}
...
...
template/en/default/admin/params/bugfields.html.tmpl
View file @
6d02055d
...
@@ -34,9 +34,6 @@
...
@@ -34,9 +34,6 @@
usestatuswhiteboard => "Do you wish to use the Status Whiteboard field?",
usestatuswhiteboard => "Do you wish to use the Status Whiteboard field?",
usebugaliases => "Do you wish to use $terms.bug aliases, which allow you to assign " _
"$terms.bugs an easy-to-remember name by which you can refer to them?",
use_see_also =>
use_see_also =>
"Do you wish to use the See Also field? It allows you refer to"
"Do you wish to use the See Also field? It allows you refer to"
_ " $terms.bugs in other installations. Even if you disable this field,"
_ " $terms.bugs in other installations. Even if you disable this field,"
...
...
template/en/default/bug/create/create.html.tmpl
View file @
6d02055d
...
@@ -352,9 +352,8 @@ TUI_hide_default('attachment_text_field');
...
@@ -352,9 +352,8 @@ TUI_hide_default('attachment_text_field');
<td> </td>
<td> </td>
[%# Calculate the number of rows we can use for flags %]
[%# Calculate the number of rows we can use for flags %]
[% num_rows = 6 + (Param("useqacontact") ? 1 : 0) +
[% num_rows = 7 + (Param("useqacontact") ? 1 : 0) +
(user.is_timetracker ? 3 : 0) +
(user.is_timetracker ? 3 : 0)
(Param("usebugaliases") ? 1 : 0)
%]
%]
<td rowspan="[% num_rows FILTER html %]">
<td rowspan="[% num_rows FILTER html %]">
...
@@ -464,7 +463,6 @@ TUI_hide_default('attachment_text_field');
...
@@ -464,7 +463,6 @@ TUI_hide_default('attachment_text_field');
</tr>
</tr>
[% END %]
[% END %]
[% IF Param("usebugaliases") %]
<tr>
<tr>
[% INCLUDE "bug/field-label.html.tmpl"
[% INCLUDE "bug/field-label.html.tmpl"
field = bug_fields.alias editable = 1
field = bug_fields.alias editable = 1
...
@@ -473,7 +471,6 @@ TUI_hide_default('attachment_text_field');
...
@@ -473,7 +471,6 @@ TUI_hide_default('attachment_text_field');
<input name="alias" size="20" value="[% alias FILTER html %]">
<input name="alias" size="20" value="[% alias FILTER html %]">
</td>
</td>
</tr>
</tr>
[% END %]
<tr>
<tr>
[% INCLUDE "bug/field-label.html.tmpl"
[% INCLUDE "bug/field-label.html.tmpl"
...
...
template/en/default/bug/edit.html.tmpl
View file @
6d02055d
...
@@ -186,11 +186,9 @@
...
@@ -186,11 +186,9 @@
<a href="show_bug.cgi?id=[% bug.bug_id %]">
<a href="show_bug.cgi?id=[% bug.bug_id %]">
[%-# %]<b>[% terms.Bug %] [% bug.bug_id FILTER html %]</b>
[%-# %]<b>[% terms.Bug %] [% bug.bug_id FILTER html %]</b>
[%-# %]</a> -<span id="summary_alias_container" class="bz_default_hidden">
[%-# %]</a> -<span id="summary_alias_container" class="bz_default_hidden">
[% IF Param("usebugaliases") %]
[% IF bug.alias != "" %]
[% IF bug.alias != "" %]
(<span id="alias_nonedit_display">[% bug.alias FILTER html %]</span>)
(<span id="alias_nonedit_display">[% bug.alias FILTER html %]</span>)
[% END %]
[% END %]
[% END %]
<span id="short_desc_nonedit_display">[% bug.short_desc FILTER quoteUrls(bug) %]</span>
<span id="short_desc_nonedit_display">[% bug.short_desc FILTER quoteUrls(bug) %]</span>
[% IF bug.check_can_change_field('short_desc', 0, 1) ||
[% IF bug.check_can_change_field('short_desc', 0, 1) ||
bug.check_can_change_field('alias', 0, 1) %]
bug.check_can_change_field('alias', 0, 1) %]
...
@@ -201,7 +199,6 @@
...
@@ -201,7 +199,6 @@
<div id="summary_alias_input">
<div id="summary_alias_input">
<table id="summary">
<table id="summary">
[% IF Param("usebugaliases") %]
<tr>
<tr>
[% IF bug.check_can_change_field('alias', 0, 1) %]
[% IF bug.check_can_change_field('alias', 0, 1) %]
<td>
<td>
...
@@ -224,7 +221,6 @@
...
@@ -224,7 +221,6 @@
&& bug.alias %]
&& bug.alias %]
</td>
</td>
</tr>
</tr>
[% END %]
[%# *** Summary *** %]
[%# *** Summary *** %]
<tr>
<tr>
<td>
<td>
...
...
template/en/default/bug/show-multiple.html.tmpl
View file @
6d02055d
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<h1>
<h1>
[% terms.Bug %]
[% terms.Bug %]
<a href="show_bug.cgi?id=[% bug.bug_id FILTER html %]">[% bug.bug_id FILTER html %]</a>
<a href="show_bug.cgi?id=[% bug.bug_id FILTER html %]">[% bug.bug_id FILTER html %]</a>
[% IF
Param("usebugaliases") AND
bug.alias AND NOT bug.error %]
[% IF bug.alias AND NOT bug.error %]
(<a href="show_bug.cgi?id=[% bug.alias FILTER uri %]">
(<a href="show_bug.cgi?id=[% bug.alias FILTER uri %]">
[% bug.alias FILTER html %]</a>)
[% bug.alias FILTER html %]</a>)
[% END %]
[% END %]
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<td class="error">
<td class="error">
[% IF bug.error == "InvalidBugId" %]
[% IF bug.error == "InvalidBugId" %]
'[%+ bug.bug_id FILTER html %]' is not a valid [% terms.bug %] number
'[%+ bug.bug_id FILTER html %]' is not a valid [% terms.bug %] number
[%- IF Param("usebugaliases") %] nor a known [% terms.bug %] alias[% END %]
.
nor a known [% terms.bug %] alias
.
[% ELSIF bug.error == "NotPermitted" %]
[% ELSIF bug.error == "NotPermitted" %]
You are not allowed to view this [% terms.bug %].
You are not allowed to view this [% terms.bug %].
[% ELSIF bug.error == "NotFound" %]
[% ELSIF bug.error == "NotFound" %]
...
...
template/en/default/global/user-error.html.tmpl
View file @
6d02055d
...
@@ -914,9 +914,7 @@
...
@@ -914,9 +914,7 @@
[% END %]
[% END %]
[% IF bug_id %]
[% IF bug_id %]
'[% bug_id FILTER html %]' is not a valid [% terms.bug %] number
'[% bug_id FILTER html %]' is not a valid [% terms.bug %] number
[% IF Param("usebugaliases") %]
nor an alias to [% terms.abug %].
nor an alias to [% terms.abug %]
[% END %].
[% ELSE %]
[% ELSE %]
[% IF field %]
[% IF field %]
The '[% field_descs.$field FILTER html %]' field
The '[% field_descs.$field FILTER html %]' field
...
...
template/en/default/pages/fields.html.tmpl
View file @
6d02055d
...
@@ -220,7 +220,6 @@
...
@@ -220,7 +220,6 @@
[% NEXT IF field == 'status_whiteboard' AND !Param('usestatuswhiteboard') %]
[% NEXT IF field == 'status_whiteboard' AND !Param('usestatuswhiteboard') %]
[% NEXT IF field == 'target_milestone' AND !Param('usetargetmilestone') %]
[% NEXT IF field == 'target_milestone' AND !Param('usetargetmilestone') %]
[% NEXT IF field == 'alias' AND !Param('usebugaliases') %]
[%# For now we don't have help for attachment fields and so on. %]
[%# For now we don't have help for attachment fields and so on. %]
[% NEXT IF field.match('\.') %]
[% NEXT IF field.match('\.') %]
...
...
template/en/default/pages/quicksearch.html.tmpl
View file @
6d02055d
...
@@ -46,17 +46,14 @@
...
@@ -46,17 +46,14 @@
[%+ field_descs.product FILTER html %],
[%+ field_descs.product FILTER html %],
[%+ field_descs.component FILTER html %],
[%+ field_descs.component FILTER html %],
[%+ IF use_keywords %][%+ field_descs.keywords FILTER html %],[% END %]
[%+ IF use_keywords %][%+ field_descs.keywords FILTER html %],[% END %]
[%+
IF Param('usebugaliases') %][% field_descs.alias FILTER html %],[% END %]
[%+
field_descs.alias FILTER html %],
[%+ field_descs.short_desc FILTER html %],
[%+ field_descs.short_desc FILTER html %],
[%+ IF Param('usestatuswhiteboard') %][% field_descs.status_whiteboard FILTER html %],[% END %]
[%+ IF Param('usestatuswhiteboard') %][% field_descs.status_whiteboard FILTER html %],[% END %]
and [% field_descs.longdesc FILTER html %] fields for your word or words.</li>
and [% field_descs.longdesc FILTER html %] fields for your word or words.</li>
<li>Typing just a <strong>number</strong> in the search box will take
<li>Typing just a <strong>number</strong> in the search box will take
you directly to the [% terms.bug %] with that ID.
you directly to the [% terms.bug %] with that ID. Also, just typing the
[% IF Param('usebugaliases') %]
<strong>alias</strong> of [% terms.abug %] will take you to that [% terms.bug %].
Also, just typing the <strong>alias</strong> of [% terms.abug %]
will take you to that [% terms.bug %].
[% END %]
</li>
</li>
<li>Adding more terms <strong>narrows down</strong> the search, it does not
<li>Adding more terms <strong>narrows down</strong> the search, it does not
...
...
xt/lib/Bugzilla/Test/Search.pm
View file @
6d02055d
...
@@ -887,7 +887,6 @@ sub run {
...
@@ -887,7 +887,6 @@ sub run {
my
$params
=
Bugzilla
->
params
;
my
$params
=
Bugzilla
->
params
;
local
$params
->
{
'useclassification'
}
=
1
;
local
$params
->
{
'useclassification'
}
=
1
;
local
$params
->
{
'useqacontact'
}
=
1
;
local
$params
->
{
'useqacontact'
}
=
1
;
local
$params
->
{
'usebugaliases'
}
=
1
;
local
$params
->
{
'usetargetmilestone'
}
=
1
;
local
$params
->
{
'usetargetmilestone'
}
=
1
;
local
$params
->
{
'mail_delivery_method'
}
=
'None'
;
local
$params
->
{
'mail_delivery_method'
}
=
'None'
;
local
$params
->
{
'timetrackinggroup'
}
=
$everybody
->
name
;
local
$params
->
{
'timetrackinggroup'
}
=
$everybody
->
name
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment