[OPEN-ILS-GENERAL] Reshelving 2.2Alpha1

Thomas Berezansky tsbere at mvlc.org
Wed Jan 25 09:33:39 EST 2012


Going to point out here what I did in IRC:

"with ParamValues: 1=undef"

That indicates that the "default" passed in is ending up as "undef"  
rather than a number of seconds, which is breaking the call (because  
undef isn't valid at that point in the SQL).

I can find no reason that would be the case, as that is being parsed  
by an OpenSRF function that hasn't changed in years, and not in the  
version they are running.

Even if something was wrong with the function, it defaults to a return  
of 0, not undef.

Thomas Berezansky
Merrimack Valley Library Consortium


Quoting Ben Shum <bshum at biblio.org>:

> Hi Sue,
>
> Not sure about the cause of the error you're seeing quite yet, but I  
> noticed that the SQL function specified as part of the error looks  
> out of date.  The reshelving interval in 2.x was not picking up the  
> proper values from the library settings, so with help, I managed to  
> write a fix to that SQL function to get it working better.  See:  
> http://git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=c1202c1492a210ea51610a164d938faef4a4d28c
>
> Normally, what I would expect to see is that one would run the  
> "reshelving_complete.srfsh" script at various intervals using cron,  
> and then assign in the staff client a unique (or shared) library  
> setting for "Change reshelving status interval".  On our system, we  
> chose a value like "1 hour".   That way we don't have to specify the  
> interval as part of the command actions.
>
> Even before we made that previously mentioned change to our  
> production systems, the cron job was working fine, so I'm unsure why  
> you've experienced the error you've noted...
>
> -- Ben
>
> On 1/25/2012 8:09 AM, Sue Hopkins wrote:
>>
>> Hi,
>>
>> I am running release 2.2-alpha1 and I cannot get any reshelving to  
>> work.  When I try to run the reshelving command from an srfsh  
>> prompt , I get the following:
>>
>> srfsh# request open-ils.storage  
>> open-ils.storage.action.circulation.reshelving.complete "2h"
>>
>> Received Exception:
>>
>> Name: osrfMethodException
>>
>> Status:  *** Call to  
>> [open-ils.storage.action.circulation.reshelving.complete] failed  
>> for session [1327496758.265765.13274967589115], thread trace [1]:
>>
>> DBD::Pg::st execute failed: called with 3 bind variables when 1 are  
>> needed [for Statement "             UPDATE  asset.copy
>>
>>                  SET   status = 0
>>
>>                  WHERE id IN (
>>
>>            SELECT cp.id
>>
>>            FROM  asset.copy cp
>>
>>                LEFT JOIN actor.org_unit_setting setting
>>
>>                    ON (cp.circ_lib = setting.org_unit AND  
>> setting.name = 'circ.reshelving_complete.interval')
>>
>>            WHERE cp.status = 7
>>
>>                AND cp.status_changed_time < NOW() - CAST( COALESCE(  
>> BTRIM( setting.value,'"' ), ? )  AS INTERVAL)
>>
>>                  )
>>
>> " with ParamValues: 1=undef] at  
>> /usr/share/perl5/DBIx/ContextualFetch.pm line 52.
>>
>> Status: 500
>>
>> ------------------------------------
>>
>> Request Completed Successfully
>>
>> Request Time in seconds: 0.063729
>>
>> ------------------------------------
>>
>> :
>>
>> Any ideas how I can get this working?
>>
>> */Sue Hopkins/*
>>
>> graphic
>>
>>
>>
>> */Systems & Networking Manager/*
>>
>> /C/W MARS, Inc./
>>
>> /67 Millbrook Street, Suite 201/
>>
>> /Worcester, MA 01606/
>>
>> /Ph:   (508)-755-3323 *ext-18*/
>>
>> /Fax: (508)-755-3721/
>>
>
> -- 
> Benjamin Shum
> Open Source Software Coordinator
> Bibliomation, Inc.
> 32 Crest Road
> Middlebury, CT 06762
> 203-577-4070, ext. 113
>
>




More information about the Open-ils-general mailing list