working/Evergreen.git
12 years agoXUL localStorage interface
Bill Erickson [Fri, 25 Jan 2013 20:46:39 +0000 (15:46 -0500)]
XUL localStorage interface

localStorage is so much better than cookies.  To use it inside of
XUL-embedded web pages, we have to use the XUL localStorage interface,
since window.localStorage is not available within the oils:// protocol.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoDefault number of ACQ copies per provider
Bill Erickson [Wed, 30 Jan 2013 14:36:17 +0000 (09:36 -0500)]
Default number of ACQ copies per provider

Acquisitions providers have a new "Default # Copies" field.  When the value
is set, this number of copies will be automatically added to each lineitem
added to a purchase order for the provider.  This takes place during PO
creation from a selection list or existing bib record and when a lineitem is
added to an existing purchase order.  If a lineitem already has copies
attached, no default copies are added.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoReturn count purged
Thomas Berezansky [Wed, 19 Sep 2012 15:30:40 +0000 (11:30 -0400)]
Return count purged

Because postgres dislikes functions that don't return.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoFix rentention typo
Thomas Berezansky [Mon, 10 Sep 2012 16:14:09 +0000 (12:14 -0400)]
Fix rentention typo

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoPurge Circulations: Unwrapped Upgrade Script
Thomas Berezansky [Mon, 18 Jun 2012 17:45:21 +0000 (13:45 -0400)]
Purge Circulations: Unwrapped Upgrade Script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoPurge Circulations: Allow global age as forced min
Thomas Berezansky [Mon, 18 Jun 2012 17:29:58 +0000 (13:29 -0400)]
Purge Circulations: Allow global age as forced min

This allows a library to keep all circs in the last Y interval, regardless
of user settings that may otherwise cause an earlier purging.

Another global flag that defaults to off controls this behavior.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoPurge Circulations: Remove extra delete loop
Thomas Berezansky [Mon, 18 Jun 2012 17:19:18 +0000 (13:19 -0400)]
Purge Circulations: Remove extra delete loop

A trigger on action.circulation purges upwards through the circ chain. Thus
we don't need to do the loop ourselves.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoPurge Circulations: Better selection logic
Thomas Berezansky [Mon, 18 Jun 2012 17:07:56 +0000 (13:07 -0400)]
Purge Circulations: Better selection logic

This attempts two things:

1 - Keep the number of circs the library wants based on the most recent
    circulations, regardless of user prefs and such.

    This is accomplished by changing the circ fetching query to use a
    window function in a subquery so we can filter on it easily.

    This also allowed removal of the purge position counter.

2 - Allow removal of circs that are between kept circs if they meet all
    other removal criteria.

    This is accomplished by using CONTINUE instead of EXIT in the loop.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoPurge Circulations: Support last xact_finished use
Thomas Berezansky [Mon, 18 Jun 2012 17:00:30 +0000 (13:00 -0400)]
Purge Circulations: Support last xact_finished use

Based on a new (off by default) global flag change between the xact_finish
on the last circ in the chain and the most recent one.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoPurge Circulations: Skip partially complete chains
Thomas Berezansky [Mon, 18 Jun 2012 16:52:04 +0000 (12:52 -0400)]
Purge Circulations: Skip partially complete chains

Billings in earlier portions of the chain may leave them open. Thus, look
for any circulations in the chain with a null xact_finish.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoCirc Chain Functions should take BIGINTs
Thomas Berezansky [Mon, 18 Jun 2012 16:49:39 +0000 (12:49 -0400)]
Circ Chain Functions should take BIGINTs

Because INTEGER isn't suitable for circ IDs.

This only requires editing the input definitions.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoACQ delayed lineitems style release notes
Bill Erickson [Wed, 26 Dec 2012 21:43:20 +0000 (16:43 -0500)]
ACQ delayed lineitems style release notes

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoImprove styling for 'delayed' lineitems in PO UI
Bill Erickson [Tue, 11 Dec 2012 15:26:30 +0000 (10:26 -0500)]
Improve styling for 'delayed' lineitems in PO UI

When a lineitem is cancelled, but "keep_debits" is true, the lineitem is
in effect delayed instead of truly cancelled.  Make it more obvious in
the UI the difference between delayed and truly cancelled lineitems by
applying a row styling for delayed items (similar to other status row
styling) and always show the cancel reason (label) in the lineitem
display in the PO, next to the non-title attributes.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoLP #1092921: Display of/sorting by CN affixes in Simplified Hold Pull List
Lebbeous Fogle-Weekley [Wed, 2 Jan 2013 17:33:36 +0000 (12:33 -0500)]
LP #1092921: Display of/sorting by CN affixes in Simplified Hold Pull List

