evergreen/tadl.git
13 years agoRespect DESTDIR during the build process
Ben Webb [Mon, 13 Jun 2011 12:31:53 +0000 (13:31 +0100)]
Respect DESTDIR during the build process

Add $(DESTDIR) to paths it is currently missing from
Manually specify the apxs2 install location so that DESTDIR can be prepended
Attempt to create the apache directory if it does not exist

Signed-off-by: Ben Webb <bjwebb67@googlemail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoStamped DB upgrade script for for XMLAGG cleanup
Bill Erickson [Fri, 24 Jun 2011 15:52:41 +0000 (11:52 -0400)]
Stamped DB upgrade script for for XMLAGG cleanup

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoUpgrade script for the XMLAGG cleanup
Mike Rylander [Fri, 24 Jun 2011 15:15:49 +0000 (11:15 -0400)]
Upgrade script for the XMLAGG cleanup

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoAddress LP#801129, in-db unAPI failure
Mike Rylander [Fri, 24 Jun 2011 14:42:15 +0000 (10:42 -0400)]
Address LP#801129, in-db unAPI failure

Cleanup of improper use of XMLAGG in the unAPI stored procs first identified by Bill Erickson in https://bugs.launchpad.net/bugs/801129

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agobump xulrunner version
Jason Etheridge [Thu, 23 Jun 2011 18:25:57 +0000 (14:25 -0400)]
bump xulrunner version

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoCheck if hold is really available in Trigger::Validator.
Jason Stephenson [Wed, 22 Jun 2011 14:48:58 +0000 (10:48 -0400)]
Check if hold is really available in Trigger::Validator.

Add checks for shelf time and no fulfillment time in
HoldIsAvailable in OpenILS::Application::Trigger::Validator.

We've had some issues with poorly migrated data and people
messing with holds that causes the original logic to trigger
for unfilled holds. Plus, the extra precaution of checking
more precise conditions of an actually filled hold can't hurt,
can it?

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoMake bucket content retrieval authoritative
Mike Rylander [Wed, 22 Jun 2011 14:36:13 +0000 (10:36 -0400)]
Make bucket content retrieval authoritative

LP#492036, we neeed all bucket methods to be authoritative.  Some already were, this finishes the job.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoLP#790639: Provide actual text, rather than id values in patron search results for...
Michael Peters [Wed, 22 Jun 2011 14:14:55 +0000 (10:14 -0400)]
LP#790639: Provide actual text, rather than id values in patron search results for various columns

Cleaned up some tabs versus spaces and a needless trailing comma from original patch.  Not porting to master, hoping to use collab/phasefx/fm_columns instead.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
13 years agoFurther clean-up of Serials interfaces
Dan Wells [Tue, 21 Jun 2011 21:09:58 +0000 (17:09 -0400)]
Further clean-up of Serials interfaces

When trying to come up with good tests, found a few bugs (imagine!).
Some have been nagging for a while now.

1) For 'MFHDDrawn' event, make sure it runs if deleting the last
serials data of any kind for that record (to unpopulate the menus
properly)

2) Make sure global mfhd member (g.mfhd) is cleared in the same case
(i.e. deleting the last serials data for that record)

3) Add a string to better indicate when no MFHD records are available
for 'Legacy Record Entry' drop-down

4) Convert submitted empty drop-down values to 'null' as needed in
distribution editor

5) Mark subscription 'start date' as a required field

6) Make serial virtual records better handle deleted 'legacy record
entries' attached to distributions, and also expose non-deleted
record entries even if in 'use_sdist_only' summary mode

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoBetter coordination of MFHD/SRE adding/deleting
Dan Wells [Fri, 17 Jun 2011 19:26:39 +0000 (15:26 -0400)]
Better coordination of MFHD/SRE adding/deleting

Adding or deleting MFHD records from the XUL menus requires
coordinating the OPAC display, the XUL menus, and the Serial
Control distribution editors.  The previous code frequently
required some non-obvious manual refreshing to make it work.

This commit keeps them in sync using custom events instead.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoAdd unit tests for LP 800269 - holdings for captions only
Dan Scott [Wed, 22 Jun 2011 03:31:01 +0000 (23:31 -0400)]
Add unit tests for LP 800269 - holdings for captions only

Running "prove -l lib" in Open-ILS/src/perlmods shows that the two new
unit tests pass, whereas they fail using the previously installed
version of MFHD.pm. Good evidence that the fix from dbwells does indeed
solve the reported bug.

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoMFHD compressed holdings short-circuit logic
Dan Wells [Tue, 21 Jun 2011 15:44:10 +0000 (11:44 -0400)]
MFHD compressed holdings short-circuit logic

