[open-ils-commits] [GIT] Evergreen ILS branch rel_2_9 updated. 7066a3200f96c0863445cf196e933f71df04f94e

Evergreen Git git at git.evergreen-ils.org
Wed Feb 24 10:34:49 EST 2016


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_9 has been updated
       via  7066a3200f96c0863445cf196e933f71df04f94e (commit)
      from  bd8411c9e141ab3d6bf3cb3ac895b85bc43012b6 (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 7066a3200f96c0863445cf196e933f71df04f94e
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Wed Dec 16 15:46:17 2015 -0500

    LP#1526546 Sort copies by part label in holdings maint.
    
    This commit improves the sorting of copies on the Holdings Maintenance
    screen in the XUL-based staff client. The previous code sorted the
    copies by their barcodes after retrieval. This commit moves the sorting
    logic into the search call and adds logic to first sort by the part
    label sort key.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
index 91566c2..6b7d3a6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
@@ -680,11 +680,25 @@ sub _build_volume_list {
 
         my $copies = $e->search_asset_copy([
             { call_number => $volume->id , deleted => 'f' },
-            { flesh => 1, flesh_fields => { acp => ['stat_cat_entries','parts'] } }
+            {
+                join => {
+                    acpm => {
+                        type => 'left',
+                        join => {
+                            bmp => { type => 'left' }
+                        }
+                    }
+                },
+                flesh => 1,
+                flesh_fields => { acp => ['stat_cat_entries','parts'] },
+                order_by => [
+                    {'class' => 'bmp', 'field' => 'label_sortkey', 'transform' => 'oils_text_as_bytea'},
+                    {'class' => 'bmp', 'field' => 'label', 'transform' => 'oils_text_as_bytea'},
+                    {'class' => 'acp', 'field' => 'barcode'}
+                ]
+            }
         ]);
 
-        $copies = [ sort { $a->barcode cmp $b->barcode } @$copies  ];
-
         for my $c (@$copies) {
             if( $c->status == OILS_COPY_STATUS_CHECKED_OUT ) {
                 $c->circulations(

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Cat.pm    |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list