senator [Wed, 19 Jan 2011 21:53:32 +0000 (21:53 +0000)]
Backport r19214 from trunk
Booking: Robert Soulliere spotted and fixed a bug in processing reservation-
related overdue fines. See https://bugs.launchpad.net/evergreen/+bug/705061
miker [Wed, 19 Jan 2011 19:52:12 +0000 (19:52 +0000)]
Build and flatten a tree, correcting a sorting issue in some OU dropdowns.
The previous code assumed that work org units would be delivered in hierarchical order, but alas, they are not. Thus, we build the hierarchy and then flatten it, sorting at each level. This will be non-fast with many work OUs, but the common case is a small set, which is not painful.
Further improvement is warranted when the above proves false.
This version of the algorithm is more general -- for example,
all combining characters are removed -- so there should be
fewer fiddly edge cases to worry about for most European
languages.
Rebuilding the metabib.*_field_entry tables (e.g., by using
reingest-1.6-2.0.pl) is recommended if there are any bibs that contain
any non-ASCII characters.
Normalized text is now left in the NFKD form, so while this should
be transparent to the search system after reindexing, it does mean
that (for example) Korean text in metabib.*_field_entry may not
be in the same Unicode normalization form as that found in
biblio.record_entry.
Also includes fix for bug #684467: more bulletproofing of naco_normalize
dbs [Wed, 19 Jan 2011 15:13:24 +0000 (15:13 +0000)]
Avoid escaping issues in authority.normalize_heading() by parameterizing the query
Long story short: MARC subfield values containing backslashes caused noise
and in some cases painful errors. Using spi_prepare/spi_exec_query is the
safest way of handling escaping, rather than adding more regexes and munging
the data before it even gets to naco_normalize().
Most painful case was <subfield code="a">Foo, Bar\</subfield> - the trailing
slash ended up escaping the enclosing single quote (because PostgreSQL isn't
configured by default with strict conformance to SQL escaping rules yet) and
threw an error.
dbwells [Sat, 15 Jan 2011 04:05:40 +0000 (04:05 +0000)]
Postpone advanced serial call-number handling until after 2.0
Sharing of a single call-number for multiple volumes, while well intentioned, was not ready for primetime for various reasons. This commit:
1) harmonizes and unifies call-number handling in Serial.pm, sticking with current practices
2) adds a very basic and now necessary prompt to the Serial Control view
dbs [Fri, 14 Jan 2011 03:00:51 +0000 (03:00 +0000)]
Enable truncation attribute in Z39.50 queries to be left out entirely
Per https://bugs.launchpad.net/evergreen/+bug/702695, some Z39.50
servers hate the truncation attribute (@attr 5=anything) and always
return 0 hits.
This gives you the ability to specify a negative value for the
truncation attribute and thereby prevent the truncation attribute
from being included in the Z39.50 query for a given server.
gmc [Wed, 12 Jan 2011 20:52:42 +0000 (20:52 +0000)]
AutoFieldWidget no longer uses CurrencyTextBox dijit
NumberTextBox used instead to work around problem with
CurrencyTextBox's support for negative monetary amounts
in Dojo 1.3. See https://bugs.launchpad.net/evergreen/+bug/702117
erickson [Mon, 10 Jan 2011 16:29:27 +0000 (16:29 +0000)]
avoid fetching user settings for new user registration; the result of fetching settings with a null user id is that settings of the staff/editor were fetched instead, leading to settings that appeared to selected, but were not saved during submit
dbs [Mon, 10 Jan 2011 03:47:37 +0000 (03:47 +0000)]
Clean up c-apps Makefile.am and make everything load cleanly again
Executable programs don't have library versions, so don't set -version-info
for them.
Add -version-info to liboils_idl and liboils_util, and link liboils_util
explicitly against liboils_idl rather than relying on AM_LDFLAGS.
Set the linking dependencies correctly; if a library links against
liboils_util, set that as the sole link dependency; no need for liboils_idl
once (let alone twice!)
dbs [Mon, 10 Jan 2011 03:47:07 +0000 (03:47 +0000)]
Set explicit library versioning for Evergreen 2.0 to 2:0:0
This should help for anything linking to core Evergreen libraries;
as we revise the -version-info number, anything that links against
the core Evergreen libraries will quickly scream if we rev the
interface number without specifying via the age number that previous
interfaces are still supported. Let's remember to revise it
accordingly!
senator [Fri, 7 Jan 2011 23:06:10 +0000 (23:06 +0000)]
Backport r19137 from trunk
Make openils.PermaCrud.Store use a default order_by clause in common situations
This avoids an issue where, using a FilteringSelect dijit, sometimes you type a
couple letters, let's says "ABC", and you get a set of matches like this:
"ABCDE"
"ABCD"
"ABC"
just because there happens to be no specific ordering. If you click the ABC
match and tab away too quickly, the dijit will reset itself to the first match,
"ABCDE". This is probably a Dojo/Dijit bug, as I've been able to duplicate the
problem with other stores, but that's all murky.
This avoids the issue by making sure the shortest match is at the top of the
list.
senator [Fri, 7 Jan 2011 20:06:18 +0000 (20:06 +0000)]
Backport r19134 from trunk
Acq: fix prorating bug
When prorating, the system decides what funds to target by looking at what
funds have already been spent against. Previously, the system only looked at
acqie objects, but an invoice can also be composed of acqii objects.
erickson [Wed, 5 Jan 2011 14:48:13 +0000 (14:48 +0000)]
roll back xact in set_item_lost when copy is alrady marked lost and we exit the sub; if caller passes an event to editor->die_event, capture it as the editor's last event
Signed-off-by: Bill Erickson <berick@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19124 dcc99617-32d9-48b4-a31d-7c20da2025e4
dbs [Wed, 5 Jan 2011 04:26:02 +0000 (04:26 +0000)]
Finish adding authority.js to i18n Makefile
Forgot to add some crucial bits in the extensive copy and paste
effort that's required to add another file to the i18n build.
Sigh. Rewrites welcome! And sorry for leaving this trap for
you to fall into, miker.
dbs [Tue, 4 Jan 2011 19:23:20 +0000 (19:23 +0000)]
Clean up marc_export and teach it how to export (all) authority records
The new "--type" parameter enables users to specify "authority"
and have the expected result.
Add an "--all" option to marc_export and silence some warnings
Rather than forcing users to generate a set of record IDs using a
separate process, the --all option enables to to export all records
of the specified type. Note that the approach is basic: grab the
record with the highest ID, then start at ID 0 and count up by 1
while trying to retrieve each record along the way. While this will
undoubtedly generate plenty of warnings for deleted records or gaps
in the ID sequences, the alternative of retrieving an ID list for
potentially millions of records in large Evergreen instances wasn't
appealing.
Some other refactoring and fixes:
Three large chunks of code were factored out into subroutines to
make it a little easier to read the main flow of the code.
As we explicitly call uc() on the $format input parameter
to begin with, we don't have to call it subsequently.
If a requested ID did not exist in the database, then
the script would die; now we trap and flag that error but
continue to fulfill subsequent requests.
The --money parameter is now documented in the help, and
the help has a brief overview that describes (poorly) the
expected format for the list of IDs.
An uninitialized variable error when exporting BRE format
records was squashed.
Also, $count{did} and $count{bib} resulted in uninitialized variable
warnings if no records were actually exported, so initialize them to 0.
dbs [Tue, 4 Jan 2011 19:08:27 +0000 (19:08 +0000)]
Internationalize the JavaScript portion of the "Manage Authorities" interface
We can use the dojo i18n infrastructure to support translations of the
"Manage Authorities" interface, but unfortunately we still don't have
a TT2 solution for i18n. Still, better to do what we can.
dbs [Tue, 4 Jan 2011 19:07:43 +0000 (19:07 +0000)]
Improve see from / see also handling in MARC editor authority menu
(Backporting r19091 and r19092 from trunk)
The 2.0-style authorities use a browse menu that currently consists
of matches against the 1XX entries, which makes working with see from /
see also entries rather difficult. To prepare for an authority browse
method that does surface matches against 4xx and 5xx entries, we will
now display the 4xx and 5xx entries for a given authority record
immediately below the 1xx entry in the browse menu, with the entry
text italicized, aligned to the right, and prefixed with "See also" or
"See from" appropriately. This won't provide a perfect alphabetized
solution - we won't know which field provided the alphabetical browse
match, so the best we can do is present the 1xx in the main browse
menu and the 4xx / 5xx below - but it will provide access to the other
references.
We now display the 4xx fields in the authority summary / selector menu
along with the 5xx fields. As part of making the 4xx and 5xx fields
first-class entries in the context menu, 5xx subfields are no longer
appended to their 1xx field menu entry with a "/" in the context menu.
$0 subfields are no longer added to the 4xx and 5xx fields from the
authority summary / selector menu; if a user had selected a 5xx and the
$0 that had been added by the menu, the field would have incorrectly been
linked to the 1xx authority record. To link to a 5xx entry, for now the
workaround is for the user to select the 5xx subfield(s), "Apply Selected",
then right-click on the new subfield to generate a new authority context menu.
To improve the 5xx handling, we need to make the "See also" entry fire a new
authority context menu based on the 5xx contents so that the actual 1xx
authority record can be inserted and linked against.
Consider an authority record containing the following fields:
150 $a Infants
450 $a Babies
550 $a Children
The ASCII-ized authority context menu will now display:
Infants ->
See from: Babies ->
See also: Children ->
The submenu in each case will currently lead to the authority record
for "Infants". If we teach the underlying authority browse and startswith
methods to return matches based on 4xx and 5xx fields instead of just 1xx
fields, then the menu triggered by a right-click on "Childs" might look
like:
Chickens ->
Infants ->
See from: Babies ->
See also: Children ->
Choking ->
The main entry will be out of alphabetical order, which is not ideal,
but the linkage from the 5xx should at least be evident. (Also, this
suggests that when clicking on a 5xx entry in the authority menu is
changed to launch a new authority menu, it should use the 1xx-only
browse variant to avoid showing the record from which the user was
referred...)
erickson [Tue, 4 Jan 2011 16:30:05 +0000 (16:30 +0000)]
cleaned up vestigal item import API call; repaired some faulty assumptions in vandelay UI regarding which types of import to attempt based on user input
Signed-off-by: Bill Erickson <berick@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19104 dcc99617-32d9-48b4-a31d-7c20da2025e4
senator [Tue, 4 Jan 2011 14:51:21 +0000 (14:51 +0000)]
Acq: backport r19040 and r19094 from trunk
[19040] Acq: support manual claiming as always intended, which to some users
means claiming with no predefined policy
[19094] Acq: Make manual lineitem claiming work better. When a claiming policy
has not been applied, users can now choose claim actions manually (this is what
a claiming policy would have specified).
phasefx [Thu, 30 Dec 2010 18:43:18 +0000 (18:43 +0000)]
Never do money math as anything but pennies I tell you. :-) Three $0.60 transactions run through check-in were showing a running tally of $1.79 instead of $1.80.
phasefx [Thu, 30 Dec 2010 16:31:45 +0000 (16:31 +0000)]
fix a bug with standing penalties and the stop sign page. We still have a race condition where the stop sign page may not show, and this seems to happen when multiple patrons are retrieved at once from a patron search.
dbs [Wed, 29 Dec 2010 04:28:29 +0000 (04:28 +0000)]
Create authority records with meaningful cataloging agency values
Hardcoded values in the 040 are problematic for sites that want
to be a source of authority records; with the addition of another
parameter to the open-ils.cat.authority.record.create_from_bib(.readonly)
API, we can solve that problem. The callers of this API (the MARC editor)
have access to the cat.marc_control_number_identifier OU setting, so as
long as that is set correctly, problem solved.
dbs [Wed, 29 Dec 2010 04:24:40 +0000 (04:24 +0000)]
Invoke MARC editor with the appropriate control number identifier
The control number identifier is most critical for the creation
of authority records; given that the callers have the required
context, have them pass in the control number identifier to the
MARC editor. Edit MARC record, new MARC record, import MARC record;
those have to be the big ones, right?
dbs [Wed, 29 Dec 2010 04:15:33 +0000 (04:15 +0000)]
Towards a more useful authority delete confirmation pane
Rather than simply creating a raw confirm dialogue that only
provides the cataloguer with the ID of the authority record that
is about to be deleted (not an especially useful handle), supply
a confirmation dialogue that recaps how many bibliographic records
are linked to this authority record and also displays the MARC of
the record about to be deleted.
Most authority records appear to be short enough that the MARC
display is not a concern, but if it becomes a problem we can opt
not to show the MARC by default and give the cataloguer the ability
to click a "View MARC" button on the confirmation dialog instead.
Along the way, make some more variables local and remove some
unnecessary workarounds for object IDs.
erickson [Tue, 28 Dec 2010 16:50:12 +0000 (16:50 +0000)]
Update auth-cached user after payment
After payment toward one's own account, reset the cached user object so
that it will contain the latest last_xact_id value. This is necessary
for supporting patron credit card payments in the catalog.
Signed-off-by: Bill Erickson <erickson@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19070 dcc99617-32d9-48b4-a31d-7c20da2025e4
erickson [Tue, 28 Dec 2010 16:50:11 +0000 (16:50 +0000)]
refresh cached user during auth session reset
Add a boolean (1/0) param to open-ils.auth.session.reset_timeout
that forces open-ils.auth to refresh the cached user object. Useful if
a column on actor.usr was updated and the client may be pulling the
object from the cache w/ a page reload, etc.
Signed-off-by: Bill Erickson <erickson@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19069 dcc99617-32d9-48b4-a31d-7c20da2025e4
gmc [Thu, 23 Dec 2010 13:43:36 +0000 (13:43 +0000)]
When the subfield delimiter is configured as "$" (the default), use {dollar} to represent a literal dollar sign. This is apparently in line with other Breaker-format tools. Fix suggested by Galen Charlton, thanks gmc!
gmc [Thu, 23 Dec 2010 13:43:34 +0000 (13:43 +0000)]
addressing two Breaker-format issues: 1) supply an "empty" (space) value for indicators in the internal format if they are left out and 2) add indicator placeholders to incoming Breaker datafield lines if they seem to be missing. Addresses https://bugs.launchpad.net/evergreen/+bug/693468
dbs [Tue, 21 Dec 2010 20:52:35 +0000 (20:52 +0000)]
Add line feeds to the output of org_tree_proximity.pl
When another routine was appended to autogen.sh, the output
was appended to the result string returned from org_tree_proximity.pl;
adding a linefeed cleans that up.
dbs [Tue, 21 Dec 2010 20:23:39 +0000 (20:23 +0000)]
Propagate merged authority record change to bibliographic record
Launchpad bug 688015 reported that the merge of authority records
resulted in the control number identifier in a controlled field
in a bibliographic record changing to the right value, but the
value of the field itself wasn't being changed.
The problem turned out to be a confusion of the "source" and
"target" values in the authority.merge_record() function. Once
that was straightened out, the merge updated the controlled
field as expected.
dbs [Mon, 20 Dec 2010 04:42:57 +0000 (04:42 +0000)]
Add an "Apply full authority" option to the MARC editor
By definition, the only subfields that should be applied from an
authority record to a bibliographic record are the complete set
from the 1XX field of the authority record. So, rather than forcing
the user to select the correct subfields from the chosen authority
record, give them this handy shortcut to do the right thing.
dbs [Mon, 20 Dec 2010 02:21:32 +0000 (02:21 +0000)]
Display the tag of the displayed authority record in MARC Editor context
We currently display both 1xx and 5xx fields in the authority record,
but do not display the tag. This can lead to some confusion when a 5xx
field is actually present. Ergo, show the tag to disambiguate the fields
in the authority browse selection interface.
dbs [Mon, 20 Dec 2010 02:21:04 +0000 (02:21 +0000)]
Provide starting context for authority browse in MARC Editor context menu
Using the browse interface instead of startwith provides a first page
of results that shows some of the authority entries that precede the
first alphabetical match for the chosen term. Context is good.
senator [Fri, 17 Dec 2010 19:27:31 +0000 (19:27 +0000)]
Backport r19013 from trunk
Thanks to Sally Fortin for drawing attention to this bug, wherein new
Holding Subfields can't be created in this interface via the staff client.
Acq: Tracked down a small but subtle bug with the Holding Subfield tab of
the Provider editor interface.
We apparently have a global variable "name" defined somewhere which, when
assigned in place of an overrideWidget for an AutoGrid thanks to some vestigial
code, ultimately causes an error from within AutoFieldWidget, if you're using
the staff client. That's because name is the string "browser_browser" in the
staff client, but if you access this interface from Firefox, name is apparently
set to some value that evaluates to false in a boolean context, because
AutoFieldWidget doesn't choke on it (the comparison at line 182 of that file
will return false).
dbs [Fri, 17 Dec 2010 15:19:12 +0000 (15:19 +0000)]
Do an equality test, instead of assigning a value
Thanks to Bill Erickson for catching this; this fixes a bug where
SuperCat requests would end up returning authority records instead of
bibliographic records.
senator [Thu, 16 Dec 2010 18:40:42 +0000 (18:40 +0000)]
Backport r18852, r19005 from trunk
[18852] Serials: make some IDL changes and some changes to field order in an
AutoGrid to support easier creation of working copy templates with serials.
[19005] Serials: the circ_lib field on a copy template has no meaning in the
only context where these copy templates are used, which is serials. Any
copy-like objects that are created in serials have their circ_lib determined
by distribution.holding_lib
dbs [Wed, 15 Dec 2010 20:24:36 +0000 (20:24 +0000)]
Address the call number browsing performance problem raised in LP 690242
The ORDER BY clause currently generated by call number browsing does not
have a sufficient index to use to assist the sorting of the returned rows,
and consequently does a sequential scan of the asset.call_number table.
Which, as you can imagine, is not fast for a system with more than a few
thousand call numbers.
This adds an index specifically to enable the query to go back to an
index scan instead of a sequential scan. We can investigate whether other
indexes should be removed to enable efficient data loading once we've
squashed the sequential scan problem.
miker [Wed, 15 Dec 2010 17:12:13 +0000 (17:12 +0000)]
Two bug fixes: 1) only allow one fine generator call per circulation during a given transaction; 2) require that a circulation be open, based on the xact_finish field, in order to be the parent of a renewal (I suspect this used to depend on the open-circ view)
miker [Fri, 10 Dec 2010 17:22:15 +0000 (17:22 +0000)]
Patch from James Fournie to address https://bugs.launchpad.net/evergreen/+bug/622908 wherein we learn that related item physical description might be used as the main PD of the main item, if the main item lacks such a field in the MARC
miker [Fri, 10 Dec 2010 16:03:49 +0000 (16:03 +0000)]
Provide a mechanism to load any random JS file via dojo.require()-ish syntax.
Why would we want to do such a thing, you might ask?
Well, the short answer is that Firefox hates pages that have more than one script block (inline is worse than tag) that contains pre-onLoad XHR. So, this allows us to pull the actual loading of JS from the same domain as the page into an inline block. This allows us to eliminate the WSOD on FF by pulling all (dangerous) JS into a single, final inline block, after which we don't care if the DOMContentLoaded event fires -- that's when it should fire, structurally -- but in FF it may fire for a different reason (bug) than it should (fell of the end of the page in the rendering engine).
miker [Fri, 10 Dec 2010 14:27:37 +0000 (14:27 +0000)]
Backporting r18957 from trunk:
Fix two bugs:
* Wide Character warning in authority.generate_overlay_template due to the generated template not being UTF-8 encoded internally
* Correctly test the same space-normalization form of the pre- and post-strip records during the application of a replace rule in vandelay.replace_field
This addresses https://bugs.launchpad.net/evergreen/+bug/687996 for 2.0beta5
senator [Tue, 7 Dec 2010 22:43:55 +0000 (22:43 +0000)]
Backport r18931 from trunk
Serials: When the fully compressed serial holdings are active in the OPAC,
you get this "issues held" display with an expand/compress toggle that will
either show you individual holdings (and allow you to place holds on them)
or compressed holdings statements.
The functionality existed in trunk before this commit, but this cleans it up
and makes it better. It's more consistent with the the result detail table,
it doesn't offer you the change to place holds on issues that don't have
units (copy-equivalent objects), etc etc.