From a2e427f167beaf671889d51ec1e0ab4846cce0d0 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Wed, 27 Mar 2013 15:19:13 -0400 Subject: Bug 855414 - Editing of FlagTypeComment values for each status is broken due to the 4.2 upgrade --- Bugzilla/FlagType.pm | 6 ++++++ extensions/FlagTypeComment/Extension.pm | 7 ++++--- template/en/default/admin/flag-type/edit.html.tmpl | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index 617ea54b7..f2afb6f95 100644 --- a/Bugzilla/FlagType.pm +++ b/Bugzilla/FlagType.pm @@ -52,6 +52,7 @@ use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Util; use Bugzilla::Group; +use Bugzilla::Hook; use base qw(Bugzilla::Object); @@ -133,6 +134,8 @@ sub create { exclusions => $exclusions }); $flagtype->update(); + Bugzilla::Hook::process('flagtype_end_of_create', { type => $flagtype }); + $dbh->bz_commit_transaction(); return $flagtype; } @@ -201,6 +204,9 @@ sub update { undef, $self->id); } + Bugzilla::Hook::process('flagtype_end_of_update', + { type => $self, changed => $changes }); + $dbh->bz_commit_transaction(); return $changes; } diff --git a/extensions/FlagTypeComment/Extension.pm b/extensions/FlagTypeComment/Extension.pm index d9098a5db..8da6101ad 100644 --- a/extensions/FlagTypeComment/Extension.pm +++ b/extensions/FlagTypeComment/Extension.pm @@ -147,16 +147,17 @@ sub _set_ftc_states { sub flagtype_end_of_create { my ($self, $args) = @_; - _set_flagtypes($args->{id}); + _set_flagtypes($args->{type}); } sub flagtype_end_of_update { my ($self, $args) = @_; - _set_flagtypes($args->{id}); + _set_flagtypes($args->{type}); } sub _set_flagtypes { - my $flagtype_id = shift; + my $flag_type = shift; + my $flagtype_id = $flag_type->id; my $input = Bugzilla->input_params; my $dbh = Bugzilla->dbh; diff --git a/template/en/default/admin/flag-type/edit.html.tmpl b/template/en/default/admin/flag-type/edit.html.tmpl index 2cb985a47..46346d2ea 100644 --- a/template/en/default/admin/flag-type/edit.html.tmpl +++ b/template/en/default/admin/flag-type/edit.html.tmpl @@ -231,6 +231,8 @@ + [% Hook.process('rows') %] +   -- cgit v1.2.3-24-g4f1b