[open-ils-commits] [GIT] Evergreen ILS branch master updated. 6a1c6b68f9459b6ed87b0f1ceb7573aafc9bc8b7

Evergreen Git git at git.evergreen-ils.org
Tue Mar 20 12:34:09 EDT 2012


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, master has been updated
       via  6a1c6b68f9459b6ed87b0f1ceb7573aafc9bc8b7 (commit)
      from  69b708f8647c34c42b375c223de42ef4b72086f7 (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 6a1c6b68f9459b6ed87b0f1ceb7573aafc9bc8b7
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Feb 7 14:40:19 2012 -0500

    Tpac (etc): improve payment history sorting/paging
    
    Payments within a transaction will have the same timestamp.  With a
    large enough set of such payments, sorting by timestamp alone when
    retrieving payments is not enough to guarantee unique pages of payments.
    This adds a secondary sort on payment ID as a tie-breaker.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 627ee87..3fa922c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -3710,11 +3710,18 @@ sub user_payments {
                 }   
             }
         },
-        order_by => [{ # by default, order newest payments first
-            class => 'mp', 
-            field => 'payment_ts',
-            direction => 'desc'
-        }]
+        order_by => [
+            { # by default, order newest payments first
+                class => 'mp', 
+                field => 'payment_ts',
+                direction => 'desc'
+            }, {
+                # secondary sort in ID as a tie-breaker, since payments created
+                # within the same transaction will have identical payment_ts's
+                class => 'mp',
+                field => 'id'
+            }
+        ]
     };
 
     for (qw/order_by limit offset/) {

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

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


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list