[open-ils-commits] [GIT] Evergreen ILS branch master updated. 8aea98c37f73c6b2b58c79d48cb0e2d13134b2df

Evergreen Git git at git.evergreen-ils.org
Wed Mar 13 12:18:22 EDT 2013


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  8aea98c37f73c6b2b58c79d48cb0e2d13134b2df (commit)
       via  f9441fad3a8c7fb7d67fed2b59b499acb94bfa78 (commit)
      from  41aa2f0441ae40ac91d4d30c6b3d3de96542849e (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 8aea98c37f73c6b2b58c79d48cb0e2d13134b2df
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Tue Mar 12 13:47:41 2013 -0400

    Release notes for Serial Control special statuses
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/docs/RELEASE_NOTES_NEXT/serial_control_special_statuses.txt b/docs/RELEASE_NOTES_NEXT/serial_control_special_statuses.txt
new file mode 100644
index 0000000..5b4e3c3
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/serial_control_special_statuses.txt
@@ -0,0 +1,7 @@
+Serial Control: Set Special Statuses
+====================================
+The Serial Control interface prevents direct editing of serial item statuses
+for data integrity reasons. As an alternative to direct control, the interface
+now offers new menu options for setting items to 'claimed', 'not held', and
+'not published'. Note that these statuses are still currently useful for
+reporting and display purposes only.

commit f9441fad3a8c7fb7d67fed2b59b499acb94bfa78
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Fri Dec 14 14:22:20 2012 -0500

    Serials special status support for Items tab
    
    The Serial Control interface prevents direct editing of item status, as
    some status changes require additional updates and/or can create data
    conflicts.
    
    In the current state, though, we have no way to set three important
    statuses: claimed, not held, and not published.  At some point, claims in
    particular should be more than a simple status, but in the meantime, the
    ability to set these should not be overlooked.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 4134573..6f2543d 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -1749,6 +1749,9 @@
 <!ENTITY staff.serial.ssub_editor.notes.label "Subscription Notes">
 <!ENTITY staff.serial.ssub_editor.notes.accesskey "N">
 <!ENTITY staff.serial.manage_dists.actions.cmd_add_sstr.label "Add Stream">
+<!ENTITY staff.serial.manage_items.actions.cmd_claim_items.label "Claim Item">
+<!ENTITY staff.serial.manage_items.actions.cmd_set_items_not_held.label "Set 'Not Held'">
+<!ENTITY staff.serial.manage_items.actions.cmd_set_items_not_published.label "Set 'Not Published'">
 <!ENTITY staff.serial.manage_dists.actions.cmd_delete_sstr.label "Delete Stream">
 <!ENTITY staff.serial.manage_items.actions.cmd_edit_items.label "Edit Item Attributes">
 <!ENTITY staff.serial.manage_items.actions.cmd_edit_items.accesskey "E">
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties b/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
index 917dd68..d41adb7 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
@@ -67,6 +67,9 @@ staff.serial.manage_dists.delete_sstr.override=Override Delete Failure? Doing so
 staff.serial.manage_items.subscriber.label=Subscriber
 staff.serial.manage_items.holder.label=Holder
 staff.serial.manage_items.notes_column.label=Notes (Item/Dist/Sub)
+staff.serial.manage_items.set_claimed_success=Successfully claimed %1$s item(s)
+staff.serial.manage_items.set_not_held_success=Successfully set %1$s item(s) to 'Not Held'
+staff.serial.manage_items.set_not_published_success=Successfully set %1$s item(s) to 'Not Published'
 staff.serial.manage_subs.add.error=error adding object in manage_subs.js:
 staff.serial.manage_subs.delete.error=error deleting object in manage_subs.js:
 staff.serial.manage_subs.delete_scap.confirm=Are you sure you would like to delete this caption and pattern?
diff --git a/Open-ILS/xul/staff_client/server/serial/manage_items.js b/Open-ILS/xul/staff_client/server/serial/manage_items.js
index 9b519b4..08a7135 100644
--- a/Open-ILS/xul/staff_client/server/serial/manage_items.js
+++ b/Open-ILS/xul/staff_client/server/serial/manage_items.js
@@ -280,6 +280,18 @@ serial.manage_items.prototype = {
                             }
                         }
                     ],