In the Simplified Hold Pull List interface, the "Call Number Label" column
displays the call number of the copy targeted by the hold in each row,
and it does so by combining affixes with the actual label field.
Sorting of this column actually uses the call number sortkey generated
in-database for this purpose.

Sometimes this means that sorting order doesn't match what you'd
expect to see with this column.  Opinions differ on desired behavior, so
now you can explicity add columns to the table for call number prefix
and suffix, and sort on either of those (potentially in combination with
other columns).

Amended from an earlier version of this commit that still didn't sort
CN prefix and suffix columns quite right.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agofix clear hold shelf with 25 or more holds
Jason Etheridge [Tue, 26 Jun 2012 15:39:48 +0000 (11:39 -0400)]
fix clear hold shelf with 25 or more holds

When there are 25 or more shelf expired holds to be processed, the API call
returns an array of objects instead of an object, which the staff client wasn't
prepared to accommodate. This fixes that.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
12 years agoLP#1067361: vandelay: batch queue deletion no longer works
Mark Cooper [Tue, 16 Oct 2012 18:02:23 +0000 (11:02 -0700)]
LP#1067361: vandelay: batch queue deletion no longer works

Because window.location.reload can trigger before the deletions
have occurred. Simple fix (band aid?) is to make the delete
calls in sync.

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
12 years agoChange "Search Preferences" to "Search and History Preferences".
Jason Stephenson [Mon, 26 Nov 2012 20:14:33 +0000 (15:14 -0500)]
Change "Search Preferences" to "Search and History Preferences".

A separate commit to update the translation files' msgId entries.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoRename "Search Preferences" tab to "Search and History Preferences".
Jason Stephenson [Mon, 26 Nov 2012 20:04:59 +0000 (15:04 -0500)]
Rename "Search Preferences" tab to "Search and History Preferences".

This change better reflects the complete meaning of the preference tab.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoFix handling of ranges in OpenILS::SIP::Patron::fine_items().
Jason Stephenson [Mon, 22 Oct 2012 14:05:32 +0000 (10:05 -0400)]
Fix handling of ranges in OpenILS::SIP::Patron::fine_items().

When the client specifies a begin and end range for SIP2 fine items,
only the first fine item is returned. This is because of a typo on
line 646. The @fines array should be dereferenced there as @fines and
not $fines.

Signed-off-by: Jason Stephenson <jason@sigio.com>
12 years agoAcq general search: improve searching for negative comparisons
Lebbeous Fogle-Weekley [Wed, 19 Sep 2012 19:27:03 +0000 (15:27 -0400)]
Acq general search: improve searching for negative comparisons

This aims to address Launchpad bug #1031535.  I think the bug only
really shows up when searches involve invoices either as the core type
or with filter fields.  If a search doesn't involve invoices, the
problematic joins aren't present.

Could use more testing though.  Seems to make the problem go away, and
other basic searches seem to work, but I certainly haven't tested
everything.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoTeach the staff client to use titlesort
Thomas Berezansky [Tue, 12 Jun 2012 18:08:04 +0000 (14:08 -0400)]
Teach the staff client to use titlesort

At least in some places.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoExpose sortable title in mvr
Thomas Berezansky [Tue, 12 Jun 2012 17:42:10 +0000 (13:42 -0400)]
Expose sortable title in mvr

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoVandelay: default match set
Jeff Davis [Wed, 17 Oct 2012 23:19:36 +0000 (16:19 -0700)]
Vandelay: default match set

Adds an org unit setting to specify a default Record Match Set when
importing MARC records with Vandelay.  NB: If this is set, it will not
be possible to leave the Record Match Set field blank; it may be
necessary to define a default match set that replicates the current
default behavior.

A new "Vandelay" settings group is also created.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
12 years agoMore receipt macros
Thomas Berezansky [Wed, 26 Sep 2012 14:42:41 +0000 (10:42 -0400)]
More receipt macros

Patron/Staff Middle Name and patron expiration date.

Including a YMD format variant of the latter.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoInclude Wrong-Shelf holds in clear-shelf results
Bill Erickson [Tue, 21 Aug 2012 21:19:54 +0000 (17:19 -0400)]
Include Wrong-Shelf holds in clear-shelf results

Include non-expired, Wrong-Shelf holds in the results list of the "Clear
Shelf-Expired Holds" process.  ("Wrong-Shelf" holds are those whose
pickup lib was changed while the hold was on the holds shelf).  The idea
behind this option is that branches may use the clear-shelf process as a
general shelf management report beyond just holds that have expired.
I.e. tell me everything I need to remove from the shelf.

