evergreen/bjwebb.git
13 years agoReplace the native dump() function with a wrapper function that takes an optional...
phasefx [Fri, 28 Jan 2011 19:38:57 +0000 (19:38 +0000)]
Replace the native dump() function with a wrapper function that takes an optional 2nd parameter for log level (defaults to debug)
Log level: 0 None, 1 Error, 2 Warning, 3 Info, 4 debug
A global _dump_level variable gets consulted when the function is used.  The default is 2, Warning.
So by default, until we start changing things, this will suppress most of the existing dump statements.  Some are slipping through the cracks based on when the function replacement happens, but I'm happy with it.  We also prepend the dump msg with a label for the log level.

_dump_level could be locally customized with server/skin/custom.js

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19323 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agomake the default sdump setup less noisy
phasefx [Fri, 28 Jan 2011 19:38:06 +0000 (19:38 +0000)]
make the default sdump setup less noisy

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19322 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoeffectively fixes tab locking with the MARC editor, and makes the previous fix with...
phasefx [Fri, 28 Jan 2011 17:37:32 +0000 (17:37 +0000)]
effectively fixes tab locking with the MARC editor, and makes the previous fix with the patron editor redundant.  bleh :)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19321 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agotweaking the debug output for page/tab locking
phasefx [Fri, 28 Jan 2011 17:37:25 +0000 (17:37 +0000)]
tweaking the debug output for page/tab locking

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19320 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoneed to record the schema version in the upgrade script ... spotted by Thomas Berezansky
miker [Fri, 28 Jan 2011 15:33:15 +0000 (15:33 +0000)]
need to record the schema version in the upgrade script ... spotted by Thomas Berezansky

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19319 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoschema version bump required by previous commit
miker [Fri, 28 Jan 2011 15:06:07 +0000 (15:06 +0000)]
schema version bump required by previous commit

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19318 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoPatch from Thomas Berezansky addressing logical importance of various circulation...
miker [Fri, 28 Jan 2011 14:58:37 +0000 (14:58 +0000)]
Patch from Thomas Berezansky addressing logical importance of various circulation and hold matrix matchpoint components.

Previous to this commit, INDB circ and holds use a pre-defined weighting set for rule ordering. This can be changed via replacing the relevant "find" functions in the database, but this is not easily done for most people.

The weight set for circ matchpoints is obtained based on the context ou of the circ (aka, where the circ is happening).

The weight set for hold matchpoints is obtained based on the item's circ library (aka, where the item lives).

Optionally, add an enabled circ.holds.weight_owner_not_circ internal flag to have the weight set for hold matchpoints be obtained based on the item's owning library (owner of the call number).

TODO: discuss promotion of circ.holds.weight_owner_not_circ to a Global Flag; wikified or docbook'd documentation and use-case examples.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19317 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoMake window.print() configurable. The "Mozilla Print" strategy is internally identif...
phasefx [Thu, 27 Jan 2011 20:58:41 +0000 (20:58 +0000)]
Make window.print() configurable.  The "Mozilla Print" strategy is internally identified as 'webBrowserPrint', and it uses XPCOM for printing the contents of an HTML document.  However, in some cases we override this with a 'window.print' strategy to workaround bugs.  A problem with this has been that an actual bare javascript window.print() does not honor any of configured "gPrintSettings".  However, it is informed by (and in turn informs) a Mozilla preference called print.print_printer.  Right now window.print (if used from within the JSAN util.print library) only gets called in when in the Default printer context/role.  So we force print.print_printer to equal the configured printer for the Default role.  Have I mentioned that I hate printing in Mozilla?

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19316 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoenable the checkbox column so we can delete hard due dates
phasefx [Thu, 27 Jan 2011 16:19:58 +0000 (16:19 +0000)]
enable the checkbox column so we can delete hard due dates

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19312 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSerials: add "clone subscription" functionality to alt serials control
senator [Wed, 26 Jan 2011 23:04:56 +0000 (23:04 +0000)]
Serials: add "clone subscription" functionality to alt serials control

This feature clones subscriptions and all the objects related to them
that don't describe holdings.  Should help speed users' workflow when setting
up subscriptions.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19311 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agopatch to edi4r
gmc [Wed, 26 Jan 2011 21:58:47 +0000 (21:58 +0000)]
patch to edi4r

