[OPEN-ILS-DEV] Perl Module Help Needed

Alan Simon simon at hslc.org
Mon May 7 08:14:50 EDT 2012


Jason -

Thank you for your help.

Alan


On 5/4/2012 12:39 PM, Jason Stephenson wrote:
> Quoting Alan Simon <simon at hslc.org>:
>
>> Jason -
>>
>> Thanks for your response.
>>
>> OpenILS::Const does not define locally-defined parameters (those not 
>> in the seed values script).  Do I need to modify OpenILS::Const to 
>> add them, or is there another way for modules to get the 
>> locally-defined parameter values?
>
> I'm not entirely sure I understand your question. If you want to use a 
> constant in Perl rather than a raw database value, then OpenILS::Const 
> is where I'd put it.
>
>
>>
>> Since the module calls the event file:
>>
>> $e->allowed('SET_CIRC_LOST'. $circ->circ_lib) or return $e->die_event;
>>
>> I either need to edit the file or remove the command.  What would be 
>> the ramifications of removing it?
>
> The above is not calling the event file directly. It's making a 
> database call to check if the patron has the SET_CIRC_LOST permission 
> at the circ library. It only creates an event if that check fails. 
> SET_CIRC_LOST is the value of the permission.perm_list.code column for 
> the permission being checked
>
> The ramification of removing that line is that staff will have the 
> ability to do whatever the function containing that line does without 
> needing the requisite permission.
>
> You could always create a new permission and check for that if you like.
>
>
>
>
>>
>> Alan
>>
>>
>>> Quoting Alan Simon<simon at hslc.org 
>>> <http://libmail.georgialibraries.org/mailman/listinfo/open-ils-dev>>:
>>>
>>>> /  Hello -
>>> />/
>>> />/  This is a repost of an #evergreen IRC chat posting.
>>> />/
>>> />/  I would like to create a new action trigger that is similar to
>>> />/  90-day Mark Lost but that would mark an item billed instead of 
>>> lost.
>>> />/   I have created a new billing type of 'Long Overdue' and a new 
>>> copy
>>> />/  status of 'billed,' and want to create a new Reactor called
>>> />/  MarkItemBilled, based on the MarkItemLost reactor used by the 
>>> 90-Day
>>> />/  Mark Lost action trigger.  The MarkItemLost reactor calls sub
>>> />/  set_item_lost in OpenILS::Application::Cat::AssetCommon, so I
>>> />/  thought that I would copy that module to
>>> />/  OpenILS::Application::Cat::AssetCommonHSLC and edit it to include
>>> />/  only a set_item_billed subroutine based on set_item_lost.
>>> /
>>> No comment there. I'll assume that you have a reason to want to mark
>>> something as "BILLED" rather than "LOST." (I saw some of that
>>> discussion in IRC.)
>>>
>>>> /
>>> />/  I see that set_item_lost sets variables defined in
>>> />/  OpenILS::Application::AppUtils (e.g.,
>>> />/  OILS_SETTING_LOST_PROCESSING_FEE) and
>>> />/  OpenILS::Application::Circ::CircCommon (e.g.,
>>> />/  OILS_COPY_STATUS_LOST).  However, those modules does not define
>>> />/  locally-defined settings like our 'Long Overdue' billing type and
>>> />/  our 'Billed' status.  How does
>>> />/  OpenILS::Application::Circ::CircCommon know what those are?
>>> /
>>> It finds the constant values in OpenILS::Const.
>>>
>>>
>>>> /
>>> />/  It also sets a variable found in the
>>> />/  /openils/var/data/ils_events.xml file, which contains translations
>>> />/  including non-alpha characters.  How do I (and should I?) edit 
>>> that
>>> />/  file to add a new event?
>>> /
>>> One developer has plans to make that file go away since it only
>>> partially implements all of the events that Evergreen has. His
>>> intention is to move them into the database. I know that doesn't
>>> really answer your question, but I guess it is a way of saying that
>>> you don't have to edit that file unless you really want to.
>>>
>>>
>>>> /
>>> />/  Thanks very much for whatever help you can give me.
>>> />/
>>> />/  Alan
>>> />/
>>> />/  -- />/  Alan Simon, Associate Director
>>> />/  HSLC
>>> />/  3600 Market Street, Suite 550
>>> />/  Philadephia, PA  19104
>>> />/  215-222-1532
>>> />/  simon at hslc.org 
>>> <http://libmail.georgialibraries.org/mailman/listinfo/open-ils-dev>
>>> />/
>>> />/
>>> /
>>>
>>>
>>> -- 
>>> Jason Stephenson
>>> Assistant Director for Technology Services
>>> Merrimack Valley Library Consortium
>>> Chief Bug Wrangler, Evergreen ILS
>>
>> -- 
>> Alan Simon, Associate Director
>> HSLC
>> 3600 Market Street, Suite 550
>> Philadephia, PA  19104
>> 215-222-1532
>> simon at hslc.org
>>
>>
>
>
>

-- 
Alan Simon, Associate Director
HSLC
3600 Market Street, Suite 550
Philadephia, PA  19104
215-222-1532
simon at hslc.org



More information about the Open-ils-dev mailing list