This change includes a label change for the clear-shelf menu options:

"Clear Shelf-Expired Holds" -> "Clear Holds Shelf"

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoError Checking for Hold Targeter
Thomas Berezansky [Fri, 6 Apr 2012 18:39:28 +0000 (14:39 -0400)]
Error Checking for Hold Targeter

Because having it leave lock files around is annoying.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAttempt to find "Correct" copy location
Thomas Berezansky [Wed, 1 Feb 2012 21:07:05 +0000 (16:07 -0500)]
Attempt to find "Correct" copy location

This adds a trigger to asset.copy that on insert or change of the location
and/or call number tries to find an identically named copy location that
is scoped to the owning library of the copy.

If it does not find one it uses the location provided.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agotpac: sort copies by physical loc when searching parent
Bill Erickson [Mon, 18 Jun 2012 14:16:39 +0000 (10:16 -0400)]
tpac: sort copies by physical loc when searching parent

If a physical location is set and it is a child of the current search
location, sort copies living at the physical location to the top of the
copy grid in the record detail page.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoQueryParser: use combined metabib_field column
Thomas Berezansky [Tue, 18 Dec 2012 20:53:28 +0000 (15:53 -0500)]
QueryParser: use combined metabib_field column

Because I somehow forgot about it. Oops.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd basic release notes and notes for docwriters
Thomas Berezansky [Tue, 18 Dec 2012 20:12:10 +0000 (15:12 -0500)]
Add basic release notes and notes for docwriters

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUpgrade script for ts config use
Thomas Berezansky [Tue, 18 Dec 2012 19:35:28 +0000 (14:35 -0500)]
Upgrade script for ts config use

And the rest of that work

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd config interfaces
Thomas Berezansky [Tue, 18 Dec 2012 15:38:24 +0000 (10:38 -0500)]
Add config interfaces

For metabib class, class ts maps, field, and field ts maps.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Much work
Thomas Berezansky [Thu, 11 Oct 2012 15:43:25 +0000 (11:43 -0400)]
QueryParser Driver: Much work

Switch to configurable fts configs
Add "combined" index vectors
Add word boundary checks for phrase searches
Use combined rel_bump function

