Josh, Thanks for sharing this! It's certainly a tidier approach than the loop.
-Michele -- Michele M. Morgan, Technical Assistant North of Boston Library Exchange, Danvers Massachusetts mmor...@noblenet.org On Mon, Mar 28, 2016 at 10:20 AM, Josh Stompro <stomp...@exchange.larl.org> wrote: > Michele, if you want to skip the loop, this also seems to work. > “circ.target_copy.parts.0.part.label” > > > > This adds the part label surrounded by parentheses to the end of the Title > line if it exists, and doesn’t add a trailing space when it doesn’t exists. > > > > Title: [[% circ.target_copy.circ_modifier.name %]] [% copy_details.title > %][% GET ' (' _ circ.target_copy.parts.0.part.label _ ')' IF > circ.target_copy.parts.0.part.label %] > > > > The output looks like this on our system: > > Title: [Magazine] Garden gate, 2016 (FEB) > > > > I see that the FM parts linking says that a target_copy can have multiple > mapping entries, but I don’t see how that would be setup or used. You can > only enter one part for a copy as far as I can see. > > > > Josh Stompro - LARL IT Director > > > > *From:* Open-ils-general [mailto: > open-ils-general-boun...@list.georgialibraries.org] *On Behalf Of *Morgan, > Michele > *Sent:* Thursday, March 10, 2016 10:00 AM > *To:* Evergreen Discussion Group > *Subject:* Re: [OPEN-ILS-GENERAL] Email Notices, Action Trigger, > Monograph Part information > > > > Josh, > > We do include part information on notices. In the trigger environment, we > added: > > target_copy.parts.part > > For the call number in the at_template, we have: > > Call Number: [% circ.target_copy.call_number.prefix.label %] [% > circ.target_copy.call_number.label %] [% FOR part IN circ.target_copy.parts > %][% part.part.label %][% END %] > > Not sure if this is the best approach, but it gets the job done. > > Hope this helps, > > Michele > > > -- > > Michele M. Morgan, Technical Assistant > > North of Boston Library Exchange, Danvers Massachusetts > > mmor...@noblenet.org > > > > > > On Thu, Mar 10, 2016 at 10:40 AM, Josh Stompro <stomp...@exchange.larl.org> > wrote: > > Hello, does anyone include monograph_part information in their notices? I > would like to include this information in Hold Pickup, Courtesy, Overdue > and Bill notices, to make it easier for customers to know which item they > need to find. Is there already a method to do this? > > > > There doesn’t seem to be a fieldmapper link from a copy to its part > information. So I wonder if a TT helper would be needed? Or would it be > reasonable to add a virtual field to the Asset::Copy object that generates > a link to the monographic_part information? > > > > Thanks > > Josh > > > > Lake Agassiz Regional Library - Moorhead MN larl.org > > Josh Stompro | Office 218.233.3757 EXT-139 > > LARL IT Director | Cell 218.790.2110 > > > > >