]> git.evergreen-ils.org Git - working/Evergreen.git/log
working/Evergreen.git
11 years agoAdd some new functions to extension c_functions. user/dsy/extension_in_c
Swenyu Duan [Mon, 30 Jul 2012 02:42:47 +0000 (22:42 -0400)]
Add some new functions to extension c_functions.
New functions include oils_xslt_process, vandelay.add_field and vandelay.strip_field. These functions are implemente in plperlu before.
The C implementation of these functions relies on ICU4C and libxml2, libxslt. To install the new functions just create the extension
c_functions as before.
All the functions have not tested yet. There may be some errors in it. I will test it soon.

Signed-off-by: Swenyu Duan <dsy@sina.com>
11 years agoRevert "A tested version of the PostgreSQL extension."
Swenyu Duan [Sat, 21 Jul 2012 02:31:45 +0000 (22:31 -0400)]
Revert "A tested version of the PostgreSQL extension."

This reverts commit b25b3882cfdca920426627fabdd145a2e7293c2a.

11 years agoA tested version of the PostgreSQL extension.
Swenyu Duan [Mon, 4 Jun 2012 02:45:21 +0000 (22:45 -0400)]
A tested version of the PostgreSQL extension.
Now the extension contains two C implemented functions
(naco_normalize and search_normalize). To add the extension to PostgreSQL,
a upgrade sql script is included in the
Open-ILS/src/sql/Pg/upgrage/XXXX.schema.create_extension.sql. This script
drop the plperlu function of naco_nomalize and search_normalize and create
a extension which will add two C version of the two functions.
The extension depend on the ICU4C lib. The environment variable ICU_DATA must
be set up to the right ICU data path before you use the extension.
The extension has been tested in debian and windows environment(50 cases in
/Open-ILS/tests/naco_normalize.t has passed). The source file in this extension
is debian/linux version of the extension while the windows version has some
difference.

Signed-off-by: Swenyu Duan <dsy@sina.com>
11 years agoImplement search_normalize and naco_normalize in C.
Swenyu Duan [Thu, 31 May 2012 09:02:45 +0000 (05:02 -0400)]
Implement search_normalize and naco_normalize in C.

This is the first extension for PostgreSQl.
The lib has not been tested yet.
The normalize.functions_in_c.c relies on ICU4C lib. The makefile links
normalize.functions_in_c.o libs of ICU4C(/usr/lib) and PostgreSQL lib.
c_functions--1.0.sql will replace the original plperlu version of
search_normalize and naco_normalize into C version.

11 years agostamping upgrade script for saved queries
Mike Rylander [Tue, 22 May 2012 19:10:14 +0000 (15:10 -0400)]
stamping upgrade script for saved queries

Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoTPAC: Search Filter Groups
Bill Erickson [Thu, 23 Feb 2012 22:01:28 +0000 (17:01 -0500)]
TPAC: Search Filter Groups

Adds support for a new CGI param:

fg:<filter_group_code>=filter_group_entry

Each filter group entry will be mapped to a filter_group_entry()
filter and appended to the current search query.

This includes a new filter selector builder at
parts/filter_group_selector.tt2.

Usage, assuming a filter_group with code "audience":

<span>[% ctx.filter_groups.audience.label %]<span>
<span>
[%
    INCLUDE 'opac/parts/filter_group_selector.tt2'
    filter_group=audience
    none_ok=1
%]
<span>

The set of filter groups available to the TPAC are those defined at the
search org unit and its ancestors.  If multiple filters have the same
code name, the filter owned closest to the context org unit is used.
This allows for global filters with local overrides.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agotpac : search_HINT cache fixes
Bill Erickson [Wed, 18 Apr 2012 20:15:46 +0000 (16:15 -0400)]
tpac : search_HINT cache fixes

When searching for multiple values like a list of IDs, generate the
cache key from the sorted JSON form of the search value instead of the
bare ARRAY ref.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoNew QueryParser filter_group_entry filter
Bill Erickson [Thu, 19 Apr 2012 17:54:34 +0000 (13:54 -0400)]
New QueryParser filter_group_entry filter

filter_group_entry() takes one or more filter_group_entry IDs as
parameters and applies the included sub-searches as filters on the
current search.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoGive the PG QP driver a subquery callback for the new saved_query() filter
Mike Rylander [Wed, 18 Apr 2012 17:25:06 +0000 (13:25 -0400)]
Give the PG QP driver a subquery callback for the new saved_query() filter

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoTeach QueryParser about search filter callbacks, and if a callback returns a value...
Mike Rylander [Wed, 18 Apr 2012 17:24:24 +0000 (13:24 -0400)]
Teach QueryParser about search filter callbacks, and if a callback returns a value, parse it at the current recursion level

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoSearch Filter Groups and Generic Queries : DB / IDL
Bill Erickson [Thu, 23 Feb 2012 19:28:50 +0000 (14:28 -0500)]
Search Filter Groups and Generic Queries : DB / IDL

Adds 3 new tables.  The first is a general purpose container for
query-parser queries.  These can be used by other entities for storing
saved searches, saved search filters, etc.  Each contains a query string
and a label.

The two other tables are for creating org unit saved search filter
groups.  A filter group is a named set of search queries, treated as
filters, collected to create a high-level search filter.  Filter group
entries use search_query's under the covers, so the content of the
filter can be any valid query string, including other filters or even
other filter groups.

For example, you could create an "Audience" filter group with entries
like, "Children" => "audience(a, b) locations(3,4,5)" to filter on copy
location in addition to the MARC audience data.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoQuery Parser merged copy / non-dynamic filters
Bill Erickson [Mon, 21 May 2012 14:32:56 +0000 (10:32 -0400)]
Query Parser merged copy / non-dynamic filters