If you attempt to get compressed (or uncompressed) holdings from
a MFHD record with only a caption, the code should short-circuit
and return an empty list.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoLP#783590 fix patron alert message highlighting
Michael Peters [Tue, 21 Jun 2011 15:57:39 +0000 (11:57 -0400)]
LP#783590 fix patron alert message highlighting

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoReserve 0561 (used in 2.0) to avoid confusion
Mike Rylander [Tue, 21 Jun 2011 15:44:02 +0000 (11:44 -0400)]
Reserve 0561 (used in 2.0) to avoid confusion

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoSet AC timeout value to 3 seconds and describe tradeoffs
Dan Scott [Fri, 17 Jun 2011 16:30:12 +0000 (12:30 -0400)]
Set AC timeout value to 3 seconds and describe tradeoffs

As discussed on the Evergreen Development mailing list, the higher the
AC timeout value, the greater the risk of a denial of service. 30 is
therefore too high to be comfortable as a default setting, so we're
dropping it down to 3 as a compromise between the original value of 1
(which resulted in a number of request timing out where added content
was actually available) and the much-less-safe 30.

In addition, we document inline the risk/reward of different values and
provide some justification for the default value that we chose, so that
Evergreen system administrators will have guidance when tweaking this
setting.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoDROP biblio.reingest_uris() after use
Dan Scott [Mon, 20 Jun 2011 15:16:21 +0000 (11:16 -0400)]
DROP biblio.reingest_uris() after use

We will hopefully only need to reingest URIs in bulk once, and can
therefore DROP the biblio.reingest_uris() function after it has been
successfully invoked.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agoProtect URI reingest from failure due to malformed XML
Dan Scott [Mon, 20 Jun 2011 14:56:44 +0000 (10:56 -0400)]
Protect URI reingest from failure due to malformed XML

In an ideal world, there would be no malformed XML. But our world is the
real world of libraries, and while the well_formed_xml() protects
against malformed XML in Evergreen 2.0 systems, in some cases bad XML
has been able to find its way into Evergreen systems in the past.

A single biblio.record_entry row containing malformed XML in the marc
column will prevent the call to reingest URIs from succeeding. By
limiting the set of records to those with well-formed XML, we can
increase the chance of the URI reingest succeeding at the cost of more
processing time.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agoGrace period is an interval. Convert to seconds.
Thomas Berezansky [Tue, 14 Jun 2011 23:53:02 +0000 (19:53 -0400)]
Grace period is an interval. Convert to seconds.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agolp#788763 - final upgrade script
Thomas Berezansky [Fri, 17 Jun 2011 19:07:34 +0000 (15:07 -0400)]
lp#788763 - final upgrade script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agolp#788763 - fix updating copy status, locations, and OU visibiilty
Thomas Berezansky [Fri, 17 Jun 2011 19:06:49 +0000 (15:06 -0400)]
lp#788763 - fix updating copy status, locations, and OU visibiilty

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agoRepaired exchange rate PO activation bug
Bill Erickson [Thu, 16 Jun 2011 15:50:16 +0000 (11:50 -0400)]
Repaired exchange rate PO activation bug

Code was using the wrong hash key to read data from cstore request,
resulting in a NULL debit amount when activating a PO with a different
provider => fund currencies.  This resulted in POs that could not be
activated.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoMove the user/dbs/lp797304_lp797307 upgrade script into place with a number
Mike Rylander [Thu, 16 Jun 2011 14:16:39 +0000 (10:16 -0400)]
Move the user/dbs/lp797304_lp797307 upgrade script into place with a number

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoMerging branch user/dbs/lp797304_lp797307
Mike Rylander [Thu, 16 Jun 2011 13:50:25 +0000 (09:50 -0400)]
Merging branch user/dbs/lp797304_lp797307

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Cherry picking the following:

commit 7be2a32620587af27de4316e42a308e913e9314c
Author: Dan Scott <dan@coffeecode.net>
Date:   Tue Jun 14 22:35:26 2011 -0400

    Add a stored procedure to reingest problematic URIs

    Assuming that href = label in asset.uri is a red enough flag for the
    problem in LP 797307 where the perfectly good label was being thrown
    away, reingest the unique set of records connected with such asset.uri
    rows.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
commit 39fe0c4a8a3074ff4c1e427ad9f00a0760bac260
Author: Dan Scott <dan@coffeecode.net>
Date:   Tue Jun 14 21:54:51 2011 -0400

    Add unwrapped upgrade script for biblio.extract_located_uris

    See XXXX.biblio.extract_located_uris.sql for the upgrade script, waiting
    to be signed off and committed.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.biblio.extract_located_uris.sql

