[OPEN-ILS-DEV] opt-in patch

James Fournie jfournie at sitka.bclibraries.ca
Wed Jun 10 18:15:30 EDT 2009


Hi all,

As per my discussion long ago with Mike, I've created a big patch for
the opting functionality, which we are using at SITKA.  We needed to
improve the opting functionality to better acommodate mutli-branch
sites.  SITKA is currently using 1.2, and I can provide the patch for
that version if anyone wants, however the patch I have attached here
has been modified for trunk.

The main change is that the search target is no longer just a depth,
you specify an org unit you wish to search and that org unit and all
of its children will be searched.  I made this change, because the
patron search depth dropdown was not context-aware, and just pulled
all possible org unit types.  In the default Evergreen setup, it gives
you an option to search "This Bookmobile" even if you don't have a
child ou that is a bookmobile.  A slight change to the staff client
fixed this, and it makes the method more generic IMO.  It also makes
the OpenSRF method more useful in a more complex org tree, where you
might be working at a parent ou with multiple child ous, and you just
want to search for a patron in a specific child ou.  To do that you
would need only change findOrgType(el.ou_type()).opac_label() to
el.name() or el.shortname().

The rest of the patch is very specific to opting functionality.  I
have created a permission called patron.opt_in, which is primarily
used for its depth.  The depth is the topmost depth at which opting is
required.  For example, in the default evergreen database, setting
this perm to a depth of 1 (System) means that this user does not have
to opt in patrons within their local system, but must opt-in patrons
outside of their system.

I am keen on Mike's suggestion of a dropdown selecting the opt level,
but we don't really need it at SITKA, and it would be beyond my
current capabilities.  However, I have added the argument for that
value to be passed into the OpenSRF request.  Currently, the patron
will just be opted in at org unit representing the highest level that
the user has the patron.opt_in permission.

Anyway, there it is.

~James Fournie
BC SITKA
-------------- next part --------------

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: 
James Fournie
jfournie at sitka.bclibraries.ca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opting-changes.patch
Type: application/octet-stream
Size: 6822 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20090610/10c47ff5/attachment.obj 


More information about the Open-ils-dev mailing list