miker [Thu, 10 Jun 2010 19:15:13 +0000 (19:15 +0000)]
Trunk port of a patch from James Fournie of SITKA:
There was some discussion about problems with holds fulfillment at the
holds roundtable at EG2010. I am pleased to share this patch with the
community which has been thoroughly tested by the folks at
Thompson-Nicola Regional District Library. (thanks guys!)
Background:
Evergreen's default out-of-the-box behaviour for holds fulfillment is
a gas-saving method. Holds are fulfilled by proximity. In a
multibranch library, holds are fulfilled at the local branch first.
Many libraries, particularly single branch libraries may be ok with
this, but it may be problematic for other libraries.
Imagine a scenario where you have a large central branch and a small
rural branch of the same library system. At the large branch, there
are many copies of Popular New DVD with lots of holds. There are no
copies at the rural branch. Patrons at the small rural branch who
want to pick up Popular New DVD at their home branch may never get
their hold fulfilled because the copies will stay at the large branch
as long as there are holds for pickup there.
This patch adds an org unit setting that changes the opportunistic
check-in so that items checked in will be assigned to holds by request
date first, rather than proximity. This setting can be applied to
any level of the org tree, so in some situations you may even want to
activate FIFO for large libraries, but leave the original setting for
smaller libraries with less traffic who want to keep their copies more
local.
Also credit to Jeff Godin who thought of the same patch and
contributed the setting name "holds FIFO" for the setting
[ NOTE: Implications of mixed FIFO and non-FIFO environments that are
not sufficiently segregated by the use of Hard Boundaries for Holds
present a potenial for user confusion. Beware that mixing FIFO and
non-FIFO settings within a resource-sharing group will likely result in
severe imbalance of hold fulfillment, though further configuration,
development, tuning and testing may be able to mitigate these issues.
--miker ]
erickson [Thu, 10 Jun 2010 18:47:57 +0000 (18:47 +0000)]
updated report param editor to handle join types embedded in the field name. this bug caused sporadic failed rendering of the report editor params widgets
scottmk [Thu, 10 Jun 2010 16:28:50 +0000 (16:28 +0000)]
Change the return type of the open-ils.qstore.prepare method.
Formerly, this method merely returned a string to be used as
token for future references to the query.
Now it returns an object, with the following elements:
"token" -- the query token as returned formerly
"bind_variables" -- a (possibly empty) object containing a
list of bind variables and their various attributes, as
returned by the param_list method.
Rationale: an interactive query-building client will always
want a list of bind variables so that it can prompt the user
for values. With this change to the return type, the client
can get such a list without having to make a separate call
to the param_list method.
senator [Thu, 10 Jun 2010 15:34:34 +0000 (15:34 +0000)]
Hold requests in the middle layer now bubble up more specific information to
the caller in the event of failure.
The caller can find an ilsevent in the response received from calling
open-ils.circ.title_hold.is_possible, and this event will have a fail_part
attribute in its payload that can be mapped either to a) the new entities
in opac.dtd or b) values of the name column of the database table
config.standing_penalty, depending on why a hold request failed.
miker [Thu, 10 Jun 2010 14:53:38 +0000 (14:53 +0000)]
thinko on how ou settings are returned from open-ils.actor.ou_setting.ancestor_default; also, cache max_loops per pickup lib for the duration of the targetting run
scottmk [Thu, 10 Jun 2010 14:35:01 +0000 (14:35 +0000)]
Fix a pcrud bug. Create method wasn't working because we were
foolishly trying to fetch the record that hadn't been created
yet, in order to test its ownership.
miker [Thu, 10 Jun 2010 13:55:47 +0000 (13:55 +0000)]
logic thinko causing us to never use the restricted set of copies for this hold targeting round, and instead use all good copies, when in max_loop mode
atz [Wed, 9 Jun 2010 21:43:59 +0000 (21:43 +0000)]
</link> is not valid HTML
Although the DTD *may* specify xhtml, since in practice we are serving
with Content-Type: text/html and
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
we should avoid tags that are illegal in html.
These errors are reported in chrome as:
"Unmatched </link> encountered. Ignoring tag."
scottmk [Wed, 9 Jun 2010 21:39:12 +0000 (21:39 +0000)]
Rewrote the implementation of the open-ils.qstore.columns method.
The old implementation examined the SELECT clause(s) as encoded
in the query.select_item and query.expression tables. The new
implementation performs a dummy query, and then returns the
field names from the database result.
Advantages of the new implementation:
1. It doesn't get confused by wild cards in the SELECT clause.
2. It provides a field name for every column, including those
which are function calls, subqueries, or other expressions.
(Of course these names may not be very revealing, such as
"?column?".)
Disadvantages:
1. The resulting field names are not qualified by table name.
2. Additional overhead due to the additional database call.
gmc [Wed, 9 Jun 2010 18:41:05 +0000 (18:41 +0000)]
updated license text with current GPL 2.0 text
NOTE: THIS IS NOT A SEMANTICALLY IMPORTANT CHANGE TO EVERGREEN'S LICENSE.
Updated LICENSE.txt by pulling the current GPL 2.0 text
directly from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
The changes are purely textual, and consist solely of:
* updating the FSF's mailing address
* changing references to the "GNU Library General Public License"
to "GNU Lesser General Public License", per the FSF's current
(and long-standing) practice
* whitespace changes
miker [Tue, 8 Jun 2010 13:46:33 +0000 (13:46 +0000)]
Patch from Galen Charlton:
[This] patch adds a new XSL transform for indexing purpose that converts MARC21 880 fields (which are used for alternate graphic representations, i.e., vernacular representations of foreign language strings) to the base tags.
For example, if a MARC record for a Chinese book has
245.00 $6 880-01 $a Ba shi san nian duan pian xiao shuo xuan
880.00 $6 245-01/$1 $a\u516b\u5341\u4e09\u5e74\u77ed\u7bc7\u5c0f\u8aaa\u9078
this stylesheet will transform it to the equivalent of
245.00 $6 880-01 $a Ba shi san nian duan pian xiao shuo xuan
245.00 $6 245-01/$1 $a\u516b\u5341\u4e09\u5e74\u77ed\u7bc7\u5c0f\u8aaa\u9078
This allows an indexing XPath like //marc:datafield[@tag='245']/marc:subfield[@code='a'] to bring in both the vernacular and transliterated versions of the 245$a.
[ED: pretend the \u-encoded unicode are real characters ... curse you, Chrome, for not giving me the raw string!]
scottmk [Mon, 7 Jun 2010 19:31:05 +0000 (19:31 +0000)]
Add the left_operand column to the query.expr_xbet view
(correcting an oversight).
M Open-ILS/src/sql/Pg/002.schema.config.sql
M Open-ILS/src/sql/Pg/008.schema.query.sql
A Open-ILS/src/sql/Pg/upgrade/0298.schema.xbet-left-operand.sql
M Open-ILS/examples/fm_IDL.xml
scottmk [Mon, 7 Jun 2010 18:41:21 +0000 (18:41 +0000)]
1. Add table: serial.caption_and_pattern
2. In serial.record entry: make "marc" row nullable.
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0297.schema.serial-caption-and-pattern.sql
M Open-ILS/src/sql/Pg/210.schema.serials.sql
M Open-ILS/examples/fm_IDL.xml
miker [Mon, 7 Jun 2010 16:53:55 +0000 (16:53 +0000)]
Patch from Galen Charlton:
Fix glitch in definition of the new default identifier indexes that would cause bib ingest to fail. Note that this affected only newly-created databases; the upgrade script for 0265 is correct.
erickson [Mon, 7 Jun 2010 16:10:48 +0000 (16:10 +0000)]
Patch from Galen Charlton: The attached patch adds triggers on biblio.record_entry and authority.record_entry to prevent the insertion or update of MARCXML that is not well-formed. Since the various consumers of bre.marc and are.marc tend not to handle invalid XML all that well, these triggers serve as a (very basic) data integrity check. http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-June/006116.html
scottmk [Mon, 7 Jun 2010 13:52:29 +0000 (13:52 +0000)]
Added a new login type "persist", as a peer of "opac", "staff", and "temp".
It is intended for sessions that may stay open for days or weeks at a time
even in the absence of activity. The default timeout interval is defined
as two weeks in opensrf.xml, and may be overridden by the org unit
setting "auth.persistent_login_interval".
Timeout resets work a little differently for persistent logins. They
have no effect unless the session is within ten minutes of expiring. When
they do take effect, they reset the timeout to ten minutes, rather than to
the full length of the original timeout. That way we can avoid rudely
interrupting an active session without extending it excessively.
The ten minute reset interval for persistent timeouts is currently
hard-coded. With some further work it could be made configurable.
The timeout resets for the older login types still work the way they
always have.
------------
In order to make it easier to specify long timeout intervals, the
auth server now accepts PostgreSQL-style interval strings, such as
"15 minutes" or "2 weeks". Such strings work for any of the login
types, and they work either in opensrf.xml or in the org unit setting
values.
If the timeout setting (in either context) is all digits, then it will
be interpreted as an integral number of seconds, as it has been in the
past. So existing settings will almost certainly continue to work
without change.
The exception -- an unlikely one -- is if the existing setting carries
a leading plus sign. Under the old regime, a leading plus sign was
simply superfluous, and had no effect. With the new version, a
leading plus sign means that the following number is to be treated as
a number of hours, rather than a number of seconds (just because
that's what PostgreSQL does with it).
Hence in the unlikely event that existing settings use a leading
plus sign, this change will make those timeouts 3600 times as long
as they should be.
If the timeout interval is expressed as anything other than a string
of all digits (possibly with leading and/or trailing white space), we
make a database call to get PostgreSQL to interpret it for us. So the
convenience of using interval strings comes at the price of some
additional overhead.
--------------
Besides applying the changes to the C code, it will be necessary to
update the opensrf.xml file in order to define a default timeout
interval for the new login type.
M Open-ILS/include/openils/oils_constants.h
M Open-ILS/src/c-apps/oils_auth.c
M Open-ILS/examples/opensrf.xml.example
dbs [Mon, 7 Jun 2010 06:19:33 +0000 (06:19 +0000)]
Update a complete set of PO files in trunk
For all languages that have submitted any significant amount of translation,
commit PO files for every available POT or PO file (including our many new Dojo
I18N resource bundles)
dbs [Mon, 7 Jun 2010 05:45:26 +0000 (05:45 +0000)]
Make booking reservation Dojo NLS file JSON-compliant
You can't use string concatentation based on the plurality of arguments
to create a translatable string. Solution: create a singular and a plural
version of the string, and use the logic in the program itself to pass in
the substitution variable to the correct respective string.
dbs [Mon, 7 Jun 2010 05:36:47 +0000 (05:36 +0000)]
More cleanup of Dojo JSON files
* Double-quote all strings - no single-quoting or barewords
* Don't escape dollar signs
* JSON doesn't allow expressions like string continuations ("" + "")
reservations.js has some remaining issues, looks like functions were
defined for what should be simple string substitutions. dojo.string.substitute()
will solve this problem, I believe, with ${0}, ${1}, etc tokens for substitution
dbs [Mon, 7 Jun 2010 03:48:07 +0000 (03:48 +0000)]
Commit updates from Launchpad translation
Bringing all of the translated files up to date with what is in Launchpad.
Next steps: generate all of the updates from trunk and add all the new files
erickson [Fri, 4 Jun 2010 20:53:27 +0000 (20:53 +0000)]
Bugfixes: undef handling and legacy script support setting.
The legacy setting was a major bug. It was not possible to disable legacy scripts
except by *removing* the setting. That is, if you set it to 'false',
we failed to interpret that here in SIP to mean FALSE. Instead we
looked at it as a non-zero-length string and therefore TRUE!
This patch also prevents warnings from unitialized values (undef concatenation), like:
Use of uninitialized value in concatenation (.) or string at /openils/lib/perl5/OpenILS/SIP/Patron.pm line 110.
Added a little formatting and whitespace cleanup to address display along w/ undef handling.
erickson [Fri, 4 Jun 2010 20:53:25 +0000 (20:53 +0000)]
Checkin overhual for extensions, including item, patron and checkin underpinnings.
Extensions fields added to AUTOLOADable content.
Also fix checkin logic to check for NO_CHANGE and SUCCESS at necessary moments.
Update new code to match berick's #16544.
Add AUTOLOAD to Item and provide a slot to store the raw EG hold object.
Store the hold data down on the item (not the Checkin transaction level).
Allow SIP Patron lookup by usr ID (not barcode).
This is important because we need supplemental data when we find holds info at checkin.
The change is backwards compatible (w/ just 1 arg it will still be treated as a barcode).
Propagate $inst_id down into checkout core, needed for hold routing logic.
Remove old accessor methods, also make some of the settings checks more flexible w/ regex.
This adds code for enable, still experimental. It also adds the
client's block message to the patron alert, bracketed by <sip> tags.
The tags are necessary because enable has to be able to regexp out
the block alert message (including user-specified variable text).
Remove unused vars.
Whitespace cleanup and extra feedback data.
Return object on failure, not just 0
Signed-off-by: Joe Atzberger <atz@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16598 dcc99617-32d9-48b4-a31d-7c20da2025e4
erickson [Fri, 4 Jun 2010 20:53:23 +0000 (20:53 +0000)]
Lots of cleanup, logging improvements, and comments.
One arrayref accessor updated to recommended style
Removed unused dependency.
Removed never-possible return statement.
Trying to use an arrayref in the log message results in a string like "ARRAY(0x2541870)".
I added a prebuilt string representation of the array for use in those messages.
More whitespace cleanup.
More flexible to_bool, extra comments;
Also added institution_id method.
Note: OpenILS::Event->new returns a hash, not a true object.
script_x_check.sh is executable.
Irony: this script could have been used to detect itself.
Typo in Cronscript POD.
Signed-off-by: Joe Atzberger <atz@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16597 dcc99617-32d9-48b4-a31d-7c20da2025e4
scottmk [Fri, 4 Jun 2010 19:00:55 +0000 (19:00 +0000)]
Add two little utility functions to convert from intervals to seconds.
M Open-ILS/src/sql/Pg/999.functions.global.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0293.function.interval-to-seconds.sql
dbs [Fri, 4 Jun 2010 03:54:14 +0000 (03:54 +0000)]
Improve circ transaction performance by indexing NULL circs (Launchpad 587031)
Creating a unique index on target_copy in the action.circulation table where
the checkin_time is NULL will increase the speed of circ transactions,
particularly on systems with a lot of traffic. The uniqueness also
ensures that a given item will not be able to be checked out multiple times
concurrently.
Thanks to James Fournie from BC Sitka for suggesting the index in Launchpad
bug 587031!
dbs [Fri, 4 Jun 2010 03:29:03 +0000 (03:29 +0000)]
Improve database performance for partial indexes on boolean columns (bug 587028 in Launchpad)
PostgreSQL 8.3/8.4 treats "IS FALSE" and "= FALSE" expressions differently,
which can have a significant impact on database performance if an index is
created with one and a query uses the other. This patch addresses all existing
partial indexes on boolean columns to enable the query planner to use an index
scan whether the query uses either expression.
Thanks to James Fournie of BC Sitka for noticing the problem with the index
on asset.copy and opening bug 587028 in Launchpad with the suggested fix!
scottmk [Thu, 3 Jun 2010 20:02:39 +0000 (20:02 +0000)]
Various tweaks:
1. When resetting the timeout for a session: if the session object
carries an endtime, and the expiration time is within a designated
interval, extend the expiration time a bit instead of reapplying the
entire original timeout from the current time.
This feature is unreachable at the moment because it is designed for
persistent sessions, which aren't otherwise implemented yet. The
purpose is to avoid rudely terminating an active session, but without
extending it too much.
2. Whenever possible, use integral types instead of doubles.
3. Instead of calling osrfCacheSetExpire(), call osrfCachePutObject()
directly, which does the same thing with less overhead.
4. Tinkered with white space and comments here and there.
erickson [Thu, 3 Jun 2010 19:56:53 +0000 (19:56 +0000)]
implemented a simple mechanism to allow for linking to record detail pages by ISBN. If no record ID is present in the URL and the URL has a search type of isbn and an isbn value, do an ISBN lookup and display the first record we get back from the search.
dbs [Thu, 3 Jun 2010 02:52:10 +0000 (02:52 +0000)]
password reset URI needs a trailing slash, and this enables the aupr entry to be created, but:
* Server is now returning a 500 instead of 200, which causes an error dialogue
to be displayed instead of "success!" and JavaScript errors to cascade
* We don't want to hard-code the en-US locale; need to pull that from current locale
scottmk [Wed, 2 Jun 2010 19:24:14 +0000 (19:24 +0000)]
Replace most of the serial schema with a different set of tables. Only
the serial.record_entry table remains unscathed.
In addition: a new table asset.copy_template.
M Open-ILS/src/sql/Pg/002.schema.config.sql
M Open-ILS/src/sql/Pg/040.schema.asset.sql
A Open-ILS/src/sql/Pg/upgrade/0288.schema.serial-overhaul.sql
M Open-ILS/src/sql/Pg/210.schema.serials.sql
M Open-ILS/examples/fm_IDL.xml
miker [Wed, 2 Jun 2010 14:38:58 +0000 (14:38 +0000)]
get rid of search.staged_fts() and supporting functions -- entirely replaced by search.query_parser_fts(); deprecating only, no upgrade script required
senator [Tue, 1 Jun 2010 20:35:21 +0000 (20:35 +0000)]
Move credit card processing ML code into the circ module, removing API method
for direct payment processing. (Using open-ils.circ.money.payment with auth
can invoke CC processing).