[OPEN-ILS-DEV] actor.card creator and create_time

Bill Ott bott at grpl.org
Mon Dec 6 13:51:30 EST 2010


Bill Erickson said the following on 12/06/2010 11:03 AM:
>
> On Wed, Dec 1, 2010 at 10:03 AM, Bill Ott <bott at grpl.org 
> <mailto:bott at grpl.org>> wrote:
>
>     We sometimes encounter disputes over when exactly a new library
>     card was issued.  Particularly when it comes to lost cards and
>     checkouts on reportedly lost cards.  While we can gleen much of
>     the information from the auditor tables, it's still not an exact
>     science.
>
>     Long ago I mentioned the possibility of adding a timestamp to the
>     card.  While it involves a dreaded schema change, the code to
>     store the data is very basic.  I also added a creator, as it's
>     another piece of information that is sometimes hard to track down.
>
>     For your review.  The attached, is against trunk.
>
>
>
> Hi Bill.  Thanks for the patch!  I have a couple of comments:
>
> 1. For the date display in the registration UI, you can use something 
> like this to get a nice locale-friendly date:
>
> getByName(row, 'create_date').innerHTML =
>
>     openils.Util.timeStamp( card.create_date(), {"formatLength": 
> "short"} );
>
>
> In en-US, this would be dd/mm/yyyy
>
> 2. "create_date" should also be added to CDBI/actor.pm <http://actor.pm>.
>
> 3. As of 2.0, there is a user purging database function that scrubs 
> away the existence of a user.  The staff version of this call requires 
> that any object linked to a staff user be handed over to another staff 
> account during purge.  As such, any new fields added to the DB that 
> link to (what in practice would have to be) a staff account, need to 
> be accounted for in the purge routine.  The code lives 
> in 999.functions.global.sql and it's called actor.usr_purge_data.  In 
> here, there are a series of update commands grouped by schema for 
> convenience.  Something like this should do it:
>
> UPDATE actor.card SET creator = dest_usr WHERE creator = src_usr;
>
> -b
>
> -- 
> Bill Erickson
> | VP, Software Development & Integration
> | Equinox Software, Inc. / Your Library's Guide to Open Source
> | phone: 877-OPEN-ILS (673-6457)
> | email: erickson at esilibrary.com <mailto:erickson at esilibrary.com>
> | web: http://esilibrary.com


Thanks for the feedback Bill.  I've attached another patch with the 
noted changes, and included the SQL changes in the appropriate create 
scripts.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20101206/987a96c5/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: card_create.diff
Type: text/x-patch
Size: 5862 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20101206/987a96c5/attachment.bin 


More information about the Open-ils-dev mailing list