From 550387711c0c96478ad0341cd9285e8e80e83a96 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 5 Aug 2010 19:08:08 +0000 Subject: [PATCH] fix open-ils.circ.prev_renewal_chain.retrieve_by_circ.summary to return the correct user for the previous circ chain, and some debugging tweaks to Item Status Alternate View and avoid a widget collision with hold patrons git-svn-id: svn://svn.open-ils.org/ILS/trunk@17103 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ.pm | 4 ++-- Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js | 5 ++++- Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index c2197dcfd..f19ccca34 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -1679,7 +1679,7 @@ sub retrieve_prev_circ_chain { my $target_copy = $$first_circ{'target_copy'}; my $usr = $$first_circ{'usr'}; my $last_circ_from_prev_chain = $e->json_query({ - 'select' => { 'circ' => ['id'] }, + 'select' => { 'circ' => ['id','usr'] }, 'from' => 'circ', 'where' => { target_copy => $target_copy, @@ -1694,7 +1694,7 @@ sub retrieve_prev_circ_chain { return undef unless $sum; my $obj = Fieldmapper::action::circ_chain_summary->new; $obj->$_($sum->{$_}) for keys %$sum; - return { 'summary' => $obj, 'usr' => $usr }; + return { 'summary' => $obj, 'usr' => $$last_circ_from_prev_chain{'usr'} }; } else { diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js index 713a26dd1..0deea0073 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js @@ -401,6 +401,7 @@ function load_item() { patron.util.format_name( r_au ) + ' : ' + r_au.card().barcode(), details.circ.usr() ); + set_tooltip('patron_name','circ id ' + details.circ.id()); }); set("xact_finish", util.date.formatted_date( details.circ.xact_finish(), '%{localized}' )); set("xact_start", util.date.formatted_date( details.circ.xact_start(), '%{localized}' )); @@ -442,6 +443,7 @@ function load_item() { patron.util.format_name( r_au ) + ' : ' + r_au.card().barcode(), robj['usr'] ); + set_tooltip('prev_patron_name','circ chain prior to circ id ' + details.circ.id()); }); set("prev_num_circs", summary.num_circs()); set("prev_num_renewals", Number(summary.num_circs()) - 1); @@ -556,6 +558,7 @@ function load_item() { set_tooltip("selection_ou", ''); set("target", ''); set("hold_usr", ''); + set("hold_patron_name", ''); set("cancel_time", ''); set("notify_time", ''); set("notify_count", ''); @@ -591,7 +594,7 @@ function load_item() { JSAN.use('patron.util'); var au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), details.hold.usr() ); - $('patron_name').setAttribute('value', $('circStrings').getFormattedString('staff.circ.copy_details.user_details', [au_obj.family_name(), au_obj.first_given_name(), au_obj.card().barcode()]) ); + $('hold_patron_name').setAttribute('value', $('circStrings').getFormattedString('staff.circ.copy_details.user_details', [au_obj.family_name(), au_obj.first_given_name(), au_obj.card().barcode()]) ); set("hold_status", details.hold.status()); set("transit", details.hold.transit()); diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul index 46d8baf8e..f85b53c10 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul @@ -278,7 +278,7 @@ - -- 2.11.0