commit 7e6d2bfd7e9a5cbe57e4aacdf0b4b015a566883d
Author: Dan Scott <dan@coffeecode.net>
Date:   Tue Jun 14 21:34:15 2011 -0400

    Avoid duplicate row issues in biblio.extract_located_uris

    As there is currently no unique constraint on the non-ID columns of
    asset.uri, ensure that we only select a single ID from the tables until
    we dedupe the tables. Use an ORDER BY to grab the matching row with the
    lowest ID so we can clear out the rows with higher IDs.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
commit e79a805299ec734a29ee5bfa77dc74bc1fd208cd
Author: Dan Scott <dan@coffeecode.net>
Date:   Tue Jun 14 14:02:49 2011 -0400

    Fix LP 797304 and 797307 - asset.uri parsing bugs

    Per 797304: one would expect asset.uri.label to be populated with the
    value of 856 $y, however, it was getting populated with 856 $u - perhaps
    as a result of the ordering of array entries in XPATH() not matching the
    XPath expression. Instead of including 856 $u in the XPath expression
    for uri_label, just assign its value to uri_label if uri_label is
    otherwise NULL.

    Per 797307: biblio.extract_located_uris() tries to reuse an existing
    active asset.uri entry rather than create a new row; however, it does
    not handle the case where there is no public note aka "use restriction"
    and will end up creating a duplicate row every time the record is
    reingested. Teach it to handle NULL values properly.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
(cherry picked from commit da70b778268afff19c3dd4f2e9e4c9e85cfeb7e3)

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agolp797321: Disable the Apply Payment button during payment processing to mitigate...
Jason Etheridge [Wed, 15 Jun 2011 07:13:50 +0000 (03:13 -0400)]
lp797321: Disable the Apply Payment button during payment processing to mitigate chance of duplicate payments.

I can't actually reproduce the creation of duplicate payments locally with
trunk/2.x, but there are reports of it, and this doesn't seem to hurt.  Not
a complete solution, but better than before

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agoResolve Squeeze installation problems with PostgreSQL 9.0
Dan Scott [Tue, 14 Jun 2011 02:54:27 +0000 (22:54 -0400)]
Resolve Squeeze installation problems with PostgreSQL 9.0

When you install OpenSRF on Debian Squeeze, one of the packages
(apache2-prefork-dev) installs 8.4 versions of libpq5 and libpq-dev as
dependencies. These conflict with the 9.0 versions that are required as
dependencies for PostgreSQL 9.0 - so get them out of the way, pin the
9.0 versions of the packages, and reinstall apache2-prefork-dev.

We will probably need to do something similar for Lucid.

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoFix a serial batch receive problem reported by Sally Fortin
Lebbeous Fogle-Weekley [Mon, 13 Jun 2011 20:40:07 +0000 (16:40 -0400)]
Fix a serial batch receive problem reported by Sally Fortin

That prevents receiving items when not using units in some cases.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoSet a more generous AC timeout value
Dan Scott [Mon, 13 Jun 2011 19:34:03 +0000 (15:34 -0400)]
Set a more generous AC timeout value

A timeout value of 1 second is a bit too tight for many added content
providers; set the default to 30 seconds to avoid too many artificial
timeouts.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoSupport for required fields in Serial Control editors
Dan Wells [Tue, 7 Jun 2011 16:06:57 +0000 (12:06 -0400)]
Support for required fields in Serial Control editors

Adds a basic check for any fields marked as 'required', and alerts and
prevents submitting if they are blank.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoclearer label for not charging last patron when marking an item damaged
Jason Etheridge [Mon, 13 Jun 2011 18:25:48 +0000 (14:25 -0400)]
clearer label for not charging last patron when marking an item damaged

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoupdated favicon to match staff client logo
Galen Charlton [Mon, 13 Jun 2011 14:42:25 +0000 (10:42 -0400)]
updated favicon to match staff client logo

