From: Kyle Tomita Date: Tue, 29 Jan 2013 23:04:05 +0000 (-0800) Subject: Bug fix for Launchpad #1109316 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f82fee4e1facf86415da8926630840bee9dce7fe;p=working%2FEvergreen.git Bug fix for Launchpad #1109316 Fixed the display of Hold Note(s) Count and Hold Note(s) Text. Signed-off-by: Kyle Tomita Signed-off-by: Pasi Kallinen --- diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 5e766b2906..968efd8dc1 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 be349113a2..b3b68892dd 100644 --- a/Open-ILS/xul/staff_client/server/patron/hold_details.js +++ b/Open-ILS/xul/staff_client/server/patron/hold_details.js @@ -41,6 +41,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); @@ -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 9b15aef53e..a4470eacb5 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -52,6 +52,9 @@ patron.holds.prototype = { 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 +115,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') {