From e4dfffc24ca572965c513356c7c8a19f82a22c64 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 10 Nov 2009 21:21:52 +0000 Subject: Bug 526165: Make it impossible to set creation_ts via Bugzilla::Bug->create Patch by Max Kanat-Alexander r=dkl, a=mkanat --- Bugzilla/Migrate.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Migrate.pm') diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index c8f601521..40249bf50 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -767,7 +767,12 @@ sub insert_bugs { my $created = Bugzilla::Bug->create($bug); $self->debug('Created bug ' . $created->id); Bugzilla->set_user($super_user); - + + if (defined $bug->{creation_ts}) { + $dbh->do('UPDATE bugs SET creation_ts = ?, delta_ts = ? + WHERE bug_id = ?', undef, $bug->{creation_ts}, + $bug->{creation_ts}, $created->id); + } if (defined $bug->{delta_ts}) { $dbh->do('UPDATE bugs SET delta_ts = ? WHERE bug_id = ?', undef, $bug->{delta_ts}, $created->id); -- cgit v1.2.3-24-g4f1b