View | Details | Raw Unified | Return to bug 9259
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-1 / +2 lines)
Lines 454-460 Page Link Here
454
    <td>[% batch_lis.upload_timestamp %]</td>
454
    <td>[% batch_lis.upload_timestamp %]</td>
455
    <td>[% batch_lis.num_records %]</td>
455
    <td>[% batch_lis.num_records %]</td>
456
    <td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&amp;op=create_labels">(Create label batch)</a>[% END %]</td>
456
    <td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&amp;op=create_labels">(Create label batch)</a>[% END %]</td>
457
    <td class="actions">[% IF ( batch_lis.can_clean ) %]
457
    <td class="actions">
458
        [% IF ( batch_lis.can_clean ) %]
458
          <form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" >
459
          <form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" >
459
            <input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" />
460
            <input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" />
460
            <input type="hidden" name="op" value="clean-batch" />
461
            <input type="hidden" name="op" value="clean-batch" />
(-)a/t/db_dependent/ImportBatch.t (-5 / +2 lines)
Lines 138-148 my $id_import_batch3 = C4::ImportBatch::AddImportBatch($sample_import_batch3); Link Here
138
# Test CleanBatch
138
# Test CleanBatch
139
C4::ImportBatch::CleanBatch( $id_import_batch3 );
139
C4::ImportBatch::CleanBatch( $id_import_batch3 );
140
my $batch3_clean = $dbh->do('SELECT * FROM import_records WHERE import_batch_id = "$id_import_batch3"');
140
my $batch3_clean = $dbh->do('SELECT * FROM import_records WHERE import_batch_id = "$id_import_batch3"');
141
is_deeply( $batch3_clean, "0E0",
141
is( $batch3_clean, "0E0", "Batch 3 has been cleaned" );
142
    "Batch 3 has been cleaned" );
143
142
144
# Test DeleteBatch
143
# Test DeleteBatch
145
C4::ImportBatch::DeleteBatch( $id_import_batch3 );
144
C4::ImportBatch::DeleteBatch( $id_import_batch3 );
146
my $batch3_results = $dbh->do('SELECT * FROM import_batches WHERE import_batch_id = "$id_import_batch3"');
145
my $batch3_results = $dbh->do('SELECT * FROM import_batches WHERE import_batch_id = "$id_import_batch3"');
147
is_deeply( $batch3_results, "0E0", # 0E0 == 0
146
is( $batch3_results, "0E0", "Batch 3 has been deleted");
148
    "Batch 3 has been deleted");
149
- 

Return to bug 9259