A/T reactor 'AstCall' can't have global CStoreEditor
It's not good for any Evergreen service to try to have a global
cstoreeditor instance. Scope it to the handler() sub that needs it, and
comment out the thus-far unused/unfinished retrieve() sub.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jeff Davis [Tue, 30 Aug 2011 21:03:16 +0000 (14:03 -0700)]
Email notification of reservation capture
When a reserved resource is captured, Evergreen does not notify the patron
that the resource is ready for pickup. (As far as I am aware this is true
of all versions of Evergreen that include bookings.) This could give rise
to situations where the patron goes to pick up the resource at the specified
time, only to find that it hasn't been captured and is currently unavailable.
This change gives you a checkbox to enable email notification when creating
the reservation, and adds a hook, reactor, and validator so that you can
create an action trigger to send the emails.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Wed, 7 Sep 2011 07:29:40 +0000 (03:29 -0400)]
Fix unified interface w/ editing multiple volumes
Breakage if editing existing items across volumes with non-default values for
call number class, prefix, or suffix. This was due to some logic happening
within a loop that was sadly referencing data that changed out from under it
with every loop iteration (so for example, we were effectively referencing the
last rendered class menu instead of each in turn).
Remember folks:
for (var unsafe = 0; unsafe < 10; unsafe++) {
setTimeout(
function(safe) {
return function() {
do_something_with(safe); // good
do_something_with(unsafe); // bad
};
}(unsafe),
1000
);
}
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Wed, 31 Aug 2011 19:07:52 +0000 (15:07 -0400)]
LP#838311 acn_id = undefined error in vol/copy ui
Fixes race condition between multiple event listeners on drop-down menus. Bug
happened most often when batch applying values across multiple volumes and then
hitting save/create/update.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Steven Callender [Mon, 29 Aug 2011 15:11:18 +0000 (15:11 +0000)]
LP#836768 Proximity update trigger
Update org proximity automatically when parent org unit is changed to avoid the need to use the autogen -u parameter,
by means of a trigger on the actor.org_unit table and a new function.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Missing a =s in getopts config means it becomes a 0 or 1, when it should
be a string.
The problem only occurs when you are specifying a particular postgresql
pg_config file (for example, if you have multiple versions of postgresql
installed).
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Wells [Wed, 7 Sep 2011 15:35:18 +0000 (11:35 -0400)]
Clear org_unit cache fix for autogen.sh
autogen.sh is not properly clearing the org_tree cache. It is
unclear how this hasn't caused a problem before, but this fix
works for me and should be at least harmless in other enviroments.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Tue, 6 Sep 2011 15:54:47 +0000 (11:54 -0400)]
Generic mapping index normalizer
Useful for mapping values extracted for SVF (metabib.record_attr.attrs)
attributes to alternate values. For example, you can map collections of
MARC Audience codes into groups of codes for to create audience groups.
This normalizer takes a text parameter (in addition to the extracted value)
that defines a simple mapping between input and output. Each mapping
consists of one or more comma separated strings on the left of a separator
(called the source group), a separator, and a alphanumeric string to the
right of the separator (called the mapping target). The format of a mapping
is:
{string}[,{string}][..]=>{non-whitespace-string}
For example:
a,b,c=>X
Multiple mappings can be supplied, separated by whitespace. Each mapping
itself is not sensitive to most whitespace. For instance, the following
are all equivalent:
a,b,c=>X
a, b, c => X
a , b , c => X
In each, "a", "b" and "c" are mapped to "X", and anything else is returned
without mapping.
Additionionally, whitespace within a string in the source group is tolerated.
Given a mapping of:
a e i o u, y, w => V
The string "a e i o u", "y" or "w" will return "V".
In addition to explicit mapping, an empty source group will produce a default
mapping, where anything not matching another mapping will return the mapping
target. For instance, given the following:
=>X a,b,c=>Y
An input of "b" will return "Y" and an input of "k" will return "X". The
Default mapping target may be the same as the mapping target with an explicit
source group. For instance, the following can be interperated as "map a, b
and c to X, map 1, 2, 3 and anything we don't know about to Y":
a,b,c=>X 1,2,3=>Y =>Y
As a practical example, simplifying the audience values in MARC fixed fields
to three groups and using those values in a new coded value map would allow
one to create a dynamically populated search interface that uses more patron-
friendly terms. For instance:
a,b,j=>K c,d=>T a=>A =>A g=>E
The above makes the assumption that Unknown, Specialized and Not Coded should
be lumped in with Audult, just to be safe, and General is for (E)veryone.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Jason Etheridge [Tue, 6 Sep 2011 19:14:20 +0000 (15:14 -0400)]
Pull in custom.js with offline/chrome overlays
Or at least try to. Main goal here is for browser.xul to see url constant
changes from custom.js and feed them to embedded Acquisition interfaces via
xulG.urls
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Wells [Thu, 1 Sep 2011 13:13:47 +0000 (09:13 -0400)]
Hourly fine periods do not charge enough
Hourly fine periods are not charging for the first period of
overdue-ness. If an item is due at 2:00pm and has a fine of
$.50 per hour, the first fine should be eligible for generation
at 2:01pm. As it stands, the first fine does not generate until
an entire fine period has elapsed, so in this case, 3:00pm.
The previous version of the code had a special case for day-
granular fine periods, so a majority of fines were not affected.
This commit expands the same idea (charging for the fine period
you are currently "in") to all fine periods.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Merge branch 'collab/miker/acs-ui-repairs' from working/Evergreen.git
Use bib tag instead to find the correct ACS, instead of the static field map
Use authority main entry instead of thesaurus to find the correct ACS
Add method for finding an ACS by authority tag
See https://bugs.launchpad.net/evergreen/+bug/837637
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Takes a single parameter: The name of the include.
Each include is an OU setting: circ.staff_client.receipt.<name>
The includes are done as the first substitution. This has the benefit
of allowing other substitutions within them (including additional calls
to %INCLUDE()%) and the downside of not allowing dynamic includes.
Because an include can contain includes the code keeps track of all
includes already done, skipping those already included. This prevents
infinite loops when A includes B and B includes A, or longer variants
thereof.
Primary intended use would be for libraries to place frequently changed
notices and such in their templates. Instead of having to edit every
template on every workstation they use the %INCLUDE()% macro and edit
the org unit settings. At the next login the updated text appears on
every workstation.
Due to the includes being processed first a library could use them to
centrally administer templates by using an include for each piece of
each template.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Added to line item templates.
Takes one or more comma separated parameters:
field AS type ASC/DESC
AS type is optional
ASC/DESC is optional
Field is the field name without % signs.
Type is DATE, INT, FLOAT, NUMBER, LOWER, or UPPER
DATE will sort based on wrapping both sides in "new Date"
INT will sort based on wrapping both sides in parseInt
FLOAT and NUMBER will sort based on wrapping both sides in parseFloat
LOWER will apply .toLowerCase to both sides
UPPER will apply .toUpperCase to both sides
ASC (default) will sort in ascending order.
DESC will sort in descending order.
Can be specified more than once:
%SORT(a,b)% %SORT(c)%
Would sort by a, then b, then c.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Bill Erickson [Tue, 23 Aug 2011 18:22:06 +0000 (14:22 -0400)]
Support labelFormat for read-only AutoFieldWidget's
Previously only worked with edit widgets (e.g. drop-downs). This also
takes into account the fact that different instances of AutoFieldWidget
for the same class and value may have different labelFormat's
One user-visible result of this change is the ACQ read-only fund display
in purchase orders. Funds will now show the code and year for funds in
the copy grid before and after the data is rendered read-only.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Thu, 23 Jun 2011 02:55:27 +0000 (22:55 -0400)]
Enhance sample Z39.50 config file
Make "expose holdings" the default; use specific indexes for ISBN and
ISSN; show how to scope results to a part of the org tree; and show that
multiple database configs can be specified in the same file.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Liam Whalen [Thu, 11 Aug 2011 18:36:19 +0000 (14:36 -0400)]
Fixed seaching for a colon (:) surrounded by white space
When searching for a colon surrounded by white space the search would
freeze. An example of such a search would be:
Climate change economics and policy : an RFF anthology
This was happening because the decompose function within QueryParser.pm
Would build a regular expression that would search the query for both
classes and class aliases e.g (keyword and kw). However, when buliding
the regex for aliases QueryParser would add extraneous or symbols (|)
to the end of the regex without adding the accompanying alias.
This was happening because there was a check to see if the corresponding
class to each alias had already been added to the regex. But, the
check to see if the alias had already been appened to the regex happened
too late. I have moved the check to encopase the appending of the or
symbols and the class. Signed-off-by: Liam Whalen <lwhalen@evergreen-dev.catalogue.nrcan.gc.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
James Fournie [Thu, 7 Jul 2011 02:07:50 +0000 (19:07 -0700)]
Adds org unit selectors to Admin -> Server Admin -> Booking menu items, also modifies
the IDL to give context-field based pcrud perms instead of 'require global'
This makes the booking module more org-unit scopable
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
When a user selects "Merge On Single Match" or "Merge On Best Match" and
apply a minimum quality ratio, the fall-through profile will be used in
a secondary merge attempt for any records that fail the initial merge
due to insufficient record quality.
This allows the user to choose 2 different outcomes based on record
quality. For example, you may wish to do a full overlay for all
high-quality records, but only extract subjects or other information
from lower quality records. This also allows users to do record+copy
imports for high-quality records and copy-only imports for low quality
records (using a no-op merge profile like "replace 901c").
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Fri, 22 Jul 2011 05:47:15 +0000 (01:47 -0400)]
use_perm column for config.z3950_source
The idea is that if a permission code is specified for a given source, then
staff will need that permission to use that source in the staff client z39.50
interface.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Sat, 20 Aug 2011 21:51:46 +0000 (17:51 -0400)]
Remove cache-generator.sh from Makefile.am
In a previous commit, we removed cache-generator.sh. Now we remove the
remaining reference to it in the Makefile.am that was generating an
error (reported by Ben Webb).
Bill Erickson [Fri, 19 Aug 2011 19:50:22 +0000 (15:50 -0400)]
Vandelay: repair item attr context org selector
1. Prevents resetting the context selector to the workstation org unit
each time it's changed.
2. Prevent the unintentional pileup of dojo.connect() events, which
can lead to exponential growth in the number of server calls to fetch
import-item-attribute-definitions with each change of the context org
selector.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Ben Shum [Tue, 2 Aug 2011 15:15:57 +0000 (11:15 -0400)]
#LP801961, error when running edi_fetcher.pl
This patch addresses an error encountered when running edi_fetcher.pl.
The method "is_dir" should be just plain "dir" in RemoteAccount.pm file. Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Wells [Tue, 16 Aug 2011 21:22:47 +0000 (17:22 -0400)]
Stricter order for actor.org_unit_parent_protect()
actor.org_unit_parent_protect() may not work due to the fact
that 'IF' conditions in PL/pgSQL are not necessarily processed
in the order written. This line:
"IF TG_OP = 'INSERT' OR NEW.parent_ou
IS DISTINCT FROM OLD.parent_ou THEN"
may fail because the 'IS DISTINCT FROM' happens before the
'INSERT' check, and and that fails because there is no 'OLD'
variable for INSERTs.
This commit may not be the optimal style for this circumstance
in this language, but it works. It also appears to change more
than it really does due to a loss of one level of indentation in
the structure.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 18 Aug 2011 19:32:53 +0000 (15:32 -0400)]
Update README to reflect the --create-database option
Now that eg_db_config.pl is intelligent enough to create the database,
update the README to free people from the tyranny of having to manually
issue database creation (and contrib-adding) commands.
Dan Scott [Tue, 16 Aug 2011 03:14:01 +0000 (23:14 -0400)]
Further autogen.sh cleanup
* Roll cache-generator.sh functionality into autogen.sh
* No longer install deleted scripts
* Teach Perl build infrastructure about OpenILS::Utils::Configure
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Dan Scott [Mon, 15 Aug 2011 22:03:37 +0000 (18:03 -0400)]
Revamp autogen.sh to call functions from a Perl module
This cut moves all of the logic from the individual scripts that
autogen.sh used to call into a self-contained Perl module. We use
OpenILS::Utils::Cronscript to avoid much of the init dupe code.
Note that calling Perl functions from a bash script is not crazy pretty,
but perhaps in the long run autogen.sh becomes something else. This is
just a step towards consolidating those functions in a single module
while maintaining the same interface as before.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Bill Erickson [Wed, 17 Aug 2011 13:17:17 +0000 (09:17 -0400)]
Vandelay: don't clear item import profile when creating new queue
This avoids the problem of: enter import-profile in the UI => enter name for
new queue => profile is cleared. Import profile is still cleared/set when
an existing queue is selected, since existing queues already have an
item import profile set.
Dan Scott [Tue, 16 Aug 2011 15:50:45 +0000 (11:50 -0400)]
LP 799719: Pass the DESTDIR variable to python installer
Based on Ben Webb's patch, but using the same triple-slash to avoid any
possibility of confusion about the installation location (see also the
same adjustment made to OpenSRF).
Dan Scott [Thu, 28 Jul 2011 18:29:48 +0000 (14:29 -0400)]
LP#790329 org_lasso search is broken
Fix the JavaScript error when we attempt to create a feed for the
shortname of the org_unit_lasso (lassos have no shortname) - which lets
the request hit the backend Perl module, which in turn chokes on a test
for OU that only allows two conditions: either all digits is treated as
a numeric ID for an org unit, or it is a shortname. Of course, lassos
are negative integers, so we have to modify the test slightly to make it
happier.
There was no depth for org lasso copy counts, and this was handled
correctly in the main case by the asset.opac_lasso_record_copy_count()
function and its staff variant, but when a copy was not found at a given
org_unit in the lasso a request was made for the non-existent depth and
the function would error out.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Tue, 16 Aug 2011 14:55:39 +0000 (10:55 -0400)]
Vandelay: don't clear match-set when creating new queue
This avoids the problem of: enter match set in the UI => enter name for
new queue => match set is cleared. Match set is still cleared/set when
an existing queue is selected, since existing queues already have a
match set.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Keep the logging output of the EDI translator by default
There is valuable troubleshooting information there that is otherwise hard to
find. This particularly matters when the output of an EDI
Action/Trigger template (JEDI) doesn't successfully get translated to
EDIFACT for nonobvious reasons.
In production environments, you might instead pipe to logger so that you can
collect output with syslog, rather than in a flat file. As long as
output goes *somewhere.*
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
This line var modified_ou = new aou().fromStoreItem( current_ou ); was
producing a fieldmapper object where certain fields were being set to
contain the string "undefined" rather than a null.
The update method would take isdeleted == "undefined" as True.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Galen Charlton [Fri, 12 Aug 2011 20:09:11 +0000 (16:09 -0400)]
return only the one applicable OU setting value
Correct actor.org_unit_ancestor_setting so that it returns
at most one setting value, rather than the entire set
of values defined for the OU and its ancestors.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>