summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-07 00:42:09 +0100
committerDylan William Hardison <dylan@hardison.net>2018-03-07 00:42:09 +0100
commit51c442fb9e1eb1c779a5ba18105335fe54eb234c (patch)
treee3d0f9e0e8758237501950af022c976c450c53fe /extensions/TrackingFlags
parent517805794fc99737fb69c4e0cdae7c045a88eb7d (diff)
downloadbugzilla-51c442fb9e1eb1c779a5ba18105335fe54eb234c.tar.gz
bugzilla-51c442fb9e1eb1c779a5ba18105335fe54eb234c.tar.xz
Revert Bug 1273381
Diffstat (limited to 'extensions/TrackingFlags')
-rw-r--r--extensions/TrackingFlags/lib/Flag.pm11
-rw-r--r--extensions/TrackingFlags/lib/Flag/Bug.pm7
-rw-r--r--extensions/TrackingFlags/lib/Flag/Value.pm9
-rw-r--r--extensions/TrackingFlags/lib/Flag/Visibility.pm7
4 files changed, 3 insertions, 31 deletions
diff --git a/extensions/TrackingFlags/lib/Flag.pm b/extensions/TrackingFlags/lib/Flag.pm
index f54e42a7a..82c0314e3 100644
--- a/extensions/TrackingFlags/lib/Flag.pm
+++ b/extensions/TrackingFlags/lib/Flag.pm
@@ -376,16 +376,8 @@ sub set_is_active { $_[0]->set('is_active', $_[1]); }
#### Accessors ####
###############################
-use constant ID_FIELD => 'field_id';
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub flag_id { return $_[0]->{'id'}; }
+sub name { return $_[0]->{'name'}; }
sub description { return $_[0]->{'description'}; }
sub flag_type { return $_[0]->{'type'}; }
sub sortkey { return $_[0]->{'sortkey'}; }
@@ -468,6 +460,7 @@ sub activity_count {
# Here we return 'field_id' instead of the real
# id as we want other Bugzilla code to treat this
# as a Bugzilla::Field object in certain places.
+sub id { return $_[0]->{'field_id'}; }
sub type { return FIELD_TYPE_EXTENSION; }
sub legal_values { return $_[0]->values; }
sub custom { return 1; }
diff --git a/extensions/TrackingFlags/lib/Flag/Bug.pm b/extensions/TrackingFlags/lib/Flag/Bug.pm
index 62f103ee5..7be661720 100644
--- a/extensions/TrackingFlags/lib/Flag/Bug.pm
+++ b/extensions/TrackingFlags/lib/Flag/Bug.pm
@@ -169,13 +169,6 @@ sub set_value { $_[0]->set('value', $_[1]); }
#### Accessors ####
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub tracking_flag_id { return $_[0]->{'tracking_flag_id'}; }
sub bug_id { return $_[0]->{'bug_id'}; }
sub value { return $_[0]->{'value'}; }
diff --git a/extensions/TrackingFlags/lib/Flag/Value.pm b/extensions/TrackingFlags/lib/Flag/Value.pm
index c1b3ef4f1..4f2aacc3a 100644
--- a/extensions/TrackingFlags/lib/Flag/Value.pm
+++ b/extensions/TrackingFlags/lib/Flag/Value.pm
@@ -35,7 +35,6 @@ use constant DB_COLUMNS => qw(
);
use constant LIST_ORDER => 'sortkey';
-use constant NAME_FIELD => 'value';
use constant UPDATE_COLUMNS => qw(
setter_group_id
@@ -112,13 +111,6 @@ sub set_comment { $_[0]->set('comment', $_[1]); }
#### Accessors ####
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub tracking_flag_id { return $_[0]->{'tracking_flag_id'}; }
sub setter_group_id { return $_[0]->{'setter_group_id'}; }
sub value { return $_[0]->{'value'}; }
@@ -148,6 +140,7 @@ sub setter_group {
## Compatibility with Bugzilla::Field ##
########################################
+sub name { return $_[0]->{'value'}; }
sub is_visible_on_bug { return 1; }
1;
diff --git a/extensions/TrackingFlags/lib/Flag/Visibility.pm b/extensions/TrackingFlags/lib/Flag/Visibility.pm
index a16ddfe75..878c16f99 100644
--- a/extensions/TrackingFlags/lib/Flag/Visibility.pm
+++ b/extensions/TrackingFlags/lib/Flag/Visibility.pm
@@ -147,13 +147,6 @@ sub _check_component {
#### Accessors ####
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub tracking_flag_id { return $_[0]->{'tracking_flag_id'}; }
sub product_id { return $_[0]->{'product_id'}; }
sub component_id { return $_[0]->{'component_id'}; }