Favicon created by Michael Peters <mrpeters@library.in.gov>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoTypo, we need commas
Mike Rylander [Mon, 13 Jun 2011 15:00:36 +0000 (11:00 -0400)]
Typo, we need commas

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoBackporting 36b0a67a4520151082e72056893d92ad3bf797f1, in-db unAPI improvement
Mike Rylander [Mon, 13 Jun 2011 14:43:55 +0000 (10:43 -0400)]
Backporting 36b0a67a4520151082e72056893d92ad3bf797f1, in-db unAPI improvement

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agomore s/Foreign/Conjoined/ Items label changes
Jason Etheridge [Mon, 13 Jun 2011 14:41:18 +0000 (10:41 -0400)]
more s/Foreign/Conjoined/ Items label changes

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoMerge branch 'rel_2_1' of git.evergreen-ils.org:Evergreen into rel_2_1
Jason Etheridge [Mon, 13 Jun 2011 14:36:10 +0000 (10:36 -0400)]
Merge branch 'rel_2_1' of git.evergreen-ils.org:Evergreen into rel_2_1

13 years agochange accesskeys/labels for menu entries related to Conjoined Items
Jason Etheridge [Mon, 13 Jun 2011 14:35:29 +0000 (10:35 -0400)]
change accesskeys/labels for menu entries related to Conjoined Items

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoRemove all references to Cookie(s).js and Cookies.js
Dan Scott [Tue, 31 May 2011 17:55:29 +0000 (13:55 -0400)]
Remove all references to Cookie(s).js and Cookies.js

Dojo toolkit is the new Cookie manager, so any lingering
references to Cookie.js (a typo in any case) are no longer
valid, and we no longer need to ship Cookies.js with
Evergreen.

Cookie.js typo was reported by Steven Chan in LP 790429

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoUse the new status.opac_visible attribute in search summary
Dan Scott [Tue, 7 Jun 2011 14:16:25 +0000 (10:16 -0400)]
Use the new status.opac_visible attribute in search summary

Until we exposed the OPAC visibility of the status element as set in
config.copy_status, We previously had to hardcode the logic for whether
a given copy should be displayed based on its status. Now we can simply
use the status.opac_visible attribute to determine visibility.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoAdd opac_visible attribute to copy and serial unit statuses
Dan Scott [Tue, 7 Jun 2011 14:09:57 +0000 (10:09 -0400)]
Add opac_visible attribute to copy and serial unit statuses

config.copy_status defines an opac_visible column, but that attribute
was not being exposed in the holdings XML, so code that displayed copies
and serial units based on the holdings XML had to hardcode the display
based on the status ID or name instead of using the configured setting.

To simplify display logic, teach holdings XML about the opac_visible
column and expose its value in the status element as a new opac_visible
attribute.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoMake copy status visibility match default config.copy_status settings
Dan Scott [Mon, 6 Jun 2011 17:38:17 +0000 (13:38 -0400)]
Make copy status visibility match default config.copy_status settings

Previous version of this patch had hardcoded copy status settings to
0, 7, 12 to match the "Available" settings, rather than the OPAC
visibility settings available from config.copy_status for each status.

Until config.copy_status.opac_visible translates into an opac_visible
attribute on the status element in the holdings XML, this is probably
the best we can do.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoPlug the many OPAC visibility holes in search result item display
Dan Scott [Tue, 31 May 2011 02:49:00 +0000 (22:49 -0400)]
Plug the many OPAC visibility holes in search result item display

Check volume and circ_lib and copy status OPAC visibility (and
deleted status in the case of volumes) in addition to the existing
copy and copy-location checks.

Worst hack is hard-coded copy status IDs of 0, 7, 12 - but this is
currently used throughout the code, so one more can't hurt that much
(OWWW).

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoUpdater apparently reads extensionVersion
Thomas Berezansky [Mon, 13 Jun 2011 13:20:31 +0000 (09:20 -0400)]
Updater apparently reads extensionVersion

