Hold targeting didn't work right on type I (issuance) holds, but now it does
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 17 Nov 2010 21:59:50 +0000 (21:59 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 17 Nov 2010 21:59:50 +0000 (21:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18772 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/serial.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/asset.pm

index 515d4ca..cb2a126 100644 (file)
@@ -3417,12 +3417,14 @@ SELECT  usr,
                        <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
                        <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
                        <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
+                       <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
                </fields>
                <links>
                        <link field="creator" reltype="has_a" key="id" map="" class="au"/>
                        <link field="editor" reltype="has_a" key="id" map="" class="au"/>
                        <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
                        <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
+                       <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
index af9cbed..d004f38 100644 (file)
@@ -535,7 +535,7 @@ sub modify_from_fieldmapper {
 
        serial::unit->has_many( items => 'serial::item' );
 
-       serial::issuance->has_a( subscription => 'serial::subsription' );
+       serial::issuance->has_a( subscription => 'serial::subscription' );
        serial::issuance->has_many( items => 'serial::item' );
 
        serial::subscription->has_a( record_entry => 'biblio::record_entry' );
index 7879cb7..431c672 100644 (file)
@@ -21,7 +21,8 @@ __PACKAGE__->table( 'serial_issuance' );
 __PACKAGE__->columns( Primary => qw/id/ );
 __PACKAGE__->columns( Essential => qw/creator editor create_date edit_date
                                       subscription label date_published
-                                      holding_code holding_type holding_link_id/ );
+                                      caption_and_pattern holding_code
+                                      holding_type holding_link_id/ );
 
 #-------------------------------------------------------------------------------
 package serial::item;
@@ -43,8 +44,8 @@ __PACKAGE__->columns( Essential => qw/call_number barcode creator create_date ed
                                   edit_date copy_number status loan_duration circ_lib
                                   fine_level circulate deposit price ref opac_visible dummy_isbn
                                   circ_as_type circ_modifier deposit_amount location mint_condition
-                                  holdable dummy_title dummy_author deleted alert_message label
-                                  age_protect floating label_sort_key contents/ );
+                                  holdable dummy_title dummy_author deleted alert_message
+                                  age_protect floating summary_contents detailed_contents/ );
 
 #-------------------------------------------------------------------------------
 package serial::record_entry;
index e227981..622a1db 100644 (file)
@@ -835,8 +835,7 @@ sub issuance_ranged_tree {
     # ... and add all /their/ items to the target issuance
     for my $i ( @similar_iss ) {
         for my $it ( $i->items() ) {
-    
-            next if ($it->unit->deleted);
+            next unless $it->unit and not $it->unit->deleted;
             next unless (grep { $it->unit->circ_lib eq $_ } @$ou_list);
     
             my $unit = $it->unit->to_fieldmapper;