[Koha-patches] [PATCH] Bug 6589: Adding supplements broken

Katrin Fischer Katrin.Fischer.83 at web.de
Sat Jul 16 22:35:10 CEST 2011


To test:
- add a new subscription, choose 'create items on receive'
- receive some issues and create items > should work ok
- create a supplement, alone or at the same time as receiving a normal issue
- check if item was created and attached to the biblio record

Without patch this should give you an error message. Although supplement will be created,
no item will be added to the bibliogrpahic record.

With patch applied there should be no error message and the item should be created
and attached to the proper record.
---
 .../prog/en/modules/serials/serials-edit.tt        |    2 +-
 serials/serials-edit.pl                            |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt
index 83df447..304c6ca 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt
@@ -394,7 +394,7 @@ $(document).ready(function() {
    
                 <label>[% iteminformatio.subfield %] - [% IF ( iteminformatio.mandatory ) %]<b>[% END %][% iteminformatio.marc_lib %][% IF ( iteminformatio.mandatory ) %] *</b>[% END %]</label>
                 [% iteminformatio.marc_value %]
-                <input type="hidden" name="itemid" value="[% iteminformatio.itemid %]" />
+                <input type="hidden" name="itemid" value="[% newserialloo.itemid %]" />
                 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
                 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
                 <input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl
index fbf9ad5..db7620c 100755
--- a/serials/serials-edit.pl
+++ b/serials/serials-edit.pl
@@ -176,6 +176,7 @@ foreach my $subscriptionid (@subscriptionids) {
             $cell->{serialsadditems} = 1;
         }
         $cell->{'subscriptionid'} = $subscriptionid;
+        $cell->{biblionumber} = $serialdatalist[0]->{'biblionumber'};
         $cell->{'itemid'}         = 'NNEW';
         $cell->{'serialid'}       = 'NEW';
         $cell->{'issuesatonce'}   = 1;
-- 
1.7.4.1



More information about the Koha-patches mailing list