And probably more I forgot about

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Remove Unphrases, add negates
Thomas Berezansky [Wed, 10 Oct 2012 21:23:43 +0000 (17:23 -0400)]
QueryParser Driver: Remove Unphrases, add negates

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUse ][ instead of # to split facets
Thomas Berezansky [Wed, 10 Oct 2012 20:51:36 +0000 (16:51 -0400)]
Use ][ instead of # to split facets

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Add "lucky" modifier
Thomas Berezansky [Thu, 27 Sep 2012 20:48:03 +0000 (16:48 -0400)]
QueryParser Driver: Add "lucky" modifier

Forces to 1 result. Best used with redirect on single hit active.

Because why not.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Improve format filter
Thomas Berezansky [Tue, 18 Sep 2012 15:55:07 +0000 (11:55 -0400)]
QueryParser Driver: Improve format filter

Allow multi-select in particular, and make negate more intuitive.

-format(at-d) would previously generate:
-item_type(a,t) -item_form(d)

Now it generates:
-(item_type(a,t) item_form(d))

Multi-select allows for things like:
format(at-d,g)

To generate:
((item_type(a,t) item_form(d)) || item_type(g))

Negating that results in:
-((item_type(a,t) item_form(d)) || item_type(g))

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Long Line Cleanup
Thomas Berezansky [Fri, 14 Sep 2012 16:15:40 +0000 (12:15 -0400)]
QueryParser Driver: Long Line Cleanup

Both in the code and in the generated where clause.

The where clause we start a new line whenever:

1 - We encounter an AND or OR
2 - We are building a complex subquery (including embedded newlines)
3 - We enter a subplan

This makes for a nicely human-readable where clause.

For the code we split many long lines into multiple. A number of those were
changed due to the where clause formatting.

We also change all instances of multiple ${spc} being added to use the
${spc} x #
method of doing things, as it tends to be shorter.

Also, we move some conditionals from the ends of lines to the fronts, mainly
in those situations where we are moving something from single to multi line.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Remove Switch usage
Thomas Berezansky [Fri, 14 Sep 2012 12:57:45 +0000 (08:57 -0400)]
QueryParser Driver: Remove Switch usage

Because not all distros install it by default.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Improve anchored searches
Thomas Berezansky [Wed, 12 Sep 2012 13:12:41 +0000 (09:12 -0400)]
QueryParser Driver: Improve anchored searches

By checking individual atoms for ^ and $ anchors we can get better results,
without needing to have people quote individual terms.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Protect against NULLs
Thomas Berezansky [Tue, 11 Sep 2012 19:02:59 +0000 (15:02 -0400)]
QueryParser Driver: Protect against NULLs

mrd.attrs->'value' can return NULL. If this happens:

Checking that the value is within a range or list will work fine.
NEGATING that will not.

This is because:
AND NULL returns NULL
AND NOT (NULL) also returns NULL

The solution? Adjust things so we can wrap all the offending checks in a
COALESCE to false. Then if mrd.attrs->'value' is null we get a false.

In the process we move any and all negations to outside the COALESCE.

Also apply the same logic to the bib_source filter, not to mention
making it support being negated.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd bib_source filter
Thomas Berezansky [Tue, 11 Sep 2012 13:48:39 +0000 (09:48 -0400)]
Add bib_source filter

Because it would likely be very useful, if only for staff.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoFix empty statuses filter
Thomas Berezansky [Tue, 11 Sep 2012 13:42:38 +0000 (09:42 -0400)]
Fix empty statuses filter

By adding a check that was overlooked.

Also remove a leftover TODO note and add another test query.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Use proper table alias
Thomas Berezansky [Tue, 11 Sep 2012 13:21:36 +0000 (09:21 -0400)]
QueryParser Driver: Use proper table alias

When all atoms are dummy atoms we need the correct table alias.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd some more test queries to query_tester.pl
Thomas Berezansky [Tue, 11 Sep 2012 13:11:29 +0000 (09:11 -0400)]
Add some more test queries to query_tester.pl

At least one of which requires a follow-up change to the driver to resolve.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoRemove search.query_parser_fts from schema
Thomas Berezansky [Mon, 10 Sep 2012 20:47:15 +0000 (16:47 -0400)]
Remove search.query_parser_fts from schema

Including an upgrade script to drop it.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQuick script for pushing queries into search
Thomas Berezansky [Mon, 10 Sep 2012 17:54:55 +0000 (13:54 -0400)]
Quick script for pushing queries into search

Several of the defaults are designed to trigger bad SQL generation.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoRemove dependence on search.query_parser_fts proc
Thomas Berezansky [Fri, 7 Sep 2012 20:07:26 +0000 (16:07 -0400)]
Remove dependence on search.query_parser_fts proc

We do this by moving everything into the QueryParser driver, then telling
the metabib layer to not call it anymore.

In the process we remove the "superpage" checks, instead just getting the
entire result set directly from the DB.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryparser Driver: SQL Generation Tweaks
Thomas Berezansky [Fri, 7 Sep 2012 18:13:08 +0000 (14:13 -0400)]
Queryparser Driver: SQL Generation Tweaks

Remove fwhere/where distinction due to issues with detecting where some
operators were supposed to go.

Change format to a callback instead of forcing it to the top of the tree.

Change date-based filters to work in nested situations.

Change container and record_list to work in nested situations.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser Driver: Adjust query whitespace
Thomas Berezansky [Fri, 7 Sep 2012 14:46:34 +0000 (10:46 -0400)]
QueryParser Driver: Adjust query whitespace

Adjust spacing and newlines to make the resulting query more easily read.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser: Expand negate and disallow operators
Thomas Berezansky [Sun, 16 Sep 2012 20:46:43 +0000 (16:46 -0400)]
QueryParser: Expand negate and disallow operators

Allow negate to act like disallow on phrases.

Allow both to apply to groups.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser: Add negate operator
Thomas Berezansky [Sun, 16 Sep 2012 19:21:07 +0000 (15:21 -0400)]
QueryParser: Add negate operator

To replace the previous -atom behavior add a negate op, by default !.

This acts identically to how - worked before it was changed to convert atoms
into unphrases.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser: Treat Unphrases as negated phrases
Thomas Berezansky [Sun, 16 Sep 2012 19:08:06 +0000 (15:08 -0400)]
QueryParser: Treat Unphrases as negated phrases

This should allow drivers to better check for negated phrases by using
indexes on the contained atoms.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser: Protect phrase parsing
Thomas Berezansky [Sun, 16 Sep 2012 17:53:16 +0000 (13:53 -0400)]
QueryParser: Protect phrase parsing

Ensure that phrases don't get parsed as containing anything other than
individual atoms. This ensures that you can phrase-escape things that would
otherwise be treated as QP syntax.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoConvert negated words to unphrases, like we do with +d words to phrases
Mike Rylander [Fri, 14 Sep 2012 18:28:20 +0000 (14:28 -0400)]
Convert negated words to unphrases, like we do with +d words to phrases

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoLots ...
Mike Rylander [Wed, 12 Sep 2012 17:12:12 +0000 (13:12 -0400)]
Lots ...

 * increase debugging amount and readability
 * floating sections (push-to-top)
 * force plan level setting
 * fix several forms of auto-pushdown breakage (explicit bool precedence support)

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQueryParser unit test
Jared Camins-Esakov [Sat, 8 Sep 2012 02:44:50 +0000 (22:44 -0400)]
QueryParser unit test

Test that QueryParser can handle a variety of queries. This initial
unit test does the following:

1) Test the configuration of QueryParser.
2) Test that various queries have stable canonical representations.
3) Test that a number of equivalent queries are correctly parsed as
   equivalent.
