From b500cbf4935025b7f0a33f479082bee4c794972f Mon Sep 17 00:00:00 2001 From: dbwells Date: Tue, 21 Dec 2010 22:54:15 +0000 Subject: [PATCH] 'Bindery' item status rethink - this status should eventually be tracked at the unit level, not the item level. git-svn-id: svn://svn.open-ils.org/ILS/trunk@19036 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Serial.pm | 7 +------ Open-ILS/xul/staff_client/server/serial/manage_items.js | 15 ++++++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm b/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm index e55632fa21..6607b0822b 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm @@ -999,8 +999,6 @@ sub unitize_items { if ($mode eq 'receive') { $item->date_received('now'); $item->status('Received'); - } else { - $item->status('Bindery'); } # check for types to trigger summary updates @@ -1064,6 +1062,7 @@ sub unitize_items { foreach my $unit_id (keys %found_unit_ids) { # get all the needed issuances for unit + # TODO remove 'Bindery' from this search (leaving it in for now for backwards compatibility with any current test environment data) my $issuances = $editor->search_serial_issuance([ {"+sitem" => {"unit" => $unit_id, "status" => ["Received", "Bindery"]}}, {"join" => {"sitem" => {}}, "order_by" => {"siss" => "date_published"}} ]); #TODO: evt on search failure @@ -1099,10 +1098,6 @@ sub unitize_items { $sort_key =~ s/(\d+)/sprintf '%06d', $1/eg; # this may need improvement $sunit->sort_key($sort_key); - if ($mode eq 'bind') { - $sunit->status(2); # set to 'Bindery' status - } - my $evt = _update_sunit($editor, undef, $sunit); return $evt if $evt; } 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 4e757be98e..66ca3d8e3b 100644 --- a/Open-ILS/xul/staff_client/server/serial/manage_items.js +++ b/Open-ILS/xul/staff_client/server/serial/manage_items.js @@ -577,15 +577,16 @@ 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}, 'status' : {'!=' : 'Bindery'} }; + obj.lists.main.sitem_retrieve_params = {'date_received' : {'!=' : null}}; // unit set dynamically in 'retrieve' } obj.lists.main.sitem_extra_params ={'order_by' : {'sitem' : 'date_expected ASC, stream ASC'}}; - obj.lists.workarea.sitem_retrieve_params = {'status' : 'Bindery'}; // unit set dynamically in 'retrieve' + obj.lists.workarea.sitem_retrieve_params = {}; // unit set dynamically in 'retrieve' obj.lists.workarea.sitem_extra_params ={'order_by' : {'sitem' : 'date_received DESC'}}; // default to **NEW UNIT** - obj.set_sunit(-2, 'New Unit', '', ''); + // For now, keep the unit static. TODO: Eventually, keep track of and store the last used unit value for both receive and bind separately + // obj.set_sunit(-2, 'New Unit', '', ''); } }, @@ -715,8 +716,12 @@ serial.manage_items.prototype = { var robj; rparams['+sstr'] = { "distribution" : obj.sdist_ids }; - if (obj.mode == 'bind' && list_name == 'workarea') { - rparams['unit'] = obj.current_sunit_id; + if (obj.mode == 'bind') { + if (list_name == 'workarea') { + rparams['unit'] = obj.current_sunit_id; + } else if (!$('serial_manage_items_show_all').checked){ + rparams['unit'] = {"<>" : obj.current_sunit_id}; + } } var other_params = list.sitem_extra_params; -- 2.11.0