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
a0d0ee27
Commit
a0d0ee27
authored
Feb 26, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 36257 : Have the QA Contact field appear in New Bug submission form
Patch by Shane H. W. Travis <travis@sedsystems.ca> r=LpSolit a=justdave
parent
5d8f3d8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
19 deletions
+74
-19
enter_bug.cgi
enter_bug.cgi
+17
-9
post_bug.cgi
post_bug.cgi
+11
-3
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+46
-7
No files found.
enter_bug.cgi
View file @
a0d0ee27
...
...
@@ -310,19 +310,24 @@ elsif (1 == @{$::components{$product}}) {
}
my
@components
;
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
,
$login
,
$realname
)
=
FetchSQLData
();
my
$dbh
=
Bugzilla
->
dbh
;
my
$sth
=
$dbh
->
prepare
(
q{SELECT name, description, p1.login_name, p2.login_name
FROM components
LEFT JOIN profiles p1 ON components.initialowner = p1.userid
LEFT JOIN profiles p2 ON components.initialqacontact = p2.userid
WHERE product_id = ?
ORDER BY name}
);
$sth
->
execute
(
$product_id
);
while
(
my
(
$name
,
$description
,
$owner
,
$qacontact
)
=
$sth
->
fetchrow_array
())
{
push
@components
,
{
name
=>
$name
,
description
=>
$description
,
default_login
=>
$login
,
default_realname
=>
$realname
,
initialowner
=>
$owner
,
initialqacontact
=>
$qacontact
||
''
,
};
}
...
...
@@ -342,6 +347,9 @@ $vars->{'assigned_to'} = formvalue('assigned_to');
$vars
->
{
'assigned_to_disabled'
}
=
!
UserInGroup
(
'editbugs'
);
$vars
->
{
'cc_disabled'
}
=
0
;
$vars
->
{
'qa_contact'
}
=
formvalue
(
'qa_contact'
);
$vars
->
{
'qa_contact_disabled'
}
=
!
UserInGroup
(
'editbugs'
);
$vars
->
{
'cloned_bug_id'
}
=
$cloned_bug_id
;
if
(
$cloned_bug_id
)
{
...
...
post_bug.cgi
View file @
a0d0ee27
...
...
@@ -63,6 +63,7 @@ my $dbh = Bugzilla->dbh;
&
Bugzilla::User::
match_field
({
'cc'
=>
{
'type'
=>
'multi'
},
'assigned_to'
=>
{
'type'
=>
'single'
},
'qa_contact'
=>
{
'type'
=>
'single'
},
});
# The format of the initial comment can be structured by adding fields to the
...
...
@@ -142,10 +143,17 @@ my @bug_fields = ("version", "rep_platform",
"bug_status"
,
"bug_file_loc"
,
"short_desc"
,
"target_milestone"
,
"status_whiteboard"
);
# Retrieve the default QA contact if the field is empty
if
(
Param
(
"useqacontact"
))
{
SendSQL
(
"SELECT initialqacontact FROM components "
.
"WHERE id = $component_id"
);
my
$qa_contact
=
FetchOneColumn
();
my
$qa_contact
;
if
(
!
UserInGroup
(
"editbugs"
)
||
trim
(
$::FORM
{
'qa_contact'
})
eq
""
)
{
SendSQL
(
"SELECT initialqacontact FROM components "
.
"WHERE id = $component_id"
);
$qa_contact
=
FetchOneColumn
();
}
else
{
$qa_contact
=
DBNameToIdAndCheck
(
trim
(
$::FORM
{
'qa_contact'
}));
}
if
(
defined
$qa_contact
&&
$qa_contact
!=
0
)
{
$::FORM
{
'qa_contact'
}
=
$qa_contact
;
push
(
@bug_fields
,
"qa_contact"
);
...
...
template/en/default/bug/create/create.html.tmpl
View file @
a0d0ee27
...
...
@@ -34,20 +34,34 @@
<script type="text/javascript">
<!--
var default_owners = new Array([% component_.size %]);
var initialowners = new Array([% component_.size %]);
var last_initialowner;
var components = new Array([% component_.size %]);
[% IF Param("useqacontact") %]
var initialqacontacts = new Array([% component_.size %]);
var last_initialqacontact;
[% END %]
[% count = 0 %]
[%- FOREACH c = component_ %]
components[[% count %]] = "[% c.name FILTER js %]";
default_owners[[% count %]] = "[% c.default_login FILTER js %]";
initialowners[[% count %]] = "[% c.initialowner FILTER js %]";
[% IF Param("useqacontact") %]
initialqacontacts[[% count %]] = "[% c.initialqacontact FILTER js %]";
[% END %]
[% 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.
// with the default component owner, and the the "QA Contact:" field
// with the default QA Contact.
var form = document.Create;
var assigned_to = form.assigned_to.value;
[% IF Param("useqacontact") %]
var qa_contact = form.qa_contact.value;
[% END %]
var index = -1;
if (form.component.type == 'select-one') {
index = form.component.selectedIndex;
...
...
@@ -56,14 +70,23 @@ function set_assign_to() {
index = 0;
}
if (index != -1) {
var owner =
default_
owners[index];
var owner =
initial
owners[index];
var component = components[index];
if (assigned_to == last_
default_
owner
if (assigned_to == last_
initial
owner
|| assigned_to == owner
|| assigned_to == '') {
form.assigned_to.value = owner;
last_
default_
owner = owner;
last_
initial
owner = owner;
}
[% IF Param("useqacontact") %]
var contact = initialqacontacts[index];
if (qa_contact == last_initialqacontact
|| qa_contact == contact
|| qa_contact == '') {
form.qa_contact.value = contact;
last_initialqacontact = contact;
}
[% END %]
}
}
-->
...
...
@@ -203,6 +226,22 @@ function set_assign_to() {
</td>
</tr>
[% IF Param("useqacontact") %]
<tr>
<td align="right"><strong>QA Contact:</strong></td>
<td colspan="3">
[% INCLUDE global/userselect.html.tmpl
name => "qa_contact"
value => qa_contact
disabled => qa_contact_disabled
size => 32
emptyok => 1
%]
<noscript>(Leave blank to assign to default qa contact)</noscript>
</td>
</tr>
[% END %]
<tr>
<td align="right"><strong>Cc:</strong></td>
<td colspan="3">
...
...
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