[Koha-bugs] [Bug 10477] Increased flexibility for upload of Staged MARC records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 19 19:29:23 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10477

--- Comment #18 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 24159
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24159
Bug-10477 Increased flexibility for upload of Staged

Review of attachment 24159:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10477&attachment=24159)
-----------------------------------------------------------------

::: C4/ImportBatch.pm
@@ +249,5 @@
> +    my $sth = $dbh->prepare("UPDATE import_batches SET marctag = ? WHERE import_batch_id = ?");
> +    $sth->execute($marctag, $batch_id);
> +    return;
> +}
> +

When you add functions to a C4 or Koha library, you need to make sure there is
a test file. There is no ./t/db_dependent/ImportBatch.t file, which is likely
what you need to create, since this requires the import_batches table. The test
file generally calls the functions/methods in every way that could be done
normally inside code.

@@ +724,5 @@
> +            $sth->execute($oldxml, $rowref->{'import_record_id'});
> +            $sth = $dbh->prepare($query);
> +            $sth->execute($recordid, $rowref->{'import_record_id'});
> +            SetImportRecordOverlayStatus($rowref->{'import_record_id'}, 'match_applied');
> +            SetImportRecordStatus($rowref->{'import_record_id'}, 'imported');

And your test file will have to trigger this code segment too. :)

::: tools/manage-marc-import.pl
@@ +228,3 @@
>          };
>      }
>      $template->param(batch_list => \@list); 

Make sure your git repo has:
git config --global core.whitespace trailing-space,space-before-tab
git config --global apply.whitespace fix

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list