summaryrefslogtreecommitdiffstats
path: root/contrib/reorg-tools
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-11-28 18:29:38 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-11-28 18:29:38 +0100
commit403751b3a632945288b3177531077bf717521406 (patch)
tree1f9a442fb4ad85fa445bcbee15b599d303d16f9d /contrib/reorg-tools
parent1c5e0c47c92128afebef5614407d84cd72c12b35 (diff)
downloadbugzilla-403751b3a632945288b3177531077bf717521406.tar.gz
bugzilla-403751b3a632945288b3177531077bf717521406.tar.xz
Bug 815112 - Bug history mis-states which field was changed after script mass changed whiteboard=[orange] to keyword
Diffstat (limited to 'contrib/reorg-tools')
-rw-r--r--contrib/reorg-tools/migrate_orange_bugs.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/reorg-tools/migrate_orange_bugs.pl b/contrib/reorg-tools/migrate_orange_bugs.pl
index 82913bc98..ae68b227c 100644
--- a/contrib/reorg-tools/migrate_orange_bugs.pl
+++ b/contrib/reorg-tools/migrate_orange_bugs.pl
@@ -70,8 +70,11 @@ usage() if $help;
my $user_id = login_to_id('nobody@mozilla.org');
$user_id or usage("Can't find user ID for 'nobody\@mozilla.org'\n");
-my $field_id = get_field_id('keywords');
-$field_id or usage("Can't find field ID for 'keywords' field\n");
+my $keywords_field_id = get_field_id('keywords');
+$keywords_field_id or usage("Can't find field ID for 'keywords' field\n");
+
+my $whiteboard_field_id = get_field_id('status_whiteboard');
+$whiteboard_field_id or usage("Can't find field ID for 'whiteboard' field\n");
# intermittent-keyword id (assumes already created)
my $keyword_obj = Bugzilla::Keyword->new({ name => 'intermittent-failure' });
@@ -113,7 +116,7 @@ foreach my $bug (@$bugs) {
undef, $bug_id, $keyword_id);
$dbh->do("INSERT INTO bugs_activity(bug_id, who, bug_when, fieldid, removed, added) " .
"VALUES (?, ?, ?, ?, '', 'intermittent-failure')",
- undef, $bug_id, $user_id, $timestamp, $field_id);
+ undef, $bug_id, $user_id, $timestamp, $keywords_field_id);
$dbh->do("UPDATE bugs SET delta_ts = ?, lastdiffed = ? WHERE bug_id = ?",
undef, $timestamp, $timestamp, $bug_id);
}
@@ -130,7 +133,7 @@ foreach my $bug (@$bugs) {
undef, $whiteboard, $bug_id);
$dbh->do("INSERT INTO bugs_activity(bug_id, who, bug_when, fieldid, removed, added) " .
"VALUES (?, ?, ?, ?, ?, ?)",
- undef, $bug_id, $user_id, $timestamp, $field_id, $old_whiteboard, $whiteboard);
+ undef, $bug_id, $user_id, $timestamp, $whiteboard_field_id, $old_whiteboard, $whiteboard);
$dbh->do("UPDATE bugs SET delta_ts = ?, lastdiffed = ? WHERE bug_id = ?",
undef, $timestamp, $timestamp, $bug_id);
}