2011-06-28 Mike Rylander * : commit fe0888063e329eb9afe241f7d0c0127397c9b136 Author: Mike Rylander Date: Tue Jun 28 14:06:49 2011 -0400 2011-06-28 Lebbeous Fogle-Weekley * Open-ILS/web/templates/default/acq/common/li_table.tt2: Michael Peters provided a patch to add some missing labels... ... to a key acquisitions interface. It works. Also fixed some unclosed tags while I was at it. Wasn't sure whether to copy and paste Michael's sign-off or what, but here's the link to his original patch for purists: https://launchpadlibrarian.net/74191964/0001-LP802578-Acquisitions-Batch-copy-update-missing-head.patch Signed-off-by: Lebbeous Fogle-Weekley 2011-06-24 Dan Scott * Open-ILS/web/opac/skin/default/js/result_common.js: Fix broken images for items without ISBNs in search results The search results code happily sets the src attribute of the cover image to an empty string (as returned by cleanISBN()) if currentISBN has not been defined (which is generally the case if an item doesn't have an ISBN, such as a DVD or a thesis or an old book). Protect against the empty string and set the src attribute to '/opac/images/blank.png' to avoid broken image indicators in search results. Signed-off-by: Dan Scott Signed-off-by: Dan Scott Signed-off-by: Mike Rylander 2011-06-22 Jason Stephenson * Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm: Check if hold is really available in Trigger::Validator. Add checks for shelf time and no fulfillment time in HoldIsAvailable in OpenILS::Application::Trigger::Validator. We've had some issues with poorly migrated data and people messing with holds that causes the original logic to trigger for unfilled holds. Plus, the extra precaution of checking more precise conditions of an actually filled hold can't hurt, can it? Signed-off-by: Jason Stephenson Signed-off-by: Mike Rylander 2011-06-22 Mike Rylander * Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm, Open-ILS/web/opac/common/js/config.js: Make bucket content retrieval authoritative LP#492036, we neeed all bucket methods to be authoritative. Some already were, this finishes the job. Signed-off-by: Mike Rylander 2011-06-22 Michael Peters * Open-ILS/xul/staff_client/server/locale/en-US/patron.properties, Open-ILS/xul/staff_client/server/patron/search_result.js: LP#790639: Provide actual text, rather than id values in patron search results for various columns Cleaned up some tabs versus spaces and a needless trailing comma from original patch. Not porting to master, hoping to use collab/phasefx/fm_columns instead. Signed-off-by: Jason Etheridge Signed-off-by: Michael Peters 2011-06-21 Dan Wells * Open-ILS/src/perlmods/OpenILS/Application/Search/Serial.pm, Open-ILS/web/opac/skin/default/js/rdetail.js, Open-ILS/xul/staff_client/chrome/content/cat/opac.js, Open-ILS/xul/staff_client/server/locale/en-US/serial.properties, Open-ILS/xul/staff_client/server/serial/sdist_editor.js, Open-ILS/xul/staff_client/server/serial/ssub_editor.js: Further clean-up of Serials interfaces When trying to come up with good tests, found a few bugs (imagine!). Some have been nagging for a while now. 1) For 'MFHDDrawn' event, make sure it runs if deleting the last serials data of any kind for that record (to unpopulate the menus properly) 2) Make sure global mfhd member (g.mfhd) is cleared in the same case (i.e. deleting the last serials data for that record) 3) Add a string to better indicate when no MFHD records are available for 'Legacy Record Entry' drop-down 4) Convert submitted empty drop-down values to 'null' as needed in distribution editor 5) Mark subscription 'start date' as a required field 6) Make serial virtual records better handle deleted 'legacy record entries' attached to distributions, and also expose non-deleted record entries even if in 'use_sdist_only' summary mode Signed-off-by: Dan Wells Signed-off-by: Jason Etheridge 2011-06-17 Dan Wells * Open-ILS/xul/staff_client/chrome/content/cat/opac.js, Open-ILS/xul/staff_client/server/serial/sdist_editor.js: Better coordination of MFHD/SRE adding/deleting Adding or deleting MFHD records from the XUL menus requires coordinating the OPAC display, the XUL menus, and the Serial Control distribution editors. The previous code frequently required some non-obvious manual refreshing to make it work. This commit keeps them in sync using custom events instead. Signed-off-by: Dan Wells Signed-off-by: Jason Etheridge 2011-06-21 Dan Wells * Open-ILS/src/perlmods/OpenILS/Utils/MFHD.pm: MFHD compressed holdings short-circuit logic If you attempt to get compressed (or uncompressed) holdings from a MFHD record with only a caption, the code should short-circuit and return an empty list. Signed-off-by: Dan Wells Signed-off-by: Dan Scott 2011-06-21 Michael Peters * Open-ILS/xul/staff_client/server/skin/patron_display.css: LP#783590 fix patron alert message highlighting Signed-off-by: Michael Peters Signed-off-by: Jason Etheridge 2011-06-21 Mike Rylander * Open-ILS/src/sql/Pg/002.schema.config.sql, Open-ILS/src/sql/Pg/030.schema.metabib.sql, Open-ILS/src/sql/Pg/upgrade/0561.schema.tnf_index.sql: Add "tnf" index for faster title sorting (pre-SVF) Signed-off-by: Mike Rylander 2011-06-17 Dan Scott * Open-ILS/examples/opensrf.xml.example: Set AC timeout value to 3 seconds and describe tradeoffs As discussed on the Evergreen Development mailing list, the higher the AC timeout value, the greater the risk of a denial of service. 30 is therefore too high to be comfortable as a default setting, so we're dropping it down to 3 as a compromise between the original value of 1 (which resulted in a number of request timing out where added content was actually available) and the much-less-safe 30. In addition, we document inline the risk/reward of different values and provide some justification for the default value that we chose, so that Evergreen system administrators will have guidance when tweaking this setting. Signed-off-by: Dan Scott Signed-off-by: Mike Rylander 2011-06-20 Dan Scott * Open-ILS/src/sql/Pg/2.0.6-2.0.7-upgrade-db.sql, Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris .sql: DROP biblio.reingest_uris() after use We will hopefully only need to reingest URIs in bulk once, and can therefore DROP the biblio.reingest_uris() function after it has been successfully invoked. Signed-off-by: Dan Scott Signed-off-by: Galen Charlton 2011-06-20 Dan Scott * Open-ILS/src/sql/Pg/2.0.6-2.0.7-upgrade-db.sql, Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris .sql: Protect URI reingest from failure due to malformed XML In an ideal world, there would be no malformed XML. But our world is the real world of libraries, and while the well_formed_xml() protects against malformed XML in Evergreen 2.0 systems, in some cases bad XML has been able to find its way into Evergreen systems in the past. A single biblio.record_entry row containing malformed XML in the marc column will prevent the call to reingest URIs from succeeding. By limiting the set of records to those with well-formed XML, we can increase the chance of the URI reingest succeeding at the cost of more processing time. Signed-off-by: Dan Scott Signed-off-by: Galen Charlton 2011-06-20 Mike Rylander * Open-ILS/src/sql/Pg/2.0.6-2.0.7-upgrade-db.sql: Incorporate explode_array -> unnest change and fix for located URIs into upgrade script Signed-off-by: Mike Rylander 2011-06-20 Mike Rylander * : commit 9ebe72e82e3eb27cc8eba9ff51f8069cb0c55996 Author: Bill Erickson Date: Thu Jun 16 11:50:16 2011 -0400 2011-06-16 Mike Rylander * Open-ILS/src/sql/Pg/002.schema.config.sql, Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris .sql, Open-ILS/src/sql/Pg/upgrade/XXXX.biblio.extract_located_uris.sql: Move the user/dbs/lp797304_lp797307 upgrade script into place with a number Signed-off-by: Mike Rylander 2011-06-16 Mike Rylander * Open-ILS/src/sql/Pg/030.schema.metabib.sql, Open-ILS/src/sql/Pg/upgrade/XXXX.biblio.extract_located_uris.sql: Merging branch user/dbs/lp797304_lp797307 Cherry picking the following: commit 7be2a32620587af27de4316e42a308e913e9314c Author: Dan Scott Date: Tue Jun 14 22:35:26 2011 -0400 Add a stored procedure to reingest problematic URIs Assuming that href = label in asset.uri is a red enough flag for the problem in LP 797307 where the perfectly good label was being thrown away, reingest the unique set of records connected with such asset.uri rows. commit 39fe0c4a8a3074ff4c1e427ad9f00a0760bac260 Author: Dan Scott Date: Tue Jun 14 21:54:51 2011 -0400 Add unwrapped upgrade script for biblio.extract_located_uris See XXXX.biblio.extract_located_uris.sql for the upgrade script, waiting to be signed off and committed. create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.biblio.extract_located_uris.sql commit 7e6d2bfd7e9a5cbe57e4aacdf0b4b015a566883d Author: Dan Scott Date: Tue Jun 14 21:34:15 2011 -0400 Avoid duplicate row issues in biblio.extract_located_uris As there is currently no unique constraint on the non-ID columns of asset.uri, ensure that we only select a single ID from the tables until we dedupe the tables. Use an ORDER BY to grab the matching row with the lowest ID so we can clear out the rows with higher IDs. commit e79a805299ec734a29ee5bfa77dc74bc1fd208cd Author: Dan Scott Date: Tue Jun 14 14:02:49 2011 -0400 Fix LP 797304 and 797307 - asset.uri parsing bugs Per 797304: one would expect asset.uri.label to be populated with the value of 856 $y, however, it was getting populated with 856 $u - perhaps as a result of the ordering of array entries in XPATH() not matching the XPath expression. Instead of including 856 $u in the XPath expression for uri_label, just assign its value to uri_label if uri_label is otherwise NULL. Per 797307: biblio.extract_located_uris() tries to reuse an existing active asset.uri entry rather than create a new row; however, it does not handle the case where there is no public note aka "use restriction" and will end up creating a duplicate row every time the record is reingested. Teach it to handle NULL values properly. (cherry picked from commit da70b778268afff19c3dd4f2e9e4c9e85cfeb7e3) (cherry picked from commit 6019d97c2a0604675cd0c00ec747f248f3f79849) Signed-off-by: Mike Rylander Signed-off-by: Dan Scott Signed-off-by: Dan Scott Signed-off-by: Dan Scott Signed-off-by: Dan Scott Signed-off-by: Mike Rylander Signed-off-by: Mike Rylander 2011-06-15 Jason Etheridge * Open-ILS/xul/staff_client/server/patron/bill2.js: lp797321: Disable the Apply Payment button during payment processing to mitigate chance of duplicate payments. I can't actually reproduce the creation of duplicate payments locally with trunk/2.x, but there are reports of it, and this doesn't seem to hurt. Not a complete solution, but better than before Signed-off-by: Jason Etheridge Signed-off-by: Galen Charlton 2011-06-13 Lebbeous Fogle-Weekley * Open-ILS/xul/staff_client/server/serial/batch_receive.js: Fix a serial batch receive problem reported by Sally Fortin That prevents receiving items when not using units in some cases. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Dan Wells 2011-06-13 Dan Scott * Open-ILS/examples/opensrf.xml.example: Set a more generous AC timeout value A timeout value of 1 second is a bit too tight for many added content providers; set the default to 30 seconds to avoid too many artificial timeouts. Signed-off-by: Dan Scott 2011-06-07 Dan Wells * Open-ILS/xul/staff_client/server/locale/en-US/serial.properties, Open-ILS/xul/staff_client/server/serial/editor_base.js, Open-ILS/xul/staff_client/server/serial/scap_editor.js, Open-ILS/xul/staff_client/server/serial/sdist_editor.js: Support for required fields in Serial Control editors Adds a basic check for any fields marked as 'required', and alerts and prevents submitting if they are blank. Signed-off-by: Dan Wells 2011-05-31 Dan Scott * Open-ILS/web/opac/common/js/Cookies.js, Open-ILS/web/reports/oils_rpt_common.xhtml, Open-ILS/xul/staff_client/server/admin/cash_reports.xhtml, Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml, Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml, Open-ILS/xul/staff_client/server/admin/hold_pull_list_classic.xhtml , Open-ILS/xul/staff_client/server/admin/non_cat_types.xhtml, Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml, Open-ILS/xul/staff_client/server/patron/user_edit.xhtml: Remove all references to Cookie(s).js and Cookies.js Dojo toolkit is the new Cookie manager, so any lingering references to Cookie.js (a typo in any case) are no longer valid, and we no longer need to ship Cookies.js with Evergreen. Cookie.js typo was reported by Steven Chan in LP 790429 Signed-off-by: Dan Scott Signed-off-by: Dan Scott 2011-06-07 Dan Scott * Open-ILS/web/opac/skin/default/xml/result/result_table.xml: Use the new status.opac_visible attribute in search summary Until we exposed the OPAC visibility of the status element as set in config.copy_status, We previously had to hardcode the logic for whether a given copy should be displayed based on its status. Now we can simply use the status.opac_visible attribute to determine visibility. Signed-off-by: Dan Scott 2011-06-07 Dan Scott * Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm: Add opac_visible attribute to copy and serial unit statuses config.copy_status defines an opac_visible column, but that attribute was not being exposed in the holdings XML, so code that displayed copies and serial units based on the holdings XML had to hardcode the display based on the status ID or name instead of using the configured setting. To simplify display logic, teach holdings XML about the opac_visible column and expose its value in the status element as a new opac_visible attribute. Signed-off-by: Dan Scott 2011-06-06 Dan Scott * Open-ILS/web/opac/skin/default/xml/result/result_table.xml: Make copy status visibility match default config.copy_status settings Previous version of this patch had hardcoded copy status settings to 0, 7, 12 to match the "Available" settings, rather than the OPAC visibility settings available from config.copy_status for each status. Until config.copy_status.opac_visible translates into an opac_visible attribute on the status element in the holdings XML, this is probably the best we can do. Signed-off-by: Dan Scott 2011-05-30 Dan Scott * Open-ILS/web/opac/skin/default/xml/result/result_table.xml: Plug the many OPAC visibility holes in search result item display Check volume and circ_lib and copy status OPAC visibility (and deleted status in the case of volumes) in addition to the existing copy and copy-location checks. Worst hack is hard-coded copy status IDs of 0, 7, 12 - but this is currently used throughout the code, so one more can't hurt that much (OWWW). Signed-off-by: Dan Scott 2011-06-12 Dan Scott * Open-ILS/src/sql/Pg/upgrade/0554.unnest_search_query_parser_fts.sql: Remove 2.1 bits that infiltrated 2.0 database upgrades Core schema was fine, but the cherry-picked upgrade script didn't show any conflicts (naturally) so some pieces of the 2.1 schema that don't exist in 2.0 made their way into the 0554 upgrade script. Thanks to Ben Shum for catching this. Signed-off-by: Dan Scott 2011-06-11 Dan Scott * Open-ILS/src/sql/Pg/002.schema.config.sql, Open-ILS/src/sql/Pg/upgrade/0549.unnest_oils_xpath_table.sql, Open-ILS/src/sql/Pg/upgrade/0550.unnest_biblio_extract_metabib_fiel d_entry.sql, Open-ILS/src/sql/Pg/upgrade/0551.unnest_metabib_remap_metarecord_fo r_bib.sql, Open-ILS/src/sql/Pg/upgrade/0552.unnest_biblio_map_authority_linkin g.sql, Open-ILS/src/sql/Pg/upgrade/0553.unnest_action_hold_request_permit_ test.sql, Open-ILS/src/sql/Pg/upgrade/0554.unnest_search_query_parser_fts.sql , Open-ILS/src/sql/Pg/upgrade/0555.unnest_oils_xpath_table.sql, Open-ILS/src/sql/Pg/upgrade/0556.unnest_biblio_extract_metabib_fiel d_entry.sql: Update upgrade files that had conflicting numbers 0549 and 0550 were taken by other commits over time. Signed-off-by: Dan Scott 2011-06-11 Dan Scott * : commit f0ed4253afb59bbcfeffde752f4942eeaad3f9da Author: Galen Charlton Date: Fri Jun 10 17:34:51 2011 -0400 2011-06-10 Galen Charlton * Open-ILS/src/sql/Pg/300.schema.staged_search.sql: lp#795737: improve staff bib search copy visibility check An errant join in query used to see if a bib is visible in the search OU scope for a bib search initiated from the staff client signficantly degrade the speed of such searches. Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson 2011-06-10 Jason Etheridge * Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties: missing string for MFHD deletion Signed-off-by: Jason Etheridge Signed-off-by: Dan Wells 2011-06-10 Thomas Berezansky * Open-ILS/web/js/ui/default/actor/user/register.js: Mark invalid home ous as such in patron editor Signed-off-by: Thomas Berezansky Signed-off-by: Bill Erickson 2011-06-07 Dan Scott * Open-ILS/src/sql/Pg/002.functions.aggregate.sql, Open-ILS/src/sql/Pg/002.functions.config.sql, Open-ILS/src/sql/Pg/002.schema.config.sql, Open-ILS/src/sql/Pg/030.schema.metabib.sql, Open-ILS/src/sql/Pg/110.hold_matrix.sql, Open-ILS/src/sql/Pg/300.schema.staged_search.sql, Open-ILS/src/sql/Pg/pgmemcache-ou_tree_traversal_cache.sql, Open-ILS/src/sql/Pg/upgrade/0549.unnest_oils_xpath_table.sql, Open-ILS/src/sql/Pg/upgrade/0550.unnest_biblio_extract_metabib_fiel d_entry.sql, Open-ILS/src/sql/Pg/upgrade/0551.unnest_metabib_remap_metarecord_fo r_bib.sql, Open-ILS/src/sql/Pg/upgrade/0552.unnest_biblio_map_authority_linkin g.sql, Open-ILS/src/sql/Pg/upgrade/0553.unnest_action_hold_request_permit_ test.sql, Open-ILS/src/sql/Pg/upgrade/0554.unnest_search_query_parser_fts.sql: Use native unnest() db function instead of explode_array() Per LP 789747, the custom explode_array() database function was found to generate significantly slower results for searches than using the native (and equivalent) unnest() array function. Given that unnest() has been part of PostgreSQL since 8.4 and Evergreen 2.0 requires a minimum of PostgreSQL 8.4, this patch removes the definition of the explode_array() functions and replaces its usage with unnest(). Signed-off-by: Dan Scott 2011-06-03 Lebbeous Fogle-Weekley * Open-ILS/web/js/ui/default/actor/user/register.js: Prevent future dates of birth in patron editor The patron editor form allowed staff to enter a date of birth that takes place in the future. While it is theoretically conceivable (hah) that a library might register patrons that have yet to be born, it is unlikely enough that we will not even assign this behavior to an org-unit setting, but we will take the bold move of using a regular expression to prevent a future dates of birth at all. Note that if a library system travels into the past, this will cause all sorts of problems in the patron editor interface (not to mention overdues). Please do not mix Evergreen and time travel. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Dan Scott 2011-06-02 Dan Wells * Open-ILS/web/opac/skin/default/js/rdetail.js: Fix false MFHD editing cues (LP #791974) The in-DB serial holdings use the same general display code as the MFHD records, but were falsely triggering MFHD administration widgets when in fact no MFHD record exists. These holdings were already being marked, so this fix honors that mark. Signed-off-by: Dan Wells Signed-off-by: Dan Scott 2011-06-02 Dan Wells * Open-ILS/web/opac/skin/default/js/rdetail.js: Tweak MFHD scoping Three changes: 1) Add a closure for 'entryNum' value (currently used for some display placement and menu-entry correlation) 2) Remove depth-climb to simplify code and better approximate copy scoping 3) Move 'here' assignment out of the foreach Signed-off-by: Dan Wells Signed-off-by: Dan Scott 2011-05-27 Dan Scott * Open-ILS/web/opac/skin/default/js/rdetail.js: Fix rendering of MFHD records when ownership is out of scope Dojo would die with a null reference error when an MFHD record was retrieved that was outside of the current OU search scope. For example, if a given bib record had one linked MFHD record for BR1, and one linked MFHD record for BR4, the details page would choke trying to draw the MFHD holdings in a scope that only included BR1 and end up drawing nothing. Ungood. Moving the ownership check and invoking _holdingsDrawMFHD() only after ensuring that the record is within our scope resolves the problem. Signed-off-by: Dan Scott 2011-06-06 Dan Scott * Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm, Open-ILS/web/opac/common/js/config.js: LP 791546: advanced search ISBN/ISSN in .staff mode In 1.6, advanced search ISBN/ISSN searches always operated in .staff mode, returning results whether the results should have been visible to the user or not. This confused patrons who saw records to which they had no access. In 2.0, this behaviour changed so that advanced search ISBN/ISSN searches never operated in .staff mode. This confused staff who were used to retrieving records via the ISBN/ISSN search when they wanted to add holdings for their own library to the records. The pattern for addressing this problem and satisfying both use cases is the same - use the multiclass.query.staff method if we invoke the ISBN or ISSN searches with the .staff method name. One could easily refactor many of the search method bodies in this module to use the exact same logic, keying off the method name to identify the identifier field and the .staff portion of the method name to determine whether to invoke .staff mode or not. For now we just address the ISBN and ISSN entry points. Signed-off-by: Dan Scott Signed-off-by: Dan Wells 2011-06-03 Bill Erickson * Open-ILS/web/js/ui/default/acq/po/view_po.js: PO activation date display improvement Use the smarter Util.js date parsing code to prevent small time offsets in PO activation date display. Signed-off-by: Bill Erickson 2011-06-01 Dan Scott * Open-ILS/src/perlmods/OpenILS/Application/Reporter.pm: Whitespace cleanup in aisle 3 (O:A:Reporter) Signed-off-by: Dan Scott 2011-06-01 Michael Peters * Open-ILS/src/perlmods/OpenILS/Application/Reporter.pm: LP#740466 Sort report folders by name Add order_by to Reporter.pm to sort report folders by name Signed-off-by: Michael Peters Signed-off-by: Dan Scott 2011-06-01 Dan Wells * Open-ILS/src/perlmods/OpenILS/Application/Search/Serial.pm, Open-ILS/src/perlmods/OpenILS/Application/Serial.pm, Open-ILS/src/sql/Pg/002.schema.config.sql, Open-ILS/src/sql/Pg/upgrade/0543.data.reformat_generated_coverage.s ql: Serial holdings display consistency fix When holdings are sourced from both MFHD and the DB, display may be inconsistent due to a hard-coded ', ' in Serial.pm. This patch works around the problem by storing generated_coverage as a JSON array instead of a string, leaving display formatting to the OPAC. Signed-off-by: Dan Wells Signed-off-by: Dan Scott 2011-05-31 Michael Peters * Open-ILS/web/opac/locale/en-US/opac.dtd: LP#739444 Incrementing opac.dtd copyright date Signed-off-by: Michael Peters Signed-off-by: Dan Scott 2011-05-27 Jason Etheridge * Open-ILS/web/opac/locale/en-US/lang.dtd: indicate what date format to use for offline patron registration Signed-off-by: Jason Etheridge 2011-05-27 Thomas Berezansky * Open-ILS/xul/staff_client/server/circ/checkin.xul: Fix Hold Capture checkin mode oils_persist was trumping hardcoded values. Also, change how checked is set/unset for reliability. Signed-off-by: Thomas Berezansky Signed-off-by: Jason Etheridge 2011-05-26 Mike Rylander * Open-ILS/web/opac/skin/default/xml/home/index_body.xml: Patch suggested by Jason Boyer for LP#788601 The