4) Test that a number of non-equivalent queries are correctly parsed as
   NOT being equivalent.
5) Several other tests relating to query parsing.

This includes almost 100% subroutine coverage in the QueryParser class.
Other classes have somewhat lower test coverage.

As of 2012-09-09, several outstanding bugs affect these tests:
1) QueryParser->superpage cannot be unset.
2) Explicit groups are not handled correctly by the abstract query
   to string converter.
3) There is no defined precedence between explicit boolean connectors
   and implicit boolean connectors.
4) Modifiers are silently dropped when not at the top level of the query.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoStart adding skeletal POD for subroutines
Jared Camins-Esakov [Sun, 9 Sep 2012 14:52:06 +0000 (10:52 -0400)]
Start adding skeletal POD for subroutines

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoMove allow_nested_modifiers to the driver level, provide a wrapper for it, and add...
Mike Rylander [Mon, 10 Sep 2012 19:31:05 +0000 (15:31 -0400)]
Move allow_nested_modifiers to the driver level, provide a wrapper for it, and add that to the Pg test setup as an example

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAllow nested modifiers
Jared Camins-Esakov [Sat, 8 Sep 2012 03:36:36 +0000 (23:36 -0400)]
Allow nested modifiers

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoPretty-fy canonicalization
Mike Rylander [Mon, 10 Sep 2012 18:58:01 +0000 (14:58 -0400)]
Pretty-fy canonicalization

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoTeach QP about floating (force-to-top) subplans indicated by {{...}}
Mike Rylander [Mon, 10 Sep 2012 17:21:30 +0000 (13:21 -0400)]
Teach QP about floating (force-to-top) subplans indicated by {{...}}

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoQP: OO-ize canonicalizer; remove extra nesting from canonicalized query; repair neste...
Mike Rylander [Fri, 7 Sep 2012 19:51:43 +0000 (15:51 -0400)]
QP: OO-ize canonicalizer; remove extra nesting from canonicalized query; repair nested operator in bool nesting; updated (basis) test script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAutomatic push-down of explicitly-bool-connected conditions
Mike Rylander [Fri, 7 Sep 2012 18:15:21 +0000 (14:15 -0400)]
push-down of explicitly-bool-connected conditions

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoSerials: Caption/pattern wizard use enum fields for chronology when no enum
Lebbeous Fogle-Weekley [Mon, 21 Jan 2013 19:54:55 +0000 (14:54 -0500)]
Serials: Caption/pattern wizard use enum fields for chronology when no enum

MFHD spec says that when there are no ‡a - ‡f enumeration captions, any
chronology captions should move back from their usual ‡i - ‡m places
back into enumeration space.

The predictions engine we already have deals with this better than with
the wrong patterns we were creating before, e.g.:

853 20 ‡81 ‡i(year) ‡j(month) ‡wm

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoDeal with opt-in boundaries defensively
Dan Scott [Fri, 17 Aug 2012 20:07:19 +0000 (16:07 -0400)]
Deal with opt-in boundaries defensively

If a site had not set an 'org.patron_opt_default' OU setting, then it
seemed that a DEFAULT value was getting dumped into the "create opt-in"
INSERT statement for the org_unit argument, and that (as there is a
non-NULL constraint on the column and no default value for the column)
resulted in the patron not getting opted in.

One way for sites to deal with this is to set an opt-in boundary at the
consortial level, along the lines of:

INSERT INTO actor.org_unit_setting (org_unit, name, value)
  VALUES (1, 'org.patron_opt_default', 2);

Alternatively, in the absense of any such setting, opt-in should
continue to work as it had before the new feature was added; this change
keeps the old behaviour active in that case.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoLP1051112 - Display lineitem commands menu on empty picklists
Bill Erickson [Mon, 5 Nov 2012 14:22:55 +0000 (09:22 -0500)]
LP1051112 - Display lineitem commands menu on empty picklists

