diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-08-12 17:44:56 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-08-12 17:44:56 +0200 |
commit | 261bb90c5cf98eb824f6897cdc0c6c4191618115 (patch) | |
tree | 51bc0fb953cc9b59272d0f543b23a153788755fb | |
parent | afa23774e953411a0b7ad73739970d5b81495195 (diff) | |
download | bugzilla-261bb90c5cf98eb824f6897cdc0c6c4191618115.tar.gz bugzilla-261bb90c5cf98eb824f6897cdc0c6c4191618115.tar.xz |
Bug 902212 - tidy up active_custom usage in TrackingFlags
r=glob
-rw-r--r-- | extensions/Push/lib/Serialise.pm | 8 | ||||
-rw-r--r-- | extensions/TrackingFlags/lib/Flag.pm | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/extensions/Push/lib/Serialise.pm b/extensions/Push/lib/Serialise.pm index 82eb654b5..94f33c754 100644 --- a/extensions/Push/lib/Serialise.pm +++ b/extensions/Push/lib/Serialise.pm @@ -206,14 +206,10 @@ sub _bug { }; # add custom fields - my @custom_fields = Bugzilla->active_custom_fields; + my @custom_fields = Bugzilla->active_custom_fields( + { product => $bug->product_obj, component => $bug->component_obj }); foreach my $field (@custom_fields) { my $name = $field->name; - - # skip custom fields that are hidded from this product/component - next if Bugzilla::Extension::BMO::cf_hidden_in_product( - $name, $bug->product, $bug->component); - $rh->{$name} = _custom_field($field, $bug->$name); } diff --git a/extensions/TrackingFlags/lib/Flag.pm b/extensions/TrackingFlags/lib/Flag.pm index 2151c3763..5daa47508 100644 --- a/extensions/TrackingFlags/lib/Flag.pm +++ b/extensions/TrackingFlags/lib/Flag.pm @@ -190,7 +190,8 @@ sub get_all { my %tracking_flags_hash = map { $_->flag_id => $_ } @tracking_flags; $cache->{'tracking_flags'} = \%tracking_flags_hash; } - return values %{ $cache->{'tracking_flags'} }; + return sort { $a->flag_type cmp $b->flag_type || $a->sortkey <=> $b->sortkey } + values %{ $cache->{'tracking_flags'} }; } sub remove_from_db { |