LP#1944601: Checkout Fails Silently if Operating Hours Set to Closed 7 Days a Week This fixed an issue where a checkout or renewal would timeout and fail without an error message if attempted from an org unit where all hours of operation were closed, every day of the week. This would cause open-ils.storage.actor.org_unit.closed_date.overlap to infinitely recurse without throwing an error. -- How to test [1] Go to Administration -> Server Administration-> Organizational Units [2] Select an Org Unit and the Hours of Operation tab [3] Click on closed button or manually set start and end times to 12:00 AM for all days and apply changes [4] Observe pretty new warning [5] Ensure link in pretty new warning leads to the right page [6] Using a workstation at the affected org unit, attempt to check out a book and renew a checked out book. [7] Go to the page the new warning links to: Administration -> Local Administration -> Closed Dates Editor [8] Add a closing of whatever length you desire, including now and/or the date an item would be due if checked out today. [9] Using a workstation at the affected org unit, attempt to check out a book and renew a checked out book. Signed-off-by: Steven Mayo <smayo@georgialibraries.org> Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Garry Collum <gcollum@gmail.com>
LP#1552778: copy some date/time utils from OpenSRF As preparation for subsequent bugfixes, this patch copies several date/time routines from OpenSRF::Utils to a new module, OpenILS::Utils::DateTime. Specifically, the routines copied over are: * clean_ISO8601() (renaming of the OpenSRF cleanse_ISO8601) * gmtime_ISO8601() * interval_to_seconds() * seconds_to_interval() This move will allow us to fix bugs in this core routines without requiring a mandatory OpenSRF upgrade. Furthermore, with the exception of interval_to_seconds() (and in only one place), none of those routines are used by OpenSRF itself. To test ------- [1] Apply the patch. [2] Verify that unit tests pass. [3] Verify that all Perl services start correctly. [4] Verify that date/time and interval calculations continue to work as expected, particularly in circulation. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
LP#1776020 Patron preferred name & name keywords Preferred Name Adds a new set of patron preferred name fields for prefix, first, middle, last, and suffix allowing patrons to provide preferred name information. Preferred names are optional and each acts as an overlay to the analogous primary name field, making it possible to provide preferred name values for individual fields. For example, a patron named William Erickson may have a preferred first name (pref_first_given_name) of Bill, in which case the preferred name would be Bill Erickson. Note a preferred last name is not required in this case as the code uses primary name values as defaults when not replaced with a preferred version. * Patrons will see primary names displayed in the catalog when set. * Staff will see both primary name and preferred name in the patron summary side bar. * Patron searches for any given name field will search both the primary and preferred name data. * Preferred name fields are available in Action/Trigger templates and are present in various patron-focused print templates. Name Keywords Adds a new field to store miscellaneous patron name search terms. These values are only for searching and do not appear in any interfaces, apart from the patron summary side bar and the patron edit UI. Included is a new search field in the patron search UI which searches keyword values and all other name fields. It's essentially a global patron name keyword search. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#14973322: (follow-up) allow profile-only patron searches This patch removes the implicit requirement introduced by the previous patch that a field other than profile be used in the patron search. For performance reasons, it might be good to mark permission.grp_descendants() as stable. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP14973322: Search for Users by Profile Stop treating profile like a text value, instead include users in the selected profiles and descendants. To test ------- [0] Search for users by last name (and / or first) and do not select a profile, take note of results [1] Select the top of your permission group tree (Users, likely) and search again, results should be the same. [2] Select a group further down the tree (Circulators, Administrators, Patrons, etc.) and repeat the search, there should only be results from that group and its descendants. [3] Finally, select a group with no child groups. Results will only be that specific group. Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP1655158 Patron Search by Date of Birth Adds three UI boxes to the WBSC "Show Extra" patron search. One for the year, month and day. The javascript on the page is altered to deliver group "4" to the backend. Local javascript strips out non-numeric user entered data. The backend is updated to handle the new group. SQL is genereated using the DATE_PART postgres function. 1. Open the web based staff client and browse to the patron search UI. 2. Click the show more down arrow button. Notice the lack of birth date field. 3. Apply the patch, repeat step one. Notice the addition of birth date boxes. 4. Type 1975 into the birth year box and press enter. Notice search results. 5. Try searching for partial names and partial birthdates. 6. Try entering non-numeric data into the birth date boxes. 7. Try searching for patrons without including the dob. Try with only the dob. Try a mix. Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP#1664386: fix certain subrequests that control DB transactions This patch removes all cases where the current OpenSRF client object is passed to $self->method_lookup('open-ils.storage.transaction.{begin/rollback}')->run() This idiom is no longer needed, as session information required to generate a transaction ID is reliably passed to subrequests. Without this patch, current Evergreen master and OpenSRF master will cause the following methods to return not only their results, but also "1" from each use of this idiom: open-ils.storage.actor.user.checked_out open-ils.storage.booking.reservation.resource_targeter open-ils.storage.action.hold_request.copy_targeter To test ------- [1] Be running current Evergreen master and OpenSRF master (or the 2.5 alpha) [2] Run (say) open-ils.storage.actor.user.checked_out in srfsh: srfsh# request open-ils.storage open-ils.storage.actor.user.checked_out 13 Received Data: 1 Received Data: 1 Received Data: { "out":[ ], "claims_returned":[ ], "long_overdue":[ ], "overdue":[ "55", "56", "57", "58", "59", "60" ], "lost":[ ] } [3] Note the extraneous 'Received Data: 1' sent prior to the substantive response. [4] Apply the patch and rerun step 2; note that this time only the desired response is sent. Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP 1501781: Make patron name search diacritic/space insensitive. This commit adds the necessary code to storage actor publisher to use the new evergreen.unaccent_and_squash db function when doing a patron name search. It is based on code originally by Dan Pearl, but then modified to remove a dependency on a new Perl module by calling the db function on the search input as well. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP#1251415: Skip deleted users in juvenile update Avoid setting juvenile = false on deleted users during the batch juvenile update routine, even if they are a million years old. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
LP#1251415: Use the juvenile setting when removing juvenile flag. When calling the API open-ils.storage.actor.user.juvenile_to_adult, most notably from the juv_to_adult.srfsh support script, instead of strictly using the hardcoded passed value, first check the global.juvenile_age_threshold from the settings based on the user's home library. If the setting does not exist, then fall back on the hardcoded passed value. This will allow each library to be able to set different juvenile thresholds if needed and at the very least, give control to the settings rather than rely strictly on the hardcoded passed value. Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
LP#1350042 streaming patron search API Adds an API name-based option to the standard patron search API to respond with a stream of fleshed users, so the caller is not forced to make additional fetch-by-ID calls to collect the user data. Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Post-2.5-m1 whitespace fixup This is an attempt at an automated whitespace cleanup for the m1 milestone of version 2.5. It was created using the following commands (run from Open-ILS/src/perlmods/lib): find . -name "*.pm" \ -exec sh -c 'sed "/<</s/\t/ /g" < {} \ | expand -t 4 > {}.fixed ; \ cp --no-preserve=mode,ownership {}.fixed {}; \ rm {}.fixed' \; Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Remington Steed <rjs7@calvin.edu>
trivial whitespace cleanup Locally consistent, globally all over the map in this file. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Adding a WHERE clause to prevent timeout of juv-to-adult function Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Patron Stat Cat Enhancements: Add Publisher actor methods for stat_cat_entry_default objects. Add methods actor_stat_cat_entry_default and actor_stat_cat_entry_default_ancestor to retrieve and populate stat_cat_entry_default objects. Modify ranged_actor_stat_cat_entry and fleshed_actor_stat_cat to also include default entry objects, if present. Signed-off-by: Scott Prater <sprater@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
patch from James Fournie re: https://bugs.launchpad.net/evergreen/+bug/510959 for improved patron opt-in Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Revert "Wrap proximity refreshing in a transaction to avoid timespans where there is no such information" This reverts commit fbfb74639cc2628fb90e56f7dbd0d364e0b7e386. Signed-off-by: Mike Rylander <mrylander@gmail.com>
Wrap proximity refreshing in a transaction to avoid timespans where there is no such information git-svn-id: svn://svn.open-ils.org/ILS/trunk@20455 dcc99617-32d9-48b4-a31d-7c20da2025e4
Patch from Niles Ingalls to make patron phone number searching more matchy. With assistance from Mike Rylander on pointing out the needed indexes to keep search fast, and from Mike Peters on arranging a last minute DCO :-) Type numbers into a patron phone number field and get a match regardless of the punctuation actually used in the database. git-svn-id: svn://svn.open-ils.org/ILS/trunk@20429 dcc99617-32d9-48b4-a31d-7c20da2025e4
Escape rather than filter SIMILAR TO metacharacters in patron crazy search The filtering I introduced in r19983 was overly aggressive, and included characters that weren't actually SIMILAR TO metacharacters. Instead, escape each character, carefully going through the list of metacharacters listed at http://www.postgresql.org/docs/8.4/interactive/functions-matching.html Works for email addresses like "foo.bar+baz@example.com". git-svn-id: svn://svn.open-ils.org/ILS/trunk@20085 dcc99617-32d9-48b4-a31d-7c20da2025e4