When more than one copy-level filter (e.g. locations()) is used in a
query-parser query, all but the first are ignored.  The goal of this
work is to compress multiple copy-level filters into a single filter
that represents the full collection.  Wherever possible, boolean
structures will be honored, to the extent possible for post-search
copy-level filters.

Examples:

concerto locations(1,2) locations(3,4)

==> concerto locations(1,2,3,4)

( concerto locations(3,4,5) ) || (piano locations(3,5,7) )

==> ( concerto || piano ) locations(3,4,5,6,7)

( concerto locations(3,4,5) ) && ( piano locations(3,5,7) )

==> concerto piano locations(3,5)

Note, in the last 2 examples, the final query does not exactly match the
original.  This is because copy-level filters are applied after the
initial search and cannot be executed as part of the  nested query.  The
best we can do is create a representation of the final copy-level
filter, based on the nesting, and apply it to the final result of the
nested search.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoQuery Parser nested dynamic filters
Bill Erickson [Tue, 15 May 2012 22:00:30 +0000 (18:00 -0400)]
Query Parser nested dynamic filters

Dynamic filters (from metabib.record_attr) are now parsed along with
search strings and facets as Query Parser descends the parse tree.  The
WHERE clause for the query as a whole is now a combination of the main
WHERE and the ON clause for JOINing to metabib.record_attr.  This gives
us the ability to create complex boolean nested queries using
SVF/record_attr filters, unlike before where nested filters were either
ignored or always treated as global filters.

For example:

concerto && ( ( item_type(a) subject|topic[Music] ) || item_form(a) )

This query now successfully limits the "concerto" search to results that
have either (item_type(a) AND subject|topic[Music]) OR item_form(a).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoQueryParser test script
Bill Erickson [Tue, 15 May 2012 21:59:56 +0000 (17:59 -0400)]
QueryParser test script

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoUse spaces instead of tabs in QueryParser.pm
Dan Scott [Mon, 21 May 2012 19:09:59 +0000 (15:09 -0400)]
Use spaces instead of tabs in QueryParser.pm

Copying swathes of SQL from logs into psql would often trigger the
autocompletion that psql offers, garbling a query awfully. Define the
local $spc var as two spaces and use that instead, leaving open the
option for reverting to tabs or anything else people prefer.

Also remove trailing whitespace, as this whole thing is about space.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoMakes a warning go away when running fts-replacement.pl, but may have...
Lebbeous Fogle-Weekley [Mon, 21 May 2012 18:22:40 +0000 (14:22 -0400)]
Makes a warning go away when running fts-replacement.pl, but may have...

...consequences.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
11 years agoFix typo in TEST_SETUP for QueryParser.pm
Dan Scott [Mon, 21 May 2012 18:02:11 +0000 (14:02 -0400)]
Fix typo in TEST_SETUP for QueryParser.pm

"author|coporate" doesn't exist, probably doesn't matter much in
principle but is worthwhile getting rid of the distraction.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoabstract query representations from QueryParser
Mike Rylander [Thu, 29 Dec 2011 16:36:20 +0000 (11:36 -0500)]
abstract query representations from QueryParser

When you perform a search, you now also get back an abstract
representation of your search query.  fts-replacement.pl is a test
script that shows you things that QueryParser does, including the new
abstract query feature, and it also reconstitutes a string from the
abstract query to demonstrate the correctness of that query.

[Also]
Make last-wins true for facets, filters and modifiers -- arg!; Parameterized values win in the staged-search QP wrapper

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
11 years agoQueryParser: comma-delimit multiple WITH clauses
Dan Scott [Mon, 21 May 2012 18:46:53 +0000 (14:46 -0400)]
QueryParser: comma-delimit multiple WITH clauses

Bill Erickson's fix for my breakage of QueryParser.pm for the speedup
via the WITH common table expression usage inadvertently left out
the commas required to delimit multiple WITH clauses, resulting in SQL
query errors.

This fixes that oversight. Note that the fts-replacement.pl script came
in quite handy for testing this; recommended.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoAdd libnet-https-any-perl as precise deb requirement in Makefile.install.
Jason Stephenson [Sat, 19 May 2012 02:51:14 +0000 (22:51 -0400)]
Add libnet-https-any-perl as precise deb requirement in Makefile.install.

Business::OnlinePayment::PayPal requires it, and it does not always want
to install from CPAN. It says it require either Net-SSLeay or
Crypt-SSLeay but the CPAN package never wants to install unless they
both are installed. The deb package for Ubuntu seems to do the right
thing.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoQP support for nested WITH construction
Bill Erickson [Fri, 18 May 2012 20:42:19 +0000 (16:42 -0400)]
QP support for nested WITH construction

Nested query plans build their own tsquery chunks which have to be
individually JOINed to the final query.  To do this, each tsquery SELECT
gets its own entry in the top-level WITH, complete with alias for
joining.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoOptimize full text search with a CTE
Dan Scott [Wed, 16 May 2012 04:29:11 +0000 (00:29 -0400)]
Optimize full text search with a CTE

The tsquery used directly in a JOIN was resulting in bad
plan with lots of nested loops and operations. Using a CTE
to define the query improves the plan.

Also, instead of ARRAY_AGG(DISTINCT foo), just return the
whole thing in an array. Not great for dupes, but we can
handle those inside search.query_parser_fts if we really
need to.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoVandelay authority existing queue search repair
Bill Erickson [Wed, 16 May 2012 19:55:23 +0000 (15:55 -0400)]
Vandelay authority existing queue search repair

