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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
5f81c1d6
Commit
5f81c1d6
authored
Oct 10, 2005
by
bugreport%peshkin.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 311489 Bug entry makes user choose classification even if only one is enterable
Patch bu Joel Peshkin <bugreport@peshkin.net> r=kiko, a=justdave
parent
b26634d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
25 deletions
+39
-25
enter_bug.cgi
enter_bug.cgi
+39
-25
No files found.
enter_bug.cgi
View file @
5f81c1d6
...
...
@@ -74,32 +74,46 @@ if (!defined $product || $product eq "") {
GetVersionTable
();
Bugzilla
->
login
();
if
(
!
Param
(
'useclassification'
)
)
{
# just pick the default one
$cgi
->
param
(
-
name
=>
'classification'
,
-
value
=>
(
keys
%::
classdesc
)[
0
]);
}
if
(
!
$cgi
->
param
(
'classification'
))
{
my
$classifications
=
Bugzilla
->
user
->
get_selectable_classifications
();
if
(
scalar
(
@$classifications
)
==
0
)
{
ThrowUserError
(
"no_products"
);
}
elsif
(
scalar
(
@$classifications
)
>
1
)
{
$vars
->
{
'classifications'
}
=
$classifications
;
$vars
->
{
'target'
}
=
"enter_bug.cgi"
;
$vars
->
{
'format'
}
=
$cgi
->
param
(
'format'
);
if
(
!
Param
(
'useclassification'
)
)
{
# just pick the default one
$cgi
->
param
(
-
name
=>
'classification'
,
-
value
=>
(
keys
%::
classdesc
)[
0
]);
}
if
(
!
$cgi
->
param
(
'classification'
))
{
my
$classifications
=
Bugzilla
->
user
->
get_selectable_classifications
();
foreach
my
$classification
(
@$classifications
)
{
my
$found
=
0
;
foreach
my
$p
(
@enterable_products
)
{
if
(
CanEnterProduct
(
$p
)
&&
IsInClassification
(
$classification
->
{
name
},
$p
))
{
$found
=
1
;
}
}
if
(
$found
==
0
)
{
@$classifications
=
grep
(
$_
->
{
name
}
ne
$classification
->
{
name
},
@$classifications
);
}
}
if
(
scalar
(
@$classifications
)
==
0
)
{
ThrowUserError
(
"no_products"
);
}
elsif
(
scalar
(
@$classifications
)
>
1
)
{
$vars
->
{
'classifications'
}
=
$classifications
;
$vars
->
{
'target'
}
=
"enter_bug.cgi"
;
$vars
->
{
'format'
}
=
$cgi
->
param
(
'format'
);
$vars
->
{
'cloned_bug_id'
}
=
$cgi
->
param
(
'cloned_bug_id'
);
print
$cgi
->
header
();
$template
->
process
(
"global/choose-classification.html.tmpl"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
exit
;
}
$cgi
->
param
(
-
name
=>
'classification'
,
-
value
=>
@$classifications
[
0
]
->
name
);
}
$vars
->
{
'cloned_bug_id'
}
=
$cgi
->
param
(
'cloned_bug_id'
);
print
$cgi
->
header
();
$template
->
process
(
"global/choose-classification.html.tmpl"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
exit
;
}
$cgi
->
param
(
-
name
=>
'classification'
,
-
value
=>
@$classifications
[
0
]
->
name
);
}
my
%
products
;
foreach
my
$p
(
@enterable_products
)
{
...
...
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