Galen Charlton [Tue, 2 Aug 2011 16:20:32 +0000 (12:20 -0400)]
lp758945: make receipt template macros repeatable
Patch from Jason Boyer to allow macros to be used
more than once in a section; prior to this patch, only
the first occurrence was replaced with the substitation
value.
Dan Scott [Thu, 21 Jul 2011 21:39:49 +0000 (17:39 -0400)]
Update the README to include database installation instructions
A long time ago, the database server was installed by default.
Nowadays, installing the database server is a separate step
reserved for whatever machine you want to devote to PostgreSQL.
Not that you can't put it on the same machine as the rest of
Evergreen and OpenSRF...
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Bill Erickson [Mon, 1 Aug 2011 18:09:23 +0000 (14:09 -0400)]
Avoid xml_transform retrieval in record attr def editor
config.xml_transform stores large chunks of XML. Fetching it angers
Ejabberd on my test system. All we need is the name, so use the new
AutoFieldWidget.searchOptions param to do just that.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Mon, 1 Aug 2011 18:04:24 +0000 (14:04 -0400)]
AutoFieldWidget support for augmenting pcrud search options
Adds a new searchOptions attribute to AutoFieldWidget for specifying
additional parameters to pcrud when retrieving linked objects. The
initial use case is for supporting a "select" list to allow
AutoFieldWidget to retrieve only the display column of a linked object
and not the whole object.
Example:
// fetch 'remote_field_name' on the remote objects instead of
// fetching the entire object
Bill Erickson [Mon, 1 Aug 2011 13:00:30 +0000 (09:00 -0400)]
Bypass install_filter mem leak via direct insertion
See https://rt.cpan.org/Ticket/Display.html?id=46691
On the one hand we have a memory leak, on the other we have a bug caused
by the fix to the memory leak. Bypass this altogether and insert the
filter manually into the template environment using Template's FILTER
configuration argument. This has the added bonus of simplifying the
i18n filter code.
Since the filter is manually inserted, it's not necessary (and possibly
counter-productive) to USE the filter directly in the template.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Sort copies on record detail page with copies belonging to "sort org unit" first
"sort org unit" needs to eventually be an abstract concept that could
either refer to "orig_loc" or to "loc" or perhaps be skipped altogether,
depending on some future configuration.
Dan Scott [Thu, 28 Jul 2011 19:49:12 +0000 (15:49 -0400)]
Fix broken builds due to test that can't find its data
LP 817699 reports a problem that began with commit e9cd992fa4dbf1013346336193cb7469ecee10a8, reintroducing a problem that
had previously been resolved with commit f017d1261c369b9b5cc3c9cfc4f50d3cdf12a445. In short, tests can and are
run from different directories, but a new test opened a file without
making any allowance that the test might be run from anything other than
the /test/ directory.
This fix uses the dirname(__FILE__) approach to provide the appropriate
relative directory for the test data, and enables the tests to be
processed without dying.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Make users confirm they really want to delete lineitems from POs...
... when they've already been ordered. There's really no reason to ever
make such a deletion this that I can think of, but I use a confirm()
instead of stricter measures in case I'm missing something.
Dan Wells [Thu, 21 Jul 2011 16:14:02 +0000 (12:14 -0400)]
Prevent control numbers from duplicating
In maintain_control_numbers(), if you have more than one 001 or
003, and at least one is the correct one, you will end up
duplicating the correct number every time the record is saved.
For example, if the incoming record was record ID # 12345, and
the record contained:
001: 12345
001: ocm10202
... then after maintain_control_numbers() ran, the record would
contain:
001: 12345
001: 12345
Also, clean up some leftovers from the refactor I suggested in the
previous commit.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 21 Jul 2011 15:12:36 +0000 (11:12 -0400)]
Add an unwrapped upgrade script for OCLC-aware control numbers
The upgrade script creates the SCN and LCCN search indexes and
populates them using metabib.full_rec as a source; cheating, but
the normalized values will work for non-exact search purposes. Sites can
reingest all of their bibs if they want exact search to work.
Also, refactor maintain_control_numbers() using a suggestion by
Dan Wells to eliminate some duplicate code.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Thu, 21 Jul 2011 14:18:55 +0000 (10:18 -0400)]
Treat OCLC numbers specially in maintain_control_numbers
For some reason, many records that come with OCLC numbers in the 001
field are not populated with a 003 field. This resulted in the OCLC
number being thrown away entirely, rather than being moved into the 035,
as there was no corresponding control number identifier field.
However, given that we know that control numbers starting with "ocm" or
"ocn" are special OCLC numbers, we can generate the 035 accordingly even
in the absence of a 003. This update to maintain_control_numbers()
teaches it to do the right thing for OCLC numbers.
In addition, add an identifier search index so we can easily find
records by their system control numbers (035 $a subfields).
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Thu, 28 Jul 2011 15:36:23 +0000 (11:36 -0400)]
Redirector support for T-pac
Includes new Apache configuration option:
PerlSetVar OILSRedirectTpac "true"
"Original location" is tracked initially as a URL param (orig_loc), but
is ultimately absorbed into a cookie (eg_orig_loc) since the URL param
would otherwise have to be propagated to every page.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Capture holds (not already on hold shelf) as transits instead.
Use cases may include:
New material being cataloged before it is "released". If captured normally
before release the shelf expire time would start ticking and notices would go
out.
Checking items in on a closed day. Can capture holds to avoid them being on a
pull list and set them aside to avoid "ready for pickup" notices and ticking
shelf expire clock.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
When a new item is checked in local holds will be searched and re-targeted.
The search and retarget stops when a hold is found locally that the item can fill.
Already-captured holds will not be retargeted.
"New" is (currently) defined as "In progress" at checkin
Retarget occurs:
Only if the copy's circ library is the checkin library
Only if the checkin is an actual checkin (not a renewal)
Only if the checkin is capturing holds and transits
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Bill Erickson [Wed, 27 Jul 2011 18:40:46 +0000 (14:40 -0400)]
Metarecord list on results page
Added a new ?metarecord=<mrid> param to opac/results page to list
records associated with a given metarecord ID. This is used as page 2
of the (pending) metarecord search process as well 'show in catalog'
for embedded staff client metarecord holds.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Code introduced in c5d36d2a99e45b9a02d00a1e795b66a38c271b43 (SVN r17079)
can generate this event. The description I gave it is meant to be
kind of user-oriented, since patrons might see it in the OPAC. A
somewhat more informative description in available in the commit I named
above.
Add the PERSISTENT_LOGIN permission to the system, and ...
... make it belong to Users (which includes Staff and Patrons) by
default.
This doesn't mean that all logins are persistent (long-lived) by
default, it just means that users do have the permission to request a
long-lived auth session by default.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Jason Etheridge [Tue, 26 Jul 2011 14:33:13 +0000 (10:33 -0400)]
Load embedded OPAC via SSL by default, w/ override option
* url_prefix option for using/forcing SSL.
* oils.secure_opac preference for doing such with the embedded OPAC
--------
To use the preference, you may want to include something like this in server/skin/custom.js:
// Force non-SSL for the OPAC
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
if (!prefs.prefHasUserValue('oils.secure_opac')) {
prefs.setBoolPref('oils.secure_opac',false);
}
} catch(E) {
alert('Error in custom.js trying to set oils.secure_opac preference to false: ' + E + '\n');
}
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Tue, 26 Jul 2011 00:09:18 +0000 (20:09 -0400)]
Ubuntu Lucid needs MARC::Record from CPAN
As Ubuntu Lucid ships with MARC::Record 2.0.0, and Serials requires
2.0.1 or greater, we must install MARC::Record from CPAN or face failing
open-ils.search requests.
In the process, had to change the checkbox/cgi param name of the misc
fees to xact_misc and tell the middle layer to lump xact together with
xact_misc. Should test carefully.
Jason Etheridge [Mon, 11 Jul 2011 11:22:01 +0000 (07:22 -0400)]
Add support for Holds and Items counts in dynamic staff Record Summary
(use 'holds' and 'items' with your
oils.bib_brief.*.dynamic_grid_replacement.data customizations)
Also make the Bib Call # retrieval asynchronous and dependent on the field being
configured for display. This branch has merged in (and depends on) the changes
from collab/phasefx/dynamic_bib_brief
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Michael Peters [Thu, 21 Jul 2011 15:21:34 +0000 (11:21 -0400)]
LP#813151 Copy Location sort order in Advanced Search
This patch addresses the unintuitive copy location sort order in
Advanced Search when searching at a specific branch. Thanks to
Dan Wells for the code suggestion which changes the order in the listbox
to alphabetical sort by asset.copy_location.name.
Tested, and confirmed working in 2.0.4 test and production environments.
Signed-off-by: Michael Peters <mrpeters@library.in.gov> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Bill Erickson [Mon, 25 Jul 2011 15:38:17 +0000 (11:38 -0400)]
Manage parts holds warning (and removal) w/ CSS
Use add/removeCSSClass to apply and remove holds parts selector
warning instead of inline style.border management, which (when using
'auto') causes problems in IE.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>