Ensure that the lineitem commands drop-down menu appears even when the
picklist is empty.  Previously, the commands were not displayed until
the first lineitem was retrieved.  For empty picklists, of course, there
will be no first lineitem.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoLP1066158 - Add associated permissions to admin menu commands
Ben Shum [Thu, 11 Oct 2012 04:10:54 +0000 (00:10 -0400)]
LP1066158 - Add associated permissions to admin menu commands

For the admin menu, we had already begun to check for specific permissions
to allow staff to access the menu options.  However, it is not complete.

This is a first attempt to add additional permissions to various local
and server admin options.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
12 years agoLP#1102472: add about:about to staff client developer menu
Galen Charlton [Mon, 21 Jan 2013 16:38:49 +0000 (11:38 -0500)]
LP#1102472: add about:about to staff client developer menu

The about:about page contains many XULRunner diagnostic tools.

Some useful ones include:

about:buildconfig - Get information about how the staff client is built.
about:config - Tweak XULRunner settings.
about:memory - Get detailed information about staff client memory usage.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoMerge remote-tracking branch 'origin/master' into acq-invoice-doc
Kathy Lussier [Sat, 26 Jan 2013 03:36:53 +0000 (22:36 -0500)]
Merge remote-tracking branch 'origin/master' into acq-invoice-doc

12 years agoDocumentation: acquisitions updates user/kmlussier/acq-invoice-doc
Kathy Lussier [Sat, 26 Jan 2013 02:35:13 +0000 (21:35 -0500)]
Documentation: acquisitions updates

Update Search for Line Items from an Invoice section to reflect minor
changes that came with lp1050008. Also, moved received Items from an
Invoice section to fall within the rest of the Invoices section.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
12 years agoDocumentation: Update staff client installation for 2.3.3 version.
Robert Soulliere [Tue, 22 Jan 2013 14:36:08 +0000 (09:36 -0500)]
Documentation: Update staff client installation for 2.3.3 version.

Signed-off-by: Robert Soulliere <robert.soulliere@mohawkcollege.ca>
12 years agoDocumentation: Update upgrading the server instructions to point to 2.3.3.
Robert Soulliere [Tue, 22 Jan 2013 14:17:26 +0000 (09:17 -0500)]
Documentation: Update upgrading the server instructions to point to 2.3.3.

Signed-off-by: Robert Soulliere <robert.soulliere@mohawkcollege.ca>
12 years agoTPAC - new CSS for login help elements
Ben Shum [Sun, 20 Jan 2013 06:16:13 +0000 (01:16 -0500)]
TPAC - new CSS for login help elements

Instead of having everything hard coded into the page, move important
pieces into the style.css.tt2.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoTPAC - Remove images from login help page
Thomas Berezansky [Fri, 21 Dec 2012 21:10:09 +0000 (16:10 -0500)]
TPAC - Remove images from login help page

Because images are hard to translate.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoLP1054053 - make default input font darker
Ben Shum [Fri, 21 Dec 2012 20:47:40 +0000 (15:47 -0500)]
LP1054053 - make default input font darker

The original light grey made it difficult to see what was being input.
Change to use text font color variable (black by default).

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoTPAC: Fix series display for multiple series fields
Dan Scott [Sat, 19 Jan 2013 19:28:06 +0000 (14:28 -0500)]
TPAC: Fix series display for multiple series fields

This commit adds one test record, "Harry Potter and the Goblet of Fire",
which contains multiple series fields. TPAC would display the series
fields in a purely additive fashion as the variable was not reset after
each field. Now we initialize the series var for each new series field
we retrieve, fixing the display problem.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoUnbold graphic 880 title display
Ben Shum [Thu, 10 Jan 2013 22:01:05 +0000 (17:01 -0500)]
Unbold graphic 880 title display

To maintain consistency with the main title being unbolded and have
a little less bolding distraction in the record.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAdded 880 series display to Release Notes.
Kathy Lussier [Thu, 10 Jan 2013 21:55:01 +0000 (16:55 -0500)]
Added 880 series display to Release Notes.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoMake series in record details behave
Dan Scott [Mon, 7 Jan 2013 23:16:57 +0000 (18:16 -0500)]
Make series in record details behave

Add graphic 880 field support, as well as relying on mkurl() macro to
generate the desired URL and show the complete series on a single line
instead of having subfields appear on separate rows.

