Bug 3201

Summary: script missing090field.pl if record is NULL
Product: Koha Reporter: Chris Cormack <chris>
Component: Installation and upgrade (command-line installer)Assignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: PATCH-Sent (DO NOT USE) CC: paul.poulain
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Chris Cormack 2010-05-21 01:07:37 UTC


---- Reported by henry@cmi.univ-mrs.fr 2009-05-07 16:58:04 ----

please add:

$ diff -u ./misc/migration_tools/22_to_30/missing090field.pl-ori ./misc/migration_tools/22_to_30/missing090field.pl    
--- ./misc/migration_tools/22_to_30/missing090field.pl-ori      Fri Jan 16 12:10:07 2009
+++ ./misc/migration_tools/22_to_30/missing090field.pl  Thu Apr 30 12:29:51 2009
@@ -38,6 +38,8 @@
     my ($tagfield2,$biblioitemtagsubfield) = &GetMarcFromKohaField("biblio.biblioitemnumber","");
         
     my $update=0;
+       if (defined $record)
+    {  
     my $tag = $record->field($tagfield);
 #     warn "ICI : ".$record->as_formatted if $record->subfield('090','a') eq '11546';
     
@@ -63,8 +65,13 @@
             $update=1;
         }
     }
+       }
+    else
+    {
+     warn "problem with :".$biblionumber." , record undefined";
+    }
+ 
     
-    
     if ($update){
         &ModBiblioMarc($record,$biblionumber,'');
         print "\n modified : $biblionumber \n";



---- Additional Comments From gmcharlt@gmail.com 2009-05-07 17:34:11 ----

Thank you for this suggested patch.  I see you've posted a diff; would it be possible for you to use Git to prepare and format the patch and send it to patches@koha.org?  Instructions for using Git for Koha can be found at http://wiki.koha.org/doku.php?id=en:development:git_usage .

If you don't have the time or inclination to do that, that's fine - I will eventually test and push the diff you've added to this bug.  However, if you plan on sending many patches, using Git will help you a lot.



---- Additional Comments From gmcharlt@gmail.com 2009-06-06 23:13:41 ----

Submitted version of this patch to patches list.



---- Additional Comments From gmcharlt@gmail.com 2009-06-07 18:19:14 ----

Pushed patch to HEAD.  Please test and close.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:07 UTC  ---

This bug was previously known as _bug_ 3201 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3201

Unknown operating system SunOS. Setting to default OS "All".
Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was henry@cmi.univ-mrs.fr.

Comment 1 Paul Poulain 2011-02-22 21:50:41 UTC
fixed a long time ago...