From 612dd017fd0901d653fb8145385079a578b74caa Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 1 Aug 2013 14:15:20 +0800 Subject: Bug 859550: Create a user profile page for bugzilla users --- contrib/reorg-tools/movebugs.pl | 3 +++ contrib/reorg-tools/movecomponent.pl | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/reorg-tools/movebugs.pl b/contrib/reorg-tools/movebugs.pl index 6d6a53b51..adc02a1e0 100755 --- a/contrib/reorg-tools/movebugs.pl +++ b/contrib/reorg-tools/movebugs.pl @@ -10,6 +10,7 @@ use lib "$FindBin::Bin/../../lib"; use Bugzilla; use Bugzilla::Constants; use Bugzilla::FlagType; +use Bugzilla::Hook; use Bugzilla::Util; Bugzilla->usage_mode(USAGE_MODE_CMDLINE); @@ -168,5 +169,7 @@ $dbh->do( undef, $user_id, $component_field_id, $old_component, $new_component); +Bugzilla::Hook::process('reorg_move_bugs', { bug_ids => $ra_ids } ); + $dbh->bz_commit_transaction(); diff --git a/contrib/reorg-tools/movecomponent.pl b/contrib/reorg-tools/movecomponent.pl index 8f8bc0abc..702dbc6f0 100755 --- a/contrib/reorg-tools/movecomponent.pl +++ b/contrib/reorg-tools/movecomponent.pl @@ -35,6 +35,7 @@ use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; +use Bugzilla::Hook; use Bugzilla::Util; sub usage() { @@ -152,6 +153,10 @@ getc(); print "Moving '$component' from '$oldproduct' to '$newproduct'...\n\n"; $dbh->bz_start_transaction() if $doit; +my $ra_ids = $dbh->selectcol_arrayref( + "SELECT bug_id FROM bugs WHERE product_id=? AND component_id=?", + undef, $oldprodid, $compid); + # Bugs table $dbh->do("UPDATE bugs SET product_id = ? WHERE component_id = ?", undef, @@ -187,7 +192,5 @@ $dbh->do("INSERT INTO bugs_activity(bug_id, who, bug_when, fieldid, removed, undef, ($userid, $fieldid, $oldproduct, $newproduct, $compid)); +Bugzilla::Hook::process('reorg_move_bugs', { bug_ids => $ra_ids } ) if $doit; $dbh->bz_commit_transaction() if $doit; - -exit(0); - -- cgit v1.2.3-24-g4f1b