working/Evergreen.git
7 years agoMerge remote-tracking branch 'eg-working/user/dbs/lp894052-version-upgrade'
Mike Rylander [Thu, 29 Dec 2011 17:15:25 +0000 (12:15 -0500)]
Merge remote-tracking branch 'eg-working/user/dbs/lp894052-version-upgrade'

One merge conflict in 2.0-2.1-upgrade-db.sql silenced with -X theirs.  See
LP#894052 for details.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
7 years agoTPAC: Uniform search lib / depth settings collab/dyrcona/tpac_user_ou_pref
Dan Scott [Tue, 27 Dec 2011 17:31:03 +0000 (12:31 -0500)]
TPAC: Uniform search lib / depth settings

The current TPAC code uses logic embedded within the templates to
determine which org unit and depth to apply to searches.

This commit attempts to standardize the logic within the new
OpenILS::WWWW::EGCatLoader::Util::_get_search_lib() function and sets
the result as a new context variable, "search_ou". The org unit is
determined as follows (first matching condition wins):

* specific CGI "loc" value
* logged-in user's preferred search library
* logged-in user's home org unit
* specific CGI "physical_loc" value

The depth is set as follows (first matching condition wins):

* specific CGI "depth" value
* depth of the chosen org_unit

As of this commit, a library that wishes to set the a default search
org unit for any given user should set the "physical_loc" CGI param;
after the user performs their first search, the "loc" CGI param will
propagate through most interfaces. When a user clicks "Your account log
in", the user's preferred search library or home org unit will be set as
the new search lib.

At any time after that, the user can select a different org unit from
the org unit selector to explicitly set the "loc" CGI param.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agoTPAC: Add "preferred search location" preference setting
Dan Scott [Wed, 28 Dec 2011 23:42:18 +0000 (18:42 -0500)]
TPAC: Add "preferred search location" preference setting

Working towards parity with the JSPAC, give the user the ability to set
their preferred search library in account preferences via the org
selector. The value defaults to the user's home OU.

Also set a sane default of 10 search results per page in the absence of
any preference, as the default had been set to 5.

While we're in there, remove some of the inline styles and weird markup
in the user preference page, and refactor the O:W:EGCatLoader:Account
module to accept an easily-appended list of preferences to be set.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agoTPAC: Set search_ou context in common loader
Dan Scott [Wed, 28 Dec 2011 02:17:02 +0000 (21:17 -0500)]
TPAC: Set search_ou context in common loader

By setting the search_ou context in load_common() after checking for a
valid user session, we can catch the remaining pages in TPAC in which
the default search library was not being set properly.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agoTPAC: Resolve conflict with master
Dan Scott [Tue, 27 Dec 2011 23:36:32 +0000 (18:36 -0500)]
TPAC: Resolve conflict with master

The changes for LP909111 ended up causing a conflict with this branch.
Resolve!

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agoTPAC: Uniform search lib / depth settings
Dan Scott [Tue, 27 Dec 2011 17:31:03 +0000 (12:31 -0500)]
TPAC: Uniform search lib / depth settings

The current TPAC code uses logic embedded within the templates to
determine which org unit and depth to apply to searches.

This commit attempts to standardize the logic within the new
OpenILS::WWWW::EGCatLoader::Util::_get_search_lib() function and sets
the result as a new context variable, "search_ou". The org unit is
determined as follows (first matching condition wins):

* specific CGI "loc" value
* logged-in user's preferred search library
* logged-in user's home org unit
* specific CGI "physical_loc" value

The depth is set as follows (first matching condition wins):

* specific CGI "depth" value
* depth of the chosen org_unit

As of this commit, a library that wishes to set the a default search
org unit for any given user should set the "physical_loc" CGI param;
after the user performs their first search, the "loc" CGI param will
propagate through most interfaces. When a user clicks "Your account log
in", the user's preferred search library or home org unit will be set as
the new search lib.

At any time after that, the user can select a different org unit from
the org unit selector to explicitly set the "loc" CGI param.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agoTPac: improve search depth extraction
Bill Erickson [Tue, 27 Dec 2011 18:45:02 +0000 (13:45 -0500)]
TPac: improve search depth extraction

Improves how we determine the depth of a search.  The Order of
operations:

1. Depth encoded within the search query, e.g. depth(2)
2. CGI depth param
3. Default is to match the depth of the searched org unit

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
7 years agoReverse Copy Location picker labels via WS Setting
Thomas Berezansky [Thu, 29 Sep 2011 23:26:17 +0000 (19:26 -0400)]
Reverse Copy Location picker labels via WS Setting

If the setting is set then place the name before the org unit. This allows
for typing of the start of the name without having to deal with the org
unit shortname "eating" the start of the label (and thus type-in), but
preserves the information the org unit provides.

As an example, instead of having to type:
CONS : St
To get close to the default "Stacks" in a long list you could just type
St
And likely get to, or close to, Stacks.

The option can be toggled from the Workstation Administration menu.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Conflicts:

Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Display monograph parts
Dan Scott [Fri, 23 Dec 2011 06:56:02 +0000 (01:56 -0500)]
TPAC: Display monograph parts

In search results and record details, display monograph parts if
associated with a copy. Uses unapi for search results and json_query for
record details. Only generates the "Part" column in the copy table if
that record actually has a monograph part; otherwise the column is not
generated.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoSIP2: Fix transit home on checkin user/sal/fix_sip2_checkin_transit_signoff
Thomas Berezansky [Wed, 21 Dec 2011 21:51:48 +0000 (16:51 -0500)]
SIP2: Fix transit home on checkin

The Checkin doesn't need a destination_loc, but the item needs it set.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Sarah E. Chodrow <sarah.chodrow@bibliotheca-itg.com>
7 years agoSVF in bib record summary: extract attrs on the server
Bill Erickson [Thu, 22 Dec 2011 15:13:03 +0000 (10:13 -0500)]
SVF in bib record summary: extract attrs on the server