This is a patch to edi4r which has been submitted; sticking
it here temporarily since at the moment it's unclear whether
edi4r still has an active maintainer.

This patch fixes a bug where question marks in the bibiographic
description ended up being escaped three times over.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19310 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoremove redundant finalize
gmc [Wed, 26 Jan 2011 19:05:52 +0000 (19:05 +0000)]
remove redundant finalize

Already handled by OpenILS::Mapper, and has the effect
of making a parsing bug in edi4r worse by causing
question marks in the EDI data to be escaped multiple
times.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19309 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoset the svn mimetype for these
phasefx [Wed, 26 Jan 2011 15:52:50 +0000 (15:52 +0000)]
set the svn mimetype for these

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19306 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoStaff client portal page replacement by Michael Peters, with a few tweaks.
phasefx [Wed, 26 Jan 2011 15:36:49 +0000 (15:36 +0000)]
Staff client portal page replacement by Michael Peters, with a few tweaks.

Thanks!

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19305 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSwap item/issuance labels in Subscription tab prediction
dbwells [Wed, 26 Jan 2011 15:08:16 +0000 (15:08 +0000)]
Swap item/issuance labels in Subscription tab prediction

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19303 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoClear out some unused code, which in some cases was causing "command bleed"
dbwells [Wed, 26 Jan 2011 14:54:18 +0000 (14:54 +0000)]
Clear out some unused code, which in some cases was causing "command bleed"

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19301 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoFix broken stream functions, re-enable commented-out menu with correct options
dbwells [Tue, 25 Jan 2011 23:20:59 +0000 (23:20 +0000)]
Fix broken stream functions, re-enable commented-out menu with correct options

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19298 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoThis menu was for a different tab (subscriptions), comment out for now
dbwells [Tue, 25 Jan 2011 21:47:02 +0000 (21:47 +0000)]
This menu was for a different tab (subscriptions), comment out for now

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19296 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agofix the svn:mimetype properties for these
phasefx [Tue, 25 Jan 2011 21:31:56 +0000 (21:31 +0000)]
fix the svn:mimetype properties for these

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19294 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agomark this as binary
phasefx [Tue, 25 Jan 2011 21:10:42 +0000 (21:10 +0000)]
mark this as binary

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19293 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoTranslation string in manage_dists.js : right problem, wrong fix
dbwells [Tue, 25 Jan 2011 20:53:06 +0000 (20:53 +0000)]
Translation string in manage_dists.js : right problem, wrong fix

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19290 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoFix checkin backdate assumptions
dbwells [Tue, 25 Jan 2011 20:43:47 +0000 (20:43 +0000)]
Fix checkin backdate assumptions

checkin_handle_backdate() did not properly interpret bill data (voided too much), so lets use void_overdues() instead

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19288 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoTweaks to transparency and hue, courtesy of Michael Peters. Thanks!
phasefx [Tue, 25 Jan 2011 20:22:37 +0000 (20:22 +0000)]
Tweaks to transparency and hue, courtesy of Michael Peters.  Thanks!

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19287 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSmall serial interface string fixes
dbwells [Tue, 25 Jan 2011 19:57:01 +0000 (19:57 +0000)]
Small serial interface string fixes

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19285 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoPoint to Fedora 14 as the preferred Fedora version
dbs [Tue, 25 Jan 2011 19:18:50 +0000 (19:18 +0000)]
Point to Fedora 14 as the preferred Fedora version

Fedora 13 will be out of service relatively soon; give
2.0 some legs if someone goes with Fedora.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19284 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoUpdate README to include --admin-user / --admin-pass options for eg_db_config.pl
dbs [Tue, 25 Jan 2011 19:18:02 +0000 (19:18 +0000)]
Update README to include --admin-user / --admin-pass options for eg_db_config.pl

As the default Evergreen administrator account is now created with
a randomized user name and password, we have added the options to
eg_db_config.pl to reset those to something known and specific to
a given instance.

