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

Bill Ott bott at grpl.org
Wed Sep 17 14:42:17 EDT 2008


Has anyone run reshelving_complete.srfsh from trunk?

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...(?)


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.





More information about the Open-ils-dev mailing list