[Koha-patches] [PATCH] bug 2952 followup

Galen Charlton galen.charlton at liblime.com
Fri Feb 13 00:04:35 CET 2009


The feature in question is described in bug 2952; to
summarize the enhancement, which the earlier patch
description did not do, the list of bibs in an
import record batch now includes a column linking
each import record to the bib that was actually created
or updated when the import batch was committed.

The improvements in this patch are:

* If bib in import batch has not been committed, it
  has not been linked to a matching new or updated bib.
  In that case, do not create a link to a guaranteed
  404 (/cgi-bin/koha/catalogue/detail.pl?biblionumber=)

* When reverting an import batch, set matched_biblionumber
  to NULL for affected records - otherwise, the Bib
  column will include links to bibs that may no longer
  exist.

* Fixed a minor HTML validation error.
---
 C4/ImportBatch.pm                                  |    2 ++
 .../prog/en/modules/tools/manage-marc-import.tmpl  |   10 ++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm
index fd6dcab..9ceb15a 100644
--- a/C4/ImportBatch.pm
+++ b/C4/ImportBatch.pm
@@ -654,6 +654,8 @@ sub BatchRevertBibRecords {
             $num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'});
             SetImportRecordStatus($rowref->{'import_record_id'}, 'reverted');
         }
+        my $sth2 = $dbh->prepare_cached("UPDATE import_biblios SET matched_biblionumber = NULL WHERE import_record_id = ?");
+        $sth2->execute($rowref->{'import_record_id'});
     }
 
     $sth->finish();
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
index 3ab9f3d..b3cda3a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
@@ -78,7 +78,7 @@
     <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
     <input type="hidden" name="current_matcher_id" value="<!-- TMPL_VAR name="current_matcher_id" -->" />
     <ol>
-    <li><label for name="new_matcher_id">New matching rule</label>
+    <li><label for="new_matcher_id">New matching rule</label>
     <select name="new_matcher_id" id="new_matcher_id">
        <option value="">Do not look for matching records</option> 
        <!-- TMPL_LOOP name="available_matchers" -->
@@ -251,13 +251,15 @@ Page
     <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR name='import_record_id' -->" rel="gb_page_center[600,500]"><!-- TMPL_VAR name="citation"--></a></td>
     <td><!-- TMPL_VAR name="status"--></td>
     <td><!-- TMPL_VAR name="overlay_status"--></td>
-    <td align="center"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name='final_match_biblionumber' -->"><!-- TMPL_VAR name="final_match_biblionumber"--></a></td>
-
+    <td><!-- TMPL_IF name="final_match_biblionumber" -->
+        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name='final_match_biblionumber' -->"><!-- TMPL_VAR name="final_match_biblionumber"--></a>
+        <!-- /TMPL_IF -->
+    </td>
   </tr>
     <!-- TMPL_IF name="match_biblionumber" -->
     <tr>
       <td />
-      <td class="highlight" colspan="3">Matches biblio <!-- TMPL_VAR name="match_biblionumber" --> (score = <!-- TMPL_VAR name="match_score" -->): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="match_biblionumber" -->"><!-- TMPL_VAR name="match_citation" --></a></td>
+      <td class="highlight" colspan="4">Matches biblio <!-- TMPL_VAR name="match_biblionumber" --> (score = <!-- TMPL_VAR name="match_score" -->): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="match_biblionumber" -->"><!-- TMPL_VAR name="match_citation" --></a></td>
     </tr>
     <!-- /TMPL_IF -->
   <!-- /TMPL_LOOP -->
-- 
1.5.5.GIT




More information about the Koha-patches mailing list