dbs [Tue, 25 Jan 2011 06:16:45 +0000 (06:16 +0000)]
Teach the i18n Makefile how to handle serial.properties
Also check in the POT for serial.properties and some other
foobar.label matches for foobar.accesskey (does not have
an effect on properties files but hopefully if we're
consistent then the pattern will be evident for entities).
Noting in passing that there are a number of "foobar(s)"
comined singular/plural labels that should be split to
support translation.
dbs [Tue, 25 Jan 2011 03:13:38 +0000 (03:13 +0000)]
Fix existing serial entities that didn't provide .label partners for .accesskey
The translate-toolkit project generates a POT file from an input DTD
that requires entities ending in .accesskey to have a corresponding
.label entity; this is a Mozilla convention for localization. Fix up
the serial interface strings that are localized to match this expectation.
Also remove two duplicate entities in lang.dtd that were flagged by
the build/i18n/tests/check_entities.py script (and which cause Launchpad
translation imports to break).
dbs [Mon, 24 Jan 2011 21:22:06 +0000 (21:22 +0000)]
i18n support for a few OPAC strings
Enable translation of the "More copies listed in full record details"
message for the search results library / call number / item /status
lines
Also provide translation support for the hold queue status message,
including singular / plural variants (most languages do not provide
the equivalent of the "item(s)" idiom in English).
Instead of burying the display of hold queue status with a hard
coded "if (false)" test, turn it into a top-level variable for
a bit more exposure.
dbs [Fri, 21 Jan 2011 15:51:45 +0000 (15:51 +0000)]
Part 3 of a more secure default set up
With this commit, the hardcoded default barcode is replaced by an
MD5 hash of a random string of numbers, preventing the barcode from
being used as a known login name in the OPAC interface (which would
remove one of the factors required in a brute forcing of the account
credentials).
You probably don't want to change the barcode for the admin user,
but if you feel the need you can use the usual patron editor in
the staff client.
Thanks to Thomas Berezansky for suggesting this additional change.
dbs [Fri, 21 Jan 2011 15:50:55 +0000 (15:50 +0000)]
Part 2 of creating a more secure default setup
With this commit, the user name and password for the administrative
user will be MD5 hashes of a random string of numbers. You can set
the user name and password to your liking using the --admin-user and
--admin-pass switches for eg_db_config.pl (this will be the
documented method in the install docs) or via straight SQL as:
UPDATE actor.usr SET usrname = 'FOO', passwd = 'BAR' WHERE id = 1;
dbs [Fri, 21 Jan 2011 15:49:45 +0000 (15:49 +0000)]
Towards a more secure default setup
Shipping with a default account user name and password is considered
an authentication anti-pattern; see
http://code.google.com/p/owasp-development-guide/wiki/WebAppSecDesignGuide_D2
By making the user select an admin user name and password at the time
they create the database, we avoid the chance that they will forget to
change the default password and leave their system open to access.
Next step is to change the seed data to insert random values for the
admin username and password, then update the documentation accordingly.
senator [Thu, 20 Jan 2011 22:37:46 +0000 (22:37 +0000)]
Backport r19239 from trunk
Acq: use the acqlimad table instead of its ancestor acqliad table to
populate a dropdown for the Export Single Attribute List function of lists
of lineitems
The acqliad table may appear to have duplicate entries since it's a parent, and
the point of the function that's trying to use it is just to export lists of
ISBNs or UPCs, so acqlimad is a better fit.
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.