[OPEN-ILS-DEV] Vandelay Patch - Resubmit with DCO
Dan Wells
dbw2 at calvin.edu
Thu Jan 21 11:20:50 EST 2010
Resubmit with DCO
=============================================
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Daniel B. Wells
=============================================
>>>>>>
Hello,
I have been doing a lot of experimenting with Vandelay the last few weeks and have traced many of my failures to one distinct bug. I finally noticed yesterday why Item Import worked for the 'admin' user but for nobody else. It turns out there is a bug in one of the database functions where it treats the queue 'owner' column as an org_unit ID when in fact it is a usr id. Of course since 'admin' is ID 1 out of the box and there is an org_unit 1 as well, this bug is transparent to admin and easy to miss.
Well, I started by making a few changes to the function to address this, but soon realized that what we really wanted to do was base the import on the Import Def chosen by the user when the records are loaded, and it would be ideal if the Import Def was somehow associated with the queue at the time of import. I started poking around in the schema, and lo and behold, the vandelay.bib_queue table already had an 'item_attr_def' linking column for this very purpose which was going unused!
So, the attached patch finally puts this column to use by doing the following:
1) Edits the create_bib_queue() sub in Vandelay.pm to accept the item import attribute definition ID as an argument and save it appropriately.
2) Edits the vandelay.js interface file to accept and send the import definition ID to create_bib_queue() when creating a queue.
3) Edits fm_IDL.xml to add the 'item_attr_def' field (and fix a small labeling error).
4) Edits 012.schema.vandelay.sql to replace the buggy function that started all this with a now simpler, working version. The change is actually smaller than it looks due removing one nested loop and the resulting indentation change.
Questions and comments welcome!
Thanks,
Dan
--
*********************************************************************************
Daniel Wells, Library Programmer Analyst dbw2 at calvin.edu
Hekman Library at Calvin College
616.526.7133
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Vandelay.diff
Type: application/octet-stream
Size: 7462 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100121/079314da/attachment.obj
More information about the Open-ils-dev
mailing list