When searching for an existing authority queue, search for an authority
queue, not a bib queue.  Apart from simply not working, the query will
fail with an "invalid input value for enum vandelay.bib_queue_queue_type"
and result in a client-side error.

https://bugs.launchpad.net/evergreen/+bug/989391

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoAvoid collisions of normalized values going into metabib.browse_entry
Lebbeous Fogle-Weekley [Mon, 14 May 2012 16:46:44 +0000 (12:46 -0400)]
Avoid collisions of normalized values going into metabib.browse_entry

This fixes a bug that prevented successful reingestion of bib records
during the 2.1->2.2 upgrade in some cases.  Reported by George Duimovich.

Key part here:

> ERROR: duplicate key value violates unique constraint
> "browse_entry_value_key"
> DETAIL: Key (value)=(545575) already exists.
> CONTEXT: SQL statement "INSERT INTO metabib.browse_entry (value) VALUES
>                     (metabib.browse_normalize(ind_data.value,

George confirmed that the changes to the version upgrade script fixed
the problem for him.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoBe more prepared for malformed serial holding code data in upgrade scripts
Lebbeous Fogle-Weekley [Fri, 11 May 2012 19:59:37 +0000 (15:59 -0400)]
Be more prepared for malformed serial holding code data in upgrade scripts

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoMove PLPERL dropping outside of 2.1-2.2 upgrade transaction
Dan Scott [Fri, 11 May 2012 14:45:39 +0000 (10:45 -0400)]
Move PLPERL dropping outside of 2.1-2.2 upgrade transaction

Sites might have added custom PLPERL database functions for migrations,
data clean up, etc, so don't make the success of the 2.1-2.2 upgrade
hinge on a database schema that exactly matches vanilla Evergreen;
just move it outside of the upgrade transaction and output a reassuring
note.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoAdd missing weights fm_IDL entries
Thomas Berezansky [Wed, 18 Apr 2012 16:05:20 +0000 (12:05 -0400)]
Add missing weights fm_IDL entries

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoIn the 2.1-2.2 upgrade script, move 0691 into a failures-are-ok zone
Lebbeous Fogle-Weekley [Thu, 10 May 2012 20:19:26 +0000 (16:19 -0400)]
In the 2.1-2.2 upgrade script, move 0691 into a failures-are-ok zone

Mainly because it's already covered in the 2.1.1-2.1.2 upgrade script.
Thanks to George Duimovich for pointing this out in LP #997759.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoVersion Upgrade Cleanup
Thomas Berezansky [Thu, 10 May 2012 15:05:54 +0000 (11:05 -0400)]
Version Upgrade Cleanup

Merge tacked on transactions into the "primary" transaction.
Add in 0708 for tracking purposes.

Separate 0672 and 0679+0680 in the version-to-version upgrade script
They're all potentially slow.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoCheck if transaction needs closing after adding billings
Bill Erickson [Fri, 4 May 2012 13:18:10 +0000 (09:18 -0400)]
Check if transaction needs closing after adding billings

This addresses the issue where issuing refunds results in a negative
ballance and it is then impossible to close the transaction by creating
new billings.

https://bugs.launchpad.net/evergreen/+bug/758982

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoNearest Hold: Look at 100 instead of 10 holds
Thomas Berezansky [Mon, 7 May 2012 18:13:17 +0000 (14:13 -0400)]
Nearest Hold: Look at 100 instead of 10 holds

At the suggestion of Mike Rylander.

Because DB-wise the extra 90 IDs isn't a big deal, and this way we get more
chances to capture (or block renewal, etc).

Jeff Godin claims they have done this and it has produced no issues for them.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoHold Capture: Run permit tests on "old" holds
Thomas Berezansky [Mon, 7 May 2012 15:59:10 +0000 (11:59 -0400)]
Hold Capture: Run permit tests on "old" holds

Because we shouldn't be trusting that the copies are still valid.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoHold Editing: Retarget on some changes
Thomas Berezansky [Mon, 7 May 2012 15:40:41 +0000 (11:40 -0400)]
Hold Editing: Retarget on some changes

The main thing to cover is pickup library, but check a few other things too.

Note that most of what is being checked likely doesn't change in any normal
workflows or interfaces, but it looks like they could anyway later.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoHold Targeter: Ensure old best still valid
Thomas Berezansky [Mon, 7 May 2012 15:00:14 +0000 (11:00 -0400)]
Hold Targeter: Ensure old best still valid

Re-using a now invalid copy is a bad idea for various reasons.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoDefault email/phone hold pickup in TPac
Thomas Berezansky [Fri, 13 Apr 2012 17:26:59 +0000 (13:26 -0400)]
Default email/phone hold pickup in TPac

Like JSPac does, but currently without the check of having phone/email.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoRetarget Local Holds: Use part ID properly
Thomas Berezansky [Wed, 9 May 2012 12:42:58 +0000 (08:42 -0400)]
Retarget Local Holds: Use part ID properly

Because the mapping ID is meaningless unless you only create one part at a
time, assign them only once in the order you created them, etc.

Which I think pretty much describes most of my original test cycle.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoTPAC: Keep site() and depth() out of basic search box when widgets suffice
Lebbeous Fogle-Weekley [Tue, 8 May 2012 15:25:23 +0000 (11:25 -0400)]
TPAC: Keep site() and depth() out of basic search box when widgets suffice

This is a short term but working solution to the problem described here:
https://bugs.launchpad.net/evergreen/+bug/986196

Now when you have a selection for site on the advanced search page, it
doesn't lead to redundant site() and depth() terms in your basic search
query box.

Item type selections and search class selections (keyword/author/etc)
can still lead to ugliness in the advanced search box, but that's
because in the advanced search page you get a multi-select widget for
item type and in a basic search page you only get a single-select
dropdown, so there's not a clean way to map your advanced page
selections to basic page selections.  Search classes are kind of the
same issue, since you have three dropdowns on the advanced search page
and one on the basic.

So the "bigger" problem is one that we will have to solve later, but for
the common case at least we don't get the extra site() and depth() for
now.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoFix hold has copy at lookup
Thomas Berezansky [Mon, 7 May 2012 19:42:35 +0000 (15:42 -0400)]
Fix hold has copy at lookup

Filter on available or reshelving, and add more hold type support for lookup
purposes (parts and issuance holds).

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoAdding a small pile of missing permissions
Bill Erickson [Fri, 4 May 2012 14:33:43 +0000 (10:33 -0400)]
Adding a small pile of missing permissions

ADMIN_ADDRESS_ALERT
VIEW_ADDRESS_ALERT
ADMIN_COPY_LOCATION_GROUP
ADMIN_USER_ACTIVITY_TYPE

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoTPAC: repair staff client End link for showing last record
Bill Erickson [Fri, 4 May 2012 16:07:35 +0000 (12:07 -0400)]
TPAC: repair staff client End link for showing last record

In the embedded TPAC, when staff clicks the End link in the record
detail page to jump to the last record in the search results, it now
makes an intermediate jump through search code, which locates the last
record in the set (via CGI param find_last) then redirects to the record
detail page for the last record.  With this approach, we don't have to
pre-fetch the entire set of record IDs just to render the paging links.
Tip o' the hat to Mike R. for the design suggestion.

https://bugs.launchpad.net/evergreen/+bug/984070

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoTPAC: more intelligent detail paging #1
Bill Erickson [Sat, 28 Apr 2012 18:12:53 +0000 (14:12 -0400)]
TPAC: more intelligent detail paging #1

Only fetch a small page of records at a time when generating the paging
links in the detail page.

Part 2 will be to repair the 'Last' record button in the staff client,
which will not work with this change.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoTPac: Barcodes default to starting with digits
Thomas Berezansky [Wed, 9 May 2012 13:08:13 +0000 (09:08 -0400)]
TPac: Barcodes default to starting with digits

Because otherwise there is likely to be a lot of confusion when barcodes no
longer work, at all, for login when groups have no barcode regex.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoConsensus was reached to remove editor-specific globs from .gitignore.
Bradley M. Kuhn [Sat, 28 Apr 2012 13:39:12 +0000 (09:39 -0400)]
Consensus was reached to remove editor-specific globs from .gitignore.

In a highly overengineered discussion out of scope with the actual breadth
of this very minor issue, everyone has come to the conclusion that
editor-specific globs don't really belong in the project's .gitignore,
given that git permits a global-level ignore file for users.

Instead, a HACKING file is herein added, with its first entry to explain
how developers can set the own global gitignore.

Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
11 years agoAutoSuggest: Escape ampersands properly
Lebbeous Fogle-Weekley [Wed, 18 Apr 2012 14:41:27 +0000 (10:41 -0400)]
AutoSuggest: Escape ampersands properly

This fixes an issue reported by Yamil Suarez.

If you had relatively technical users composing searches with
QueryParser syntax, or if they were just typing ampersands for any
other reason, AutoSuggest would behave as if the ampersand marked the end
of user input.

This is fixed by applying the correct URI-encoding function for the
situation.

To be clear, QueryParser syntax does not actually affect suggestions;
such syntax is ignored.  AutoSuggest is not search.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
11 years agolp996776: Patch to fix the response if no configured status is detected.
Steven Callender [Tue, 8 May 2012 21:15:14 +0000 (17:15 -0400)]
lp996776: Patch to fix the response if no configured status is detected.

SIP response messages that use circulation_status where defaulting to just 1
rather than 01 if the status was not detected. Since SIP needs a 2 character
response, this was causing issues in some 3rd party devices. Added quoting
around the 01 to force the 2 characters.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoStop saving patron barcode in cookies
Thomas Berezansky [Fri, 30 Mar 2012 19:58:32 +0000 (15:58 -0400)]
Stop saving patron barcode in cookies

This causes bad interactions between patron windows and normal catalog
windows. Examples:

Load a patron, load place hold catalog in patron window. Future loads of
non-patron catalogs will default to this patron.

Load Patron A from written note, and open Place Hold catalog. Start
searching for the item Patron A wants.
Get interupted by Patron B calling. Load Patron B, and open Place Hold
catalog. Search, place a hold for Patron B.
Return to Patron A, find item, go to place hold. Find Patron B's barcode
populated.

Instead, teach the staff javascript, that already knows how to load hold
preferences, how to grab the barcode from xulG. This barcode should be
specific to the patron window the catalog is embedded in, and won't 'leak'
to other catalog interfaces.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoRoll back libjs version to 1.7.0
Dan Scott [Tue, 8 May 2012 16:52:02 +0000 (12:52 -0400)]
Roll back libjs version to 1.7.0

The install version of libjs (Spidermonkey) had been bumped to the
latest, 1.8.5, but it turned out that the tests for that had probably
been run on a system that had an old version of libjs source and/or
installed headers/libraries in place, as building libjs 1.8.5 is a
different beast entirely (different directory structure, etc).

In addition, there are several bugs along the lines of
https://rt.cpan.org/Public/Bug/Display.html?id=75058 that strongly
suggest that libjs-1.8.5 is not compatible with the
JavaScript::SpiderMonkey 0.21 Perl module.

Therefore, roll back to the tried-and-true libjs 1.7.0.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoWe can't assume that 0526 was in fact run previously so we need to drop these more...
James Fournie [Mon, 7 May 2012 18:08:06 +0000 (11:08 -0700)]
We can't assume that 0526 was in fact run previously so we need to drop these more safely
to avoid producing an error if 0526 wasn't run previously

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agofix typo in CC payment form
Galen Charlton [Tue, 8 May 2012 13:25:19 +0000 (09:25 -0400)]
fix typo in CC payment form

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoUpgrade 0704 was missing from the 2.1-2.2 upgrade script.
James Fournie [Mon, 7 May 2012 17:57:30 +0000 (10:57 -0700)]
Upgrade 0704 was missing from the 2.1-2.2 upgrade script.

That upgrade added a parameter to search.query_parser_fts, without it,
Evergreen passes 11 parameters to the database but the searches fail because
there's only a 10 parameter function in the database.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoStamping upgrade for 'inheritied' typo repair
Bill Erickson [Fri, 4 May 2012 18:46:16 +0000 (14:46 -0400)]
Stamping upgrade for 'inheritied' typo repair

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoFix "inheritied" typo in global flag
Dan Scott [Fri, 4 May 2012 18:14:12 +0000 (14:14 -0400)]
Fix "inheritied" typo in global flag

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoFix typo in TPAC noticed by Warren Layton
Dan Scott [Fri, 4 May 2012 17:55:55 +0000 (13:55 -0400)]
Fix typo in TPAC noticed by Warren Layton

Expiration needs to be spelled correctly; Warren Layton pointed out the
typo while working on a translation of the derived tpac.pot file. Many
thanks, Warren!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoAdd missing upgrade scripts 0705, 0707 to point-to-point upgrade script
Lebbeous Fogle-Weekley [Fri, 4 May 2012 16:23:19 +0000 (12:23 -0400)]
Add missing upgrade scripts 0705, 0707 to point-to-point upgrade script

These come from bugfixes I pushed to master and rel_2_2 on 28 April 2012
without remembering to address the point-to-point version upgrade script.

See c208754eafadb005439800f7fedd33241fca7b65 (LP #980199) and
89438b46fc39270ac3d47345cd99caacf6b6dee1 (LP #919279).

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoPrereqs: Remove Ubuntu Hardy references
Dan Scott [Mon, 9 Apr 2012 20:31:06 +0000 (16:31 -0400)]
Prereqs: Remove Ubuntu Hardy references

We no longer support Ubuntu Hardy 8.04, so ditch any references to it in
the prerequisite installer.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoPrereqs: update to latest available versions
Dan Scott [Mon, 9 Apr 2012 20:29:46 +0000 (16:29 -0400)]
Prereqs: update to latest available versions

* JavaScript-SpiderMonkey: from 0.20 to 0.21
* libjs: from 1.7.0 to 185-1.0.0
* yaz: from 4.2.17 to 4.2.32

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoPrereqs: Remove references to CentOS / RHEL
Dan Scott [Mon, 9 Apr 2012 20:23:08 +0000 (16:23 -0400)]
Prereqs: Remove references to CentOS / RHEL

The prereqs were focused on the 5.x series for CentOS and RHEL, which is
hella-out-of-date and never really worked anyway. Get rid of the noise
to focus on the signal.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoAllow subscriptions at org units without volumes
Dan Wells [Wed, 25 Apr 2012 19:56:20 +0000 (15:56 -0400)]
Allow subscriptions at org units without volumes

Subscriptions are sometimes owned at the consortium or system
level, so forcing can_have_vols() to be true was incorrect.

This commit removes those checks.  In addition, we also remove
some dead code and make the subscription org unit selector
consistent with the distribution org unit selector.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoAdd indexes to 2.1.2 upgrade script to speed up acq search
Dan Scott [Thu, 3 May 2012 20:44:14 +0000 (16:44 -0400)]
Add indexes to 2.1.2 upgrade script to speed up acq search

Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoAdd ISSN fix to the version upgrade script
Mike Rylander [Mon, 26 Mar 2012 15:09:14 +0000 (11:09 -0400)]
Add ISSN fix to the version upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoAddress date sorting in Item Status and Copy Buckets interfaces, too
Jason Etheridge [Wed, 2 May 2012 19:23:06 +0000 (15:23 -0400)]
Address date sorting in Item Status and Copy Buckets interfaces, too

> The sort_value function for the date columns being used in those
> interfaces had no error protection, and were returning empty strings
> upon failure.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoFix date sorting in patron-related XUL interfaces
Lebbeous Fogle-Weekley [Wed, 2 May 2012 18:01:00 +0000 (14:01 -0400)]
Fix date sorting in patron-related XUL interfaces

Null time stamps are now converted to dates in the Middle Paleolithic
era so they always sort as the lowest date.

Seriously, this is the minimum possible date you can express with a JavaScript
date object.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
11 years agoFix LP 984039: correct Syndetic Kirkus Reviews
Jeff Godin [Tue, 17 Apr 2012 14:46:22 +0000 (10:46 -0400)]
Fix LP 984039: correct Syndetic Kirkus Reviews

Use correct "filename" component of URL for retrieving Kirkus
Reviews content from Syndetic Solutions.

Correct filename confirmed by Bowker technical support, and by
empirical tests.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
11 years agoFix some "null" instead of blank values in JSPac
Thomas Berezansky [Tue, 3 Apr 2012 18:45:10 +0000 (14:45 -0400)]
Fix some "null" instead of blank values in JSPac

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoRelease notes: clean up and introduce TPAC
Dan Scott [Tue, 1 May 2012 05:52:56 +0000 (01:52 -0400)]
Release notes: clean up and introduce TPAC

General clean-up of the release notes for consistency and to support
PDF output:

* Reformat line-widths to 80 characters or less
* Mark interface window and element names as bold
* Fix up some formatting glitches and headers
* Make the "Documentation is available..." note standard & separated
  by one line; I suspect we will want to modify this globally, so it
  will be easier if it is consistent.

Also, give a brief introduction to the TPAC and mention the forthcoming
JSPAC deprecation in the next feature release.

Signed-off-by: Dan Scott <dan@coffeecode.net>
11 years agoLP992377: More 2.2 release notes from Kathy Lussier
Kathy Lussier [Tue, 1 May 2012 05:26:28 +0000 (01:26 -0400)]
LP992377: More 2.2 release notes from Kathy Lussier

Kathy Lussier <klussier@masslnc.org> contributed significant additions
to the 2.2 release notes in https://bugs.launchpad.net/bugs/992377 -
thanks Kathy!

Signed-off-by: Dan Scott <dan@coffeecode.net>
11 years agoadditions to release notes for 2.2
Galen Charlton [Mon, 30 Apr 2012 11:22:01 +0000 (07:22 -0400)]
additions to release notes for 2.2

Written by Sally Fortin <sfortin@esilibrary.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoVandelay match set permission additions
Bill Erickson [Wed, 21 Mar 2012 20:33:39 +0000 (16:33 -0400)]
Vandelay match set permission additions

Allow retrieve access for match points with the VIEW_IMPORT_MATCH_SET
permission (in addition to ADMIN_IMPORT_MATCH_SET).

Adds 2 new permissions to the database:

ADMIN_IMPORT_MATCH_SET
VIEW_IMPORT_MATCH_SET

From Jason Stephenson resolving conflicts:
> Conflicts:
>
>  Open-ILS/src/sql/Pg/950.data.seed-values.sql
>
> I had to change the ids of the new permissions because another branch
> had used one of the ids since this branch was last rebased.  I also edited
> the ids in the upgrade script to match what is in 950.data.seed-values.sql.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoUpdate POT files for translators
Dan Scott [Sat, 28 Apr 2012 19:52:54 +0000 (15:52 -0400)]
Update POT files for translators

Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoUpdate translations from Launchpad
Dan Scott [Sat, 28 Apr 2012 18:12:43 +0000 (14:12 -0400)]
Update translations from Launchpad

Includes a small update to the update_pofiles to make it easier for
release managers and release maintainers to run translation updates.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoConstrain serial.issuance.holding_code to be valid JSON or NULL
Lebbeous Fogle-Weekley [Thu, 5 Apr 2012 15:46:05 +0000 (11:46 -0400)]
Constrain serial.issuance.holding_code to be valid JSON or NULL

This avoids serial.materialize_holding_code() failing on bad data.  The
upgrade script will actually throw away bad values for
serial.issuance.holding_code.  This is no real loss, since bad data
there prevents any serials functions around the row in question from
working properly anyway.

This problem was reported by Martha Driscoll and Ben Shum.

*Also* put a couple of changes missed from the 0700 upgrade script into
210.schema.serials.sql.

Fix new serial constraint upgrades

1. None of the upgrades so far have moved is_json() from the public
to the evergreen schema.  That's probably a separate issue, but it
should be safe to call it unqualified, and that's what the rest of
the upgrade file does, so we will too.

2. Add a specific SET CONSTRAINT to avoid deferred trigger problems
when ALTERing the table.

3. Make sure that the unwanted columns on materialized_holding_code
do not exist regardless of your upgrade path.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoRemove the "print_nav.tt2" from the TTPAC Password Reset
Michael Peters [Fri, 9 Mar 2012 19:20:09 +0000 (14:20 -0500)]
Remove the "print_nav.tt2" from the TTPAC Password Reset

We no longer use "print_nav.tt2" in TTPAC, but it was still
displaying on the password reset page.  This branch removes it.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoAdd missing ADMIN_ORG_UNIT_CUSTOM_TREE permission
Bill Erickson [Thu, 12 Apr 2012 19:34:02 +0000 (15:34 -0400)]
Add missing ADMIN_ORG_UNIT_CUSTOM_TREE permission

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoTPAC: Instrument the search results page
Dan Scott [Fri, 27 Apr 2012 01:56:23 +0000 (21:56 -0400)]
TPAC: Instrument the search results page

Because we want to know why search results can be slowish, add timelog()
entries to pertinent locations in Search.pm.

Quick results on my laptop with the concerto set:
  * 10 results = 1.1 seconds for get_records_and_facets()
  * 50 results = 4.2 seconds for get_records_and_facets()

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agotweak wording - ChangeLogs are generated during release
Galen Charlton [Sat, 28 Apr 2012 14:27:19 +0000 (10:27 -0400)]
tweak wording - ChangeLogs are generated during release

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoChangeLog shouldn't merely be empty; it should tell reader where to find a change...
Bradley M. Kuhn [Sat, 28 Apr 2012 14:03:09 +0000 (10:03 -0400)]
ChangeLog shouldn't merely be empty; it should tell reader where to find a change log.

Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoautoreconf -f -i appears to clobber our own INSTALL file with the "standard" one.
Bradley M. Kuhn [Sat, 28 Apr 2012 03:36:19 +0000 (23:36 -0400)]
autoreconf -f -i appears to clobber our own INSTALL file with the "standard" one.

autoreconf -i seems to still work correctly for building Evergreen, therefore,
we should recommend developers do that.

Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoAUTHORS, NEWS, and INSTALL files should actually have reasonable content if they...
Bradley M. Kuhn [Sat, 28 Apr 2012 02:08:38 +0000 (22:08 -0400)]
AUTHORS, NEWS, and INSTALL files should actually have reasonable content if they exist.

Specifically, this commit:
   * simply points INSTALL to README via symlink, since install instructions are there.
   * AUTHORS now notes that Evergreen keeps its authors in the git log.
   * NEWS now explains where release notes are.

Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoDo not hide copy counts from results in staff client.
Ben Shum [Wed, 25 Apr 2012 03:23:04 +0000 (23:23 -0400)]
Do not hide copy counts from results in staff client.

Remove the check for whether you are a staff login or not.

Ideally, we would want the copy counts to be displayed in both
public catalog and staff client.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoApply timelog() to TPAC record detail page
Lebbeous Fogle-Weekley [Wed, 25 Apr 2012 20:19:45 +0000 (16:19 -0400)]
Apply timelog() to TPAC record detail page

Early suggestion from results is that we either need to use unapi.bre more
smartly, or optimize it further.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoInstrument the TPAC: add timelog() method to EGCatLoader
Dan Scott [Wed, 25 Apr 2012 19:20:46 +0000 (15:20 -0400)]
Instrument the TPAC: add timelog() method to EGCatLoader

Meant for timing how long events take to generate a single TPAC page,
the timelog() method will provide timing in microsecond granularity of
various events required to build the page.

To invoke: $self->timelog("Event description...");

Builds up a context variable named "timing" containing a list of
arrays; each array entry contains a time and the event description.

Disabled by default; to enable, set DEBUG_TIMING = 1 in
OpenILS/WWW/EGCatLoader.pm

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoMerge remote branch 'working/user/dbwells/serial_items_and_note_fixes'
Lebbeous Fogle-Weekley [Wed, 25 Apr 2012 20:24:04 +0000 (16:24 -0400)]
Merge remote branch 'working/user/dbwells/serial_items_and_note_fixes'

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agounsaved data loophole
Jason Etheridge [Fri, 30 Mar 2012 19:32:53 +0000 (15:32 -0400)]
unsaved data loophole

The Start/Previous/Next/End/Search Results buttons in the staff client OPAC
wrapper do not fire unsaved data warnings for the MARC editor when changing
records. This plugs that hole, but it's not a complete solution, as you can
still move away from the record by clicking on hyperlinks in the OPAC View,
though that's less likely to happen.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
11 years agoBootstrap via "autoreconf -f -i" instead of "autogen.sh" user/dyrcona/autoreconf
Dan Scott [Sun, 22 Apr 2012 19:40:00 +0000 (15:40 -0400)]
Bootstrap via "autoreconf -f -i" instead of "autogen.sh"

It has always been potentially confusing to maintain two shell scripts
named "autogen.sh" for two distinct purposes in Evergreen. Take
advantage of "autoreconf" that is packaged with autoconf for dev
bootstrapping purposes and trash the old "autogen.sh" as a result.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoClean up and refine serial note support, part 3 user/dbwells/serial_items_and_note_fixes
Dan Wells [Tue, 17 Apr 2012 20:48:43 +0000 (16:48 -0400)]
Clean up and refine serial note support, part 3

Add needed menu entries for invoking the serial notes editor from
the list in the Items tab.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoClean up and refine serial note support, part 2
Dan Wells [Tue, 17 Apr 2012 21:35:26 +0000 (17:35 -0400)]
Clean up and refine serial note support, part 2

Because of the way our notes are being rendered, a handful of
special XML characters can break the note interface when editing.
These characters are now properly encoded as entities.

Also, editing of newlines presents a similar issue with different
consequences, and it is handled similarly but separately.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoClean up and refine serial note support, part 1
Dan Wells [Tue, 17 Apr 2012 21:34:06 +0000 (17:34 -0400)]
Clean up and refine serial note support, part 1

This commit fixes a number of minor problems with serial notes:

1) Serial notes are currently returned in "random" (database)
order.  Adding a create_date sort is a sensible default.

2) If you have many notes, they start to display in a squashed and
unreadable fashion.  Switching from a groupbox to a styled vbox
provides a simple workaround.

3) It is currently impossible to display newlines in notes.  We can
deal with this by changing the display style.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoLimit excess serial data fetching
Dan Wells [Tue, 17 Apr 2012 20:02:49 +0000 (16:02 -0400)]
Limit excess serial data fetching

Overfetching and duplication of data in the interface is both
inefficient and bug-inducing.  This reduces a couple big offenders.

First, in the items tab, we will store distribution and subscription
data separately, rather than duplicating for every row.  Second, we
will only redraw rows as needed rather than refresh the whole list so
often.  Finally, we no longer need to lookup call numbers separately,
as they are included in the one-time distribution fetch.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoBetter Prediction for Incomplete Chronologies
Dan Wells [Fri, 13 Apr 2012 13:53:32 +0000 (09:53 -0400)]
Better Prediction for Incomplete Chronologies

While relatively rare, some journals record only the year on the
cover, even if they come out monthly or weekly.  This commit
expands our previous support for serials with no chronology at
all to cover serials with partial chronology.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAcq: Refactor General Search for more smarts and speed
Lebbeous Fogle-Weekley [Fri, 13 Apr 2012 21:18:58 +0000 (17:18 -0400)]
Acq: Refactor General Search for more smarts and speed

This started in response to problems discussed around
https://bugs.launchpad.net/evergreen/+bug/967824 , but it really
addresses a distinct issue from that bug.

Acq General Search relies on lots of joins to make several tables in Acq
searchable by attributes of any of the other tables for rows that happen
to be related.  This is about 1) making better joins and 2) making fewer
joins when you don't need them all for a given search.