This repairs a FIXME within the custom bib overlay code related to
parsing metabib.record_attr stores within the JS.  Instead, now we use
an attr parsing utility function which compiles a regular hash so the
client no longer needs to parse it.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agosupport SVF in staff client bib record summary
Jason Etheridge [Thu, 8 Dec 2011 22:48:42 +0000 (17:48 -0500)]
support SVF in staff client bib record summary

This is in support of https://bugs.launchpad.net/evergreen/+bug/822928, re: Cat Date

So for example, let's suppose you want to store a "Cat Date" in MARC tag 915, subfield a.

You could do this in the database:

INSERT INTO config.record_attr_definition (name,label,filter,sorter,tag,sf_list)
    VALUES ( 'cat_date', 'Cat Date', 'f', 't', '915', 'd' );

Add this to server/locale/en-US/cat_custom.properties (optional but recommended):

staff.cat.bib_brief.cat_date.label=Cat Date:
staff.cat.bib_brief.cat_date.accesskey=

And then add something like this to server/skin/custom.js:

    try {

        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);

        prefs.setCharPref(
            'oils.bib_brief.horizontal.dynamic_grid_replacement.data',
            js2JSON([
                ["title",           "edition",  "editor",       "cat_date"],
                ["author",          "pubdate",  "edit_date",    "holds"],
                ["bib_call_number", "tcn",      "create_date",  "items"]
            ])
        );

        prefs.setCharPref(
            'oils.bib_brief.alternate_copy_summary.dynamic_grid_replacement.data',
            js2JSON([
                ["title",       "edition",  "editor",       "cat_date"],
                ["author",      "pubdate",  "edit_date",    "holds"],
                ["call_number", "tcn",      "create_date",  "items"]
            ])
        );

    } catch(E) {
        dump('Error in custom.js trying to set oils.bib_brief.*.dynamic_grid_replacement.data: ' + E + '\n');
    }

Finally, re-ingest any records with tag 915d (you can simply edit the MARC via
the MARC Editor for a specific record, or if the ingest.reingest.force_on_same_marc
row in config.internal_flag is enabled and you're not doing this during library
hours, you can re-ingest all records with UPDATE biblio.record_entry SET marc = marc;)

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoWrap upgrade for "Tag previously circulated items" YAOUS
Dan Scott [Wed, 21 Dec 2011 22:13:49 +0000 (17:13 -0500)]
Wrap upgrade for "Tag previously circulated items" YAOUS

Also fix a typo ("currenlty") and use the full "circulation" for easier
translation.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPac; indicate search results previously checked out
Bill Erickson [Tue, 29 Nov 2011 21:54:52 +0000 (16:54 -0500)]
TPac; indicate search results previously checked out

When a user is logged in to the tpac and performs a search, indicate in
the results set when any of the result items were ever checked out by
the logged in user.

Items will only be tagged when the related org setting is enabled and
the user has opted-in to circ history tracking.

New org unit setting is "opac.search.tag_circulated_items" /
"Tag Circulated Items in Results"

In the search results, just below title/author/callnumber/copy-count, a
new line is displayed that says "I have checked out this item before"
with a purdy little checkmark.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPac: Don't show part selector on hold result page
Thomas Berezansky [Wed, 21 Dec 2011 21:19:47 +0000 (16:19 -0500)]
TPac: Don't show part selector on hold result page

Instead, duplicate the hold list's "part name in parens" display, when a
part was selected.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoTPAC: Change title tooltip in results table to useful message
Bill Erickson [Mon, 19 Dec 2011 17:57:08 +0000 (12:57 -0500)]
TPAC: Change title tooltip in results table to useful message

From dbs's original commit:

The tooltip that would display when hovering over the title of a result
in the results table was simply the URI-escaped version of the title
text - not particularly helpful. Change this to say "Display record
details" as an actual hint about what action will occur when the user
clicks on a title in the results list.

This modified commit changes the title to 'Display record details for
"<title>"'

This commit also introduces the HTML plugin as a new
loaded-by-default template plugin.  Among other things, it's useful for
ensuring HTML attributes are safely encoded, moresoe than |html, which
does not escape quotes.

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

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
7 years agoTPAC: Split result copy counts into a separate template
Dan Scott [Wed, 21 Dec 2011 17:58:46 +0000 (12:58 -0500)]
TPAC: Split result copy counts into a separate template

As Thomas Berezansky suggests, sites are likely to want to customize the
display of copy counts depending on whether they're consortial sharers,
how deep they want to display, whether they want to just show the
matching search scope... make it easy to customize by moving the
copy counts portion of the results table into a separate template.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoTPAC: Improve display of holds/copy counts on record details
Dan Scott [Wed, 21 Dec 2011 06:06:06 +0000 (01:06 -0500)]
TPAC: Improve display of holds/copy counts on record details

Based on some suggestions from Thomas Berezansky in LP 906168:

  * Change the "Copies" header to "Available copies"
  * Simplify the copy language to "# copies at <library>" (we still need
    the noun "copies" but "available" has been factored out)
  * Create a "Holds" header and move the holds information under that
  * Put the "Available copies" and "Holds" into inline-block elements
    so that they can take less vertical space on a wide screen but
    will wrap on a narrow screen.
  * Fix the line spacing between LI elements

In addition, break up the lengthy summary TT2 file into a few smaller
parts. In particular, make a copy_counts.tt2 file as sites are very
likely to customize this to, in some cases, not show the consortial
counts, or in other cases to only show the consortial count and current
search library.

Also fix some horrible CSS issues in the header in which the "Place
hold" and "Add to list" buttons were above the title / image, as well as
remove some of the CSS manipulation to plain H2 elements that gave them
no top margin.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoTPAC: Display additional levels of copy counts
Dan Scott [Mon, 19 Dec 2011 04:54:15 +0000 (23:54 -0500)]
TPAC: Display additional levels of copy counts

