diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-02-12 01:51:01 +0100 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-02-12 01:51:01 +0100 |
commit | f4c15fd204e9f0e00c3a5899d318f05105074e5f (patch) | |
tree | 9bc2b216b09c386b1fe54906f03612a601e04b4d /xt/lib/Bugzilla | |
parent | 9357849d00aaf742a9ec100e56ed5f996d5d6dbb (diff) | |
download | bugzilla-f4c15fd204e9f0e00c3a5899d318f05105074e5f.tar.gz bugzilla-f4c15fd204e9f0e00c3a5899d318f05105074e5f.tar.xz |
Make the "changedfrom" xt/search.t test work with see_also, again.
https://bugzilla.mozilla.org/show_bug.cgi?id=620827
Diffstat (limited to 'xt/lib/Bugzilla')
-rw-r--r-- | xt/lib/Bugzilla/Test/Search.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xt/lib/Bugzilla/Test/Search.pm b/xt/lib/Bugzilla/Test/Search.pm index 3465991f1..ce8d1338d 100644 --- a/xt/lib/Bugzilla/Test/Search.pm +++ b/xt/lib/Bugzilla/Test/Search.pm @@ -228,9 +228,11 @@ sub bug_create_value { if ($number == 6 and $field ne 'alias') { $number = 1; } - my $value = $self->_bug_create_values->{$number}->{$field}; - return $value if defined $value; - return $self->_extra_bug_create_values->{$number}->{$field}; + my $extra_values = $self->_extra_bug_create_values->{$number}; + if (exists $extra_values->{$field}) { + return $extra_values->{$field}; + } + return $self->_bug_create_values->{$number}->{$field}; } sub bug_update_value { my ($self, $number, $field) = @_; @@ -637,6 +639,7 @@ sub _create_one_bug { $dbh->do('UPDATE longdescs SET bug_when = ? WHERE bug_id = ?', undef, $ts, $bug->id); $bug->{creation_ts} = $ts; + $extra_values->{see_also} = []; } else { # Manually set the creation_ts so that each bug has a different one. @@ -657,6 +660,7 @@ sub _create_one_bug { undef, $creation_ts, $status, $resolution, $bug->id); $dbh->do('INSERT INTO bug_see_also (bug_id, value, class) VALUES (?,?,?)', undef, $bug->id, $see_also, 'Bugzilla::BugUrl::Bugzilla'); + $extra_values->{see_also} = $bug->see_also; if ($number == 1) { # Bug 1 needs to start off with reporter_accessible and |