Without it no updates are ever found. :(

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoUpdate upgrade files that had conflicting numbers
Dan Scott [Sat, 11 Jun 2011 11:05:53 +0000 (07:05 -0400)]
Update upgrade files that had conflicting numbers

0549 and 0550 were taken by other commits over time.

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoMerge branch 'rel_2_1' of git.evergreen-ils.org:Evergreen into dbs/unnest_2_1
Dan Scott [Sat, 11 Jun 2011 11:07:10 +0000 (07:07 -0400)]
Merge branch 'rel_2_1' of git.evergreen-ils.org:Evergreen into dbs/unnest_2_1

13 years agoReplace instance of location.href
Thomas Berezansky [Wed, 8 Jun 2011 18:07:48 +0000 (14:07 -0400)]
Replace instance of location.href

xulG.set_tab populates xulG properly in new URL, location.href does not

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoCorrect error in call number owning library change
Thomas Berezansky [Tue, 7 Jun 2011 17:45:55 +0000 (13:45 -0400)]
Correct error in call number owning library change

Send IDs to the backend, not objects.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoMark invalid home ous as such in patron editor
Thomas Berezansky [Fri, 10 Jun 2011 13:22:56 +0000 (09:22 -0400)]
Mark invalid home ous as such in patron editor

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agomissing string for MFHD deletion
Jason Etheridge [Fri, 10 Jun 2011 14:42:51 +0000 (10:42 -0400)]
missing string for MFHD deletion

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoExtend hold shelf expire date beyond closed dates
Bill Erickson [Wed, 8 Jun 2011 19:44:37 +0000 (15:44 -0400)]
Extend hold shelf expire date beyond closed dates

If the shelf_expire_time on a hold would land on a closed date for the
pickup library, push the expire time out to just beyond the close date
range, similar to the circulation due date overlap logic.

In the current iteration, the time component of the date is pushed out
to the end of the day (23:59:59).  If this is not generally the desired
behavior, an org setting could be added to bypass this step so that the
time matches "now" (i.e. capture time) instead.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agohonor ui.unified_volume_copy_editor setting with Add Volumes in Holdings Maintenance
Jason Etheridge [Thu, 26 May 2011 19:33:20 +0000 (15:33 -0400)]
honor ui.unified_volume_copy_editor setting with Add Volumes in Holdings Maintenance

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agomake unified vol/copy editor honor required stat cats
Jason Etheridge [Wed, 1 Jun 2011 20:25:50 +0000 (16:25 -0400)]
make unified vol/copy editor honor required stat cats

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agoUse native unnest() db function instead of explode_array()
Dan Scott [Tue, 7 Jun 2011 17:52:22 +0000 (13:52 -0400)]
Use native unnest() db function instead of explode_array()

Per LP 789747, the custom explode_array() database function
was found to generate significantly slower results for searches than
using the native (and equivalent) unnest() array function. Given that
unnest() has been part of PostgreSQL since 8.4 and Evergreen 2.0
requires a minimum of PostgreSQL 8.4, this patch removes the definition
of the explode_array() functions and replaces its usage with unnest().

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoPrevent future dates of birth in patron editor
Lebbeous Fogle-Weekley [Fri, 3 Jun 2011 19:17:48 +0000 (15:17 -0400)]
Prevent future dates of birth in patron editor

The patron editor form allowed staff to enter a date of birth that takes
place in the future. While it is theoretically conceivable (hah) that
a library might register patrons that have yet to be born, it is
unlikely enough that we will not even assign this behavior to an
org-unit setting, but we will take the bold move of using a regular
expression to prevent a future dates of birth at all.

Note that if a library system travels into the past, this will cause all
sorts of problems in the patron editor interface (not to mention
overdues). Please do not mix Evergreen and time travel.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoFix false MFHD editing cues (LP #791974)
Dan Wells [Thu, 2 Jun 2011 19:44:36 +0000 (15:44 -0400)]
Fix false MFHD editing cues (LP #791974)

The in-DB serial holdings use the same general display code as
the MFHD records, but were falsely triggering MFHD administration
widgets when in fact no MFHD record exists.  These holdings were
already being marked, so this fix honors that mark.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoTweak MFHD scoping
Dan Wells [Thu, 2 Jun 2011 14:17:07 +0000 (10:17 -0400)]
Tweak MFHD scoping

Three changes:
1) Add a closure for 'entryNum' value (currently used for some display
placement and menu-entry correlation)
2) Remove depth-climb to simplify code and better approximate copy scoping
3) Move 'here' assignment out of the foreach

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoFix rendering of MFHD records when ownership is out of scope
Dan Scott [Fri, 27 May 2011 17:51:59 +0000 (13:51 -0400)]
Fix rendering of MFHD records when ownership is out of scope

Dojo would die with a null reference error when an MFHD record
was retrieved that was outside of the current OU search scope.
For example, if a given bib record had one linked MFHD record
for BR1, and one linked MFHD record for BR4, the details page
would choke trying to draw the MFHD holdings in a scope that
only included BR1 and end up drawing nothing. Ungood.

Moving the ownership check and invoking _holdingsDrawMFHD()
only after ensuring that the record is within our scope resolves
the problem.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
13 years agoLP 791546: advanced search ISBN/ISSN in .staff mode
Dan Scott [Mon, 6 Jun 2011 16:11:58 +0000 (12:11 -0400)]
LP 791546: advanced search ISBN/ISSN in .staff mode

In 1.6, advanced search ISBN/ISSN searches always operated in .staff
mode, returning results whether the results should have been visible to
the user or not. This confused patrons who saw records to which they had
no access.