In line with the MassLNC TPAC suggestion, display the copy counts for
search results and record details not only at the consortial level, but
also at up to two additional levels of the org unit hierarchy (but no
deeper than the user has chosen to search).

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoTPac; display mono part in account holds list/edit
Bill Erickson [Fri, 7 Oct 2011 20:11:33 +0000 (16:11 -0400)]
TPac; display mono part in account holds list/edit

Part label is appended to the title, wrapped in (parens).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agoTPac: holds placement on monographic parts
Bill Erickson [Thu, 6 Oct 2011 18:34:03 +0000 (14:34 -0400)]
TPac: holds placement on monographic parts

Ability to place holds on monographic parts.  In the holds placement
form, if a record has parts, a parts selector will display in the form
allowing the user to optionally specificy a monographic part for the
hold.

If a record has no non-part copies, the user is required to select a
part, because, in such cases, the hold cannot be fulfilled without
selecting a part.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agobookbag CSV gets bib attrs; A/T unapi method
Bill Erickson [Tue, 8 Nov 2011 15:56:14 +0000 (10:56 -0500)]
bookbag CSV gets bib attrs; A/T unapi method

* Added a bib record unapi retrieval utility method for action/trigger
templates.

* Updated the bookbag CSV template to include data for the "item_type"
record attribute both to have it and as an example of how the unapi
retrieval works.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
7 years agoAdd "Last circulation date" field to new rcl view
Dan Scott [Tue, 20 Dec 2011 21:19:08 +0000 (16:19 -0500)]
Add "Last circulation date" field to new rcl view

Some libraries will want the option of filtering out copies which have
truly never circulated, so offering up the bare "last circulation date"
field rather than coalescing it with "create date" will give report
writers the ability to use an IS NOT NULL clause.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoLast Circulation timestamp for reports
Thomas Berezansky [Tue, 6 Sep 2011 16:46:04 +0000 (12:46 -0400)]
Last Circulation timestamp for reports

Specifically intended for Weeding reports.

Easily swapped out (if needed) to include legacy circ data,
when available from a migration.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoHold ratios by pickup library for reports
Thomas Berezansky [Tue, 6 Sep 2011 15:38:18 +0000 (11:38 -0400)]
Hold ratios by pickup library for reports

Specifically intended for "point in time" reports.

In our case, per-library purchase alerts.

Uses Hold Copy Map table to get more accurate numbers for copy/volume/part holds.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoEscape the backslash to avoid warning in PostgreSQL 9.0-
Dan Scott [Tue, 20 Dec 2011 16:33:33 +0000 (11:33 -0500)]
Escape the backslash to avoid warning in PostgreSQL 9.0-

In PostgreSQL 9.1, "standard_conforming_strings" is ON by default and
there's no warning - but previous versions of PostgreSQL will see the
backslash and throw a warning about how you haven't escaped the
backslash. Thanks to Thomas Berezansky for noticing.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoAdd concerto.sql dataset with callnums, copies, and URIs
Dan Scott [Fri, 9 Dec 2011 17:38:55 +0000 (12:38 -0500)]
Add concerto.sql dataset with callnums, copies, and URIs

Useful for testing a fresh Evergreen database, the concerto.sql dataset
is an SQL file that adds 100 bib records and automatically generates
assorted call numbers and copies for 3 of the branches. 50 of the
records include unadorned 856 fields and 25 of them have located URIs
(25 scoped at SYS1, and 10 scoped at both SYS1 and BR3).

In the effort to make the one-shot load of sample bib / copy / call
number data broad and realistic, delete some of the entities, add
prefixes and suffixes to some of the call numbers, and include some
monograph parts and conjoined items.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoRemove top-level templates_custom directory
Dan Scott [Tue, 20 Dec 2011 16:42:17 +0000 (11:42 -0500)]
Remove top-level templates_custom directory

This top-level directory and version of advanced.tt2 slipped into commit
c9cdea869b5 and was noticed by Bill Erickson. It should not be here.
Send it into oblivion.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoAdd built staff client dir to .gitignore as well
Dan Scott [Mon, 19 Dec 2011 18:13:18 +0000 (13:13 -0500)]
Add built staff client dir to .gitignore as well

Thanks to Thomas Berezansky for the suggestion; you can tell what I
haven't built on my system :)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoAdd a .gitignore file suitable for master
Dan Scott [Mon, 19 Dec 2011 17:55:10 +0000 (12:55 -0500)]
Add a .gitignore file suitable for master

"git status" is painful in a source directory in which you're built and
installed Evergreen. This commit adds a .gitignore file that masks most
of the files and directories that you don't want to even think about, in
the hopes that the default Evergreen development experience can be mo'
betta.

Variations on this could be backported to rel_2_1 and rel_2_0 but take
care as some of the files that used to be source files in older releases
are now build from *.in files via autoconf.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoWrap upgrade script for CREATE_REPORT_TEMPLATE permission
Dan Scott [Mon, 19 Dec 2011 16:17:12 +0000 (11:17 -0500)]
Wrap upgrade script for CREATE_REPORT_TEMPLATE permission

Permissions to create report templates will automatically be added to
any group that currently has the ability to run reports as part of the
upgrade process; if you want to make use of the ability to prevent some
groups from creating ad-hoc reports, remove the CREATE_REPORT_TEMPLATE
permission from permission.grp_perm_map for that group.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoAdd permission for creating report templates
Thomas Berezansky [Sun, 25 Sep 2011 19:00:08 +0000 (15:00 -0400)]
Add permission for creating report templates

Because we would like people to be able to run them, but not create them.

