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
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>
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>
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.
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>
Michael Peters [Wed, 20 Jul 2011 15:09:40 +0000 (11:09 -0400)]
LP#647121 Event handling on override abort
Discussed on IRC, phasefx discovered that several events were not being properly
handled when they were empty strings. Tested and working on Evergreen 2.0.4.
Signed-off-by: Michael Peters <mrpeters@library.in.gov> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Jason Etheridge [Mon, 18 Jul 2011 19:27:22 +0000 (15:27 -0400)]
Better sort support for xul lists (see launchpad bug ://bugs.launchpad.net/evergreen/+bug/751745)
Example of supplying a sort_value function for item Create Date, and automatic sort_value for fm_columns-generated timestamp and money column definitions.
Need to provide more such functions, and eventually move everything over to fm_columns
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
This implements the same update as 0582.schema.aging_circ_view.sql,
and exists purely the the sake of avoid a potential upgrade
glitch for somebody who's upgrading from 2.0.8+ that includes
a version of this fix that's not compatible with with 2.1+.
Dan Wells [Tue, 19 Jul 2011 16:02:17 +0000 (12:02 -0400)]
MFHD compressed holding fixes
1. Add new utility method to MFHD.pm:
holdings_by_caption(): return all holdings attached to a
given caption
2. Add 'passthru_open_ended' option to get_decompressed_holdings()
Previously, attempts to decompress an open-ended holding
would error out. Now, in the absence of this option,
open-ended holdings are discarded and you get a warning
(since they cannot logically be decompressed), while if
this option is 'true' they are passed back unaffected
3. compressed_to_last() on an open-ended holding now more
correctly returns 'undef' rather than the unaltered holding
4. get_compressed_holdings() will now honor an open-ended holding
by treating it as "infinite", and thus absorbing any holdings
which would follow
5. Overloaded comparison operator now correctly detects "swap"
cases (where only the second operand is a holding)
6. Overloaded comparison operator now consistently treats
open-ended holdings as "greater-than" a single or closed
holding which has the same starting point
7. Fix 2 thinkos in comparison operator for overlapping
compressed holdings
8. Add new compressed_end() method to Holding.pm which can add
or set a new ending to a holding, making compressed if needed
9. Correctly recognize partially compressed holdings
If a holding is defined as:
863 40 $81.1 $a1 $b2-10
this actually means:
863 40 $81.1 $a1-1 $b2-10
so let's make sure to treat it that way.
9. Expand the MFHD test suite to better cover the improvements
in this commit
There is also the beginnings of a _get_truncated_holdings()
method for handling odd cases where an open-ended holding is
followed by a single/closed holding, but it is currently
commented out, pending further design consideration.
Dan Scott [Mon, 18 Jul 2011 15:43:13 +0000 (11:43 -0400)]
Remove extraneous COMMIT message in 950 seed data
The extra COMMIT message didn't hurt when creating a new schema, but did
result in a warning message that could cause confusion. So, get rid of
it to avoid that.
James Fournie [Mon, 6 Jun 2011 17:00:22 +0000 (10:00 -0700)]
Spine label editor assumes LC as reported in LP #780665.
This patch encapsulates the LC-assuming code in an IF block which
considers the asset.call_number.volume.label_class. If that is equal to
3, it will use the LC formatting.
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Dan Scott <dan@coffeecode.net>
LP795032 Fix cursor rendering and dropdown position in holdings maintenance OU dropdown Signed-off-by: mrpeters-isl <mrpeters@library.in.gov> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Fixes multiple potential issues:
1 - Bad home ou on patron breaks circ rules
Ex. Patron edited while editor would let you pick bad home ou
2 - Item not allowed to circ at patron home ou
Ex. Patron went to where they were allowed to pick it up
3 - Fines change to patron home ou fine rules
Ex. Patron's home ou doesn't charge fines but circ lib does
Ex. Circ lib doesn't charge fines but Patron's home ou does
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Wells [Thu, 7 Jul 2011 21:18:16 +0000 (17:18 -0400)]
Make spell-checking case insensitive
As it stands, if you search for a proper noun using
lower case, but manage to trigger the "did you mean"
functionality, all the words are 'corrected' even if
just the case is wrong. However, we are stripping
out the best correction precisely because it is the
same word, different case. It is a bit confusing to
explain, but here is an example:
daniel potatoe
gets corrected to:
Daniela potato
This happens because the current spell check is case
sensitive, so 'daniel' is spelled wrong, but then we
remove 'Daniel' from the list of corrections
(presumably to avoid possibly suggesting terms which
would yield the same exact result set).
So, we either need to make the spell-check itself case
insensitive, or stop removing the re-cased corrections.
Since the catalog search itself is already
case-insensitive, I think it makes sense that the spell
check should follow suit.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Tue, 12 Jul 2011 21:39:37 +0000 (17:39 -0400)]
Vandelay item import copy location inheritance
When importing items that have a copy location configured and no such
location exists at the copy's owning/circ lib, Vandelay will now use
copy locations from ancestor org units as appropriate.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Corrected the logic of format string building for metarecord holds and...
made hold possiblity checking for metarecord holds respect the format
string (so you can't place holds on formats for which there will never
be anything targetable)
Made possible by much concerted effort from Mike Rylander