Add a sample record that contains a 440 series field linked to an 880
field.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoAdd test records for graphic 880 field display
Dan Scott [Sun, 6 Jan 2013 01:49:27 +0000 (20:49 -0500)]
Add test records for graphic 880 field display

"--load-all" in eg_db_config.pl will load these records with call
numbers of "G880 ", so you can shelf-browse, or search by title:

* Tu shuo Zhongguo jie
* Matsumoto Shigeharu
* Schrödinger operators
* Breathing, feeding, and neuroprotection
* Data warehousing and knowledge discovery

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoRelease notes for alternate graphic 880 fields
Dan Scott [Sat, 5 Jan 2013 04:55:13 +0000 (23:55 -0500)]
Release notes for alternate graphic 880 fields

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoTPAC: Alternate graphic fields (880) display
Dan Scott [Fri, 4 Jan 2013 21:26:30 +0000 (16:26 -0500)]
TPAC: Alternate graphic fields (880) display

In the search results and record details displays, display the
corresponding 880 field(s) whenever possible.

The contents of the 880 field are generally displayed directly
underneath the corresponding primary field, with the exception of the
contributor credits on the record details page, in which the 880
contents appear between the name of the contributor and the
contributor's credit.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoUpdate staff client's about page to include newest core committers
Ben Shum [Mon, 3 Dec 2012 15:37:43 +0000 (10:37 -0500)]
Update staff client's about page to include newest core committers

The newest core committers were elected during the Evergreen Hack-A-Way on
October 10, 2012:

Jeff Godin, Traverse Area District Library
Benjamin Shum, Bibliomation, Inc.
Jason Stephenson, Merrimack Valley Library Consortium

Also update language of page to reflect that these contributors are now core
"committers" rather than "developers".  And move past core committers into
their own section.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAdd 2.2.4 -> 2.2.5 upgrade script
Lebbeous Fogle-Weekley [Wed, 16 Jan 2013 20:18:56 +0000 (15:18 -0500)]
Add 2.2.4 -> 2.2.5 upgrade script

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoForward-porting 2.3.2 -> 2.3.3 DB upgrade
Bill Erickson [Wed, 16 Jan 2013 20:18:57 +0000 (15:18 -0500)]
Forward-porting 2.3.2 -> 2.3.3 DB upgrade

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoLP#1098377: protect against even more cstore segfaults
Galen Charlton [Tue, 15 Jan 2013 16:30:41 +0000 (11:30 -0500)]
LP#1098377: protect against even more cstore segfaults

Following up on the preceding patch, passing null
as the savepoint name to savepoint.release and
savepoint.rollback would also segfault cstore.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoVerify savepoint name is non-null
Bill Erickson [Tue, 15 Jan 2013 15:58:16 +0000 (10:58 -0500)]
Verify savepoint name is non-null

Before we attempt to mangle the name, let's ensure that it's non-null.
Otherwise, segfaults ensue.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
12 years agoProtect against overly long savepoint names
Dan Scott [Fri, 11 Jan 2013 06:32:13 +0000 (01:32 -0500)]
Protect against overly long savepoint names

Per http://postgresql.org/docs/9.1/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS,
the maximum identifier length works out to being 63 bytes (+1 for the
null terminator), so to avoid potential memory pressure by a 10GB string
somehow being passed in as the savepoint name, malloc no more than 64
bytes and copy no more than 63 bytes from the incoming name to the
escaped name.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
12 years agoLP#1098377: sanitize savepoint names
Galen Charlton [Fri, 11 Jan 2013 07:30:50 +0000 (02:30 -0500)]
LP#1098377: sanitize savepoint names

When invoking open-ils.{cstore,pcrud,rstore}.savepoint.*, the
caller supplies a name for the savepoint.  However, the savepoint
names could be constructed so that the caller could execute
arbitrary SQL.  This patch sanitizes the name so that it contains
only alphanumeric and underscore characters.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years ago2.3.3 translations : repair Finnish translator email
Bill Erickson [Wed, 16 Jan 2013 16:04:23 +0000 (11:04 -0500)]
2.3.3 translations : repair Finnish translator email

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years ago2.3.3 translations : newpot
Bill Erickson [Wed, 16 Jan 2013 15:39:31 +0000 (10:39 -0500)]
2.3.3 translations : newpot

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years ago2.3.3 translations : update profiles
Bill Erickson [Wed, 16 Jan 2013 15:35:33 +0000 (10:35 -0500)]
2.3.3 translations : update profiles

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoMinor fix in Open-ILS/src/templates/opac/parts/place_hold_result.tt2
Jason Stephenson [Mon, 10 Dec 2012 20:27:40 +0000 (15:27 -0500)]
Minor fix in Open-ILS/src/templates/opac/parts/place_hold_result.tt2