Also, allow VIEW_REPORT_OUTPUT in reporter interface, so
that you can see the contents of shared output folders.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoAvoid updating deleted call numbers for 2.0 -> 2.1 upgrade
Dan Scott [Tue, 22 Nov 2011 16:55:45 +0000 (11:55 -0500)]
Avoid updating deleted call numbers for 2.0 -> 2.1 upgrade

25% of the call numbers on our production system are deleted, so
filtering out the deleted call numbers from the update in the 2.0 -> 2.1
upgrade saves a significant amount of time.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoShow Suspended holds as Suspended
Thomas Berezansky [Thu, 8 Dec 2011 16:26:33 +0000 (11:26 -0500)]
Show Suspended holds as Suspended

In the staff client and JSPac show the status of a suspended hold as
Suspended rather than something like "Waiting for copy".

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoAdd class_for_hint function to OpenILS::Utils::Fieldmapper.
Jason Stephenson [Sun, 11 Dec 2011 01:28:48 +0000 (20:28 -0500)]
Add class_for_hint function to OpenILS::Utils::Fieldmapper.

Use this function to find a Fieldmapper class from the JSON hint or
class id:

my $class = Fieldmapper::class_for_hint('au');
print("$class\n");

Will print:

Fieldmapper::actor::user

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoLP904915 Restore call number columns
Jason Etheridge [Thu, 15 Dec 2011 19:38:54 +0000 (14:38 -0500)]
LP904915 Restore call number columns

in Check In interface

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoturn objects (such as null) into empty strings
Jason Etheridge [Thu, 15 Dec 2011 15:28:33 +0000 (10:28 -0500)]
turn objects (such as null) into empty strings

when they're being treated as strings (with escape_html) during printing

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoLP# 902667 - Wrap upgrade script for Dewey sorting
Dan Scott [Fri, 16 Dec 2011 19:00:24 +0000 (14:00 -0500)]
LP# 902667 - Wrap upgrade script for Dewey sorting

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoFix Dewey call number sorting
James Fournie [Sun, 11 Dec 2011 00:49:01 +0000 (16:49 -0800)]
Fix Dewey call number sorting

Ported over Koha commit aef8358c - fix for Koha Bug 4265.
Further documented in Evergreen LP # 902667
Here's the description from the commit message by Magnus Enger:

C4::ClassSortRoutine::Dewey turns "306 Les" into "306_Les"
for items.cn_sort and MARC-field 952$6, which results in
"306.46 Les" being sorted before "306 Les" in the OPAC.
With this patch, "306 Les" is turned into "306_000000000000000_Les".

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoFix the POD in Cronscript.pm.in.
Jason Stephenson [Thu, 1 Dec 2011 20:05:12 +0000 (15:05 -0500)]
Fix the POD in Cronscript.pm.in.

I lied when I said it includes Data::Dumper, so you don't have to.
It does include Data::Dumper, but if you want to use Data::Dumper
in your script, you still have to use Data::Dumper.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoMake some improvements to Cronscript.pm.
Jason Stephenson [Thu, 1 Dec 2011 17:38:55 +0000 (12:38 -0500)]
Make some improvements to Cronscript.pm.

Allow the session method to function when called more than once with
different service names.

Add some useful new methods:

logout: Calls open-ils.auth.session.delete if we're logged in.

die_event: Causes a script to croak if the object passed in is an event,
or optionally a certain named event.

warn_event: Causes a script to output an error message if the object passed
in is an event, or optionally a certain named event.

Use OpenILS::Application::AppUtils.

Default to staff login in Cronscript->authenticate method.

Improve the Croncript.pm.in POD to include a better synopsis of its features.

Clean up some other sections of the POD, remove the TODO section, and add
some SEE ALSO entries.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoTPAC: Assume that templates are encoded in UTF-8
Dan Scott [Sat, 10 Dec 2011 15:43:47 +0000 (10:43 -0500)]
TPAC: Assume that templates are encoded in UTF-8

Per http://template-toolkit.org/docs/faq/index.html
under "Why do I get rubbish for my utf-8 templates?", Template::Toolkit
does not assume that templates are encoded in UTF-8, which runs counter
to current assumptions circa 2011.

Practically, this means that before this change any UTF8 characters
used for purposes such as Unicode art or otherwise would be garbled in
the generated Web page. This commit tells Template::Toolkit to assume
that the templates are UTF8 without forcing us to monkey with byte-order
markers.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoAllow for the page offset when listing the "Result x of y" values.
bott [Wed, 14 Dec 2011 17:31:30 +0000 (12:31 -0500)]
Allow for the page offset when listing the "Result x of y" values.

The record details page did not show the page offset correctly, so
result 13 would show up as "Result 3 of ###", and result 23 would also
show up as "Result 3 of ###".

Signed-off-by: bott <bott@grpl.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoFix can_have_copies checks
Thomas Berezansky [Wed, 14 Dec 2011 19:30:52 +0000 (14:30 -0500)]
Fix can_have_copies checks

Bibs aren't required to have sources. Thus, adjust all appropriate locations
to support a default state of "no source bibs can have copies", without
erroring out.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoProcess still-shelved, canceled holds in clear-shelf process
Bill Erickson [Wed, 14 Dec 2011 18:36:05 +0000 (13:36 -0500)]
Process still-shelved, canceled holds in clear-shelf process

Holds that are canceled but still physically on the hold shelf are
processed like other holds during the clear-shelf process.  They will be
grouped in the same manner and if a custom post-clear status is
configured, copies linked to already-canceled holds will get the custom
status.  The only difference is already-canceled holds will not be
re-canceled during the clear-shelf process.

This change has the added benefit of leveraging another API call to
retrieve the shelf-expired holds instead of using its own custom
json-query.

See https://bugs.launchpad.net/evergreen/+bug/904332

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoClear hold shelf/shelf_expire time for pickup lib change
Bill Erickson [Tue, 13 Dec 2011 19:32:45 +0000 (14:32 -0500)]
Clear hold shelf/shelf_expire time for pickup lib change