In 2.0, this behaviour changed so that advanced search ISBN/ISSN
searches never operated in .staff mode. This confused staff who were
used to retrieving records via the ISBN/ISSN search when they wanted to
add holdings for their own library to the records.

The pattern for addressing this problem and satisfying both use cases is
the same - use the multiclass.query.staff method if we invoke the ISBN
or ISSN searches with the .staff method name.

One could easily refactor many of the search method bodies in this
module to use the exact same logic, keying off the method name to
identify the identifier field and the .staff portion of the method name
to determine whether to invoke .staff mode or not. For now we just
address the ISBN and ISSN entry points.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agofix View Holds by preventing an empty IN list with cstore, and stubbing out part_holds
Jason Etheridge [Mon, 6 Jun 2011 16:46:21 +0000 (12:46 -0400)]
fix View Holds by preventing an empty IN list with cstore, and stubbing out part_holds

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
13 years agofor the Circulate as Type column in xul lists, display the actual citm value instead...
Jason Etheridge [Wed, 1 Jun 2011 07:21:06 +0000 (03:21 -0400)]
for the Circulate as Type column in xul lists, display the actual citm value instead of the code

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agoFix Circulate as Type in the item editor.
Jason Etheridge [Wed, 1 Jun 2011 07:17:17 +0000 (03:17 -0400)]
Fix Circulate as Type in the item editor.

The citm retrieval method was changed to use open-ils.fielder, which
doesn't return actual fieldmapper objects, so when data.js went to
convert the retrieved list to a hash, it broke.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agoAllow util.functional.convert_object_list_to_hash to handle more than fieldmapper...
Jason Etheridge [Wed, 1 Jun 2011 07:16:05 +0000 (03:16 -0400)]
Allow util.functional.convert_object_list_to_hash to handle more than fieldmapper-like objects

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
13 years agoPO activation date display improvement
Bill Erickson [Fri, 3 Jun 2011 20:35:25 +0000 (16:35 -0400)]
PO activation date display improvement

Use the smarter Util.js date parsing code to prevent small time offsets
in PO activation date display.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
13 years agotweak function name
Jason Etheridge [Fri, 3 Jun 2011 19:58:52 +0000 (15:58 -0400)]
tweak function name

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoRefactor the "show copy notes button" functionality
Dan Scott [Fri, 3 Jun 2011 18:48:30 +0000 (14:48 -0400)]
Refactor the "show copy notes button" functionality

Collapse the duplicated code for showing / hiding the "show copy notes
button" into a single method. Might make maintenance a bit easier some
day.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agofix the Copy Notes button in the unified vol/copy editor
Jason Etheridge [Wed, 1 Jun 2011 19:57:50 +0000 (15:57 -0400)]
fix the Copy Notes button in the unified vol/copy editor

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoClean up a few stock perm mistakes
Dan Wells [Fri, 3 Jun 2011 17:43:40 +0000 (13:43 -0400)]
Clean up a few stock perm mistakes

This upgrade file does cleanup for two errors:
1) accounts for spelling errors (Admin != Administrator)
2) adds a group missed in 0542, for upgraders

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoFixed and extended upgrade file 0542 (stock permissions)
Dan Wells [Fri, 3 Jun 2011 17:00:25 +0000 (13:00 -0400)]
Fixed and extended upgrade file 0542 (stock permissions)

This upgrade file did not work on a multi-upgraded DB, as a bunch of new
permissions and groups never made it into any upgrade.

The changes here are intended to both fix the upgrade and rectify the
missing pieces, where needed.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoWhitespace cleanup in aisle 3 (O:A:Reporter)
Dan Scott [Wed, 1 Jun 2011 22:06:13 +0000 (18:06 -0400)]
Whitespace cleanup in aisle 3 (O:A:Reporter)

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoLP#740466 Sort report folders by name
Michael Peters [Wed, 1 Jun 2011 12:52:57 +0000 (08:52 -0400)]
LP#740466 Sort report folders by name

Add order_by to Reporter.pm to sort report folders by name

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoSerial holdings display consistency fix
Dan Wells [Wed, 1 Jun 2011 18:33:59 +0000 (14:33 -0400)]
Serial holdings display consistency fix

When holdings are sourced from both MFHD and the DB, display may be
inconsistent due to a hard-coded ', ' in Serial.pm.  This patch works around
the problem by storing generated_coverage as a JSON array instead of a string,
leaving display formatting to the OPAC.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoRevert "f424dd8" for bad commit message
Dan Wells [Wed, 1 Jun 2011 18:52:49 +0000 (14:52 -0400)]
Revert "f424dd8" for bad commit message

