LP#1450519: remove unauthorized access to library setting history This patch changes the current Library Settings editor so that it doesn't display the setting history for a setting that the user doesn't have the underlying view permission for. It also removes the coustl IDL class [config.org_unit_setting_type_log] from PCRUD. Access to the setting history is now done through a new method, open-ils.actor.org_unit.settings.history.visible.retrieve, which accepts an authtoken and a setting name. If the user has the relevant view permission, setting history entries at all of the OUs that they have the permission at are returned. If the user lacks the permission, an empty array is returned. If the setting has no permission associated with it, all history entries for the setting are returned. The user must have at least STAFF_LOGIN to retrieve any entries at all. To test ------- [1] As an administrator, make some changes to the values of a privileged library setting (such as one of the credit card ones) and an unprivileged one (e.g., lib.info_url). [2] Log in as a staff user without administration privileges and go to the library settings editor. Note that while the current value of privileged settings are not displayed, clicking on the history link displays the full history of the setting. [3] Apply the patch and repeat step 2. [4] This time, history for the privileged setting is not displayed, while history for an unprivileged setting continues to be available. Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: Shula Link <slink@gchrl.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
LP#1617556 - Remove openils_dojo.js references Somewhere along the way, openils_dojo.js was removed, but references remained. This removes them, hopefully helping to speed up page loads. Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Stephenson <jason@sigio.com>
LP1411422 Copy details repeated in search results when item/volume moved with parts attached Added the code in perl to respect the existence of parts. Both "transferring volume" and "transferring items". "Transferring items" was coded to use open-ils.cat.asset.copy.fleshed.batch.update which means most of the work was done in js. The web based staff client is coded to use open-ils.cat.transfer_copies_to_volume. Decided to use that method for xul as well. Making it more consistent with the "transferring volume" code. Considered coding it to move the part level holds to the destination part but it's possible that the source part still has items. Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
LP#1702968 - Add missing error string - mark item damaged. When marking an item damaged for a circulation that has been archived/aged, the patron receives an error that the string associated with staff.cat.util.mark_item_damaged.item_no_linked_patron is not there. This branch adds it. Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1705524 Closed dates editor handles no timezones Fix issue in closed dates editor where it failed creating new closed dates when an org unit had no value applied for the lib.timezone org unit setting. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP#1705524: Honor timezone of the acting library where appropriate This is a followup to the work done in bug 1485374, where we added the ability for the client to specify a timezone in which timestamps should be interpreted in business logic and the database. Most specifically, this work focuses on circulation due dates and the closed date editor. Due dates, where displayed using stock templates (including receipt templates) and used for fine calculation, are now manipulated in the library's configured timezone. This is controlled by the new 'lib.timezone' YAOUS, loaded from the server when required. Additionally, closings are recorded in the library's timezone so that so that due date calculation is more accurate. The closed date editor is also taught how to display closings in the closed library's timezone. Closed date entries also explicitly record if they are a full day closing, or a multi-day closing. This significantly simplifies the editor, and may be useful in other contexts. To accomplish this, we use the moment.js library and the moment-timezone addon. This is necessary because the stock AngularJS date filter does not understand locale-aware timezone values, which are required to support DST. A simple mapper translates the differences in format values from AngularJS date to moment.js. Of special note are a set of new filters used for formatting timestamps under certain circumstances. The new egOrgDateInContext, egOrgDate, and egDueDate filters provide the functionality, and autogrid is enhanced to make use of these where applicable. egGrid and egGridField are also taught to accept default and field-specific options for applying date filters. These filters may be useful in other or related contexts. The egDueDate filter, used for all existing displays of due date via Angular code, intentionally interprets timestamps in two different ways WRT timezone, based on the circulation duration. If the duration is day-granular (that is, the number of seconds in the duration is divisible by 86,400, or 24 hours worth of seconds) then the date is interpreted as being in the circulation library's timezone. If it is an hourly loan (any duration that does not meet the day-granular criterium) then it is instead displayed in the client's timezone, just as all other timestamps currently are, because of the work in 1485374. The OPAC is adjusted to always display the due date in the circulating library's timezone. Because the OPAC displays only the date portion of the due date field, this difference is currently considered acceptable. If this proves to be a problem in the future, a minor adjustment can be made to match the egDueDate filter logic. This work, as with 1485374 was funded by SITKA, and we thank them for their partnership in making this happen! Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Tina Ji <tji@sitka.bclibraries.ca>
LP#1312837 - Item Status - Alternate View - Holds/Transit tab: Transit and Hold information does not refresh When switching between copies that have different transit and hold information, the data in the hold/transit tab doesn't get cleared when there isn't a new hold or transit to clear it. Test Plan: Acquire the barcodes for 3 copies, one that is available, on that is in transit and one that is captured for a hold. Before Change: 1. Open item status alternate view and switch to hold/copy tab. Note that the labels default to saying that the item is in transit and captured for a hold before any barcodes are scanned. 2. Enter the available item and note that the labels changed to not in transit , not captured. 3. Scan in the In Transit for Captured item and note that the labels don't change when they should. 4. Scan in the available item and note that the hold or transit data isn't cleared. After Change: 1. Enter the barcodes for the 3 copies with different statuses and note that the Holds/Transit information now updates correctly. Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
LP#1205190: quiet some CSS Mozilla extensions warnings. * -moz-dialog-text is actually -moz-dialogtext * -moz-outline is deprecated, use outline * -moz-border-radius has been removed, use border-radius * -moz-border-radius-topleft (etc) are now border-top-left-radius * Fix some other CSS errors. Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Conflicts: Open-ILS/src/templates/opac/css/style.css.tt2 Open-ILS/web/css/skin/default/register.css Open-ILS/web/opac/skin/default/xml/home/homesearch.xml Open-ILS/web/reports/oils_rpt.css Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml Open-ILS/xul/staff_client/server/serial/notes.xul Open-ILS/xul/staff_client/server/skin/circ.css Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP#1244547 Fix reference to new isFiltered variable This commit completes the intention of the previous commit, which accidentally checked the isFiltered object instead of its value. Signed-off-by: Remington Steed <rjs7@calvin.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1244547 Maintain Filter Settings on Library Settings Editor After applying a filter to the rows on the Library Settings Editor, and then selecting a different OU, the filter settings are not considered unless the user clicks the "Filter" button once again. This patch maintains the filter settings on the edior until the user clicks the "Clear Filter" button. Signed-off-by: Adam Bowling <abowling@emeralddata.net> Signed-off-by: Remington Steed <rjs7@calvin.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1612752 - s/abort/cancel/ in user interfaces. Replacing the technical term "abort" with the more end-user-understandable "cancel". In client-visible language. The underlying code has retained "abort". Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1312824: Change success message for transferred holds The holds transferred success message should clarify which holds were transferred to mitigate potential confusion. Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1687971 - Make copy locations in the OPAC clickable. Adds a url field to asset.copy_location. The presence of a url in the field will cause the copy location to display as a link in the OPAC. Urls can be edited in the Copy Locations Editor. Additional contributors: Martha Driscoll, Christine Morgan, Suzanne Paterno. Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1491875: avoid erroneous "unsaved data" popup during MARC record creation Test plan --------- [1] Navigate to Cataloging -> Create New MARC Record. [2] Choose a template, click Load [3] Enter data in a fixed field, for example, Date1 [4] Enter data in a MARC field such as 100 [5] Click Create Record: The "This tab may have unsaved data. ..." pop up will appear. Clicking OK will save the record and take the user to their default view of the record. Clicking Cancel will save the record and return the user to the MARC Edit screen. The behavior when clicking Cancel can lead to confusion as to whether the record has actually been saved. [6] Apply the patch and repeats steps #1-#5. [7] This time, no extraneous unsaved data warning should appear. Note that this patch's kludge doesn't fix all possible instances of the warning; see https://bugs.launchpad.net/evergreen/+bug/1491875/comments/6 for details. Signed-off-by: Jason Etheridge <jason@esilibrary.com> SIgned-off-by: Andrea Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP1244354 Unnecessary user refresh after deletion can cause permission error obj.refresh_all() was being called no matter what. It needs to be called only when there is an issue deleting the patron. On success, this patch will simply present an informational message to the user. Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
LP#1616220 Fixes for css errors that show up in the xul staff client console. To test ------- [1] In the XUL client, try various interfaces including acquisitions, the patron editor, the reporter, the library settings editor, serials management and patron surveys. Using the error console, verify that applying this patch slightly reduces the number of CSS warnings reported. [2] Repeat step 1 using the web staff client, in particular while looking at the embedded acquisitions interfaces. Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
lp1261835 stop colliding bill UI refreshes for want of promises in Angular :) population of the bill list in this implementation is asynchronous, but the rest of the refresh action is not, and it's sadly being invoked multiple times. There are different ways to fix this, but using a semaphore seems to work. Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Dawn Dale <ddale@georgialibraries.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
LP#1576435: Force "Include inactive patrons?" on patron reg duplicate search In the XUL client, duplicate patron checking in the patron registration interface now includes inactive patrons (see LP#1217052). However, if you click on the link "Found X patron(s) with the same name," the resulting patron search does not always include inactive patrons by default (instead, the value of the "Include inactive patrons?" checkbox is cached from your last patron search, as usual). To prevent user confusion in this scenario, this commit forces the linked patron search in the XUL client to always include inactive patrons. Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
LP 1507807: Show Alert dialogs in XUL staff client. If the circ.in_house_use.copy_alert org setting is true and the copy has an alert_message, then we display an alert dialog with the copy alert message when doing an in-house-use in the XUL staff client. If the circ.in_house_use.checkin_alert org setting is true and the copy location checkin_alert field is also true, then we display an alert dialog with the "item needs to be routed to..." alert message when doing an in-house-use in the XUL staff client. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>