[open-ils-commits] [GIT] Evergreen ILS branch master updated. b5c55145272313c13b3e92e75361cb27772773ba
Evergreen Git
git at git.evergreen-ils.org
Wed Aug 24 20:14:00 EDT 2011
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 b5c55145272313c13b3e92e75361cb27772773ba (commit)
via 253db47d25073c1259a7acafa3739579eb028de3 (commit)
via 42337b3be4c5b0a7ef785111912584440ad29917 (commit)
from 0efea6dfefb398283432244e3ab801d5f5e8c3c3 (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 b5c55145272313c13b3e92e75361cb27772773ba
Author: Mike Rylander <mrylander at gmail.com>
Date: Wed Aug 24 20:09:04 2011 -0400
Stamped upgrade script for acq-lineitem-detail-receiver
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index e5830e2..5f5cabf 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0608', :eg_version); -- miker/berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0609', :eg_version); -- miker/berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem-detail-receiver.sql b/Open-ILS/src/sql/Pg/upgrade/0609.schema.acq-lineitem-detail-receiver.sql
similarity index 79%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem-detail-receiver.sql
rename to Open-ILS/src/sql/Pg/upgrade/0609.schema.acq-lineitem-detail-receiver.sql
index 8a604f9..49042bd 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem-detail-receiver.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0609.schema.acq-lineitem-detail-receiver.sql
@@ -2,7 +2,7 @@
BEGIN;
-- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0609', :eg_version);
ALTER TABLE acq.lineitem_detail
ADD COLUMN receiver INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED;
commit 253db47d25073c1259a7acafa3739579eb028de3
Author: Bill Erickson <berick at esilibrary.com>
Date: Wed Aug 24 15:28:56 2011 -0400
Show copy receiver in ACQ copy grid
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js
index 0b9b642..cf54585 100644
--- a/Open-ILS/web/js/ui/default/acq/common/li_table.js
+++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js
@@ -29,6 +29,8 @@ function nodeByName(name, context) {
return dojo.query('[name='+name+']', context)[0];
}
+// for caching linked users. e.g. lineitem_detail.receiver
+var userCache = {};
var liDetailBatchFields = ['fund', 'owning_lib', 'location', 'collection_code', 'circ_modifier', 'cn_label'];
var liDetailFields = liDetailBatchFields.concat(['barcode', 'note']);
@@ -1439,6 +1441,21 @@ function AcqLiTable() {
acqLitCopyCountInput.attr('value', self.copyCount()+'');
+ var rcvr = copy.receiver();
+ if (rcvr) {
+ if (!userCache[rcvr]) {
+ if(rcvr == openils.User.user.id()) {
+ userCache[rcvr] = openils.User.user;
+ } else {
+ userCache[rcvr] = fieldmapper.standardRequest(
+ ['open-ils.actor', 'open-ils.actor.user.retrieve'],
+ {params: [openils.User.authtoken, rcvr]}
+ );
+ }
+ }
+ dojo.query('[name=receiver]', row)[0].innerHTML = userCache[rcvr].usrname();
+ }
+
dojo.forEach(liDetailFields,
function(field) {
var searchFilter;
@@ -1464,6 +1481,7 @@ function AcqLiTable() {
readOnly = true;
}
+
var widget = new openils.widget.AutoFieldWidget({
fmObject : copy,
fmField : field,
diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2
index 28ef757..1851833 100644
--- a/Open-ILS/web/templates/default/acq/common/li_table.tt2
+++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2
@@ -236,6 +236,7 @@
<td>Callnumber</td>
<td>Barcode</td>
<td>Notes</td>
+ <td>Receiver</td>
<td colspan='0'></td>
</tr>
</tbody>
@@ -249,6 +250,7 @@
<td><div name='cn_label'></div></td>
<td><div name='barcode'></div></td>
<td><div name='note'></div></td>
+ <td><div name='receiver'></div></td>
<td><a href="javascript:void(0);" name="receive">Mark Received</a><a href="javascript:void(0);" name="unreceive">Un-Receive</a> <a href="javascript:void(0);" name="cancel">Cancel</a><span class="hidden" name="cancel_reason"></span> <a href="javascript:void(0);" name="claim">Claim</a></td>
<td><div name='delete' dojoType='dijit.form.Button' style='color:red;' scrollOnFocus='false'>X</div></td>
</tr>
commit 42337b3be4c5b0a7ef785111912584440ad29917
Author: Bill Erickson <berick at esilibrary.com>
Date: Wed Aug 24 14:24:54 2011 -0400
Column to track ACQ copy (lineitem_detail) receiver
Creates acq.lineitem_detail.receiver column, set to the staff that
marked the copy as received.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 052631f..cabc99c 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -6966,6 +6966,7 @@ SELECT usr,
<field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
<field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
<field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
+ <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
<field reporter:label="Fund" name="fund" reporter:datatype="link" />
<field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
<field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
@@ -6986,6 +6987,7 @@ SELECT usr,
<link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
<link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
<link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
+ <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
</links>
</class>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
index 8530709..8dc31ab 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -519,6 +519,7 @@ sub receive_lineitem_detail {
return 1 if $lid->recv_time;
+ $lid->receiver($e->requestor->id);
$lid->recv_time('now');
$e->update_acq_lineitem_detail($lid) or return 0;
@@ -554,6 +555,7 @@ sub rollback_receive_lineitem_detail {
return 1 unless $lid->recv_time;
+ $lid->clear_receiver;
$lid->clear_recv_time;
$e->update_acq_lineitem_detail($lid) or return 0;
diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql
index e8869a3..b566ff5 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -534,6 +534,7 @@ CREATE TABLE acq.lineitem_detail (
owning_lib INT REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
location INT REFERENCES asset.copy_location (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
recv_time TIMESTAMP WITH TIME ZONE,
+ receiver INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
cancel_reason INT REFERENCES acq.cancel_reason( id ) DEFERRABLE INITIALLY DEFERRED
);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem-detail-receiver.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem-detail-receiver.sql
new file mode 100644
index 0000000..8a604f9
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem-detail-receiver.sql
@@ -0,0 +1,11 @@
+-- Evergreen DB patch XXXX.data.acq-copy-creator-from-receiver.sql
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE acq.lineitem_detail
+ ADD COLUMN receiver INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED;
+
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/examples/fm_IDL.xml | 2 ++
.../perlmods/lib/OpenILS/Application/Acq/Order.pm | 2 ++
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/200.schema.acq.sql | 1 +
.../0609.schema.acq-lineitem-detail-receiver.sql | 11 +++++++++++
Open-ILS/web/js/ui/default/acq/common/li_table.js | 18 ++++++++++++++++++
.../web/templates/default/acq/common/li_table.tt2 | 2 ++
7 files changed, 37 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0609.schema.acq-lineitem-detail-receiver.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list