This reverts commit 997eef7b50acf10ec2afcb8d8933b75317e0410f.

13 years agof424dd8
Dan Wells [Wed, 1 Jun 2011 18:40:43 +0000 (14:40 -0400)]
f424dd8

13 years agoMissing db upgrade number bump plus backport fix
Dan Wells [Wed, 1 Jun 2011 17:00:32 +0000 (13:00 -0400)]
Missing db upgrade number bump plus backport fix

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoRemove specific admin perms, reorganize seed file
Dan Wells [Wed, 1 Jun 2011 15:10:34 +0000 (11:10 -0400)]
Remove specific admin perms, reorganize seed file

The various administrators already have 'EVERYTHING' at their
respective levels, so no need to assign new perms there.  The
seed file is now more consistently organized.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoChange a few permission levels and assignments
Dan Wells [Wed, 1 Jun 2011 13:43:53 +0000 (09:43 -0400)]
Change a few permission levels and assignments

In an attempt to be consistent with existing perms, a few were moved to
levels lower than 'Consortium', and ADMIN_SERIAL_ITEM is only in the
'Serial' group.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoPush the grp perm mappings into the seed data
Jason Etheridge [Thu, 26 May 2011 18:31:04 +0000 (14:31 -0400)]
Push the grp perm mappings into the seed data

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agowrong group ids for system admin and global admin
Jason Etheridge [Thu, 26 May 2011 16:55:25 +0000 (12:55 -0400)]
wrong group ids for system admin and global admin

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoput CREATE_PURCHASE_REQUEST into Users, not Staff
Jason Etheridge [Thu, 26 May 2011 16:50:39 +0000 (12:50 -0400)]
put CREATE_PURCHASE_REQUEST into Users, not Staff

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agomap these perms to stock perm groups
Jason Etheridge [Thu, 26 May 2011 16:43:41 +0000 (12:43 -0400)]
map these perms to stock perm groups

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoadded other permissions missing in rel_2_1
Jason Etheridge [Thu, 26 May 2011 14:51:19 +0000 (10:51 -0400)]
added other permissions missing in rel_2_1

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agosome recent cataloging permissions, but I'm unsure about the new upgrade/ script...
Jason Etheridge [Thu, 26 May 2011 07:13:26 +0000 (03:13 -0400)]
some recent cataloging permissions, but I'm unsure about the new upgrade/ script regime

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoLP#739444 Incrementing opac.dtd copyright date
Michael Peters [Tue, 31 May 2011 12:44:49 +0000 (08:44 -0400)]
LP#739444 Incrementing opac.dtd copyright date

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoindicate what date format to use for offline patron registration
Jason Etheridge [Fri, 27 May 2011 17:02:14 +0000 (13:02 -0400)]
indicate what date format to use for offline patron registration

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoFix Hold Capture checkin mode
Thomas Berezansky [Fri, 27 May 2011 15:39:53 +0000 (11:39 -0400)]
Fix Hold Capture checkin mode

oils_persist was trumping hardcoded values.
Also, change how checked is set/unset for reliability.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoPatch suggested by Jason Boyer for LP#788601
Mike Rylander [Thu, 26 May 2011 20:03:39 +0000 (16:03 -0400)]
Patch suggested by Jason Boyer for LP#788601

The <script> tag for the chrome frame message has a misplaced semicolon,
which causes an odd looking display issue in Internet Explorer. I
realize that ideally very few people will be using IE, but even if
they're not interested in a quality browsing experience we should
probably put our best face forward.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
(cherry picked from commit bbc874ddb42ac05130ccfad92fc55ccebd6af882)

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoDistinguish between 'Show Groups' checkboxes in Serial Control
Dan Wells [Thu, 26 May 2011 15:19:40 +0000 (11:19 -0400)]
Distinguish between 'Show Groups' checkboxes in Serial Control

Two different checkboxes ended up with the same ID, which, as one might
expect, kinda worked and kinda didn't.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoChecking for 'twisty' leads to false negatives in Serial Control
Dan Wells [Thu, 26 May 2011 14:53:42 +0000 (10:53 -0400)]
Checking for 'twisty' leads to false negatives in Serial Control

