[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. cec0667769188c4f0fd9678f2be549000afe4e59

Evergreen Git git at git.evergreen-ils.org
Mon Aug 8 12:12:29 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_1 has been updated
       via  cec0667769188c4f0fd9678f2be549000afe4e59 (commit)
       via  e0b53ca41132ce228117706128de0b638e5ce8a9 (commit)
       via  8e80ffa1347b85d71de8bcc3ef0c6691bfc09c97 (commit)
      from  8378369a8f6d2b796320683022494d42c2e3fc7d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cec0667769188c4f0fd9678f2be549000afe4e59
Merge: e0b53ca 8378369
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Aug 8 12:08:27 2011 -0400

    Merge branch 'rel_2_1' of git.evergreen-ils.org:Evergreen into rel_2_1


commit e0b53ca41132ce228117706128de0b638e5ce8a9
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Aug 5 16:01:09 2011 -0400

    Whoops. Do that availability test regard of whether hold_boundaries are used.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
index a8bcda2..79dec4d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
@@ -2602,45 +2602,47 @@ sub rec_to_mr_rec_descriptors {
 
 	my $desc = $e->search_metabib_record_descriptor($search);
 
-    if ($hard_boundary) { # 0 (or "top") is the same as no setting
-        my $orgs = $e->json_query(
-            { from => [ 'actor.org_unit_descendants' => $pickup_lib, $hard_boundary ] }
-        );
+	my $query = {
+		distinct => 1,
+		select   => { 'bre' => ['id'] },
+		from	 => {
+			'bre' => {
+				'acn' => {
+					'join' => {
+						'acp' => {"join" => {"acpl" => {}, "ccs" => {}}}
+					  }
+				  }
+			 }
+		},
+		where => {
+			'+bre' => { id => \@recs },
+			'+acp' => {
+				holdable => 't',
+				deleted  => 'f'
+			},
+			"+ccs" => { holdable => 't' },
+			"+acpl" => { holdable => 't' }
+		}
+	};
 
-        my $good_records = $e->json_query(
-            { distinct => 1,
-              select   => { 'bre' => ['id'] },
-              from     => {
-                  'bre' => {
-                      'acn' => {
-                          'join' => {
-                              'acp' => {"join" => {"acpl" => {}, "ccs" => {}}}
-                            }
-                        }
-                   }
-              },
-              where    => {
-                '+bre' => { id => \@recs },
-                '+acp' => {
-                    holdable => 't',
-                    circ_lib => [ map { $_->{id} } @$orgs ],
-                    deleted  => 'f'
-                },
-                "+ccs" => { holdable => 't' },
-                "+acpl" => { holdable => 't' }
-              }
-            }
-        );
+	if ($hard_boundary) { # 0 (or "top") is the same as no setting
+		my $orgs = $e->json_query(
+			{ from => [ 'actor.org_unit_descendants' => $pickup_lib, $hard_boundary ] }
+		) or return $e->die_event;
 
-        my @keep;
-        for my $d (@$desc) {
-            if ( grep { $d->record == $_->{id} } @$good_records ) {
-                push @keep, $d;
-            }
-        }
+		$query->{where}->{"+acp"}->{circ_lib} = [ map { $_->{id} } @$orgs ];
+	}
 
-        $desc = \@keep;
-    }
+	my $good_records = $e->json_query($query) or return $e->die_event;
+
+	my @keep;
+	for my $d (@$desc) {
+		if ( grep { $d->record == $_->{id} } @$good_records ) {
+			push @keep, $d;
+		}
+	}
+
+	$desc = \@keep;
 
 	return { metarecord => $mrec, descriptors => $desc };
 }

commit 8e80ffa1347b85d71de8bcc3ef0c6691bfc09c97
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Aug 5 14:31:03 2011 -0400

    In a middle-layer method for returning holdable formats on a metarecord,
    
    Do a better test of copy holdability than we were doing previously.
    We can't do a perfect test: we don't really know what patron we're doing
    this for, and even if we did, from here it's nontrivial to figure out
    whether we're doing indb holds or script-based, much less run the tests.
    
    Still, we can test whether a copy's in a holdable status, a holdable
    location, and is itself not explicitly marked unholdable.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
index 92cb75a..a8bcda2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
@@ -2610,13 +2610,24 @@ sub rec_to_mr_rec_descriptors {
         my $good_records = $e->json_query(
             { distinct => 1,
               select   => { 'bre' => ['id'] },
-              from     => { 'bre' => { 'acn' => { 'join' => { 'acp' } } } },
+              from     => {
+                  'bre' => {
+                      'acn' => {
+                          'join' => {
+                              'acp' => {"join" => {"acpl" => {}, "ccs" => {}}}
+                            }
+                        }
+                   }
+              },
               where    => {
                 '+bre' => { id => \@recs },
                 '+acp' => {
+                    holdable => 't',
                     circ_lib => [ map { $_->{id} } @$orgs ],
                     deleted  => 'f'
-                }
+                },
+                "+ccs" => { holdable => 't' },
+                "+acpl" => { holdable => 't' }
               }
             }
         );

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Search/Biblio.pm       |   63 ++++++++++++--------
 1 files changed, 38 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list