If a hold is on the holds shelf and the pickup library changes, clear
the shelf_time and shelf_expire_time, since the hold is now in transit.

This is particularly important for avoiding action_trigger events for
the "hold_request.shelf_expires_soon" hook for what is now an
in-transit item.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoTPAC: Add prefixes and suffixes to call number displays
Dan Scott [Tue, 6 Dec 2011 07:16:16 +0000 (02:16 -0500)]
TPAC: Add prefixes and suffixes to call number displays

Call numbers can be associated with prefixes and suffixes meant for
display purposes; display these with the call numbers in search results
and record details.

Thanks to Lebbeous and Bill for the assist in sorting out the remaining
portion of the hairy json_query for the record display.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoMake canceled but still on the shelf holds show up
Thomas Berezansky [Tue, 11 Oct 2011 20:42:03 +0000 (16:42 -0400)]
Make canceled but still on the shelf holds show up

Browse Hold Shelf otherwise can't see holds canceled after the item was
placed on the shelf.

This also causes the expired view to show canceled but still in on the
hold shelf status holds to show up.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
7 years agoStamping upgrade for LP898248: Address Alert
Thomas Berezansky [Wed, 14 Dec 2011 15:34:19 +0000 (10:34 -0500)]
Stamping upgrade for LP898248: Address Alert

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoAlert addresses for patron registration : UI
Bill Erickson [Fri, 9 Dec 2011 20:52:32 +0000 (15:52 -0500)]
Alert addresses for patron registration : UI

Add support for comparing user addresses to alert addresses.  When an
address is found, the address in question is styled (the header row
turns red) and the configured alert message is shown along the
top-right, where other warnings appear.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoAlert addresses for patron registration : API
Bill Erickson [Fri, 9 Dec 2011 20:51:49 +0000 (15:51 -0500)]
Alert addresses for patron registration : API

Middle-layer API call for matching addresses to alert addresses

open-ils.actor.address_alert.test(auth, orgid, fields)

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoAlert addresses for patron registration : configuration UI
Bill Erickson [Fri, 9 Dec 2011 15:43:28 +0000 (10:43 -0500)]
Alert addresses for patron registration : configuration UI

Conify UI for managing Alert Addresses

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoAlert addresses for patron registration : DB/IDL
Bill Erickson [Tue, 6 Dec 2011 21:09:16 +0000 (16:09 -0500)]
Alert addresses for patron registration : DB/IDL

DB and IDL components to support configuration of alert addresses.  The
target use case for alert addresses is in the patron registration
interface.  When a patron's address matches an alert address, the staff
should be notified.

Alert address fields are treated as regular expressions.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agojson_query boolean function param support
Bill Erickson [Tue, 13 Dec 2011 16:03:23 +0000 (11:03 -0500)]
json_query boolean function param support

Solves the following problem when passing boolean parameter values to
json_query functions using the 'from' construct.

E.g.  {"from" : ["some_func_name", true]}

oils_sql.c:2568 open-ils.cstore: Error quoting key string [(null)]

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
7 years agoMerge remote-tracking branch 'working/collab/dbs/tpac-non-fixed-width'
Thomas Berezansky [Mon, 12 Dec 2011 17:25:36 +0000 (12:25 -0500)]
Merge remote-tracking branch 'working/collab/dbs/tpac-non-fixed-width'

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
7 years agoTPAC: Remove more inline styles from results table collab/dbs/tpac-non-fixed-width
Dan Scott [Mon, 12 Dec 2011 05:44:34 +0000 (00:44 -0500)]
TPAC: Remove more inline styles from results table

Most of the inline styles are gone from the results table.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoRPAC: Remove one formatting row from results
Dan Scott [Mon, 12 Dec 2011 05:29:47 +0000 (00:29 -0500)]
RPAC: Remove one formatting row from results

One of the table rows was being inserted into every result simply to
provide a border that is better handled via CSS on the existing useful
elements. Begone.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: results use floated DIVs instead of table layout
Dan Scott [Mon, 12 Dec 2011 05:06:39 +0000 (00:06 -0500)]
TPAC: results use floated DIVs instead of table layout

Rather than a table containing a single row for the rather gross purpose
of placing the facet sidebar on the left, a little bit of a divider
between the facets and the results, and the results on the right, just
use a floated div and a relatively positioned div for the two pertinent
chunks of content. Bonus: one touch of CSS moves the facet sidebar to
the right instead of the left.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Record details - inline style to classes
Dan Scott [Mon, 12 Dec 2011 04:37:02 +0000 (23:37 -0500)]
TPAC: Record details - inline style to classes

Continue the march towards no inline styles in the record details page.
Includes a small tweak for electronic resource display so that the
unordered list gains a bit of space on the left-hand side from the image
location.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Include Chilifresh conditionally user/dbs/tpac-non-fixed-width
Dan Scott [Mon, 12 Dec 2011 00:51:10 +0000 (19:51 -0500)]
TPAC: Include Chilifresh conditionally

Rather than including Chilifresh JavaScript and table cells
unconditionally, only include the Chilifresh calls if an account has
been defined in the Apache environment.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Fix styling in advanced searchbar
Dan Scott [Sun, 11 Dec 2011 22:40:39 +0000 (17:40 -0500)]
TPAC: Fix styling in advanced searchbar

Per Peter Lux's comment, we needed to fix the styling in the advanced
search bar. Marking the DIV id with "search-box" makes it consistent
with the searchbar in other interfaces.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Fix whitespace in advanced.tt2
Dan Scott [Sun, 11 Dec 2011 22:39:43 +0000 (17:39 -0500)]
TPAC: Fix whitespace in advanced.tt2

Indentation was non-standard following plux's addition of the basic link
in the advanced search UI; fix that up.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Link to Basic Search from advanced page
Peter Lux [Fri, 9 Dec 2011 21:12:00 +0000 (16:12 -0500)]
TPAC: Link to Basic Search from advanced page