Since a tree can be opened with a double-click, we can't rely on 'twisty'
being set to load the child data.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoDon't rely on call number column being rendered before prefix/suffix/class columns...
Jason Etheridge [Thu, 26 May 2011 07:55:26 +0000 (03:55 -0400)]
Don't rely on call number column being rendered before prefix/suffix/class columns.  Also, remove prefix/suffix/class from the check-in interface, since those column definitions can make extra network calls and we want that interface to be as fast as possible.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agowrong target for parts holds in open-ils.circ.holds.retrieve_all_from_title
Jason Etheridge [Thu, 26 May 2011 06:42:07 +0000 (02:42 -0400)]
wrong target for parts holds in open-ils.circ.holds.retrieve_all_from_title

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agomissed this way back when. fix multiple event override handling (for ilsevent lackin...
Jason Etheridge [Wed, 25 May 2011 20:56:24 +0000 (16:56 -0400)]
missed this way back when.  fix multiple event override handling (for ilsevent lacking events), re: lp#757634.  Also add some missing typeof's

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoFix authority linking script typo
Dan Scott [Wed, 25 May 2011 15:38:11 +0000 (11:38 -0400)]
Fix authority linking script typo

Problem reported by Ditty Mulder <dmu@iisg.nl>

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoupgrade_deps_block_check() is not in the branches at this point
Dan Wells [Wed, 25 May 2011 13:29:13 +0000 (09:29 -0400)]
upgrade_deps_block_check() is not in the branches at this point

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoUse the correct upgrade log format for rel_2_1
Dan Scott [Wed, 25 May 2011 03:22:32 +0000 (23:22 -0400)]
Use the correct upgrade log format for rel_2_1

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoTrivial line-wrapping patch for call number class defaults
Dan Scott [Wed, 25 May 2011 01:56:13 +0000 (21:56 -0400)]
Trivial line-wrapping patch for call number class defaults

Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoMake label_class on any new call numbers default to org_unit setting
Dan Wells [Tue, 24 May 2011 14:53:09 +0000 (10:53 -0400)]
Make label_class on any new call numbers default to org_unit setting

Evergreen 2.0 added a label_class column to the call number table with
one major purpose being the generation of correct sort keys. You can
also specify a default label class as an org unit setting. However:

1) There are no interface elements for setting the label class of an
individual call number.

2) The default setting from the actor.org_unit_setting
'cat.default_classification_scheme' value, if set, is not consulted
(that is, not set in the call number table) when new call numbers are
created.

These two facts together greatly reduce the utility of this very
valuable feature, as all new call numbers end up in the 'Generic' class.

While #1 has been addressed in 2.1+, there is still work to be done in
setting this class on import. Also, which interface parts (if any) make
it back to 2.0 is subject to debate.

This commit addresses #2.

See lp #787150.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dan@coffeecode.net>
13 years agoBring serial.unit in line with asset.copy
Dan Wells [Tue, 24 May 2011 20:55:47 +0000 (16:55 -0400)]
Bring serial.unit in line with asset.copy

Signed-off-by: Dan Wells <dbw2@calvin.edu>
13 years agoremove restriction on resetting pw to random number when Use Phone Password setting...
Jason Etheridge [Tue, 24 May 2011 18:55:57 +0000 (14:55 -0400)]
remove restriction on resetting pw to random number when Use Phone Password setting is active.  uEditMakeRandomPw will still get called for new users, but should get overwritten once a phone number is entered

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agowrong identifier and lingering copy/paste-o in code for Item Status -> Add Items
Jason Etheridge [Mon, 23 May 2011 15:09:41 +0000 (11:09 -0400)]
wrong identifier and lingering copy/paste-o in code for Item Status -> Add Items

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
13 years agoMerge branch 'rel_2_1' of git.evergreen-ils.org:Evergreen into rel_2_1
Mike Rylander [Mon, 23 May 2011 15:14:31 +0000 (11:14 -0400)]
Merge branch 'rel_2_1' of git.evergreen-ils.org:Evergreen into rel_2_1

13 years agoRevert "Wrap proximity refreshing in a transaction to avoid timespans where there...
Mike Rylander [Mon, 23 May 2011 15:06:51 +0000 (11:06 -0400)]
Revert "Wrap proximity refreshing in a transaction to avoid timespans where there is no such information"

This reverts commit 2a16bb01ebf782a248155bee9c2d37d5b3184e0c.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
13 years agoApply Apache file expiration to the current official Javascript content type
Dan Wells [Mon, 23 May 2011 13:38:22 +0000 (09:38 -0400)]
Apply Apache file expiration to the current official Javascript content type

At least on Ubuntu 10.04, Javascript files are generally delivered
with a Content-Type header of 'application/javascript', not
'application/x-javascript'.  This change applies the much shorter
18 hour expiration to the affected files, rather than allowing them
to default to 1 month.

Signed-off-by: Dan Wells <dbw2@calvin.edu>