Bug 3201 - script missing090field.pl if record is NULL
Summary: script missing090field.pl if record is NULL
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-07 04:58 UTC by Chris Cormack
Modified: 2012-10-25 23:04 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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...