The searchbar in basic search, results, record details offers an option
to get to advanced search - but advanced search doesn't offer a way to
get directly back to a basic search. Now it does; however, some CSS is
required to make it look consistent.

Signed-off-by: Peter Lux <plux@upei.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoAdded CUFTS support in ResolverResolver
Art Rhyno [Fri, 9 Dec 2011 21:36:28 +0000 (16:36 -0500)]
Added CUFTS support in ResolverResolver

This is based on the CUFTS implementation for UPEI. This is
very closely modeled on the SFX implementation.

opensrf.xml.example has been modified to include a <resolver_type>
element for ResolverResolver; by default, SFX will be used and this
shouldn't break anything else. If you use CUFTS rather than SFX, you
can specify 'cufts'.

Signed-off-by: Art Rhyno <artrhyno@uwindsor.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Fix record summary e-resource and copy display
Dan Scott [Fri, 9 Dec 2011 20:12:53 +0000 (15:12 -0500)]
TPAC: Fix record summary e-resource and copy display

Electronic resources were wrapped with an ugly black line and no
differentiation from the outstanding text. Give them a light background
and remove the black line. Also, use an unordered list if we have more
than one URI to display.

Move the copy summary below the "Copies" heading that immediately
follows it for a more logical grouping of elements.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoFix typo in comment in Open-ILS/src/extras/Makefile.install. collab/dyrcona/precise_pangolin
Chris Sharp [Fri, 9 Dec 2011 19:02:31 +0000 (14:02 -0500)]
Fix typo in comment in Open-ILS/src/extras/Makefile.install.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
7 years agoUpdate the README for Ubuntu Precise Pangolin (12.04).
Jason Stephenson [Thu, 8 Dec 2011 20:53:16 +0000 (15:53 -0500)]
Update the README for Ubuntu Precise Pangolin (12.04).

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
7 years agoUpdate Open-ILS/src/extras/Makefile.install for Ubuntu 12.04.
Jason Stephenson [Thu, 8 Dec 2011 17:10:20 +0000 (12:10 -0500)]
Update Open-ILS/src/extras/Makefile.install for Ubuntu 12.04.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
7 years agoTPAC: Remove more explicit widths from results page
Dan Scott [Fri, 9 Dec 2011 17:05:14 +0000 (12:05 -0500)]
TPAC: Remove more explicit widths from results page

Refactor the facet sidebar such that headers consist of a floated span
and a div with no specific width; absent a specific width, the button
will float over top of text that might expand due to translation.

Also remove the explicit table cell width for the results counter column
and move some inline styles over to CSS. More to be done in results
table but we are on our way.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoTPAC: Use padding instead of explicit width for tabs
Dan Scott [Fri, 9 Dec 2011 16:09:24 +0000 (11:09 -0500)]
TPAC: Use padding instead of explicit width for tabs

