[OPEN-ILS-DEV] Reshelving Complete

Mike Rylander mrylander at gmail.com
Tue Nov 17 15:56:55 EST 2009


On Tue, Nov 17, 2009 at 3:21 PM, Doug Kyle <dkyle at grpl.org> wrote:
> Mike Rylander wrote:
>>
>> On Tue, Nov 10, 2009 at 9:08 AM, Doug Kyle <dkyle at grpl.org> wrote:
>>
>>>
>>> Mike Rylander wrote:
>>>
>>>>
>>>> On Mon, Nov 9, 2009 at 1:39 PM, Doug Kyle <dkyle at grpl.org> wrote:
>>>>
>>>>
>>>>>
>>>>> Doug Kyle wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> Paul Waak wrote:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> On Sep 18, 2009, at 9:13 AM, Mike Rylander wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> [big snip]
>>>>>>>> So, are their any circulation-manager-type folks out there that
>>>>>>>> would
>>>>>>>> be willing to weigh in on this?  To summarize, the options on the
>>>>>>>> table are:
>>>>>>>>
>>>>>>>> 1) Tie reshelving-complete to the last edit time (effectively the
>>>>>>>> "last time we touched the copy") for copies in the Reshelving status
>>>>>>>> [non-circulation edits would extend the reshelving delay]
>>>>>>>> 2) Extend the current behavior (checkin time OR create time for new,
>>>>>>>> uncirculated copies) to make it aware of transits and apply the
>>>>>>>> delay
>>>>>>>> only after a post-circulation transit is complete [more complicated,
>>>>>>>> and possibly slower, reshelving query]
>>>>>>>>
>>>>>>>>
>>>>>
>>>>> [snip]
>>>>>
>>>>> I'm not sure what plans are for this issue, but here is a patch that we
>>>>> are
>>>>> using with the current behavior to account for transit time.
>>>>>
>>>>>
>>>>
>>>> Thanks, Doug!  One quick question, should the new join be a LEFT JOIN
>>>> for copies that have circulated but not transited?
>>>>
>>>>
>>>>
>>>
>>> Indeed it should, thanks Mike.
>>>
>>>
>>
>> I've attached a mildly reworked version of the patch which I'd love
>> some more eyes on.  Gimme an aye (heh) and I'll commit it.
>>
>>
>
> It appears this query is missing items that have never transited.  I'm
> thinking that is because the left join on action.transit_copy returns nulls
> where no transit exists, and the HAVING clause
>
> MAX(circ.checkin_time) > MAX(trans.dest_recv_time)
>
> does not return true for NULL (unknown) values, so instead we need
>
> ( MAX(circ.checkin_time) > MAX(trans.dest_recv_time) or
> MAX(trans.dest_recv_time) IS NULL )
>
> Sound correct?
>

Indeed.  Would you like to send a trunk-targeted patch, and I'll
backport from there?

-- 
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