Bug Fix 1109316 for Evergreen 2.2.5 user/catalystit/Bug1109316_rel225
authorKyle Tomita <ktomita@catalystitservices.com>
Thu, 31 Jan 2013 19:22:07 +0000 (11:22 -0800)
committerKyle Tomita <ktomita@catalystitservices.com>
Thu, 31 Jan 2013 19:22:07 +0000 (11:22 -0800)
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 <ktomita@catalystitservices.com>
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/patron/hold_details.js
Open-ILS/xul/staff_client/server/patron/holds.js

index 0158080..09c29e8 100644 (file)
@@ -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';
                 }
index aaace8b..121f292 100644 (file)
@@ -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
                     }
                 },
index 478056c..69586ad 100644 (file)
@@ -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') {