diff options
author | Byron Jones <bjones@mozilla.com> | 2013-09-18 09:53:04 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-09-18 09:53:04 +0200 |
commit | 45b7728b22f637b3b6d95bc540be05045ee4facf (patch) | |
tree | fcd24ed2538ddd8b7622960be85cf362a0074bbe /extensions/BMO | |
parent | 3727844fe627a5bb9365ce461c13d1ff5e82d1a2 (diff) | |
download | bugzilla-45b7728b22f637b3b6d95bc540be05045ee4facf.tar.gz bugzilla-45b7728b22f637b3b6d95bc540be05045ee4facf.tar.xz |
Bug 917203: tracking flags with flag_type of "status" is unclear
Diffstat (limited to 'extensions/BMO')
-rw-r--r-- | extensions/BMO/lib/Util.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/extensions/BMO/lib/Util.pm b/extensions/BMO/lib/Util.pm index b25215f61..4da02081e 100644 --- a/extensions/BMO/lib/Util.pm +++ b/extensions/BMO/lib/Util.pm @@ -76,17 +76,19 @@ sub parse_date { sub is_active_status_field { my ($field) = @_; - if ($field->type != FIELD_TYPE_EXTENSION - && $field->name =~ /^cf_status/) - { - return !grep { $field->name eq $_ } @$cf_disabled_flags - } if ($field->type == FIELD_TYPE_EXTENSION - && $field->can('flag_type') - && $field->flag_type eq 'status') - { - return 1; + && $field->isa('Bugzilla::Extension::TrackingFlags::Flag') + && $field->flag_type eq 'tracking' + && $field->name =~ /_status_/ + ) { + return $field->is_active; + } + + if ($field->type != FIELD_TYPE_EXTENSION + && $field->name =~ /^cf_status/ + ) { + return !grep { $field->name eq $_ } @$cf_disabled_flags } return 0; |