Explicit widths work well for a combination of a specific font sizes and
a known string; however, in the context of translation, strings may get
longer than the explicit width allows. Using padding gives us more
flexibility to accommodate different font sizes and variable length
strings; the uniformity of the tab size will be sacrificed but perhaps
that is not such a bad thing.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into dbs/tpac-non-fixed...
Dan Scott [Thu, 8 Dec 2011 19:01:57 +0000 (14:01 -0500)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into dbs/tpac-non-fixed-width

Conflicts:
Open-ILS/web/css/skin/default/opac/style.css

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoSerials: be less eager to offer season dropdown in holding code mini-wizard
Lebbeous Fogle-Weekley [Wed, 16 Nov 2011 20:19:18 +0000 (15:19 -0500)]
Serials: be less eager to offer season dropdown in holding code mini-wizard

The recent commit (ebce79a288b in master) to make the holding code
mini-wizard offer a dropdown for season offers it too often, sometimes
in completely inappropriate cases.

This commit gets it right, and incidentally fixes two totally broken
links elsewhere in alternate serials control view interfaces.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
8 years agoPropagate search scope through advanced search interfaces
Dan Scott [Fri, 2 Dec 2011 04:01:24 +0000 (23:01 -0500)]
Propagate search scope through advanced search interfaces

If a user had a chosen search scope (via the CGI "loc" parameter), it
would be lost when switching to the advanced search interfaces. Now we
progagate the search scope through the advanced search interfaces.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
8 years agoStamping upgrade for LP893315: filter_deleted_acns_from_unapi
Bill Erickson [Tue, 6 Dec 2011 14:56:55 +0000 (09:56 -0500)]
Stamping upgrade for LP893315: filter_deleted_acns_from_unapi

Signed-off-by: Bill Erickson <berick@esilibrary.com>
8 years agoLP893315: Do not return delected call numbers in holdings_xml
Dan Scott [Fri, 25 Nov 2011 18:20:32 +0000 (13:20 -0500)]
LP893315: Do not return delected call numbers in holdings_xml

Per LP893315, deleted call numbers were obscuring the actual active URIs
associated with a given bib record in a given scope at the default limit
of 5 results per record in unapi.holdings_xml.

Filtering out the deleted call numbers from the results seems like a
good idea, as we're generally interested in only showing the active
results (at least as in-db unapi is currently used). This also addresses
the problem of not showing active URIs when there are active URIs to
display.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
8 years agoCode comments and tweaks for lost processing
Dan Wells [Mon, 5 Dec 2011 16:44:41 +0000 (11:44 -0500)]
Code comments and tweaks for lost processing

This commit is intended to do the following:

* Fix case where MISSING status is not retained for items
  being sent 'home' (as it was in previous versions)
* Be more explicit about when we unset the LOST status and when
  we do not in checkin_handle_lost()
* Prevent update of the copy in checkin_handle_lost() unless we
  actually change the status
* Restore log messages for special handling of LOST/MISSING
  checkins away from 'home'
* Provide additional code comments to clarify intended behavior

Note: Given the current restructure, MISSING item behavior is no
longer affected by 'lost_immediately_available' setting.  That
seemed more bug than feature, and can be implemented later
(perhaps as a separate setting) if required.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
8 years agoCheck OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE in checkin_handle_lost.
Jason Stephenson [Tue, 29 Nov 2011 14:22:29 +0000 (09:22 -0500)]
Check OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE in checkin_handle_lost.

Check the value of OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE before
changing the copy status in checkin_handle_lost. This makes the setting
actually do something.

Add a couple of blank lines to aid in readability.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
8 years agoFix LP851000.
Jason Stephenson [Thu, 17 Nov 2011 20:15:09 +0000 (15:15 -0500)]
Fix LP851000.

Remove about 14 lines from OpenILS/Application/Circ/Circulate.pm
in the checkin_handle_circ subroutine that check whether or not
the checkin happens at the copy's circ_lib and the value of the
circ.lost_immediately_available org unit setting.

This change causes the handle_lost subroutine to run regardless of
where the checkin takes place for a more consistent experience.

Whether or not billings are voided, overdues restored, etc. is still
determined by the copy's circ_lib.

Given how the hold targeter and transit code works, it does not appear
the the circ.lost_immediately_available setting could ever do what it
was intended to do. Given these changes to the code it is now unnecessary.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
8 years agoTPAC: Protect against missing 901c in legacy MARCXML
Dan Scott [Fri, 25 Nov 2011 17:30:24 +0000 (12:30 -0500)]
TPAC: Protect against missing 901c in legacy MARCXML

Bad MARCXML to which Evergreen has been unable to add a 901c happens -
particularly with legacy MARCXML. Currently, TPAC crashes hard with an
ugly error if a 901c is not found when attempting to display the record
in search results. In comparison, the JSPAC displays the record without
a problem.

This commit logs a warning and enables the TPAC to continue somewhat
gracefully (the problem record is simply skipped in the search results).
A more robust solution may be to teach unapi.bre to add the record ID to
the results and to have the TPAC pull from that, rather than relying on
the MARCXML itself to contain the record ID.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
8 years agoAdd versioned upgrade script for "Bib source: can have copies"
Dan Scott [Mon, 5 Dec 2011 18:32:23 +0000 (13:32 -0500)]
Add versioned upgrade script for "Bib source: can have copies"

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoRefactor retrieval of cbs object into cat.util.get_cbs_for_bre_id().
Jason Stephenson [Wed, 16 Nov 2011 00:31:12 +0000 (19:31 -0500)]
Refactor retrieval of cbs object into cat.util.get_cbs_for_bre_id().

Avoid code duplication.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoAdd can have copies check to the Add MFHD Record link in rdetail.
Jason Stephenson [Tue, 4 Oct 2011 20:54:32 +0000 (16:54 -0400)]
Add can have copies check to the Add MFHD Record link in rdetail.

This prevents the button from the JSPAC from being able to add MFHD
records to the affected bib record.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoModify copy browser to check for bib_source.can_have_copies.
Jason Stephenson [Tue, 4 Oct 2011 14:29:23 +0000 (10:29 -0400)]
Modify copy browser to check for bib_source.can_have_copies.

Add code to server/cat/copy_browser.js.
Add error string to server/local/en-US/cat.properties.
Swap obj. for g. that was copied from opac.js.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoModify server/cat/bib_brief.js to check for source can have volumes.
Jason Stephenson [Tue, 4 Oct 2011 00:09:37 +0000 (20:09 -0400)]
Modify server/cat/bib_brief.js to check for source can have volumes.

Copy/paste code from chrome/content/cat/opac.js.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoCheck for bib_source.can_have_copies in cataloging.
Jason Stephenson [Sat, 1 Oct 2011 16:02:16 +0000 (12:02 -0400)]
Check for bib_source.can_have_copies in cataloging.

Retrieve the BRE and CBS object in the add_volumes method of
opac.js.

Check if the CBS can have copies, and if not, tell the user such
and return.

Also required adding an api entry in constants.js and a new message
in offline.properties.

This is the beginning of the client code changes. There are very
likely to be more.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoAdd can_have_copies field to config.bib_source.
Jason Stephenson [Fri, 30 Sep 2011 15:28:08 +0000 (11:28 -0400)]
Add can_have_copies field to config.bib_source.

Add the column definition to config.bib_source in
002.schema.config.sql.

Insert TRUE into the column for the default sources created in
950.data.seed-values.sql.

Add the field definition to class id cbs in fm_IDL.xml.

Teach OpenILS/Application/Storage/CDBI/config.pm about new field.

Add upgrade script for config.bib_source.can_have_copies.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoLP881774: Missing schema on function in 2.0-2.1 upgrade user/dbs/lp894052-version-upgrade
Dan Scott [Fri, 2 Dec 2011 04:06:50 +0000 (23:06 -0500)]
LP881774: Missing schema on function in 2.0-2.1 upgrade

Although the search path is altered to include the evergreen schema at
the start of the upgrade, one of the functions in the evergreen schema
does not resolve when invoked without the explicit schema later in the
upgrade script. We address that superficial (but failure provoking / time
wasting) problem by qualifying the function with the evergreen schema in
this commit, but we should also find out why the altered search path
does not seem to be functioning in the upgrade script.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoMerge branch 'master' of git.evergreen-ils.org:Evergreen into dbs/lp894052-version...
Dan Scott [Fri, 2 Dec 2011 04:15:40 +0000 (23:15 -0500)]
Merge branch 'master' of git.evergreen-ils.org:Evergreen into dbs/lp894052-version-upgrade

8 years agopin a version number for the patron card editor upgrade script
Jason Etheridge [Thu, 1 Dec 2011 21:02:29 +0000 (16:02 -0500)]
pin a version number for the patron card editor upgrade script

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoWhen editing cards, lock tab on apply changes
Thomas Berezansky [Tue, 1 Nov 2011 18:00:46 +0000 (14:00 -0400)]
When editing cards, lock tab on apply changes

Hopefully to prevent people from moving away before saving.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoSeed values/upgrade script for card edit perms
Thomas Berezansky [Tue, 1 Nov 2011 14:11:24 +0000 (10:11 -0400)]
Seed values/upgrade script for card edit perms

Not assigned to anyone by default.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoCheck Profile Editing Perms for Card Editor
Thomas Berezansky [Tue, 1 Nov 2011 14:01:43 +0000 (10:01 -0400)]
Check Profile Editing Perms for Card Editor

Don't allow Active/Primary card changes unless you have the ability to edit
the patron's primary profile group.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoActive/Primary Editing for Patron Cards
Thomas Berezansky [Tue, 1 Nov 2011 13:18:47 +0000 (09:18 -0400)]
Active/Primary Editing for Patron Cards

Changes "See All" into an editing interface, allowing for changing of the
active and primary state of each card.

Each requires a specific permission:

UPDATE_PATRON_ACTIVE_CARD
UPDATE_PATRON_PRIMARY_CARD

Without the appropriate permission the interface will show the green check
or red x instead of the editing elements. If you don't have either
permission then the Apply Changes button is hidden.

As the editing interface exists, also show the "See All" button when there
is only one card, but not when registering a new patron. This allows for
toggling the lone card's active flag, as well as replacing a card but
leaving the old one active.

To ensure that you can do the above, and to avoid some other errors, the
new card on a patron is saved to the editCard variable, rather than using
patron.card(). This both allows for "Replacing" a new non-primary card into
place as well as avoiding issues with editing the primary and active states
at the same time (the interface would try and update the new primary card
with the old primary card's barcode). Also, when checking for duplicate
barcodes, update the editCard with the barcode so the See All interface can
show the new card's barcode in the list properly.

Finally, included is localization for the All Cards interface headers and
buttons.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoTpac: ability to edit name, description of bookbags later
Lebbeous Fogle-Weekley [Wed, 16 Nov 2011 14:48:11 +0000 (09:48 -0500)]
Tpac: ability to edit name, description of bookbags later

You could already name and describe when creating them, and now you can
edit that later.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoLP896405: Address SQL upgrade issues getting to 2.2-alpha1
Dan Scott [Fri, 25 Nov 2011 20:46:58 +0000 (15:46 -0500)]
LP896405: Address SQL upgrade issues getting to 2.2-alpha1

Martha Driscoll tried out the 2.2-alpha1 upgrade script and found a few
problems noted in this thread:
http://list.georgialibraries.org/pipermail/open-ils-dev/2011-November/007747.html

"upgrade_log" does not exist
> LINE 1: INSERT INTO config.upgrade_log (version, applied_to) VALUES .

This fails because the "applied_to" column does not exist at this point
in the schema upgrade. Just remove the "applied_to" column from the
INSERT statement.

This will probably fail because most sites won't have applied 0526 to
their production server, so move the statements outside of the
transaction.

Also, in my own testing I ran into:

public / evergreen function namespace issues we tried to address back in
the 2.0(?) timeframe. New sites will have the is_json() function in the
evergreen namespace, while old sites will have it in public, so we do
_not_ qualify the function name and just let the searchpath handle the
resolution.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoStart collecting version-upgrade scripts in one spot
Dan Scott [Fri, 25 Nov 2011 19:46:37 +0000 (14:46 -0500)]
Start collecting version-upgrade scripts in one spot

Rename the upgrade scripts missing "-upgrade-db" in their name

Add the 2.0.* upgrade scripts to version-upgrade

Discard the really old upgrade scripts that don't necessarily match what
was actually packaged and released.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoFix for LP894125 - reshelving interval collab/dyrcona/lp_894125_fix_reshelving
Ben Shum [Wed, 23 Nov 2011 20:14:32 +0000 (15:14 -0500)]
Fix for LP894125 - reshelving interval

Update to reshelving code to utilize actor.org_unit_ancestor_setting function
and properly retrieve org settings for "circ.reshelving_complete.interval" for
org unit or ancestors.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
8 years agoEnable record summary to be scrollable at larger font sizes
Dan Scott [Tue, 22 Nov 2011 18:33:07 +0000 (13:33 -0500)]
Enable record summary to be scrollable at larger font sizes

The record summary at the top of the cataloguing interfaces appears to
determine its size based on the "normal" font size at load; then, when a
larger font size is applied to the page, the text gets hidden by the
fixed size of the groupbox.  Ideally the groupbox would adjust to
accomodate the larger font size, but after trying many different
approaches the best short-term approach seems to be to enable overflow
so that scrollbars can appear when necessary.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
8 years agoLimit display to 856 with ind1 = 4 and ind2 = 0 or 1.
Jason Stephenson [Mon, 21 Nov 2011 18:47:30 +0000 (13:47 -0500)]
Limit display to 856 with ind1 = 4 and ind2 = 0 or 1.

Minor modification to Open-ILS/src/templates/opac/parts/
misc_util.tt2 that limits the display of 856 urls to that have
indicator 1 equal to 4 and indicator 2 equal to 0 or 1. These should
be those that point directly to the resource.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoTPac: show non-asset.uri 856 URLs on detail page
Bill Erickson [Mon, 3 Oct 2011 20:31:45 +0000 (16:31 -0400)]
TPac: show non-asset.uri 856 URLs on detail page

Display "global" 856 URLs in record detail page.  A "global" URL in this
case is one that has no ownership and has not been extracted out as an
asset.uri.  As of right now, this is any 856 that has no $9, $w, or $n
subfield data.

Links are displayed directly after asset.uri links using the same style.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>