Bug 9067: Hide item related strings when importing staged authority records
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 1 Apr 2015 11:28:20 +0000 (13:28 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 14 May 2015 15:19:12 +0000 (12:19 -0300)
On importing authority records, the items related string should not be
displayed.

Test plan:
1/ Import an authority record
2/ Confirm the item related string are not displayed.
3/ Before this script, the record_type param was lost just after
importing the records. Now you should see
"Processing authority records" of "Processing bibliographic records" in
the "MARC staging results"
4/ Revert the import and check there is not item related strings.

No behavior should exist on importing bibliographic records.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt
tools/stage-marc-import.pl

index 0b10962..67cf116 100644 (file)
@@ -306,7 +306,8 @@ $(document).ready(function(){
             [% END %]
         [% END %]
     </li>
-    
+
+    [% IF ( record_type == 'biblio' ) %]
     <li>
         [% IF ( can_commit ) %]
             <label for="item_action">Item processing:</label>
@@ -326,6 +327,7 @@ $(document).ready(function(){
             [% END %]
         [% END %]
     </li>
+    [% END %]
   </ol>
 [% IF ( can_commit ) %]<fieldset class="action"><input type="submit" value="Apply different matching rules" class="button" /></fieldset></form>[% END %]
 </fieldset>
@@ -373,17 +375,21 @@ $(document).ready(function(){
   <tr><td>Number of records added</td><td>[% num_added %]</td></tr>
   <tr><td>Number of records updated</td><td>[% num_updated %]</td></tr>
   <tr><td>Number of records ignored</td><td>[% num_ignored %]</td></tr>
-  <tr><td>Number of items added</td><td>[% num_items_added %]</td></tr>
-  <tr><td>Number of items replaced</td><td>[% num_items_replaced %]</td></tr>
-  <tr><td>Number of items ignored because of duplicate barcode</td><td>[% num_items_errored %]</td></tr>
+  [% IF ( record_type == 'biblio' ) %]
+      <tr><td>Number of items added</td><td>[% num_items_added %]</td></tr>
+      <tr><td>Number of items replaced</td><td>[% num_items_replaced %]</td></tr>
+      <tr><td>Number of items ignored because of duplicate barcode</td><td>[% num_items_errored %]</td></tr>
+  [ % END %]
   </table>
   [% END %]
   [% IF ( did_revert ) %]
   <div class="dialog message">Success: Import reversed</div>
   <table>
   <tr><td>Number of records deleted</td><td>[% num_deleted %]</td></tr>
-  <tr><td>Number of items deleted</td><td>[% num_items_deleted %]</td></tr>
-  <tr><td>Number of records not deleted due to items on loan</td><td>[% num_errors %]</td></tr>
+  [% IF ( record_type == 'biblio' ) %]
+    <tr><td>Number of items deleted</td><td>[% num_items_deleted %]</td></tr>
+    <tr><td>Number of records not deleted due to items on loan</td><td>[% num_errors %]</td></tr>
+  [% END %]
   <tr><td>Number of records changed back</td><td>[% num_reverted %]</td></tr>
   <tr><td>Number of records ignored</td><td>[% num_ignored %]</td></tr>
   </table>
index 50d7517..dea732a 100644 (file)
@@ -66,7 +66,9 @@ function CheckForm(f) {
           <li>Did not check for matches with existing records in catalog</li>
         [% END %]
     [% END %]
-       <li>[% num_items %] item records found and staged</li>
+    [% IF record_type == 'biblio' %]
+        <li>[% num_items %] item records found and staged</li>
+    [% END %]
        [% IF ( label_batch ) %]
          <li>New label batch created: # [% label_batch %] </li>
     [% END %]
index 2f4812f..c39b6ff 100755 (executable)
@@ -73,7 +73,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 
 $template->param(
     SCRIPT_NAME => $ENV{'SCRIPT_NAME'},
-    uploadmarc  => $fileID
+    uploadmarc  => $fileID,
+    record_type => $record_type,
 );
 
 my %cookies = parse CGI::Cookie($cookie);