Much thanks to Mike Rylander for help figuring out how to efficiently
implement the joins needed for acq.invoice, which is the tricky part.

Less importantly, but still significant for some searches, we also need
case insensitivity for searching on user-linked fields (General Search
always lets you search by any of username/family name/given name/barcode
for these fields) in order to take advantage of some indexes for speed.

This diagram of key Acq relationships is helpful:

https://docs.google.com/drawings/d/15ExkiYvq0skfobbocvPWxwdZkb7aykEZpLGfbP9PL04/view

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoMore patron display css tweaks
Thomas Berezansky [Fri, 13 Apr 2012 14:07:17 +0000 (10:07 -0400)]
More patron display css tweaks

To help prevent some "jumpy" interfaces due to borders and text appearing
and disappearing with selections and updates.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
12 years agoadd more penalty related CSS hooks
Jason Etheridge [Fri, 13 Apr 2012 06:54:13 +0000 (02:54 -0400)]
add more penalty related CSS hooks

PATRON_HAS_CUSTOM_PENALTY (if the penalty is not a stock penalty, based on id)
PATRON_HAS_STAFF_ALERT (if the staff_alert boolean on the penalty is true)
PATRON_HAS_BLOCK (if there's anything in the penalty's block list)
PATRON_HAS_CIRC_BLOCK (if CIRC is in the block list)
PATRON_HAS_RENEW_BLOCK (if RENEW is in the block list)
PATRON_HAS_HOLD_BLOCK (if HOLD is in the block list)
PATRON_HAS_CAPTURE_BLOCK (if CAPTURE is in the block list)
PATRON_HAS_FULFILL_BLOCK (if FULFILL is in the block list)