+                    'cmd_claim_items' : [
+                        ['command'],
+                        function () { obj.set_items_special_status('Claimed','staff.serial.manage_items.set_claimed_success') }
+                    ],
+                    'cmd_set_items_not_published' : [
+                        ['command'],
+                        function () { obj.set_items_special_status('Not Published','staff.serial.manage_items.set_not_published_success') }
+                    ],
+                    'cmd_set_items_not_held' : [
+                        ['command'],
+                        function () { obj.set_items_special_status('Not Held','staff.serial.manage_items.set_not_held_success') }
+                    ],
                     'cmd_delete_items' : [
                         ['command'],
                         function() {
@@ -728,7 +740,7 @@ serial.manage_items.prototype = {
             if ($('serial_manage_items_show_all').checked) {
                 obj.lists.main.sitem_retrieve_params = {};
             } else {
-                obj.lists.main.sitem_retrieve_params = {'date_received' : null };
+                obj.lists.main.sitem_retrieve_params = { 'date_received' : null, 'status' : {'not in' : ['Not Held', 'Not Published']} };
             }
             obj.lists.main.sitem_extra_params ={'order_by' : {'sitem' : 'date_expected ASC, stream ASC'}};
 
@@ -797,6 +809,14 @@ serial.manage_items.prototype = {
                             row.my.parent_obj = obj;
                             //params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':copy_id,'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': ( row.my.record ? row.my.record.id() : null ) }) );
                             params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'sitem_id':sitem.id()}) );
+                            if (sitem.status() == 'Claimed') {
+                                params.treeitem_node.firstChild.setAttribute( 'properties', 'makeItGray' );
+                            } else if (sitem.status() == 'Not Held' || sitem.status() == 'Not Published') {
+                                var treecells = params.treeitem_node.firstChild.childNodes;
+                                for (i = 0; i < treecells.length; i++) {
+                                    treecells[i].setAttribute( 'properties', 'crossItOut' );
+                                }
+                            }
                             dump('dumping... ' + js2JSON(obj.list_sitem_map[sitem.id()]));
                             if (typeof params.on_retrieve == 'function') {
                                 params.on_retrieve(row);
@@ -899,6 +919,28 @@ serial.manage_items.prototype = {
         }
     },
 
+    // accepts a list of ids or a list of objects
+    'refresh_rows' : function(list) {
+        var obj = this;
+
+        var id_list;
+
+        if (typeof list[0] == 'object') {
+            id_list = util.functional.map_list(
+                list,
+                function(o) {
+                    return o.id()
+                }
+            );
+        } else {
+            id_list = list;
+        }
+
+        for (var i = 0; i < id_list.length; i++) {
+            obj.lists[obj.selected_list].refresh_row(obj.row_map[id_list[i]]);
+        }
+    },
+
 	'retrieve' : function(list_name) {
 		var obj = this;
         var list = obj.lists[list_name];
@@ -947,6 +989,15 @@ serial.manage_items.prototype = {
 		dump('manage_items.on_select list = ' + js2JSON(list) + '\n');
 
 		var obj = this;
+        obj.controller.view.cmd_claim_items.setAttribute('disabled','false');
+
+        for (var i = 0; i < list.length; i++) {
+            var item = obj.list_sitem_map[list[i].sitem_id];
+            if (item.status() != 'Expected') {
+                obj.controller.view.cmd_claim_items.setAttribute('disabled','true');
+                break;
+            }
+        }
 
 		/*obj.controller.view.cmd_items_claimed_returned.setAttribute('disabled','false');
 		obj.controller.view.sel_mark_items_missing.setAttribute('disabled','false');*/
@@ -1027,6 +1078,36 @@ serial.manage_items.prototype = {
             );
             seen_ids[obj_id] = 1;
         }
+    },
+
+    'set_items_special_status' : function(new_status, message) {
+        var obj = this;
+        try {
+            if (!obj.retrieve_ids || obj.retrieve_ids.length == 0) return;
+
+            JSAN.use('util.functional');
+            var list = util.functional.map_list(
+                    obj.retrieve_ids,
+                    function (o) {
+                        var item = obj.list_sitem_map[o.sitem_id];
+                        item.status(new_status);
+                        obj.list_sitem_map[o.sitem_id] = item;
+                        return item;
+                    }
+                );
+
+            var robj = obj.network.request(
+                        'open-ils.serial',
+                        'open-ils.serial.item.fleshed.batch.update',
+                        [ ses(), list ]
+                    );
+            if (typeof robj.ilsevent != 'undefined') throw(robj);
+
+            alert($('serialStrings').getFormattedString(message, [list.length]));
+            obj.refresh_rows(list);
+        } catch(E) {
+            obj.error.standard_unexpected_error_alert('staff.serial.manage_items.set_items_special_status.error',E);
+        }
     }
 }
 
diff --git a/Open-ILS/xul/staff_client/server/serial/manage_items.xul b/Open-ILS/xul/staff_client/server/serial/manage_items.xul
index b9ddaea..6a838c0 100644
--- a/Open-ILS/xul/staff_client/server/serial/manage_items.xul
+++ b/Open-ILS/xul/staff_client/server/serial/manage_items.xul
@@ -41,6 +41,9 @@ vim:noet:sw=4:ts=4:
         <menupopup id="serial_manage_items_popup">
             <menuitem command="cmd_edit_items" label="&staff.serial.manage_items.actions.cmd_edit_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_edit_items.accesskey;"/>
             <menuitem command="cmd_reset_items" label="&staff.serial.manage_items.actions.cmd_reset_items.label;" />
