[OPEN-ILS-DEV] action.pm - reshelving.complete

Mike Rylander mrylander at gmail.com
Wed Oct 29 22:51:55 EDT 2008


On Wed, Sep 17, 2008 at 3:09 PM, Mike Rylander <mrylander at gmail.com> wrote:
> On Wed, Sep 17, 2008 at 2:42 PM, Bill Ott <bott at grpl.org> wrote:
>> Has anyone run reshelving_complete.srfsh from trunk?
>
> I doubt it ... but I'm glad someone has tested it now.
>

Trying to go back through some older stuff in my inbox ... this was
fixed in revision 10746 (
http://svn.open-ils.org/trac/ILS/changeset/10746 ), in the run-up to
1.4.0.0rc1.

--miker

>>
>> I was playing with the circ.reshelving_complete.interval value within
>> actor.org_unit_setting, under a 1.2.x release, when I received the
>> following, which doesn't seem version related, but just SQL syntax...(?)
>>
>
> I'll have to look into that -- looks like a subselect is going to be
> needed.  Thanks for the report!
>
>>
>> Status:  *** Call to
>> [open-ils.storage.action.circulation.reshelving.complete] failed for session
>> [1221675859.851948.122167585930291], thread trace [1]:
>> DBD::Pg::st execute failed: ERROR:  column "setting.value" must appear in
>> the GROUP BY clause or be used in an aggregate function
>> [for Statement "               UPDATE  asset.copy
>>                 SET   status = 0
>>                         WHERE id IN (
>>                   SELECT  id
>>                     FROM  (SELECT cp.id, MAX(circ.checkin_time)
>>                             FROM  asset.copy cp
>>                                   JOIN action.circulation circ ON
>> (circ.target_copy = cp.id)
>>                                   LEFT JOIN actor.org_unit_setting setting
>>                                       ON (cp.circ_lib = setting.org_unit AND
>> setting.name = 'circ.reshelving_complete.interval')
>>                             WHERE circ.checkin_time IS NOT NULL
>>                                   AND cp.status = 7
>>                             GROUP BY 1
>>                             HAVING MAX(circ.checkin_time) < NOW() - CAST(
>> COALESCE( BTRIM( setting.value,'"' ), ? )  AS INTERVAL)
>>                           ) AS foo
>>                                       UNION ALL
>>                   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')
>>                           LEFT JOIN action.circulation circ ON
>> (circ.target_copy = cp.id AND circ.id IS NULL)
>>                     WHERE cp.status = 7
>>                           AND cp.create_date < NOW() - CAST( COALESCE(
>> BTRIM( setting.value,'"' ), ? )  AS INTERVAL)
>>                 )
>> " with ParamValues: 1='24h', 2='24h'] at
>> /usr/share/perl5/DBIx/ContextualFetch.pm line 52.
>>
>>
>>
>>
>
>
>
> --
> Mike Rylander
>  | VP, Research and Design
>  | Equinox Software, Inc. / The Evergreen Experts
>  | phone: 1-877-OPEN-ILS (673-6457)
>  | email: miker at esilibrary.com
>  | web: http://www.esilibrary.com
>



-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list