also adds stock CSS for PATRON_HAS_STAFF_ALERT, a blue border around the patron
name.

In the color hierarchy, this comes after the normal Green/Lime status, but gets
trumped by any other penalty that sets a colored border.

So, for example, if a patron has no penalties, and you go to Messages and add an
"Alert" note, that equates to the penalty ALERT_NOTE, which has a staff_alert
setting of True.  On a refresh, the patron will then have a blue border around
their name.  If you then create a bill on that patron for $100, triggering the
PATRON_EXCEEDS_FINES penalty, then the patron will gain the normal purple or
lavender border, even though the penalty also has a staff_alert setting of True
and triggers PATRON_HAS_STAFF_ALERT CSS.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agolp#980303: don't complain about missing plperl
Galen Charlton [Thu, 12 Apr 2012 21:19:40 +0000 (17:19 -0400)]
lp#980303: don't complain about missing plperl

Now that use of PL/PERL has been dropped in favor of
using PL/PERLU for all Perl SPs, settings-tester.pl need not
check for it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Dan Scott <dan.scott@laurentian.ca>
12 years agoTPAC: Clear params when viewing lists in search results
Dan Scott [Wed, 11 Apr 2012 04:08:41 +0000 (00:08 -0400)]
TPAC: Clear params when viewing lists in search results

