diff options
author | mkanat%bugzilla.org <> | 2009-11-10 22:21:52 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-11-10 22:21:52 +0100 |
commit | e4dfffc24ca572965c513356c7c8a19f82a22c64 (patch) | |
tree | 4a3718d3a9d18d83f986c0ade9993a5432ac6f15 /Bugzilla/Migrate.pm | |
parent | 4b2c9f0f96242fcd5395c088de4e27bffbfb8085 (diff) | |
download | bugzilla-e4dfffc24ca572965c513356c7c8a19f82a22c64.tar.gz bugzilla-e4dfffc24ca572965c513356c7c8a19f82a22c64.tar.xz |
Bug 526165: Make it impossible to set creation_ts via Bugzilla::Bug->create
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/Migrate.pm')
-rw-r--r-- | Bugzilla/Migrate.pm | 7 |
1 files changed, 6 insertions, 1 deletions
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); |