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});
$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) {
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) = @_;
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