Because having clients constantly say there is a message of "OK" gets annoying
very quickly, especially if it is displayed in a popup message instead of via
a "messages" button.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Yamil Suarez [Thu, 7 Aug 2014 21:40:41 +0000 (17:40 -0400)]
Docs: various AsciiDoc formatting fixes for docs
Fixed the 'bad first character' error, the bad apostrophe error. Removed various UTF-8 chars.
Fixed some numbered list formatting, to take out redundant manual numerals…
for example:
. 1 item
. 2 item
. 3 item
became:
. item
. item
. item
also added "=" to wrap around breaks in numbered lists
for example:
. Right-click on the value control for the fixed field that needs to be edited.
image::media/ffrc1.jpg[]
. Select the appropriate value for the fixed field from the menu options.
became:
. Right-click on the value control for the fixed field that needs to be edited.
+
image::media/ffrc1.jpg[]
+
. Select the appropriate value for the fixed field from the menu options.
Ben Shum [Thu, 7 Aug 2014 21:31:41 +0000 (17:31 -0400)]
LP#1351355: Use libexcel-writer-xlsx-perl package for Ubuntu Trusty
Since Ubuntu 14.04 Trusty has a more recent packaged version of
libexcel-writer-xlsx-perl, use that instead of installing from CPAN
for Excel::Writer::XLSX.
Mike Rylander [Fri, 1 Aug 2014 15:26:38 +0000 (11:26 -0400)]
LP#1351355: Switch to XLSX format for Excel report output
We've always used Spreadsheet::WriteExcel::Big to generate Excel output
from reports. That module has a limitation of 64k rows, imposed by the
binary Excel format. Recently, the Excel::Writer::XLSX module has become
feature-complete enough that we can use that instead, and the XML format
files that it writes are now supported by the majority of installed
versions of Excel (and OpenOffice) -- the format arrived with Excel 2007,
released in 2006 (8 years ago). So, let's switch to that!
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Remove the cancel reason label displayed in the lineitem list pages
since the cancel reason is now displayed as the lineitem status for
cancelled lineitems.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Sort lineitem and copy cancel reasons selectors by label. In addition
to being generally useful, this helps to quick differentiate between
delayed and canceled items in the list.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Tue, 3 Jun 2014 14:18:43 +0000 (10:18 -0400)]
LP#1270289 Support canceling already-canceled lineitems
If a lineitem is canceled and the cancel_reason has keep_debits == true
(i.e. the lineitem is "delayed"), allow the lineitem to be canceled
again, up until the point the lineitem cancel_reason has keep_debits ==
false, at which point, no more cancelations are allowed.
Similarly, when a copy is canceled with a keep_debits==true reason,
allow the copy to be canceled when its parent lineitem is canceled,
following the rules above.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Tue, 3 Jun 2014 13:38:46 +0000 (09:38 -0400)]
LP#1270289 Show cancel reason labels for lineitems/copies
In the standard lineitem list page, display lineitem states as
translatable strings instead of displaying the raw lineitem state code.
Additionally, when the state is 'cancelled', display the cancel_reason
label instead of "cancelled" to help differentiate between canceled and
delayed items.
Similarly, display the cancel reason label for canceled copies in the
copy edit grid.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Add "Delayed:" and "Canceled:" prefixes to stock labels based on their
keep_debits flag to better differentiate between delayed and canceled
items in the UI.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Mon, 2 Jun 2014 20:54:01 +0000 (16:54 -0400)]
LP#1270289 Split canceled into delayed vs canceled
The acq.lineitem_summary DB view (and related
acq::lineitem_summary_invoiceable IDL view) now differentitate between
canceled items and delayed items by inspecting the keep_debits flag on
the cancel reason.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
LP#1302207 - Attempt to validate ISBNs in AddedContent.pm.
When getting ISBNs from the database, they often contain extra stuff
after the ISBN that sometimes causes problems for Business::ISBN.
This commit attempts to resolve some of that by looking only for the
part of the ISBN data that resembles an ISBN and using just that part.
If the ISBN data doesn't look like an ISBN, then it is discarded.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Wed, 12 Feb 2014 15:18:39 +0000 (10:18 -0500)]
LP#1279998 marc_stream_importer support alternate match strategies
Adds support for sending auto-overlay-1match and auto-overlay-best-match
in addition to auto-overlay-exact to Vandelay when performing the
import. If no strategy is chosen, the script still defaults to
auto-overlay-exact.
These changes are managed with 3 new command line options:
Remington Steed [Wed, 6 Aug 2014 12:47:40 +0000 (08:47 -0400)]
Docs: Fix patron registration screenshot
The previously committed screenshot contains site-specific information
which is not broadly beneficial. This commit replaces it with a more
generic screenshot.
Remington Steed [Tue, 5 Aug 2014 15:23:20 +0000 (11:23 -0400)]
Docs: Update commands for authority importing script
The tools used for importing authority records from the command line have
been modified since the original docs were written. Testing revealed these
changes, which are reflected in this commit.
Mike Rylander [Fri, 20 Jun 2014 13:29:56 +0000 (09:29 -0400)]
LP#1322285: Exclude default values for fixed fields when ingesting
Default values for fixed fields that can exist in either 008 or 006
will cause search to be over-broad. So, we avoid including those now.
I also took the time to move the baseline schema around a bit in order
to keep related code in more appropriate files and avoid continuously
redefining functions.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Bill Erickson [Tue, 8 Oct 2013 19:52:12 +0000 (15:52 -0400)]
LP#1348731: Optional Auth login nonce to differentiate same-username logins
If multiple login attempts are made using the same username within a
very short period of time, a race condition exists where, upon
completion of the first login, the auth init cache data for any pending
logins are removed, since there can only be one instance of cached init
data per username.
This adds support for allowing the caller to pass in a random string
which is added to the cache key as a way to differentiate between logins
using the same username.
The seed is passed into auth init as an optional secondary parameter
and passed again (via the "nonce" argument) to auth complete to ensure
consistent cache keys across both interactions.
Example:
my $nonce = rand($$);
my $seed = request(
'open-ils.auth',
'open-ils.auth.authenticate.init', $username, $nonce );
In cases where there is no hold on a precat copy, avoid trying to find
"related" holds, in part because it's unnecessary, but also because the
implementation assumes a fleshed $self->volume object, which is not
present during precat checkout.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Pearl [Mon, 4 Nov 2013 19:18:20 +0000 (14:18 -0500)]
LP#1099979 Provide facility to merge parts in the Monograph Parts display
A new facility is provided to make it relatively simple to merge parts that should be named the same, but are
not. The user will check-off the parts that need to be merged, and click on the new Merge Selected Parts
control, at which point the "winner" will be selected from a pop-up.
Signed-off-by: Dan Pearl <dpearl@cwmars.org> Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Tue, 8 Jul 2014 15:11:54 +0000 (11:11 -0400)]
LP#1339118: Ignore permission checks for "jump" context
We don't worry about checking permissions on foreign objects when we're
simply using them to get a context OU for the local object permission
testing. The "jump" field just gives us more layers of indirection, and
shouldn't cause a perm check, just like normal foreign context OUs.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
make_release supports a "-j" option for passing in the OpenSRF JS path:
make_release [options] -j /openils/lib/javascript
This is useful when running make_release, specifically the staff client
building portion, on a machine where the OpenSRF libs are available
(say, from a git checkout) but osrf_config is not available because
OpenSRF is not actually installed.
The script will attempt to find osrf_config and the JS path
automatically, so under normal circumstances, -j is not required.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Mon, 14 Jul 2014 18:57:38 +0000 (14:57 -0400)]
LP#1341703 Thinko in Batch Edit (hidden by older OpenSRFs)
There's a bug on line 272 of O::A::Cat.pm where we called a non-existent
method named respond_complete on the invocant object. Instead, we need to
call that on the client object (spelled $conn in this method). Batch bib
edit won't work on new OpenSRF's until this is fixed.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Jason Stephenson [Fri, 11 Jul 2014 14:57:59 +0000 (10:57 -0400)]
LP#1341013: Remove NameVirtualHost from eg.conf.in for Apache 2.4.
NameVirtualHost does nothing in Apache 2.4 and will be removed in
the next release. We might as well get rid of it now and silence
a warning when starting Apache.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Ben Shum <bshum@biblio.org>
LP1198475: Add a new, optional, Lost and Paid copy status.
Add the Lost and Paid status to config.copy_status.
Add org_unit_settig to control if the copy status is used.
Add checks to O::A::Circ::Money::make_payments to check for LOST
status and org_unit setting and change the copy status to
Lost and Paid as appropriate.
Also add checks for Lost and Paid copy status wherever LOST copy
status is used.
Add the COPY_STATUS_LOST_AND_PAID event.
Add the event to ils_events.xml with id 7026.
Check for the event in circ/util.js in the staff client.
Add pgTAP tests for the existence of the Lost and Paid copy status
and the new org_unit setting to control if it isused.
LP#1234845: Performance improvement to evergreen.ranked_volumes() database function.
For the client I analyzed logs from production Pg instance for ~ 10
days.
During this time, the single most time consuming query (summarized time
for all instances of the query, with different parameters) was:
SELECT * FROM unapi.bre ( ... ) AS "unapi.bre";
I profiled this function, and found that in my test case most of the
time (2.04s out of 2.06s, so ~ 99%) was spent in call to
unapi.holdings_xml() function.
When I profiled this function, I found that most of the time (sorry,
don't have the number now with me) was spent in call to
evergreen.ranked_volumes() function.
At this moment in my research something changed on the server I was
testing on, and all subsequent times were ~ 4-5 times lower, but the
ratios were more or less the same.
Anyway - call to evergreen.ranked_volumes() showed repeatable time (with
full caches/buffers) of ~ 380ms.
I modified the function by:
1. inlining actor.org_unit_descendants(?, ?)
2. inlining evergreen.rank_ou(?, ?, ?)
3. extracting depth calculation to separate call
4. switched to plpgsql (which gives me ability to use variables)
5. removed evergreen.rank_ou() and evergreen.rank_cp_status() from
select clause - these are still in WINDOW definition, but they
weren't used in the SELECT, so it's better to remove from there.
6. in passing renamed arguments to avoid name clash (argument depth vs.
field depth)
7. in passing changed usage of $* to access parameters to using named
parameters, for readability.
New function did the same work in ~ 18ms.
EDIT: Convert to SQL, keeping all of the improvements from depesz
EDIT2: Added Signed-off-by line for depesz, see http://markmail.org/message/rv4vaarwixeswqgu
Signed-off-by: Hubert depesz Lubaczewski <depesz@depesz.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Fri, 9 May 2014 18:32:14 +0000 (14:32 -0400)]
LP#1254918 limit ACQ batch update fund retrieval by perms
In the ACQ batch update bar along the top of the PO page, limit the
number of funds which require permission checks on the server by
limiting the fund search to those at org units where the requesting user
has the CREATE_PURCHSE_ORDER or MANAGE_FUND permissions.
In other words, if a user only has create-po perms at Branch 1, we can
specifically request funds at that branch (or below) for display so that
the server (PCRUD) does not have to inspect unrelated funds for
permissibility. This speeds up fund retrieval.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Previous to this commit, permissions in Evergreen check a cominbation
of:
* user-object permissions (does the user have a direct permission
mapping to the object in question)
* user-context permissions (does the user have the permission at the
object's context location, whose field is defined in the IDL)
* user-global permission (lacking a context location, does the user
have the permission globally (at the top of the org tree) and therefore
can apply the action to all objects of this typ)
In practice, there are almost no user-object permissions. When retrieving
just on object from the database, the cost of this check is negligable to
the point that we can completely ignore it. However, when retrieving a
large set of objects, such as the list of all funds in a large, consortial
environment, the cost to check the user-object permission adds up to a
noticable amount of time.
To address this, we add a new construct to the IDL instructing the PCRUD
infrastructure to skip user-object permission checking in those cases where
the design and use of the system makes user-specific object permissions
needless or superfluous. This is embodied in a new XML attribute on the
<pcrud> element: ignore_object_perms. When set to "true", pcrud will skip
all user-object permission checks, resulting in faster time-to-first-result.
Additionally, we add a new "owning_user" attribute on the <action> element
of the <pcrud> section. This new attribute specifies the field containing
the actor.usr.id of the user that "owns" the object. This allows PCRUD to
test ownership of an object directly, and if the requesting user and owning
user are the same, the action is allowed.
Finaly, when "global_required" is "true" for the permission check, and there
is no "owning_user" attribute defined for the class in the IDL, we skip the
above-mentioned user-object permission check. When "global_required" is
"false" or there is an "owning_user" attribute, we check for user permissions.
In all cases, the "ignore_object_perms" attribute is honored, and in its
presence we skip non-owner user-object permissions.
The net result is an immediate increase in speed for retrieval of objects
in the presence of the "global_required" attribute, and a mechanism to
increase the speed of specific cases of context-aware retrival by the use
of "ignore_object_perms".
We use this new mechanism to speed the retrieval of fund objects in the
ACQ interfaces that draw available-fund dropdowns.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Thu, 26 Jun 2014 14:35:38 +0000 (10:35 -0400)]
LP#1334693 ./configure avoid osrf_config without core
Avoid the check for and use of osrf_config during Evergreen ./configure
when run with --disable-core. This allows the staff client to be built
and, in general, for make_release to be run on a machine that does not
have opensrf installed (or has multiple versions).
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
We use the "offers" property to link the Product to the Offer, so there
is no reason to use a reciprocal "itemOffered" property to link back to
the Product from the Offer. The circular reference confuses some tools
(http://rdfa.info/play) and may complicate general processing, so let's
simply remove it.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
As our record details page lists each copy as a separate Offer (well, in
many cases anyway, unless paging gets invoked), the AggregateOffer
entity is not really necessary--and using it on the same page as
separate Offer entities is not recommended by at least one search engine
(per Google https://support.google.com/webmasters/answer/146750?hl=en
says a given page should include "_one_ of the following: Offer or
Offer-aggregate").
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Following the requirements at sitemaps.org, generate a
set of sitemaps that reflect the bib record's last edit
date, with 50,000 records per sitemap file.
Users can run this script targeting different libraries
and generating different output filenames using the
documented options in the script.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Remove an unused line of code in the hold targeter which was preventing
targeting of pre-cat copies.
In OpenILS::Utils::PermitHold::permit_copy_hold, neither in-db nor
script based hold viability checks inspect the value of the
"title_descriptor" field in the provided params. Remove this field and
pre-cats just work.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Fri, 11 Apr 2014 18:09:35 +0000 (14:09 -0400)]
LP#1306753: Only look at holds that expire before 'today'
We should not count today when generating the hold expiration list.
So, we'll look for holds that expire before 'today' instead of those
that expire before 'now'.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Victoria Lewis [Wed, 7 May 2014 20:10:19 +0000 (13:10 -0700)]
LP#1316814: Change potentially incorrect information display in hold_status.tt2
Removed word "circulating" from patron hold status message regarding the number of copies of the material.
Some copies may be ON ORDER and therefore not circulating.
Signed-off-by: Victoria Lewis <vcamklewis@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Fri, 6 Jun 2014 16:35:59 +0000 (12:35 -0400)]
LP#1327284 Display Imported As column in vandelay queue
For Bib and Authority records which have been imported / merged /
overlayed, etc. into the system via Vandelay, show the record ID of the
catalog bib/auth record to which the record was imported.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Yamil Suarez <yamil@yamil.com> Signed-off-by: Ben Shum <bshum@biblio.org>
The JSPAC bookbag feature was renamed to "Lists" in TPAC, but several
references still exist to "bookbag", "book bag", "Book Bag", etc. in the
public and staff interfaces. This commit attempts to provide simple and
clear replacements for the old term. In some cases "list" seems best,
but where the context is uncertain "book list" is used to err on the
side of clarity. Some of these changes may be in old code that is no
longer used.
This commit also includes two minor wording changes - one to fix grammar,
and the second to update instructions for sharing a list.
Signed-off-by: Remington Steed <rjs7@calvin.edu> Signed-off-by: Ben Shum <bshum@biblio.org>
Chris Sharp [Sat, 31 May 2014 20:25:29 +0000 (16:25 -0400)]
LP#1315531 Adding further changes to the server install docs for Ubuntu 14.04:
- adding apache configuration instructions that adjust for the new
mpm_prefork module in Apache 2.4 on 14.04
- adding new standalone database dependency installation instructions
that rely on OS packages rather than CPAN where possible
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Chris Sharp [Thu, 29 May 2014 19:49:38 +0000 (15:49 -0400)]
LP#1315531 Change default location of libdbi libraries.
In libdbi 0.8.4, the default installed location has changed to
/usr/lib/x86_64-linux-gnu/dbd/. On the advice of Thomas Berezansky,
I made the new location the default and ensured that the previous
locations are in the fallback.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <bshum@biblio.org>
This commit adds a note (with examples) about upgrading the database schema
across major versions. It also reformats a long line into multiple lines,
changes a NOTE to a TIP, makes a small correction, and replaces a repetitive
command with a short explanation.
Documentation: Update upgrade instruction for 2.6.1
- Update location references for 2.6.1.
- Update database updates to include 2.6.1 update.
- Add a note regarding reingesting bib records after updates.
Signed-off-by: Robert Soulliere <robert.soulliere@mohawkcollege.ca>
Remington Steed [Fri, 6 Jun 2014 15:59:58 +0000 (11:59 -0400)]
LP#968514: Revive bib/auth importing docs from 2.1, add intro
This commit revives the following sections from the 2.1 version of the docs
and updates them for 2.6:
- marc_export: Exporting Bibliographic Records into MARC files
- includes new options for 2.6
- Importing Authority Records from Command Line
- Importing Authority Records from the Staff Client
The first two are included in a new section called "Support Scripts"
within the "Developer Resources" section, with a new intro and summary
of other commonly used scripts provided with Evergreen. The third section
is moved inside the Cataloging chapter "Batch Importing MARC Records",
with slight modifications to the intro to that chapter.
Yamil Suarez [Mon, 30 Jun 2014 21:55:46 +0000 (17:55 -0400)]
Documentation: Added 'Using the OPAC' documentation & OPAC WCAG support mention
Older DocBook content that covered how to do searches on the OPAC was updated
to use Asciidoc. Also a simple mention of the 2.6 OPAC WCAG support was added.