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
c6433b10
Commit
c6433b10
authored
Sep 21, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 38922: Default (Initial) CC list for each component
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
parent
f90a0b77
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
210 additions
and
15 deletions
+210
-15
Bug.pm
Bugzilla/Bug.pm
+7
-2
Component.pm
Bugzilla/Component.pm
+23
-0
Schema.pm
Bugzilla/DB/Schema.pm
+13
-0
editcomponents.cgi
editcomponents.cgi
+71
-8
process_bug.cgi
process_bug.cgi
+13
-0
create.html.tmpl
template/en/default/admin/components/create.html.tmpl
+19
-0
edit.html.tmpl
template/en/default/admin/components/edit.html.tmpl
+19
-0
updated.html.tmpl
template/en/default/admin/components/updated.html.tmpl
+18
-2
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+25
-1
knob.html.tmpl
template/en/default/bug/knob.html.tmpl
+2
-2
No files found.
Bugzilla/Bug.pm
View file @
c6433b10
...
@@ -115,7 +115,6 @@ sub VALIDATORS {
...
@@ -115,7 +115,6 @@ sub VALIDATORS {
alias
=>
\&
_check_alias
,
alias
=>
\&
_check_alias
,
bug_file_loc
=>
\&
_check_bug_file_loc
,
bug_file_loc
=>
\&
_check_bug_file_loc
,
bug_severity
=>
\&
_check_bug_severity
,
bug_severity
=>
\&
_check_bug_severity
,
cc
=>
\&
_check_cc
,
comment
=>
\&
_check_comment
,
comment
=>
\&
_check_comment
,
commentprivacy
=>
\&
_check_commentprivacy
,
commentprivacy
=>
\&
_check_commentprivacy
,
deadline
=>
\&
_check_deadline
,
deadline
=>
\&
_check_deadline
,
...
@@ -353,6 +352,8 @@ sub run_create_validators {
...
@@ -353,6 +352,8 @@ sub run_create_validators {
$class
->
_check_assigned_to
(
$component
,
$params
->
{
assigned_to
});
$class
->
_check_assigned_to
(
$component
,
$params
->
{
assigned_to
});
$params
->
{
qa_contact
}
=
$params
->
{
qa_contact
}
=
$class
->
_check_qa_contact
(
$component
,
$params
->
{
qa_contact
});
$class
->
_check_qa_contact
(
$component
,
$params
->
{
qa_contact
});
$params
->
{
cc
}
=
$class
->
_check_cc
(
$component
,
$params
->
{
cc
});
# Callers cannot set Reporter, currently.
# Callers cannot set Reporter, currently.
$params
->
{
reporter
}
=
Bugzilla
->
user
->
id
;
$params
->
{
reporter
}
=
Bugzilla
->
user
->
id
;
...
@@ -506,7 +507,7 @@ sub _check_bug_status {
...
@@ -506,7 +507,7 @@ sub _check_bug_status {
}
}
sub
_check_cc
{
sub
_check_cc
{
my
(
$invocant
,
$ccs
)
=
@_
;
my
(
$invocant
,
$c
omponent
,
$c
cs
)
=
@_
;
return
[]
unless
$ccs
;
return
[]
unless
$ccs
;
my
%
cc_ids
;
my
%
cc_ids
;
...
@@ -515,6 +516,10 @@ sub _check_cc {
...
@@ -515,6 +516,10 @@ sub _check_cc {
my
$id
=
login_to_id
(
$person
,
THROW_ERROR
);
my
$id
=
login_to_id
(
$person
,
THROW_ERROR
);
$cc_ids
{
$id
}
=
1
;
$cc_ids
{
$id
}
=
1
;
}
}
# Enforce Default CC
$cc_ids
{
$_
->
id
}
=
1
foreach
(
@
{
$component
->
initial_cc
});
return
[
keys
%
cc_ids
];
return
[
keys
%
cc_ids
];
}
}
...
...
Bugzilla/Component.pm
View file @
c6433b10
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
#
#
# Contributor(s): Tiago R. Mello <timello@async.com.br>
# Contributor(s): Tiago R. Mello <timello@async.com.br>
# Frédéric Buclin <LpSolit@gmail.com>
# Frédéric Buclin <LpSolit@gmail.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Akamai Technologies <bugzilla-dev@akamai.com>
use
strict
;
use
strict
;
...
@@ -154,6 +156,21 @@ sub flag_types {
...
@@ -154,6 +156,21 @@ sub flag_types {
return
$self
->
{
'flag_types'
};
return
$self
->
{
'flag_types'
};
}
}
sub
initial_cc
{
my
$self
=
shift
;
my
$dbh
=
Bugzilla
->
dbh
;
if
(
!
defined
$self
->
{
'initial_cc'
})
{
my
$cc_ids
=
$dbh
->
selectcol_arrayref
(
"SELECT user_id FROM component_cc WHERE component_id = ?"
,
undef
,
$self
->
id
);
my
$initial_cc
=
Bugzilla::
User
->
new_from_list
(
$cc_ids
);
$self
->
{
'initial_cc'
}
=
$initial_cc
;
}
return
$self
->
{
'initial_cc'
};
}
###############################
###############################
#### Accessors ####
#### Accessors ####
###############################
###############################
...
@@ -212,6 +229,7 @@ Bugzilla::Component - Bugzilla product component class.
...
@@ -212,6 +229,7 @@ Bugzilla::Component - Bugzilla product component class.
my $product_id = $component->product_id;
my $product_id = $component->product_id;
my $default_assignee = $component->default_assignee;
my $default_assignee = $component->default_assignee;
my $default_qa_contact = $component->default_qa_contact;
my $default_qa_contact = $component->default_qa_contact;
my $initial_cc = $component->initial_cc
my $bug_flag_types = $component->flag_types->{'bug'};
my $bug_flag_types = $component->flag_types->{'bug'};
my $attach_flag_types = $component->flag_types->{'attachment'};
my $attach_flag_types = $component->flag_types->{'attachment'};
...
@@ -273,6 +291,11 @@ Component.pm represents a Product Component object.
...
@@ -273,6 +291,11 @@ Component.pm represents a Product Component object.
Returns: A Bugzilla::User object.
Returns: A Bugzilla::User object.
=item C<initial_cc>
Returns an arrayref of L<Bugzilla::User> objects representing the
Initial CC List.
=item C<flag_types()>
=item C<flag_types()>
Description: Returns all bug and attachment flagtypes available for
Description: Returns all bug and attachment flagtypes available for
...
...
Bugzilla/DB/Schema.pm
View file @
c6433b10
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Lance Larsh <lance.larsh@oracle.com>
# Lance Larsh <lance.larsh@oracle.com>
# Dennis Melentyev <dennis.melentyev@infopulse.com.ua>
# Dennis Melentyev <dennis.melentyev@infopulse.com.ua>
# Akamai Technologies <bugzilla-dev@akamai.com>
package
Bugzilla::DB::
Schema
;
package
Bugzilla::DB::
Schema
;
...
@@ -703,6 +704,18 @@ use constant ABSTRACT_SCHEMA => {
...
@@ -703,6 +704,18 @@ use constant ABSTRACT_SCHEMA => {
],
],
},
},
component_cc
=>
{
FIELDS
=>
[
user_id
=>
{
TYPE
=>
'INT3'
,
NOTNULL
=>
1
},
component_id
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
},
],
INDEXES
=>
[
component_cc_user_id_idx
=>
{
FIELDS
=>
[
qw(component_id user_id)
],
TYPE
=>
'UNIQUE'
},
],
},
# Authentication
# Authentication
# --------------
# --------------
...
...
editcomponents.cgi
View file @
c6433b10
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
# Contributor(s): Holger Schurig <holgerschurig@nikocity.de>
# Contributor(s): Holger Schurig <holgerschurig@nikocity.de>
# Terry Weissman <terry@mozilla.org>
# Terry Weissman <terry@mozilla.org>
# Frédéric Buclin <LpSolit@gmail.com>
# Frédéric Buclin <LpSolit@gmail.com>
# Akamai Technologies <bugzilla-dev@akamai.com>
#
#
# Direct any questions on this source code to
# Direct any questions on this source code to
#
#
...
@@ -39,6 +40,26 @@ use Bugzilla::Product;
...
@@ -39,6 +40,26 @@ use Bugzilla::Product;
use
Bugzilla::
Component
;
use
Bugzilla::
Component
;
use
Bugzilla::
Bug
;
use
Bugzilla::
Bug
;
###############
# Subroutines #
###############
# Takes an arrayref of login names and returns an arrayref of user ids.
sub
check_initial_cc
{
my
(
$user_names
)
=
@_
;
my
%
cc_ids
;
foreach
my
$cc
(
@$user_names
)
{
my
$id
=
login_to_id
(
$cc
,
THROW_ERROR
);
$cc_ids
{
$id
}
=
1
;
}
return
[
keys
%
cc_ids
];
}
###############
# Main Script #
###############
my
$cgi
=
Bugzilla
->
cgi
;
my
$cgi
=
Bugzilla
->
cgi
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$template
=
Bugzilla
->
template
;
my
$template
=
Bugzilla
->
template
;
...
@@ -129,11 +150,13 @@ if ($action eq 'new') {
...
@@ -129,11 +150,13 @@ if ($action eq 'new') {
Bugzilla::User::
match_field
(
$cgi
,
{
Bugzilla::User::
match_field
(
$cgi
,
{
'initialowner'
=>
{
'type'
=>
'single'
},
'initialowner'
=>
{
'type'
=>
'single'
},
'initialqacontact'
=>
{
'type'
=>
'single'
},
'initialqacontact'
=>
{
'type'
=>
'single'
},
'initialcc'
=>
{
'type'
=>
'multi'
},
});
});
my
$default_assignee
=
trim
(
$cgi
->
param
(
'initialowner'
)
||
''
);
my
$default_assignee
=
trim
(
$cgi
->
param
(
'initialowner'
)
||
''
);
my
$default_qa_contact
=
trim
(
$cgi
->
param
(
'initialqacontact'
)
||
''
);
my
$default_qa_contact
=
trim
(
$cgi
->
param
(
'initialqacontact'
)
||
''
);
my
$description
=
trim
(
$cgi
->
param
(
'description'
)
||
''
);
my
$description
=
trim
(
$cgi
->
param
(
'description'
)
||
''
);
my
@initial_cc
=
$cgi
->
param
(
'initialcc'
);
$comp_name
||
ThrowUserError
(
'component_blank_name'
);
$comp_name
||
ThrowUserError
(
'component_blank_name'
);
...
@@ -161,9 +184,13 @@ if ($action eq 'new') {
...
@@ -161,9 +184,13 @@ if ($action eq 'new') {
my
$default_qa_contact_id
=
Bugzilla
->
params
->
{
'useqacontact'
}
?
my
$default_qa_contact_id
=
Bugzilla
->
params
->
{
'useqacontact'
}
?
(
login_to_id
(
$default_qa_contact
)
||
undef
)
:
undef
;
(
login_to_id
(
$default_qa_contact
)
||
undef
)
:
undef
;
my
$initial_cc_ids
=
check_initial_cc
(
\
@initial_cc
);
trick_taint
(
$comp_name
);
trick_taint
(
$comp_name
);
trick_taint
(
$description
);
trick_taint
(
$description
);
$dbh
->
bz_lock_tables
(
'components WRITE'
,
'component_cc WRITE'
);
$dbh
->
do
(
"INSERT INTO components
$dbh
->
do
(
"INSERT INTO components
(product_id, name, description, initialowner,
(product_id, name, description, initialowner,
initialqacontact)
initialqacontact)
...
@@ -171,6 +198,17 @@ if ($action eq 'new') {
...
@@ -171,6 +198,17 @@ if ($action eq 'new') {
(
$product
->
id
,
$comp_name
,
$description
,
(
$product
->
id
,
$comp_name
,
$description
,
$default_assignee_id
,
$default_qa_contact_id
));
$default_assignee_id
,
$default_qa_contact_id
));
$component
=
new
Bugzilla::
Component
({
product_id
=>
$product
->
id
,
name
=>
$comp_name
});
my
$sth
=
$dbh
->
prepare
(
"INSERT INTO component_cc
(user_id, component_id) VALUES (?, ?)"
);
foreach
my
$user_id
(
@$initial_cc_ids
)
{
$sth
->
execute
(
$user_id
,
$component
->
id
);
}
$dbh
->
bz_unlock_tables
;
# Insert default charting queries for this product.
# Insert default charting queries for this product.
# If they aren't using charting, this won't do any harm.
# If they aren't using charting, this won't do any harm.
my
@series
;
my
@series
;
...
@@ -204,10 +242,6 @@ if ($action eq 'new') {
...
@@ -204,10 +242,6 @@ if ($action eq 'new') {
$series
->
writeToDatabase
();
$series
->
writeToDatabase
();
}
}
$component
=
new
Bugzilla::
Component
({
product_id
=>
$product
->
id
,
name
=>
$comp_name
});
$vars
->
{
'comp'
}
=
$component
;
$vars
->
{
'comp'
}
=
$component
;
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'product'
}
=
$product
;
$template
->
process
(
"admin/components/created.html.tmpl"
,
$template
->
process
(
"admin/components/created.html.tmpl"
,
...
@@ -263,13 +297,15 @@ if ($action eq 'delete') {
...
@@ -263,13 +297,15 @@ if ($action eq 'delete') {
}
}
}
}
$dbh
->
bz_lock_tables
(
'components WRITE'
,
'
flaginclusions
WRITE'
,
$dbh
->
bz_lock_tables
(
'components WRITE'
,
'
component_cc
WRITE'
,
'flagexclusions WRITE'
);
'flag
inclusions WRITE'
,
'flag
exclusions WRITE'
);
$dbh
->
do
(
"DELETE FROM flaginclusions WHERE component_id = ?"
,
$dbh
->
do
(
"DELETE FROM flaginclusions WHERE component_id = ?"
,
undef
,
$component
->
id
);
undef
,
$component
->
id
);
$dbh
->
do
(
"DELETE FROM flagexclusions WHERE component_id = ?"
,
$dbh
->
do
(
"DELETE FROM flagexclusions WHERE component_id = ?"
,
undef
,
$component
->
id
);
undef
,
$component
->
id
);
$dbh
->
do
(
"DELETE FROM component_cc WHERE component_id = ?"
,
undef
,
$component
->
id
);
$dbh
->
do
(
"DELETE FROM components WHERE id = ?"
,
$dbh
->
do
(
"DELETE FROM components WHERE id = ?"
,
undef
,
$component
->
id
);
undef
,
$component
->
id
);
...
@@ -292,8 +328,12 @@ if ($action eq 'delete') {
...
@@ -292,8 +328,12 @@ if ($action eq 'delete') {
if
(
$action
eq
'edit'
)
{
if
(
$action
eq
'edit'
)
{
$vars
->
{
'comp'
}
=
my
$component
=
Bugzilla::Component::
check_component
(
$product
,
$comp_name
);
Bugzilla::Component::
check_component
(
$product
,
$comp_name
);
$vars
->
{
'comp'
}
=
$component
;
$vars
->
{
'initial_cc_names'
}
=
join
(
', '
,
map
(
$_
->
login
,
@
{
$component
->
initial_cc
}));
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'product'
}
=
$product
;
...
@@ -316,12 +356,14 @@ if ($action eq 'update') {
...
@@ -316,12 +356,14 @@ if ($action eq 'update') {
Bugzilla::User::
match_field
(
$cgi
,
{
Bugzilla::User::
match_field
(
$cgi
,
{
'initialowner'
=>
{
'type'
=>
'single'
},
'initialowner'
=>
{
'type'
=>
'single'
},
'initialqacontact'
=>
{
'type'
=>
'single'
},
'initialqacontact'
=>
{
'type'
=>
'single'
},
'initialcc'
=>
{
'type'
=>
'multi'
},
});
});
my
$comp_old_name
=
trim
(
$cgi
->
param
(
'componentold'
)
||
''
);
my
$comp_old_name
=
trim
(
$cgi
->
param
(
'componentold'
)
||
''
);
my
$default_assignee
=
trim
(
$cgi
->
param
(
'initialowner'
)
||
''
);
my
$default_assignee
=
trim
(
$cgi
->
param
(
'initialowner'
)
||
''
);
my
$default_qa_contact
=
trim
(
$cgi
->
param
(
'initialqacontact'
)
||
''
);
my
$default_qa_contact
=
trim
(
$cgi
->
param
(
'initialqacontact'
)
||
''
);
my
$description
=
trim
(
$cgi
->
param
(
'description'
)
||
''
);
my
$description
=
trim
(
$cgi
->
param
(
'description'
)
||
''
);
my
@initial_cc
=
$cgi
->
param
(
'initialcc'
);
my
$component_old
=
my
$component_old
=
Bugzilla::Component::
check_component
(
$product
,
$comp_old_name
);
Bugzilla::Component::
check_component
(
$product
,
$comp_old_name
);
...
@@ -352,7 +394,10 @@ if ($action eq 'update') {
...
@@ -352,7 +394,10 @@ if ($action eq 'update') {
my
$default_assignee_id
=
login_to_id
(
$default_assignee
);
my
$default_assignee_id
=
login_to_id
(
$default_assignee
);
my
$default_qa_contact_id
=
login_to_id
(
$default_qa_contact
)
||
undef
;
my
$default_qa_contact_id
=
login_to_id
(
$default_qa_contact
)
||
undef
;
$dbh
->
bz_lock_tables
(
'components WRITE'
,
'profiles READ'
);
my
$initial_cc_ids
=
check_initial_cc
(
\
@initial_cc
);
$dbh
->
bz_lock_tables
(
'components WRITE'
,
'component_cc WRITE'
,
'profiles READ'
);
if
(
$comp_name
ne
$component_old
->
name
)
{
if
(
$comp_name
ne
$component_old
->
name
)
{
...
@@ -390,11 +435,29 @@ if ($action eq 'update') {
...
@@ -390,11 +435,29 @@ if ($action eq 'update') {
$vars
->
{
'updated_initialqacontact'
}
=
1
;
$vars
->
{
'updated_initialqacontact'
}
=
1
;
}
}
my
@initial_cc_old
=
map
(
$_
->
id
,
@
{
$component_old
->
initial_cc
});
my
(
$removed
,
$added
)
=
diff_arrays
(
\
@initial_cc_old
,
$initial_cc_ids
);
foreach
my
$user_id
(
@$removed
)
{
$dbh
->
do
(
'DELETE FROM component_cc
WHERE component_id = ? AND user_id = ?'
,
undef
,
$component_old
->
id
,
$user_id
);
$vars
->
{
'updated_initialcc'
}
=
1
;
}
foreach
my
$user_id
(
@$added
)
{
$dbh
->
do
(
"INSERT INTO component_cc (user_id, component_id)
VALUES (?, ?)"
,
undef
,
$user_id
,
$component_old
->
id
);
$vars
->
{
'updated_initialcc'
}
=
1
;
}
$dbh
->
bz_unlock_tables
();
$dbh
->
bz_unlock_tables
();
my
$component
=
new
Bugzilla::
Component
(
$component_old
->
id
);
my
$component
=
new
Bugzilla::
Component
(
$component_old
->
id
);
$vars
->
{
'comp'
}
=
$component
;
$vars
->
{
'comp'
}
=
$component
;
$vars
->
{
'initial_cc_names'
}
=
join
(
', '
,
map
(
$_
->
login
,
@
{
$component
->
initial_cc
}));
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'product'
}
=
$product
;
$template
->
process
(
"admin/components/updated.html.tmpl"
,
$template
->
process
(
"admin/components/updated.html.tmpl"
,
$vars
)
$vars
)
...
...
process_bug.cgi
View file @
c6433b10
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
# Jeff Hedlund <jeff.hedlund@matrixsi.com>
# Jeff Hedlund <jeff.hedlund@matrixsi.com>
# Frédéric Buclin <LpSolit@gmail.com>
# Frédéric Buclin <LpSolit@gmail.com>
# Lance Larsh <lance.larsh@oracle.com>
# Lance Larsh <lance.larsh@oracle.com>
# Akamai Technologies <bugzilla-dev@akamai.com>
# Implementation notes for this file:
# Implementation notes for this file:
#
#
...
@@ -1370,6 +1371,18 @@ foreach my $id (@idlist) {
...
@@ -1370,6 +1371,18 @@ foreach my $id (@idlist) {
$query
.=
", qa_contact = NULL"
;
$query
.=
", qa_contact = NULL"
;
}
}
}
}
# And add in the Default CC for the Component.
my
$comp_obj
=
$component
||
new
Bugzilla::
Component
(
$new_comp_id
);
my
@new_init_cc
=
@
{
$comp_obj
->
initial_cc
};
foreach
my
$cc
(
@new_init_cc
)
{
# NewCC must be defined or the code below won't insert
# any CCs.
$cgi
->
param
(
'newcc'
)
||
$cgi
->
param
(
'newcc'
,
[]
);
$cc_add
{
$cc
->
id
}
=
$cc
->
login
;
}
}
}
my
%
dependencychanged
;
my
%
dependencychanged
;
...
...
template/en/default/admin/components/create.html.tmpl
View file @
c6433b10
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
# Rights Reserved.
# Rights Reserved.
#
#
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Akamai Technologies <bugzilla-dev@akamai.com>
#%]
#%]
[%# INTERFACE:
[%# INTERFACE:
...
@@ -76,6 +77,24 @@
...
@@ -76,6 +77,24 @@
</td>
</td>
</tr>
</tr>
[% END %]
[% END %]
<tr>
<th align="right">
<label for="initialcc">Default CC List:</label>
</th>
<td>
[% INCLUDE global/userselect.html.tmpl
name => "initialcc"
id => "initialcc"
value => ""
size => 64
multiple => 5
%]
<br>
[% IF !Param("usemenuforusers") %]
<em>Enter user names for the CC in a comma-separated list.</em>
[% END %]
</td>
</tr>
</table>
</table>
<hr>
<hr>
<input type="submit" id="create" value="Add">
<input type="submit" id="create" value="Add">
...
...
template/en/default/admin/components/edit.html.tmpl
View file @
c6433b10
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
# Rights Reserved.
# Rights Reserved.
#
#
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Akamai Technologies <bugzilla-dev@akamai.com>
#%]
#%]
[%# INTERFACE:
[%# INTERFACE:
...
@@ -82,6 +83,24 @@
...
@@ -82,6 +83,24 @@
</tr>
</tr>
<tr>
<tr>
<td valign="top">
<label for="initialcc">Default CC List:</label>
</td>
<td>
[% INCLUDE global/userselect.html.tmpl
name => "initialcc"
id => "initialcc"
value => initial_cc_names
size => 64
multiple => 5
%]
<br>
[% IF !Param("usemenuforusers") %]
<em>Enter user names for the CC in a comma-separated list.</em>
[% END %]
</td>
</tr>
<tr>
<td>[% terms.Bugs %]:</td>
<td>[% terms.Bugs %]:</td>
<td>
<td>
[% IF comp.bug_count > 0 %]
[% IF comp.bug_count > 0 %]
...
...
template/en/default/admin/components/updated.html.tmpl
View file @
c6433b10
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
# Rights Reserved.
# Rights Reserved.
#
#
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Akamai Technologies <bugzilla-dev@akamai.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
#%]
#%]
[%# INTERFACE:
[%# INTERFACE:
...
@@ -32,10 +34,15 @@
...
@@ -32,10 +34,15 @@
#
#
# updated_initialqacontact: the default qa contact updated
# updated_initialqacontact: the default qa contact updated
#
#
# updated_initialcc: the default initial cc list
#
# comp: object; Bugzilla::Component object representing the component
# comp: object; Bugzilla::Component object representing the component
# user updated.
# user updated.
# product: object; Bugzilla::Product object representing the product to
# product: object; Bugzilla::Product object representing the product to
# which the component belongs.
# which the component belongs.
#
# initial_cc_names: a comma-separated list of the login names of
# the Initial CC, if it was updated.
#%]
#%]
[% title = BLOCK %]Updating Component '[% comp.name FILTER html %]' of Product
[% title = BLOCK %]Updating Component '[% comp.name FILTER html %]' of Product
...
@@ -72,11 +79,20 @@
...
@@ -72,11 +79,20 @@
<p>Updated Component name to: '[% comp.name FILTER html %]'.</p>
<p>Updated Component name to: '[% comp.name FILTER html %]'.</p>
[% END %]
[% END %]
[% IF updated_initialcc %]
[% IF initial_cc_names %]
<p>Updated Default CC list to:
'[% initial_cc_names FILTER html %]'.</p>
[% ELSE %]
<p>Removed the Default CC list.</p>
[% END %]
[% END %]
[% UNLESS updated_description || updated_initialowner ||
[% UNLESS updated_description || updated_initialowner ||
updated_initialqacontact || updated_name %]
updated_initialqacontact || updated_name ||
updated_initialcc %]
<p>Nothing changed for component '[% comp.name FILTER html %]'.
<p>Nothing changed for component '[% comp.name FILTER html %]'.
[% END %]
[% END %]
[% PROCESS admin/components/footer.html.tmpl %]
[% PROCESS admin/components/footer.html.tmpl %]
...
...
template/en/default/bug/create/create.html.tmpl
View file @
c6433b10
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
# Ville Skyttä <ville.skytta@iki.fi>
# Ville Skyttä <ville.skytta@iki.fi>
# Shane H. W. Travis <travis@sedsystems.ca>
# Shane H. W. Travis <travis@sedsystems.ca>
# Marc Schumann <wurblzap@gmail.com>
# Marc Schumann <wurblzap@gmail.com>
# Akamai Technologies <bugzilla-dev@akamai.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
#%]
#%]
[% PROCESS "global/field-descs.none.tmpl" %]
[% PROCESS "global/field-descs.none.tmpl" %]
...
@@ -28,7 +30,6 @@
...
@@ -28,7 +30,6 @@
title = "Enter $terms.Bug: $product.name"
title = "Enter $terms.Bug: $product.name"
style_urls = [ 'skins/standard/create_attachment.css' ]
style_urls = [ 'skins/standard/create_attachment.css' ]
javascript_urls = [ "js/attachment.js" ]
javascript_urls = [ "js/attachment.js" ]
onload="set_assign_to();"
%]
%]
<script type="text/javascript">
<script type="text/javascript">
...
@@ -36,6 +37,7 @@
...
@@ -36,6 +37,7 @@
var initialowners = new Array([% product.components.size %]);
var initialowners = new Array([% product.components.size %]);
var last_initialowner;
var last_initialowner;
var initialccs = new Array([% product.components.size %]);
var components = new Array([% product.components.size %]);
var components = new Array([% product.components.size %]);
var flags = new Array([% product.components.size %]);
var flags = new Array([% product.components.size %]);
[% IF Param("useqacontact") %]
[% IF Param("useqacontact") %]
...
@@ -60,6 +62,13 @@ var flags = new Array([% product.components.size %]);
...
@@ -60,6 +62,13 @@ var flags = new Array([% product.components.size %]);
[% IF Param("useqacontact") %]
[% IF Param("useqacontact") %]
initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]";
initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]";
[% END %]
[% END %]
[% SET initial_cc_list = [] %]
[% FOREACH cc_user = c.initial_cc %]
[% initial_cc_list.push(cc_user.login) %]
[% END %]
initialccs[[% count %]] = "[% initial_cc_list.join(', ') FILTER js %]";
[% count = count + 1 %]
[% count = count + 1 %]
[%- END %]
[%- END %]
...
@@ -90,6 +99,9 @@ function set_assign_to() {
...
@@ -90,6 +99,9 @@ function set_assign_to() {
form.assigned_to.value = owner;
form.assigned_to.value = owner;
last_initialowner = owner;
last_initialowner = owner;
}
}
document.getElementById('initial_cc').innerHTML = initialccs[index];
[% IF Param("useqacontact") %]
[% IF Param("useqacontact") %]
var contact = initialqacontacts[index];
var contact = initialqacontacts[index];
if (qa_contact == last_initialqacontact
if (qa_contact == last_initialqacontact
...
@@ -317,6 +329,18 @@ function handleWantsAttachment(wants_attachment) {
...
@@ -317,6 +329,18 @@ function handleWantsAttachment(wants_attachment) {
%]
%]
</td>
</td>
</tr>
</tr>
<tr>
<th align="right">Default CC:</th>
<td colspan="2">
<div id="initial_cc">
<!-- This has to happen after everything above renders,
and onload doesn't work. So this is as good a place
as any to put it. -->
<script type="text/javascript">set_assign_to();</script>
</div>
</td>
</tr>
<tr>
<tr>
<td> </td>
<td> </td>
...
...
template/en/default/bug/knob.html.tmpl
View file @
c6433b10
...
@@ -104,8 +104,8 @@
...
@@ -104,8 +104,8 @@
<input type="radio" id="knob-reassign-cmp" name="knob" value="reassignbycomponent">
<input type="radio" id="knob-reassign-cmp" name="knob" value="reassignbycomponent">
<label for="knob-reassign-cmp">
<label for="knob-reassign-cmp">
Reassign [% terms.bug %] to default assignee
Reassign [% terms.bug %] to default assignee
[% " and QA contact" IF Param('useqacontact') %]
[% " and QA contact" IF Param('useqacontact') %]
,
of selected component
and add Default CC,
of selected component
</label>
</label>
<br>
<br>
[% IF bug.isunconfirmed && bug.user.canconfirm %]
[% IF bug.isunconfirmed && bug.user.canconfirm %]
...
...
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