зеркало из https://github.com/mozilla/pjs.git
Clone attachments when cloning a case.
This commit is contained in:
Родитель
f90d5151fa
Коммит
1282d56ae2
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче