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
d56611c2
Commit
d56611c2
authored
Apr 27, 2003
by
bbaetz%acm.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Byg 202463 - prefill 'assign to' with default component owner
patch by slamm@yahoo-inc.com (Steve Lamm) r=bbaetz, a=justdave
parent
b47c2c65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
14 deletions
+59
-14
enter_bug.cgi
enter_bug.cgi
+12
-10
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+47
-4
No files found.
enter_bug.cgi
View file @
d56611c2
...
...
@@ -242,17 +242,19 @@ elsif (1 == @{$::components{$product}}) {
}
my
@components
;
SendSQL
(
"SELECT name, description FROM components "
.
"WHERE product_id = $product_id ORDER BY name"
);
SendSQL
(
"SELECT name, description, login_name, realname
FROM components, profiles
WHERE product_id = $product_id
AND initialowner=userid
ORDER BY name"
);
while
(
MoreSQLData
())
{
my
(
$name
,
$description
)
=
FetchSQLData
();
my
%
component
;
$component
{
'name'
}
=
$name
;
$component
{
'description'
}
=
$description
;
push
@components
,
\%
component
;
my
(
$name
,
$description
,
$login
,
$realname
)
=
FetchSQLData
();
push
@components
,
{
name
=>
$name
,
description
=>
$description
,
default_login
=>
$login
,
default_realname
=>
$realname
,
};
}
my
%
default
;
...
...
template/en/default/bug/create/create.html.tmpl
View file @
d56611c2
...
...
@@ -23,9 +23,52 @@
[% PROCESS global/header.html.tmpl
title = "Enter Bug"
h2 = "This page lets you enter a new bug into Bugzilla."
onload="set_assign_to();"
%]
<form method="post" action="post_bug.cgi">
<script type="text/javascript" language="JavaScript">
<!--
var default_owners = new Array([% component_.size %]);
var components = new Array([% component_.size %]);
[% count = 0 %]
[%- FOREACH c = component_ %]
components[[% count %]] = "[% c.name FILTER html %]";
default_owners[[% count %]] = "[% c.default_login FILTER html %]";
[% count = count + 1 %]
[%- END %]
var last_default_owner;
function set_assign_to() {
// Based on the selected component, fill the "Assign To:" field
// with the default component owner.
var form = document.Create;
assigned_to = form.assigned_to.value
var index = -1;
if (form.component.type == 'select-one') {
index = form.component.selectedIndex;
} else if (form.component.type == 'hidden') {
// Assume there is only one component in the list
index = 0;
}
if (index != -1) {
var owner = default_owners[index];
var component = components[index];
if (assigned_to == last_default_owner
|| assigned_to == owner
|| assigned_to == ''
|| confirm('Would you like to change\n\n' +
' "Assign To: ' + assigned_to + '"\n\n' +
'to the default "' + component + '" owner:\n\n' +
' ' + owner + "?")) {
form.assigned_to.value = owner;
last_default_owner = owner;
}
}
}
-->
</script>
<form name="Create" id="Create" method="post" action="post_bug.cgi">
<input type="hidden" name="product" value="[% product FILTER html %]">
<table cellspacing="2" cellpadding="0" border="0">
...
...
@@ -78,7 +121,7 @@
</strong>
</td>
<td>
<select name="component" size="5">
<select name="component"
onchange="set_assign_to();"
size="5">
[%- FOREACH c = component_ %]
<option value="[% c.name FILTER html %]"
[% " selected=\"selected\"" IF c.name == default.component_ %]>
...
...
@@ -134,13 +177,13 @@
<tr>
<td align="right">
<strong>
<a href="bug_status.html#assigned_to">Assign
ed
To</a>:
<a href="bug_status.html#assigned_to">Assign To</a>:
</strong>
</td>
<td colspan="3">
<input name="assigned_to" size="32"
value="[% assigned_to FILTER html %]">
(Leave blank to assign to default component owner)
<noscript>(Leave blank to assign to default component owner)</noscript>
</td>
</tr>
...
...
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