Per LP977353, search terms are propagating when the list is being viewed
in "results" (HTML View), and therefore those search terms block the
display of most or all of the items in the list. Therefore, do not
propagate the other CGI params to the mkurl() call.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoAdd pref_ou query filter for preferred library searching
Dan Scott [Fri, 6 Apr 2012 18:52:20 +0000 (14:52 -0400)]
Add pref_ou query filter for preferred library searching

Include the user's "preferred search library" (as set in search
preferences, falling back to home OU) in searches, specifically for the
purposes of ensuring that located URIs at the user's preferred library
would trigger hits where physical copies would be out of scope.

Practical example:

1. User sets preferred search library to BR1.

2. They jump onto the catalogue, log in (which changes their search org
  to their preferred search library of BR1), but then for some reason
  change their search org in the org selector to BR3.

3. They issue a search for "Harry Potter and the Philosopher's Stone".
  BR3 doesn't hold any copies or have any located URIs, but SYS1 (BR1's
  parent) has a PotterMore licence and has added their 856 $9 SYS1 to a
  bib record.

As it currently stands, User is out of luck; they won't see any hits in
search results as there are no copies or located URIs in the BR3 scope.

The proposed enhancement would, however, make the search results contain
a hit for "Harry Potter and the Philosopher's Stone" at the user's
preferred search library.

