[open-ils-commits] [GIT] Evergreen ILS branch master updated. 74dc248e2333240df39abdbdc9e28b7c98259cd0
Evergreen Git
git at git.evergreen-ils.org
Sun Dec 17 22:27:08 EST 2017
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 74dc248e2333240df39abdbdc9e28b7c98259cd0 (commit)
from d6e6519437daaa95de8a15a5b3d7e0dee2412126 (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 74dc248e2333240df39abdbdc9e28b7c98259cd0
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Fri Dec 8 10:29:40 2017 -0500
LP#1729922: correctly display most recent transit in item status
This patch ensures that the 'Most Recent Transit' display in
the web staff client's item status page shows the latest transit,
not the oldest one. This also fixes a bug where the transit
receive time never got displayed. As a side effect, this patch
also ensures that only the transit in question is fetched from
the database, not all transits on the item.
To test
-------
[1] Set up an item with some closed transits and display in in
detail view in the Item Status page. Note that the
/oldest/ transit is displayed and that the transit
receive time field is blank.
[2] Apply the patch and repeat step 1.
[3] This time, the most recent transit should be displayed, and
if that transit was received, the receive time should be
displayed.
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
Signed-off-by: Jason Etheridge <jason at EquinoxInitiative.org>
diff --git a/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2
index b66ba06..c4f389b 100644
--- a/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2
@@ -118,7 +118,7 @@
<div class="flex-row">
<div class="flex-cell">[% l('Transit Receive Time') %]</div>
<div class="flex-cell well">
- {{transit.source_recv_time() | date:egDateAndTimeFormat}}
+ {{transit.dest_recv_time() | date:egDateAndTimeFormat}}
</div>
</div>
</div>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
index 8b8f9ef..e587818 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
@@ -857,16 +857,20 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore ,
});
}
- function loadTransits() {
+ function loadMostRecentTransit() {
delete $scope.transit;
delete $scope.hold_transit;
if (!copyId) return;
egCore.pcrud.search('atc',
{target_copy : copyId},
- {order_by : {atc : 'source_send_time DESC'}}
+ {
+ order_by : {atc : 'source_send_time DESC'},
+ limit : 1
+ }
).then(null, null, function(transit) {
+ // use progress callback since we'll get up to one result
$scope.transit = transit;
transit.source(egCore.org.get(transit.source()));
transit.dest(egCore.org.get(transit.dest()));
@@ -892,7 +896,7 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore ,
case 'holds':
loadHolds()
- loadTransits();
+ loadMostRecentTransit();
break;
case 'triggered_events':
-----------------------------------------------------------------------
Summary of changes:
.../src/templates/staff/cat/item/t_holds_pane.tt2 | 2 +-
Open-ILS/web/js/ui/default/staff/cat/item/app.js | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list