Clone attachments when cloning a case.
git-svn-id: svn://10.0.0.236/trunk@220017 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
40634b7388
commit
620d9b63eb
@ -374,7 +374,7 @@ sub link_case {
|
||||
return;
|
||||
}
|
||||
|
||||
$dbh->do("INSERT INTO test_case_attachments (attachment_id, plan_id)
|
||||
$dbh->do("INSERT INTO test_case_attachments (attachment_id, case_id)
|
||||
VALUES (?,?)",
|
||||
undef, ($self->id, $case_id));
|
||||
$dbh->bz_unlock_tables();
|
||||
|
||||
@ -75,6 +75,10 @@
|
||||
<td align="right">Copy Document</td>
|
||||
<td><input type="radio" name="copy_doc" value="1" checked="checked">Yes <input type="radio" name="copy_doc" value="0">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Copy Attachments</td>
|
||||
<td><input type="radio" name="copy_attachments" value="1">Yes <input type="radio" name="copy_attachments" checked="checked" value="0">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Copy Tags</td>
|
||||
<td><input type="radio" name="copy_tags" value="1" checked="checked">Yes <input type="radio" name="copy_tags" value="0">No</td>
|
||||
|
||||
@ -117,6 +117,12 @@ elsif ($action eq 'do_clone'){
|
||||
my $newcaseid = $case->copy($pid, $author, $cgi->param('copy_doc'));
|
||||
$case->link_plan($pid, $newcaseid);
|
||||
$newcase = Bugzilla::Testopia::TestCase->new($newcaseid);
|
||||
|
||||
if($cgi->param('copy_attachments')){
|
||||
foreach my $att (@{$case->attachments}){
|
||||
$att->link_case($newcaseid);
|
||||
}
|
||||
}
|
||||
if ($cgi->param('copy_tags')){
|
||||
foreach my $tag (@{$case->tags}){
|
||||
# Doing it this way avoids collisions
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user