From: Kyle Tomita Date: Thu, 31 Jan 2013 19:22:07 +0000 (-0800) Subject: Bug Fix 1109316 for Evergreen 2.2.5 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fcatalystit%2FBug1109316_rel225;p=working%2FEvergreen.git Bug Fix 1109316 for Evergreen 2.2.5 Hold Note(s) Count and Hold Note(s) Text displayed properly in their respective columns on the Holds List View and Detail View pages. Signed-off-by: Kyle Tomita --- diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 01580807e2..09c29e87e6 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -2692,7 +2692,7 @@ circ.util.hold_columns = function(modify,params) { 'hidden' : true, 'editable' : false, 'render' : function(my) { var s = ''; - var notes = my.ahr.notes(); + var notes = my.ahrn_note; for (var i = 0; i < notes.length; i++) { s += notes[i].title() + ':' + notes[i].body() + '; \n'; } diff --git a/Open-ILS/xul/staff_client/server/patron/hold_details.js b/Open-ILS/xul/staff_client/server/patron/hold_details.js index aaace8b064..121f292a25 100644 --- a/Open-ILS/xul/staff_client/server/patron/hold_details.js +++ b/Open-ILS/xul/staff_client/server/patron/hold_details.js @@ -42,6 +42,7 @@ function fetch_and_render_all(do_not_refresh_parent_interface) { render_patron(); } + retrieve_notes(); a_list_of_one(); var x = document.getElementById('bib_brief_box'); while (x.firstChild) x.removeChild(x.lastChild); @@ -56,7 +57,7 @@ function fetch_and_render_all(do_not_refresh_parent_interface) { get_contentWindow(bib_brief).xulG = { 'docid' : g.blob.mvr.doc_id() }; } - retrieve_notes(); render_notes(); + render_notes(); retrieve_notifications(); render_notifications(); @@ -147,7 +148,8 @@ function a_list_of_one() { 'queue_position' : g.blob.queue_position, 'potential_copies' : g.blob.potential_copies, 'estimated_wait' : g.blob.estimated_wait, - 'ahrn_count' : g.blob.hold.notes().length, + 'ahrn_count' : g.notes.length, + 'ahrn_note' : g.notes, 'blob' : g.blob } }, diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 478056c121..69586ada60 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -51,6 +51,8 @@ patron.holds.prototype = { obj.determine_hold_interface_type(); var progressmeter = document.getElementById('progress'); + dojo.require ('openils.PermaCrud'); + g.pcrud = new openils.PermaCrud({authtoken :ses()}); JSAN.use('circ.util'); var columns = circ.util.hold_columns( @@ -112,7 +114,10 @@ patron.holds.prototype = { row.my.queue_position = blob.queue_position; row.my.potential_copies = blob.potential_copies; row.my.estimated_wait = blob.estimated_wait; - row.my.ahrn_count = blob.hold.notes().length; + g.notes = g.pcrud.search('ahrn', {'hold' : row.my.hold_id}); + g.notes = g.notes.reverse(); + row.my.ahrn_count = g.notes.length; + row.my.ahrn_note = g.notes; var copy_id = row.my.ahr.current_copy(); if (typeof copy_id == 'object') {