The hidden override field had two type attrs: "hidden" and "name."
I deleted the one with the value of "name."

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoLP1076062: Hold overrides not working properly.
Jason Stephenson [Mon, 10 Dec 2012 15:29:21 +0000 (10:29 -0500)]
LP1076062: Hold overrides not working properly.

Edit the verify_copy_for_hold helper function to actually work.  There
were cases where it would permit a copy when it shouldn't and also
disallow a copy when it should have allowed it.  It now makes better
use of the oargs override argument.

If oargs has an events member, the method now removes the matching from
the list of failure events returned by the permit_copy_hold check.  It
was previously bugged, stopping on the first matching event, clearing
the list of failed and events, and returning a value to indicate that
the copy is permitted for the hold, even when it may not be.

If oargs has the "all" member and there are failure events remaining,
the function loops through those events checking if the requestor has
the override permission for the event.  If the requestor does have the
override permission, then the event is added to oargs->{events} to be
saved for future checks on future copies.  It the requestor does not
have the override permission, then the event is pushed onto a new array
of failed events and also onto oargs->{failed}.  The latter is kept
to avoid looking up events repeatedly on future copy checks.

The oargs->{failed} member is added as a shortcut to avoid repeatedly
looking up override permissions when the requestor does not have them.
It is actually checked, when present, before the user permission is
checked with a costly database lookup.

Since verify_copy_for_hold has no other way to determine that an override
was requested, it checks for the events and/or all members of oargs being
set and having a value that would evaluate to true.  If oargs is undefined,
a hashref with no members, or lacks a "true" events or all member, then
verify_copy_for_hold functions as though no overrides are requested.

Additionally, all functions that call verify_copy_for_hold, either directly
or indirectly, have had their intro logic modified to only set oargs when
an override is requested and oargs is not already set.  We make the assump-
tion that if oargs is set, it contains the events member.  (Perhaps that is
a poor assumption, but all of the code so far looks like it will work.)

Fix test_and_create_hold_batch so that it passes the oargs parameter into
open-ils.circ.title_hold.is_possible in the way that check_title_hold (the
implementation function) actually expects it to be passed.  This also means
that we need to delete oargs from the params hashref before creating the
hold objects, as that would blow up if it were present.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoWhitespace cleanup on aisle 9!
Jason Stephenson [Wed, 5 Dec 2012 15:20:45 +0000 (10:20 -0500)]
Whitespace cleanup on aisle 9!

Fix whitespace (spaces, not tabs) in OpenILS/Application/Circ/Holds.pm.

Also, remove trailing whitespace at the end of lines.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoAvoid CStoreEditor failures on missing log-protect
Bill Erickson [Wed, 16 Jan 2013 14:39:56 +0000 (09:39 -0500)]
Avoid CStoreEditor failures on missing log-protect

When the log_protect configuration chunk is not present in
opensrf_core.xml, gracefully move on without it.  This prevents errors
like:

Can't call method \"shared\" on an undefined value at
/usr/local/share/perl/5.10.1/OpenILS/Utils/CStoreEditor.pm line 646.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoFix backdate near DST changes
Thomas Berezansky [Fri, 2 Nov 2012 13:53:30 +0000 (09:53 -0400)]
Fix backdate near DST changes

When the due date and the backdate date are on opposite sides of a DST
boundary we were getting an hour off on the checkin time (using the
original due date's time).

This commit changes it so that instead we just set the hour and minute
values on the backdate date to the due date's versions, leaving the time
zone alone.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoLP#1098669: improve handling of Content Cafe external content in staff client
Galen Charlton [Fri, 11 Jan 2013 18:11:48 +0000 (13:11 -0500)]
LP#1098669: improve handling of Content Cafe external content in staff client

This patch introduces a new TPac content variable, ctx.ext_proto, to
specify whether external content should be retrieved via HTTP or HTTPS.
ctx.proto can't be used for that purpose since it's set to 'oils' when
TPac is running inside the staff client.

This fixes a bug where Content Cafe reviews wouldn't display in the staff
client bib record page and where clicking on the reviews link from search
results would open an empty window.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years ago2.3 Release notes update
Bill Erickson [Tue, 15 Jan 2013 19:08:03 +0000 (14:08 -0500)]
2.3 Release notes update

Merge the edireader and edi_order_template release notes into the 2.3
release notes files.  Added a blurb to the Upgrade Notes regarding the
lack of an automatic EDI template upgrade.

Signed-off-by: Bill Erickson <berick@esilibrary.com>