Sites can trigger the preferred library as part of the query filters
using the "pref_ou(SHORTNAME)" syntax.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoNicer staff searches display in record details
Thomas Berezansky [Wed, 11 Apr 2012 18:58:26 +0000 (14:58 -0400)]
Nicer staff searches display in record details

Specifically, don't make us scroll down a few hundred pixels to see the
actual page content.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agofix sort bug introduced with multi-sort
Jason Etheridge [Tue, 10 Apr 2012 17:15:09 +0000 (13:15 -0400)]
fix sort bug introduced with multi-sort

The bug happens on columns without a defined sort_value

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoFix bill selection in the billing interface
Jason Etheridge [Tue, 10 Apr 2012 16:57:16 +0000 (12:57 -0400)]
Fix bill selection in the billing interface

We were looking for the checkbox column to be the first treecell in a treerow,
but the ever-present line number column now takes up that position.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoBump 2.2 beta version number in upgrade script
Thomas Berezansky [Mon, 9 Apr 2012 20:22:06 +0000 (16:22 -0400)]
Bump 2.2 beta version number in upgrade script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoi18n: Robustify db-seed-i18n.py parsing
Dan Scott [Mon, 9 Apr 2012 13:37:57 +0000 (09:37 -0400)]
i18n: Robustify db-seed-i18n.py parsing

Faced with the perplexing use of a space before a comma in
oils_i18n_gettext() keys, db-seed-i18n.py's regex failed. The solution
for a sloppy regex? More powerful regex!

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>