Also, Fedora 13 is getting close to retirement, update to Fedora 14 for
supported distros.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19283 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoTeach the i18n Makefile how to handle serial.properties
dbs [Tue, 25 Jan 2011 06:17:46 +0000 (06:17 +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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19282 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoReplace a few hardcoded strings in the serials JavaScript
dbs [Tue, 25 Jan 2011 04:44:39 +0000 (04:44 +0000)]
Replace a few hardcoded strings in the serials JavaScript

There is, unfortunately, an awful lot of this left to fix.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19279 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoFix existing serial entities that didn't provide .label partners for .accesskey
dbs [Tue, 25 Jan 2011 03:09:18 +0000 (03:09 +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).

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19277 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoExpose (in a very basic way) existing serial item reset functionality, fix small...
dbwells [Mon, 24 Jan 2011 23:19:53 +0000 (23:19 +0000)]
Expose (in a very basic way) existing serial item reset functionality, fix small bug in reset code (resetting an item with no unit)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19275 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoCorrect for over-zealous sdist editor field display code
dbwells [Mon, 24 Jan 2011 23:03:15 +0000 (23:03 +0000)]
Correct for over-zealous sdist editor field display code

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19273 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSerials: A batch of improvements to the caption/pattern wizard
senator [Mon, 24 Jan 2011 22:14:57 +0000 (22:14 +0000)]
Serials: A batch of improvements to the caption/pattern wizard

- Using a numeric frequency ($w) now pre-selects the regularity page
- Switch the regularity page from a box layout to a grid layout for legibility
- Simplify and unify month/date control pairs, enforcing correct limits
    on days in each month
- Scrollbars!
- If the user creates $y data in the regularity page, but then unchecks the
    "use specific regularity information" box, the $y stuff will be correctly
    excluded from the compiled pattern code.
- "Display in Holding Field" replaced with text that better explains what it
    means
- The wizard's dialog window has a title now
- In alternate serials control -> subscription details -> captions/patterns tab,
    if the user has already typed something in the Pattern Code field, they
    now get a warning that using the wizard will erase their existing work
    if they click the Wizard button
- The captions/pattern tab now treats pattern codes as immutable once created,
    which is what was apparently intended from the beginning.  See
    http://list.georgialibraries.org/pipermail/open-ils-dev/2010-May/006079.html

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19272 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoexpose the print.always_print_silent preference in the Printer Settings Editor
phasefx [Mon, 24 Jan 2011 21:05:04 +0000 (21:05 +0000)]
expose the print.always_print_silent preference in the Printer Settings Editor

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19269 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agomake the Printer Settings Editor immune to the print.always_print_silent preference
phasefx [Mon, 24 Jan 2011 21:05:00 +0000 (21:05 +0000)]
make the Printer Settings Editor immune to the print.always_print_silent preference

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19268 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoFix for spurious warning (LP bug #707114)
miker [Mon, 24 Jan 2011 20:28:52 +0000 (20:28 +0000)]
Fix for spurious warning (LP bug #707114)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19266 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoi18n support for a few OPAC strings
dbs [Sun, 23 Jan 2011 18:43:22 +0000 (18:43 +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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19262 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agocorrect XPath attribute test syntax
miker [Sun, 23 Jan 2011 00:04:35 +0000 (00:04 +0000)]
correct XPath attribute test syntax

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19260 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agohandle deleting line item from selection list more carefully
gmc [Sat, 22 Jan 2011 05:49:10 +0000 (05:49 +0000)]
handle deleting line item from selection list more carefully

Once a line item is attached to a purchase order, removing it
from a selection list should mean detaching it from the list,
not deleting it outright.

The open-ils.acq.lineitem.delete method can be removed
once the old jubgrid code is finally purged.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19258 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agomore overzealous unsaved data prompts
phasefx [Fri, 21 Jan 2011 22:22:53 +0000 (22:22 +0000)]
more overzealous unsaved data prompts

onKeypress catches all sorts of stuff, like the control+w for closing tabs.  Not good.  Ideally we'd test event.isChar, but that's broken in Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=312552

Instead we look to see if control, alt, or meta are being held down.  Not perfect, but good enough for now.  For example, won't ignore tabs for jumping from field to field, and won't realize the hotkey for clipboard pasting should trigger the unsaved data state.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19257 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoProtect against volumes with many copies attached
dbs [Fri, 21 Jan 2011 22:04:00 +0000 (22:04 +0000)]
Protect against volumes with many copies attached

Bill Erickson has good data for testing these cases.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19255 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoUse holdings_xml-full for the copy display
dbs [Fri, 21 Jan 2011 20:52:06 +0000 (20:52 +0000)]
Use holdings_xml-full for the copy display

Less to munge and transfer over the wire = win win win!

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19253 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoslimpac issue where deleted copies are visisble, spotted by Steve Callendar and Jason...
miker [Fri, 21 Jan 2011 20:40:28 +0000 (20:40 +0000)]
slimpac issue where deleted copies are visisble, spotted by Steve Callendar and Jason Etheridge

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19252 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAdopt the Conifer local call number display code as an example of complex client...
dbs [Fri, 21 Jan 2011 20:36:16 +0000 (20:36 +0000)]
Adopt the Conifer local call number display code as an example of complex client-side customization

It's useful, too - library / call number / copy location / copy status on
search results, and easily tweaked from the out of the box defaults.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19250 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agofix spurious unsaved data prompt with repeated use of same patron editor (only set...
phasefx [Fri, 21 Jan 2011 16:58:44 +0000 (16:58 +0000)]
fix spurious unsaved data prompt with repeated use of same patron editor (only set tab lock once with patron editor, since we only unlock once upon save)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19247 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoPart 3 of a more secure default set up
dbs [Fri, 21 Jan 2011 03:13:14 +0000 (03:13 +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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19243 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAcq: the "Load Catalog Record IDs" interface failed on files produced in
senator [Thu, 20 Jan 2011 23:05:39 +0000 (23:05 +0000)]
Acq: the "Load Catalog Record IDs" interface failed on files produced in
Windows due to not stripping out carriage returns. Fixed.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19241 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAcq: use the acqlimad table instead of its ancestor acqliad table to
senator [Thu, 20 Jan 2011 22:37:13 +0000 (22:37 +0000)]
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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19239 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agodon't offer to cancel related transits that have already completed when canceling...
phasefx [Thu, 20 Jan 2011 19:53:53 +0000 (19:53 +0000)]
don't offer to cancel related transits that have already completed when canceling holds

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19234 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoBooking: these lines don't belong; they were erroneously copied and pasted
senator [Thu, 20 Jan 2011 19:41:30 +0000 (19:41 +0000)]
Booking: these lines don't belong; they were erroneously copied and pasted
from a neighboring section of the file

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19229 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agowhack-a-mole, was getting a null instead of an empty array here, but may be a red...
phasefx [Wed, 19 Jan 2011 22:28:13 +0000 (22:28 +0000)]
whack-a-mole, was getting a null instead of an empty array here, but may be a red herring

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19225 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoif this user does not have permission to edit an existing user, disable the save...
erickson [Wed, 19 Jan 2011 22:27:14 +0000 (22:27 +0000)]
if this user does not have permission to edit an existing user, disable the save and clone buttons

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19222 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoremove disallowed permission groups from the perm group selector in user registration...
erickson [Wed, 19 Jan 2011 22:27:14 +0000 (22:27 +0000)]
remove disallowed permission groups from the perm group selector in user registration; see bug 699914

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19221 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agolet amnesty checkin mode trump the restore overdues on lost checkin setting
phasefx [Wed, 19 Jan 2011 22:05:18 +0000 (22:05 +0000)]
let amnesty checkin mode trump the restore overdues on lost checkin setting

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19219 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoBooking: Robert Soulliere spotted and fixed a bug in processing reservation-
senator [Wed, 19 Jan 2011 21:52:28 +0000 (21:52 +0000)]
Booking: Robert Soulliere spotted and fixed a bug in processing reservation-
related overdue fines.  See https://bugs.launchpad.net/evergreen/+bug/705061

This patch tests successfully for me. Thanks Robert!

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19214 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoBuild and flatten a tree, correcting a sorting issue in some OU dropdowns.
miker [Wed, 19 Jan 2011 19:50:47 +0000 (19:50 +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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19208 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agobug #684467: more bulletproofing of naco_normalize
gmc [Wed, 19 Jan 2011 15:59:01 +0000 (15:59 +0000)]
bug #684467: more bulletproofing of naco_normalize

Also preparing for backporting to rel_2_0.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19204 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agodrop name check constraint on config.hard_due_due
gmc [Wed, 19 Jan 2011 15:34:56 +0000 (15:34 +0000)]
drop name check constraint on config.hard_due_due

See https://bugs.launchpad.net/evergreen/+bug/704951 for context
and possible future direction.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19203 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAvoid escaping issues in authority.normalize_heading() by parameterizing the query
dbs [Wed, 19 Jan 2011 14:53:48 +0000 (14:53 +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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19201 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoPart 2 of creating a more secure default setup
dbs [Wed, 19 Jan 2011 04:41:15 +0000 (04:41 +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;

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19200 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoTowards a more secure default setup
dbs [Wed, 19 Jan 2011 04:24:49 +0000 (04:24 +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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19199 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoProtect against blank and invalid scap IDs in issuance editor
dbwells [Tue, 18 Jan 2011 23:44:00 +0000 (23:44 +0000)]
Protect against blank and invalid scap IDs in issuance editor

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19197 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agofix glitch that could break invoice proration
gmc [Tue, 18 Jan 2011 22:52:04 +0000 (22:52 +0000)]
fix glitch that could break invoice proration

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19195 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agouser saved searches are only accessible to the originating user; remove (incorrect...
erickson [Tue, 18 Jan 2011 19:57:55 +0000 (19:57 +0000)]
user saved searches are only accessible to the originating user; remove (incorrect) permacrud config for usr_saved_searches

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19193 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoMake EditPane objects built of AutoFieldWidget objects (such as those used
senator [Tue, 18 Jan 2011 18:35:04 +0000 (18:35 +0000)]
Make EditPane objects built of AutoFieldWidget objects (such as those used
for create/edit dialogs with AutoGrid) enforce required fields more forcefully.

Before, if a field was marked required either in the IDL or by the
requirdFields attribute of an AutoGrid, you'd get a yellow widget with a caution
sign for that field, but you could still click save and the system would
attempt to save your object.

Sometimes this is stopped when pcrud can't save the object due to
required="true" in the IDL and/or a "not null" constraint in the schema, but
there may be cases where a given interface wants to require a value in a given
field even though that's not necessarily enforced at lower levels.

Serials: Specifically use this new feature in the distribution pane of the
Alternate Serial Control view, to prevent the creation of issues without a
"receive unit template" field, as you can't receive items in the Batch
Receive interface without one.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19192 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAuto-generation of placeholder barcodes approved for backport
dbwells [Tue, 18 Jan 2011 18:06:00 +0000 (18:06 +0000)]
Auto-generation of placeholder barcodes approved for backport

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19190 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAuto-generation of placeholder barcodes
dbwells [Mon, 17 Jan 2011 23:34:49 +0000 (23:34 +0000)]
Auto-generation of placeholder barcodes

This commit implements a very basic trigger for auto-generating placeholder barcodes, as discussed at the Dec. 14 2010 IRC developer meeting.  The 1.6.1-2.0 upgrade script has not been changed, as backporting this to 2.0 is pending review.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19189 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoIn serial control, if they defined a *_call_number, honor it as the default
dbwells [Mon, 17 Jan 2011 19:29:14 +0000 (19:29 +0000)]
In serial control, if they defined a *_call_number, honor it as the default

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19187 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agodefault ordering-agency org unit to workstation org in PO create dialog
erickson [Mon, 17 Jan 2011 15:54:08 +0000 (15:54 +0000)]
default ordering-agency org unit to workstation org in PO create dialog

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19185 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoget more aggressive with unsaved data prompts. onkeypress instead of onchange
phasefx [Mon, 17 Jan 2011 15:30:15 +0000 (15:30 +0000)]
get more aggressive with unsaved data prompts.  onkeypress instead of onchange

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19184 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoPostpone advanced serial call-number handling until after 2.0
dbwells [Sat, 15 Jan 2011 04:04:23 +0000 (04:04 +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

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19182 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSerials: a regularity (i.e. 85X subfield $y) page for the caption/pattern wizard
senator [Sat, 15 Jan 2011 03:03:45 +0000 (03:03 +0000)]
Serials: a regularity (i.e. 85X subfield $y) page for the caption/pattern wizard

This adds a new page to the caption/pattern wizard that allows the user to
enter regularity information (specific published, omitted, and combined issues)
by chronology.  Doing the same by enumeration is possible in MFHD but not yet
supported in the wizard.

You still have to be a serials librarian who understands MFHD and the 85X tags
in order to really benefit from this, but it beats hand-entering the MARC tags.

Still to-do to perfect this:
    -   suggest (pre-enable) the regularity page when numeric $w is used
    -   use grid layout instead of hbox and vbox elements for neatness
    -   support enumeration codes
    -   days of month widget should be smarter than to always allow 31 days
    -   the whole caption/pattern wizard still needs scrollbars
    -   more limitations to prevent the user from entering patterns that
            don't make sense
    -   make sure that if a user fills out a page of the wizard, including
            this new one, but then unchecks the whole page, that whatever
            work they did is not included in the compiled result
    -   more testing, general cleanup

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19181 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoWhitespace normalization: tabs to spaces
dbs [Fri, 14 Jan 2011 02:57:46 +0000 (02:57 +0000)]
Whitespace normalization: tabs to spaces

Also, remove vestigial Data::Dumper import.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19176 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoEnable truncation attribute in Z39.50 queries to be left out entirely
dbs [Fri, 14 Jan 2011 02:49:33 +0000 (02:49 +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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19175 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agotrivial typo fixes FTW!
gmc [Thu, 13 Jan 2011 01:12:30 +0000 (01:12 +0000)]
trivial typo fixes FTW!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19174 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSerials: In the holding code mini wizard of the alt serials controls, pre-
senator [Wed, 12 Jan 2011 22:50:16 +0000 (22:50 +0000)]
Serials: In the holding code mini wizard of the alt serials controls, pre-
populate any Year, Season, Month or Day fields based on issuance.date_published
to reduce the need for redundant user input.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19173 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agogit-svn-id: svn://svn.open-ils.org/ILS/trunk@19172 dcc99617-32d9-48b4-a31d-7c20da2025e4
dbs [Wed, 12 Jan 2011 21:11:08 +0000 (21:11 +0000)]
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19172 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoDeprecate overdue/predue config sections in favour of action/trigger
dbs [Wed, 12 Jan 2011 20:55:54 +0000 (20:55 +0000)]
Deprecate overdue/predue config sections in favour of action/trigger

Set email notification to "false" for holds, overdues, and predues.

Fix one line of whitespace.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19169 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAutoFieldWidget no longer uses CurrencyTextBox dijit
gmc [Wed, 12 Jan 2011 20:51:27 +0000 (20:51 +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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19167 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoRevert r19162 for now, pending further conversation in #Evergreen
senator [Wed, 12 Jan 2011 15:52:37 +0000 (15:52 +0000)]
Revert r19162 for now, pending further conversation in #Evergreen
about the right way to address this.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19166 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoallow data entry of negative currency amounts
gmc [Wed, 12 Jan 2011 00:30:07 +0000 (00:30 +0000)]
allow data entry of negative currency amounts

Plug in fix for Dojo bug http://bugs.dojotoolkit.org/ticket/9438, which
was preventing the input of discounts and credits during invoice
creation.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19163 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSerials: Fix a problem with chronology prediction when there's
senator [Wed, 12 Jan 2011 00:24:51 +0000 (00:24 +0000)]
Serials: Fix a problem with chronology prediction when there's
a subfield $y in a caption/pattern with a weekly chronology code

Illustrative 853 tag:
 $2$0$8$1$a$v.$b$no.$u$50$v$r$i$(year)$j$(month)$k$(day)$w$w$x$01$y$ow1198,1204
Holding (863) tag:
 $4$1$8$1$a$1$b$39$i$2011$j$09$k$26$x$AUTOGEN

Before this commit, you get a run of predictions that look like this:
v.1:no.40(2011:Oct.03)
v.1:no.41(2011:Oct.10)
v.1:no.42(2011:Oct.17)
v.1:no.43(2011:Oct.24)
v.1:no.44(2011:Oct.31)
v.1:no.45(2011:Nov.07)
v.1:no.46(2011:Nov.21)
v.1:no.47(2011:Nov.28)
v.1:no.48(2011:Dec.05)
v.1:no.49(2011:Dec.12)
v.1:no.50(2011:Dec.26)
v.2:no.1(2012:Jan.02)

Which I'm pretty sure is wrong.  The next-to-last week in November should have
been skipped, and the fourth week in December should have been skipped.  I think
the week number should be defined in terms of the day of the week on which this
weekly serial is published, so fourth week means fourth Monday in this case (?).

With this commit, you get a run of predictions that look like:
v.1:no.40(2011:Oct.03)
v.1:no.41(2011:Oct.10)
v.1:no.42(2011:Oct.17)
v.1:no.43(2011:Oct.24)
v.1:no.44(2011:Oct.31)
v.1:no.45(2011:Nov.07)
v.1:no.46(2011:Nov.14)
v.1:no.47(2011:Nov.28)
v.1:no.48(2011:Dec.05)
v.1:no.49(2011:Dec.12)
v.1:no.50(2011:Dec.19)
v.2:no.1(2012:Jan.02)

Which seems correct to me. I'm going to consult with others before backporting
this to rel_2_0, however.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19162 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoallow deletion of incomplete invoice LIs
gmc [Tue, 11 Jan 2011 23:18:21 +0000 (23:18 +0000)]
allow deletion of incomplete invoice LIs

Fix silent failure when attempting to delete a LI
whose type or cost was not set; dojo.string.subtitute
does not like replacement values to be null.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19160 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agofix regression with org selector when specifying ?ol= and the org unit hiding setting...
phasefx [Tue, 11 Jan 2011 21:45:53 +0000 (21:45 +0000)]
fix regression with org selector when specifying ?ol= and the org unit hiding setting is unset

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19155 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoClean up opensrf.xml.example for easier consumption
dbs [Tue, 11 Jan 2011 21:29:35 +0000 (21:29 +0000)]
Clean up opensrf.xml.example for easier consumption

Make open-ils.acq, as the first service alphabetically and the Perl service
to boot, be the commented example.

Remove max_requests elements (not unix_config/max_requests elements!) from
service configurations where the language is not Perl.

Comment out open-ils.resolver in activeapps to match the commented-out state
within the configuration.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19154 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agorepaired pending-order vs order-pending thinko. Thanks to Kathy Lussier and Mike...
erickson [Tue, 11 Jan 2011 21:28:26 +0000 (21:28 +0000)]
repaired pending-order vs order-pending thinko.  Thanks to Kathy Lussier and Mike R. for the diagnosis

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19152 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoRemove leftover import of Data::Dumper
dbs [Tue, 11 Jan 2011 00:09:45 +0000 (00:09 +0000)]
Remove leftover import of Data::Dumper

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19150 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAdditional code unification; add 'reset item' capability to unitize_items()
dbwells [Mon, 10 Jan 2011 22:16:16 +0000 (22:16 +0000)]
Additional code unification; add 'reset item' capability to unitize_items()

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19148 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoavoid fetching user settings for new user registration; the result of fetching setti...
erickson [Mon, 10 Jan 2011 16:27:54 +0000 (16:27 +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

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19146 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoremoved deprecated, unused code
erickson [Mon, 10 Jan 2011 16:27:53 +0000 (16:27 +0000)]
removed deprecated, unused code

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19145 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSimplify authority reference deduplication
dbs [Mon, 10 Jan 2011 15:27:37 +0000 (15:27 +0000)]
Simplify authority reference deduplication

Rather than multiplying the number of records to be returned in
the case of a .refs. call, stick with the original number. This
avoids corner cases where paging through the results would skip
some records, and the UI is not overly heavily affected as even
in the case where one record offers 10 matches for see also /
see from references and represents an entire page of results,
the UI will display 11 lines (1 for the 1XX field and 10 for
the 4XX / 5XX fields). The user will be able to page to the next
set of results to continue browsing.

We can also be smarter about some things:
  * Return the original list immediately if not a .refs. call
  * No need to reverse and unshift the list items when
    deduping the .refs. list; just stick with the same
    order of the incoming list

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19144 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoClean up c-apps Makefile.am and make everything load cleanly again
dbs [Mon, 10 Jan 2011 03:44:34 +0000 (03:44 +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!)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19141 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoSet explicit library versioning for Evergreen 2.0 to 2:0:0
dbs [Mon, 10 Jan 2011 03:06:50 +0000 (03:06 +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!

Also remove redundant linkage to oils_idl.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19140 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoPrevent dupe record IDs from being returned by authority browse/startwith
dbs [Sun, 9 Jan 2011 21:27:01 +0000 (21:27 +0000)]
Prevent dupe record IDs from being returned by authority browse/startwith

The 4xx/5xx .ref variants on the authority browse/startwith methods
could return duplicate records if a 1xx/4xx/5xx contained similar entries,
which was highly irritating in the user interfaces.

I haven't been able to figure out a way to use just json_query to return
a set of unduped records that are still ordered appropriately, so I'm
fixing it in post-production... roughly. There is probably a better way
to do this (create an SQL function and select from that, perhaps) but
this at least appears to be an improvement over the current state of affairs.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19139 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoMake openils.PermaCrud.Store use a default order_by clause in common situations
senator [Fri, 7 Jan 2011 23:05:29 +0000 (23:05 +0000)]
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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19137 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoIn 1.6.1-2.0 upgrade, update index IDs to the target_id, not the incoming arg
dbs [Fri, 7 Jan 2011 21:58:24 +0000 (21:58 +0000)]
In 1.6.1-2.0 upgrade, update index IDs to the target_id, not the incoming arg

Also, create (and later drop) indexes that /might/ help with the
otherwise ultra-painful sequential scans of metabib.*_field_entry if it turns
out that indexes do need to get moved around. Sounds good in theory, our test
box is still slogging away on this bit though...

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19136 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoAcq: fix prorating bug
senator [Fri, 7 Jan 2011 20:04:34 +0000 (20:04 +0000)]
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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19134 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoWhen modifying existing indexes, ensure subject|complete drops into ID 16
dbs [Fri, 7 Jan 2011 14:00:14 +0000 (14:00 +0000)]
When modifying existing indexes, ensure subject|complete drops into ID 16

Other parts of the upgrade script assumed that subject|complete would be
ID = 16, so we might as well try and make it conform. This means turning
config.bump_metabib_field() into a two-argument function so that we can
provide an explicit target ID for the modified index.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19133 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoPrevent tag array from growing insanely in supercat browses
dbs [Fri, 7 Jan 2011 04:58:05 +0000 (04:58 +0000)]
Prevent tag array from growing insanely in supercat browses

Modifying the passed-in tag array reference apparently resulted
in those changes persisting to the next call, growing the tag
array at a rapid clip. So we needed to clean that up.

Also, applying the DISTINCT transform to the afr.record column, while
a valiant effort, didn't actually work. distinct() is not DISTINCT
ON () for starters; also, because DISTINCT ON needs to have the
ORDER BY clause match its arguments, and we actually want to order
by afr.value, not afr.record.

We could do it in a subquery, then reorder by value in the outer
SELECT, but it's not clear that json_query supports DISTINCT ON
anyway. Some days I wish I could just write SQL.

We could retrieve only the afr.record column - it's not clear that
any callers actually need the naco-normalized value column - but
that seems like a pretty major change at this point.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19132 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoTeach supercat browse / startwith to return a distinct set of records
dbs [Thu, 6 Jan 2011 18:47:21 +0000 (18:47 +0000)]
Teach supercat browse / startwith to return a distinct set of records

The addition of the .refs variants exposed feeds that had multiple
copies of the same bib in the same results (e.g. if 1xx was "Scott, Daniel"
and 4xx in the same record was "Scott, Dan" it would be returned twice).
Filtering it in this call prevents the callers from requesting 10 records
and only getting 7 back (or whatever). If there's an actual use case for
getting the same record twice, we can revisit this.

Note that the authority context menu currently still shows duplicate
records, because the record is displayed in full for each 4xx / 5xx
entry, that will be fixed in a subsequent patch.

Also, prevent supercat browse from issuing two separate requests for
page = 0; the second would always stomp on the results of the first,
so I just made the first request go away in that case.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19131 dcc99617-32d9-48b4-a31d-7c20da2025e4

13 years agoUnify some summarization code in preparation for further development.
dbwells [Wed, 5 Jan 2011 23:16:44 +0000 (23:16 +0000)]
Unify some summarization code in preparation for further development.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19129 dcc99617-32d9-48b4-a31d-7c20da2025e4