summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/reorg-tools/movebugs.pl3
-rwxr-xr-xcontrib/reorg-tools/movecomponent.pl9
2 files changed, 9 insertions, 3 deletions
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);
-