New EDI Order Generator


  1. New database tables exist for configuring vendor-specific EDI order attributes.

    • `acq.edi_attr .

      • List of EDI order generation toggles, e.g. "INCLUDE_COPIES" to add GIR segments
    • acq.edi_attr_set

      • Collection of edi_attr`s. Each edi_account may be linked to one `edi_attr_set.
      • One edi_attr_set per known vendor is added to the stock data, matching the stock configuration found in the JEDI template.
    • acq.edi_attr_set_map

      • Link between `edi_attr`s and `edi_attr_set`s.
  2. EDI Attribute Sets are manged via a new (browser client only) configuration interface at Administration → Acquisitions Administration → EDI Attribute Sets.
  3. Each acq.edi_account should be linked to an acq.edi_attr_set. If a link is not set, default values will be used. Links between an EDI account and an attribute set are managed in the EDI Accounts configuration interface.
  4. Local modifications to the stock EG JEDI template are managed by modifying and/or adding additional `edi_att_set`s as needed.
  5. A new script is added which replaces the functionality of is still available.
  6. After moving to, the JEDI Action/Trigger event definition is no longer required and can be disabled.


EDI accounts have a new boolean field Use EDI Attributes (use_attrs) that specifies whether PO’s generated via the account should be built using EDI attributes or fall back to traditional JEDI A/T template generation.

This allows sites to activate EDI attributes on a per-account basis, making it possible to migrate piecemeal to EDI attributes. For the initial roll out of this new feature, no accounts will be configured to use EDI attributes by default.

3 Day Courtesy Notice by SMS

New optional SMS text notification to be sent out 3 days prior to the due date of any circulating item for patrons who have an SMS text number and carrier stored in their accounts. This action trigger is disabled by default, but can be enabled and modified by going into Administration → Local Administration → Notifications / Action Triggers.

You may wish to make use of granularity so that these messages are batched and sent at the same time each day.

Add Description Field to Circulation and Hold Configuration Entries

The circulation and hold policy configuration rules now each have a description field. This allows administrators to add comments to describe the purpose of each rule.

Apache Internal Port Configuration Option

Apache configuration now supports a new variable which allows admins to specify the port used by Apache to handle HTTP traffic. The value is used for HTTP requests routed from Perl handlers back to the same Apache instance, like added content requests. Use this when running Apache with a non-standard port, typical with a proxy setup. Defaults to "80".

<Location /eg>
    PerlSetVar OILSWebInternalHTTPPort "7080"

Configurable Bib Record Display Fields

Administration → Server Administration → MARC Search/Facet Fields have 2 new configuration fields: Display Field? and Display XPath.

When Display Field is set to true, data from the field will be extracted from each record and added to a new table of display data for each bib record.

If a value is present in the Display XPath field, this XPath will be applied to the extracted data after the base XPath (from the XPath field) is applied to each field.

This data acts as a replacement for the various and sundry ways bib record data is currently extracted, including inline XPath in the TPAC, reporter views, real-time MVR compilation from MODS, etc. and will be available to the user interface, notification templates, etc. for rendering bib records.

The browser client gets a new service egBibDisplay which is capable of translating the display field data from various formats into data more suitable for JavaScript usage.

The database gets 3 new views for representing display data in various formats:

  • metabib.flat_display_entry

    • List of all display fields linked to their configuration.
  • metabib.compressed_display_entry

    • Same as metabib.flat_display_entry except there’s one row per display field type, with multi rows compressed into JSON arrays. Non-multi fields are represented as JSON strings/numbers.
  • metabib.wide_display_entry

    • Tabular view of display field data, one column per well-known field. Values are represented JSON, consistent with metabib.flat_display_entry. The view does not contain locally configured display fields, as each field must be encoded in the view and IDL definition. This is essentially a replacement for reporter.simple_record.


After making changes to display field configuration, it’s possible to reingest only display field data in the database using the following:

SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE, TRUE,
  (SELECT ARRAY_AGG(id)::INT[] FROM config.metabib_field WHERE display_field))
  FROM biblio.record_entry WHERE NOT deleted AND id > 0;

Fix COPY_STATUS_LONGOVERDUE.override Permission Typo

The existing permission was incorrectly created with a code of COPY_STATUS_LONGOVERDUE.override, while the event thrown requires a permission with a code of COPY_STATUS_LONG_OVERDUE.override. This update changes the permission code to match what the event requires.

Hold Targeter V2 Repairs and Improvements

  • Make the batch targeter more resilient to a single-hold failure.
  • Additional batch targeter info logging.
  • Set OSRF_LOG_CLIENT in for log tracing
  • Removes the confusingly named --target-all option

    • The same behavior can be achieved by using --retarget-interval "0s"
  • Removes --skip-viable (see --soft-retarget-interval below)

New --next-check-interval Option

Specify how long after the current run time the targeter will retarget the currently affected holds. Applying a specific interval is useful when the retarget-interval is shorter than the time between targeter runs.

For example, if the targeter is run nightly at midnight with a --retarget-interval 36h, you would set --next-check-interval to 48hr, since the holds won’t be processed again until 48 hours later. This ensures that the org unit closed date checks are looking at the correct date.

This setting overrides the default behavior of calculating the next retarget time from the retarget-interval.

New --soft-retarget-interval Option

This is a replacement for (and rebranding of) the --skip-viable option. The new option allows for time-based soft-targeting instead simple binary on/off soft-targeting.

How soft-targeting works:

  • Update hold copy maps for all affected holds
  • Holds with viable targets (on the pull list) are otherwise left alone.
  • Holds without viable targets are retargeted in the usual manner.

New marc_export --descendants Option

The marc_export script has a new option, --descendants. This option takes one argument of an organizational unit shortname. It works much like the existing --library option except that it is aware of the org. tree and will export records with holdings at the specified organizational unit and all of its descendants. This is handy if you want to export the records for all of the branches of a system. You can do that by specifying this option and the system’s shortname, instead of specifying multiple --library options for each branch.

The --descendants option can be repeated, as the --library option can. All of the specified org. units and their descendants will be included in the output. It can also be combined with individual --library options when necessary.

RTL and LTR Public Catalog Stylesheets Merged

The RTL stylesheet for the public catalog, templates/opac/css/style-rtl.css.tt2, has been merged into the LTR one (templates/opac/css/style.css.tt2). The combined stylesheet template will provide RTL or LTR styles based on the value of the rtl flag of the active locale. An rtl variable is also available in the template to allow the correct style to be chosen.

Miscellaneous Improvements

  • If a filter is in effect in the Library Settings Editor, the filter will continue to be applied after a user changes the selected library.
  • Copy templates used for serials now correctly link to age protection rules and MARC item type values (for the "Circ as Type" field). During upgrade, the database update will set to NULL any age protection and circ as type fields in serial copy templates that do not point to defined values.

Obsolete Internal Flag Removed

An obsolete and unused ingest.disable_metabib_field_entry internal flag was removed from the config.internal_flags table. It was rendered obsolete by the addition of the 3 flags to control the browse, search, and facet indexing.

Tweaks to Caching/Expiry of Public Catalog Assets

The default cache expiration time for static assets (e.g., CSS, image, and JavaScript files) in the public catalog and the Kid’s PAC has been increased to one year. Links to all such assets now have a cache-busting value tacked on as a query parameter. This value is refreshed when is run, but it can also be manually set by adjusting the ctx.cache_key Template Toolkit variable.

Action/Trigger Events Data Purging

Action/Trigger event definitions have a new field called Retention Interval. When an optional interval value is applied, events and template output data linked to the event definition will be deleted from the database once they reach the specified age.

Retention Interval Restrictions for Passive Hooks

Restrictions are placed on retention interval values for event definitions using passive hooks to prevent data from being deleted while it’s still needed by the system.

The presence of event data is how the system knows not to send duplicate events. As long as a scenario exists where a duplicate event may be generated, the events must be retained.

To apply a retention interval value to a passive-hook event definition:

  • The event definition must have a max_delay value.
  • The retention interval must be larger than the difference between the delay and max_delay values.

For example, if the delay is 7 days and max_delay is 10 days, the retention interval must be greater than 3 days to ensure no duplicate events are created between the first event on day 7 and the end of the event validity window on day 10.


A new script is installed in the bin directory (typically /openils/bin) which should be added to CRON for regular maintenance.


On large data sets, this script can take a long time to run and create higher than normal I/O load as it churns though the event and event_output tables. You may wish to run the script by hand the first time so it can be monitored. It can be run in psql like so:

SELECT action_trigger.purge_events();


On very large data sets (10s to 100s of millions of event and event_output rows), it may be advisable to first repopulate the event and event_output tables with only the desired data before starting regular purges. This can be done, for example, using the copy to temp table, truncate source table, repopulate source table from temp table approach. This will be much faster than the purge_events() function in cases where most of the data will be purged.

Hook Data Cleanup

A number of action_trigger.hook entries which have always been treated as active hooks, though are configured as passive hooks, have been updated to properly reflect the non-passive-ness. This allows for simpler configuration of their retention interval values.

Remove JSPAC Redirects

Future versions of Evergreen will no longer contain automatic redirects from JSPAC URLs to TPAC URLs, with the exception of myopac.xml, given that the JSPAC is no longer supported. Existing sites, however, may wish to retain JSPAC redirects in their Apache configuration files since JSPAC URLs may still be used in the wild to access their catalogs.

The original JSPAC URL redirects are all retained in the file Open-ILS/examples/jspac_redirects.conf for reference.