+            <menuitem command="cmd_claim_items" label="&staff.serial.manage_items.actions.cmd_claim_items.label;" />
+            <menuitem command="cmd_set_items_not_published" label="&staff.serial.manage_items.actions.cmd_set_items_not_published.label;" />
+            <menuitem command="cmd_set_items_not_held" label="&staff.serial.manage_items.actions.cmd_set_items_not_held.label;" />
             <menuitem command="cmd_delete_items" label="&staff.serial.manage_items.actions.cmd_delete_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_delete_items.accesskey;"/>
             <menuitem command="cmd_view_sitem_notes" label="&staff.serial.manage_items.actions.cmd_view_sitem_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sitem_notes.accesskey;"/>
             <menuitem command="cmd_view_sdist_notes" label="&staff.serial.manage_items.actions.cmd_view_sdist_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sdist_notes.accesskey;"/>
@@ -68,6 +71,9 @@ vim:noet:sw=4:ts=4:
                     <menupopup>
                         <menuitem command="cmd_edit_items" label="&staff.serial.manage_items.actions.cmd_edit_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_edit_items.accesskey;"/>
                         <menuitem command="cmd_reset_items" label="&staff.serial.manage_items.actions.cmd_reset_items.label;" />
+                        <menuitem command="cmd_claim_items" label="&staff.serial.manage_items.actions.cmd_claim_items.label;" />
+                        <menuitem command="cmd_set_items_not_published" label="&staff.serial.manage_items.actions.cmd_set_items_not_published.label;" />
+                        <menuitem command="cmd_set_items_not_held" label="&staff.serial.manage_items.actions.cmd_set_items_not_held.label;" />
                         <menuitem command="cmd_delete_items" label="&staff.serial.manage_items.actions.cmd_delete_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_delete_items.accesskey;"/>
                         <menuitem command="cmd_view_sitem_notes" label="&staff.serial.manage_items.actions.cmd_view_sitem_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sitem_notes.accesskey;"/>
                         <menuitem command="cmd_view_sdist_notes" label="&staff.serial.manage_items.actions.cmd_view_sdist_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sdist_notes.accesskey;"/>
diff --git a/Open-ILS/xul/staff_client/server/serial/serctrl_main.xul b/Open-ILS/xul/staff_client/server/serial/serctrl_main.xul
index 34b0f31..456c7ad 100644
--- a/Open-ILS/xul/staff_client/server/serial/serctrl_main.xul
+++ b/Open-ILS/xul/staff_client/server/serial/serctrl_main.xul
@@ -52,6 +52,7 @@ vim:noet:sw=4:ts=4:
 		<command id="cmd_add_sstr"/>
 		<command id="cmd_add_subscriptions"/>
 		<command id="cmd_broken" />
+		<command id="cmd_claim_items"/>
 		<command id="cmd_clear" />
 		<command id="cmd_edit_items"/>
         <command id="cmd_edit_sdists"/>
@@ -74,6 +75,8 @@ vim:noet:sw=4:ts=4:
 		<command id="cmd_refresh_list"/>
 		<command id="cmd_replace_barcode"/>
         <command id="cmd_reset_items"/>
+        <command id="cmd_set_items_not_held"/>
+        <command id="cmd_set_items_not_published"/>
         <command id="cmd_set_sunit" />
         <command id="cmd_set_other_sunit" />
         <command id="cmd_show_all_libs" />
diff --git a/Open-ILS/xul/staff_client/server/skin/serial.css b/Open-ILS/xul/staff_client/server/skin/serial.css
index 0414871..ca88a32 100644
--- a/Open-ILS/xul/staff_client/server/skin/serial.css
+++ b/Open-ILS/xul/staff_client/server/skin/serial.css
@@ -27,3 +27,12 @@ groupbox {
 description#print_routing_desc { margin: 0; padding: 0 1em; }
 #pattern_wizard_main > vbox { padding: 0.5em 0; }
 #pattern_wizard_main { overflow: auto; }
+treechildren::-moz-tree-row(makeItGray) {
+    background-color: #CCCCCC;
+}
+treechildren::-moz-tree-row(makeItGray, selected) {
+    background-color: #AAAAAA;
+}
+treechildren::-moz-tree-cell-text(crossItOut) {
+    text-decoration: line-through;
+}

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    3 +
 .../server/locale/en-US/serial.properties          |    3 +
 .../xul/staff_client/server/serial/manage_items.js |   83 +++++++++++++++++++-
 .../staff_client/server/serial/manage_items.xul    |    6 ++
 .../staff_client/server/serial/serctrl_main.xul    |    3 +
 Open-ILS/xul/staff_client/server/skin/serial.css   |    9 ++
 .../serial_control_special_statuses.txt            |    7 ++
 7 files changed, 113 insertions(+), 1 deletions(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/serial_control_special_statuses.txt


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list