[open-ils-commits] [GIT] Evergreen ILS branch rel_2_8 updated. 3b30c886bdcfb126750ed780783660680e846f69

Evergreen Git git at git.evergreen-ils.org
Wed Feb 24 10:35:17 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_8 has been updated
       via  3b30c886bdcfb126750ed780783660680e846f69 (commit)
      from  8a550811b93d1c47bec5117c99d2b97dba20cf9e (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 3b30c886bdcfb126750ed780783660680e846f69
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 f4b9f11..bc1e5a1 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