[OPEN-ILS-DEV] Autorenew - template issue with get_copy_bib_basics

Jason Boyer jboyer at equinoxinitiative.org
Wed Jul 1 10:22:11 EDT 2020


Hi Josh, it looks like the default event doesn’t have target_copy in its environment, so it wouldn’t normally be fleshed out (so circ.target_copy would just be an id). Is it in place for your event definition? It should only be necessary to include if there’s something in the acp object that you want to access that get_copy_bib_basics isn’t giving you.

Jason

-- 
Jason Boyer
Senior System Administrator
Equinox Open Library Initiative
phone:  +1 (877) Open-ILS (673-6457)
email:  JBoyer at EquinoxInitiative.org
web:  https://EquinoxInitiative.org/

> On Jul 1, 2020, at 10:12 AM, Josh Stompro <stomproj at gsuite.larl.org> wrote:
> 
> Hello, I'm working on starting autorenew this morning, and I ran into an issue with AutoRenewNotify template, related to the get_copy_bib_basics call.
> 
> The default template seems to be assigning the target_copy object to cid and passing that.
> [%- SET cid = circ.target_copy || udata.copy -%]
> [%- SET copy_details = helpers.get_copy_bib_basics(cid) -%]
> 
> Other templates, seem to use the target_copy.id <http://target_copy.id/> value.
> Here is the courtesy notice example
> [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id <http://circ.target_copy.id/>) -%]
> 
> The error the default template gives me is
> [ERR :10260:Reactor.pm:455:] Error processing Trigger template: undef error - Can't call method "call_number" on an undefined value at /usr/local/share/perl/5.20.2/OpenILS/Application/Trigger/Reactor.pm line 129.
> 
> Did the default template work for others that are sending out autorenew notices?  I couldn't find a bug report.
> Thanks
> Josh
> 
> -- 
> Josh Stompro - IT Director
> Lake Agassiz Regional Library
> Desk: 218-233-3757 Ext 139
> Cell: 218-790-2110

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20200701/511a3f41/attachment.html>


More information about the Open-ils-dev mailing list