зеркало из https://github.com/mozilla/gecko-dev.git
Copy compoenets field when you copy test cases.
This commit is contained in:
Родитель
23c0b80055
Коммит
a19af15e62
|
@ -783,11 +783,23 @@ sub copy {
|
|||
|
||||
my $key = $dbh->bz_last_key( 'test_cases', 'case_id' );
|
||||
|
||||
my $components_ref = $dbh->selectcol_arrayref(
|
||||
"SELECT component_id
|
||||
FROM test_case_components
|
||||
WHERE case_id = ?",
|
||||
undef, $self->id);
|
||||
|
||||
foreach my $comp_id (@{$components_ref}){
|
||||
$dbh->do("INSERT INTO test_case_components
|
||||
VALUES(?,?)", undef, $key, $comp_id);
|
||||
}
|
||||
|
||||
if ($copydoc){
|
||||
$self->store_text($key, Bugzilla->user->id, $self->text->{'action'},
|
||||
$self->text->{'effect'}, $self->text->{'setup'},
|
||||
$self->text->{'breakdown'},'VRESET' , $timestamp);
|
||||
}
|
||||
|
||||
return $key;
|
||||
|
||||
}
|
||||
|
|
|
@ -165,10 +165,12 @@ elsif ($action eq 'do_clone'){
|
|||
}
|
||||
|
||||
my $case = Bugzilla::Testopia::TestCase->new($id);
|
||||
# Copy test cases creating new ones
|
||||
if ($cgi->param('copy_cases') == 2 ){
|
||||
my $caseid = $case->copy($newplan->id, $author, 1);
|
||||
$case->link_plan($newplan->id, $caseid);
|
||||
}
|
||||
# Just create a link
|
||||
else {
|
||||
$case->link_plan($newplan->id);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче