[open-ils-commits] r19037 - in branches/rel_2_0/Open-ILS: src/perlmods/OpenILS/Application xul/staff_client/server/serial (dbwells)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 21 18:03:47 EST 2010
Author: dbwells
Date: 2010-12-21 18:03:41 -0500 (Tue, 21 Dec 2010)
New Revision: 19037
Modified:
branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js
Log:
'Bindery' item status rethink - this status should eventually be tracked at the unit level, not the item level.
Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm 2010-12-21 22:54:15 UTC (rev 19036)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm 2010-12-21 23:03:41 UTC (rev 19037)
@@ -999,8 +999,6 @@
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 @@
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 @@
$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;
}
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js 2010-12-21 22:54:15 UTC (rev 19036)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_items.js 2010-12-21 23:03:41 UTC (rev 19037)
@@ -577,15 +577,16 @@
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 @@
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;
More information about the open-ils-commits
mailing list