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
ad9d2eb5
Commit
ad9d2eb5
authored
Oct 24, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 522404: Allow Bugzilla::Product->create to create multiple products in one script.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
parent
f9cd15c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
Product.pm
Bugzilla/Product.pm
+2
-0
User.pm
Bugzilla/User.pm
+13
-0
No files found.
Bugzilla/Product.pm
View file @
ad9d2eb5
...
...
@@ -112,6 +112,7 @@ sub create {
my
$create_series
=
delete
$params
->
{
create_series
};
my
$product
=
$class
->
insert_create_data
(
$params
);
Bugzilla
->
user
->
clear_product_cache
();
# Add the new version and milestone into the DB as valid values.
Bugzilla::
Version
->
create
({
name
=>
$version
,
product
=>
$product
});
...
...
@@ -364,6 +365,7 @@ sub update {
$dbh
->
bz_commit_transaction
();
# Changes have been committed.
delete
$self
->
{
check_group_controls
};
Bugzilla
->
user
->
clear_product_cache
();
# Now that changes have been committed, we can send emails to voters.
foreach
my
$msg
(
@msgs
)
{
...
...
Bugzilla/User.pm
View file @
ad9d2eb5
...
...
@@ -659,6 +659,13 @@ sub visible_bugs {
return
[
grep
{
$visible_cache
->
{
blessed
$_
?
$_
->
id
:
$_
}
}
@$bugs
];
}
sub
clear_product_cache
{
my
$self
=
shift
;
delete
$self
->
{
enterable_products
};
delete
$self
->
{
selectable_products
};
delete
$self
->
{
selectable_classifications
};
}
sub
can_see_product
{
my
(
$self
,
$product_name
)
=
@_
;
...
...
@@ -1962,6 +1969,12 @@ care of by the constructor. However, when updating the email address, the
user may be placed into different groups, based on a new email regexp. This
method should be called in such a case to force reresolution of these groups.
=item C<clear_product_cache>
Clears the stored values for L</get_selectable_products>,
L</get_enterable_products>, etc. so that their data will be read from
the database again. Used mostly by L<Bugzilla::Product>.
=item C<get_selectable_products>
Description: Returns all products the user is allowed to access. This list
...
...
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