[OPEN-ILS-DEV] PATCHES: OpenNCIP (Attn: David) and OpenILS::SIP

David J. Fiander david at fiander.info
Wed Jun 18 18:24:37 EDT 2008


Actually, now that I've applied the patch and seen the differences in  
context, there's a small problem.

We only add the due date, recall date, or hold pickup date if they're  
non-zero. The strings being returned by the ILS are not numbers, so  
they all evaluate to zero. That is, those fields will never been  
sent, even if they're set. The correct test is not

	foo != 0

but

	!foo

Attached is an updated patch.

- David

On 18-Jun-2008, at 16:49 , David J. Fiander wrote:

>
> On 18-Jun-2008, at 09:02 , Bill Erickson wrote:
>
>> On Wednesday 18 June 2008 5:20 Brandon W. Uhlman wrote:
>>>
>>> The SIP2 standard specifically says that the ACS 'can send this date
>>> field in any format it wishes'. Since the format currently being
>>> returned by Evergreen and used in handle_checkout seems to be  
>>> working
>>> with most SCs, and since I like consistency, I elect to use that
>>> format. Larry Wall once said about Perl, "it generally does what you
>>> want, unless what you want is consistency." We can do better. :)
>>
>> I agree with the spirit of this patch, but I'll let David comment  
>> on it in
>> case he has any grand schemes I'm not aware of.
>
> I spent a bunch of time trying to explain the curious situation of  
> different parts of the code using or not using the Sip::timestamp()  
> function to format the due date of an item and finally gave up.  
> Let's just leave it at "historical reasons".
>
> Yes, all of the due dates should be treated the same way. The first  
> option is to change the ILS interface module so that it returns due  
> dates as seconds since the epoch, and then change handle_checkout  
> to call Sip::timestamp. The second option is to change MsgType.pm  
> so that it doesn't use Sip::timestamp for due dates.
>
> Aside from the fact that the second option only changes one file in  
> one part of the system, the second option also has the advantage  
> that it's clearly working properly now for users.
>
> Because the SIP protocol says that due dates can be in any format  
> (when sent from ACS to SC), then it must be the case that the SCs  
> are doing nothing with that field but printing, or displaying, it  
> for the user. Changing handle_checkout to return SIP timestamps,  
> would probably leave users with SIP timestamps on their slips,  
> which would be bad.
>
> This patch definitely needs to be applied.  Thanks Brandon.
>
> - David
>
>
> - David
>
> -- 
> David J. Fiander
> Library Software Development
>
>

-- 
David J. Fiander
Library Software Development

-------------- next part --------------
A non-text attachment was scrubbed...
Name: due_dates.patch
Type: application/octet-stream
Size: 2017 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20080618/4f3a04ac/due_dates.obj


More information about the Open-ils-dev mailing list