use constant ID_FIELD => 'attach_id';
use constant LIST_ORDER => ID_FIELD;
# Attachments are tracked in bugs_activity.
+use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
sub DB_COLUMNS {
use constant NAME_FIELD => 'alias';
use constant LIST_ORDER => ID_FIELD;
# Bugs have their own auditing table, bugs_activity.
+use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
# This is a sub because it needs to call other subroutines.
use constant DB_TABLE => 'bug_see_also';
use constant NAME_FIELD => 'value';
use constant LIST_ORDER => 'id';
+# See Also is tracked in bugs_activity.
+use constant AUDIT_CREATES => 0;
+use constant AUDIT_UPDATES => 0;
+use constant AUDIT_REMOVES => 0;
use constant DB_COLUMNS => qw(
id
#### Initialization ####
###############################
-# Updates of comments are audited in bugs_activity instead of audit_log.
+# Creation and updating of comments are audited in longdescs
+# and bugs_activity respectively instead of audit_log.
+use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
use constant DB_COLUMNS => qw(
use constant DB_TABLE => 'flags';
use constant LIST_ORDER => 'id';
# Flags are tracked in bugs_activity.
+use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
+use constant AUDIT_REMOVES => 0;
use constant SKIP_REQUESTEE_ON_ERROR => 1;
# XXX At some point, this will be joined with FIELD_MAP.
use constant REQUIRED_FIELD_MAP => {};
use constant EXTRA_REQUIRED_FIELDS => ();
+use constant AUDIT_CREATES => 1;
use constant AUDIT_UPDATES => 1;
+use constant AUDIT_REMOVES => 1;
# This allows the JSON-RPC interface to return Bugzilla::Object instances
# as though they were hashes. In the future, this may be modified to return
my $id_field = $self->ID_FIELD;
my $dbh = Bugzilla->dbh;
$dbh->bz_start_transaction();
- $self->audit_log(AUDIT_REMOVE);
+ $self->audit_log(AUDIT_REMOVE) if $self->AUDIT_REMOVES;
$dbh->do("DELETE FROM $table WHERE $id_field = ?", undef, $self->id);
$dbh->bz_commit_transaction();
undef $self;
Bugzilla::Hook::process('object_end_of_create', { class => $class,
object => $object });
- $object->audit_log(AUDIT_CREATE);
+ $object->audit_log(AUDIT_CREATE) if $object->AUDIT_CREATES;
return $object;
}
use constant DB_TABLE => 'profile_search';
use constant LIST_ORDER => 'id DESC';
+# Do not track buglists viewed by users.
+use constant AUDIT_CREATES => 0;
+use constant AUDIT_UPDATES => 0;
+use constant AUDIT_REMOVES => 0;
use constant DB_COLUMNS => qw(
id
#############
use constant DB_TABLE => 'namedqueries';
+# Do not track buglists saved by users.
+use constant AUDIT_CREATES => 0;
+use constant AUDIT_UPDATES => 0;
+use constant AUDIT_REMOVES => 0;
use constant DB_COLUMNS => qw(
id