Galen Charlton [Fri, 2 Jun 2017 17:13:50 +0000 (13:13 -0400)]
LP#1208875: follow-up to standardize extract fields
This patch removes the proposed custom methods for extracting
title, author, and record format in favor of tweaking
->fetch_user_circ_history to invoke unapi.bre and adjusting
the template to use get_marc_attrs. Also, nowadays
->fetch_user_circ_history can flesh what we need it to without
having to rely on the existance of an action.circulation row,
which won't be present if the circ was aged but was otherwise
retained in the user circ history.
The result is slower than the previous approach, but still
retains the core idea of getting A/T out of the equation, and remains
much faster than the A/T approach.
Dropping use of unapi.bre would speed things up a bit more, as it
was added only to match the addition of the record format column
in the CSV output. Drop the column, and we no longer need to worry
about MVFs.
There would also be opportunities to improve caching further. Bib
display fields, when it comes, will likely help even more, as it
would mean being able to drop a lot of the XML parsing currently used.
This patch also adjusts misc_util.tt2 so that including it doesn't
result in an unwanted blank line.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
LP 1208875: Fix circ history CSV download for many circulations.
We no longer retrieve a user's circ history for download via
action/trigger and instead build the CSV data right in the TPAC.
The reason for this change is that action/trigger imposes just
too much of a delay between initiating the retrieval and getting
the data, particulary for patrons who have a large number of
circulation history entries, for certain values of large.
The new code uses the CStoreEditor to make JSON queries to retrieve
only the information needed for CSV. Testing revealed that using
the existing fetch_user_circs method in EGCatLoader/Account.pm was
still too slow for the more extreme patrons. The new code also
caches most of the retrieved bibliographic data. Testing revealed
that most patrons get multiple checkouts of the same things, or
multiple parts of a multiple part television series. Caching the
bib data for these records has shaved several seconds off retrieval
time in testing.
This branch makes use of a new, MVF, view when retrieving format
information. It is thus unsuitable as-is for backport before
2.6.
Along the way, we have accreted a generically reusable CSV filter
for Template Toolkit. That could be useful not only in other
parts of Evergreen, but in other projects.
Finally, this commit leaves the old action/trigger code in the
database. Right now, it makes a good reference if anyone wants
to study what has been changed. It can be removed later, if so
desired.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Ben Shum [Wed, 21 Jun 2017 19:14:55 +0000 (15:14 -0400)]
i18n: fix syntax for Spanish lang.dtd
As noted by FreddyEnrique in IRC, there was a syntax problem for the Spanish
file lang.dtd that caused an error when trying to open the Closed Date Editor.
Jason Boyer [Wed, 31 May 2017 19:29:46 +0000 (15:29 -0400)]
lp1642035: Editing User Hold Preferences
The JS for hold notification values was replacing rather
than concatenating so only the furthest-right true value
would be saved. And because an ng-if directive creates
a child scope[1], the hold_notify_sms primitive could
never be true. Changed hold_notify_* to an object to
avoid this.
An ng-model directive was added to enable
opac.default_sms_notify but opac.default_sms_carrier
will still require some work to enable / replace.
pre-patch:
Try to do anything with default sms number, fail.
Try to set more than one of phone + email notification, fail.
Try to set sms notification to anything, fail.
post-patch:
Default sms notify value is populated and can be changed.
All 8 possible combinations of hold notify options can be set.
Still can't set opac.default_sms_carrier value, needs additional work.
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Cesar Velez [Mon, 19 Jun 2017 21:40:38 +0000 (17:40 -0400)]
LP#1696495-WebStaff fix user_settings data caching between patron views
Appends a few promises to make sure that the user_settings are refreshed
each time a user is loaded from within patron app.
Note that testing this requires that LP1642035's fix be in place...
Otherwise you can't properly add user_settings inputs in Webstaff.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Kathy Lussier [Tue, 20 Jun 2017 20:31:43 +0000 (16:31 -0400)]
LP#1693560: Remove permission check for retrieve tag table function
The permission check for the retrieve tag table function was preventing
users who don't have the UPDATE_MARC permssion from performing searches
in the staff catalog. Since there's nothing confidential in the table,
this commit removes that permission check. Thanks to Jason Boyer for
finding the source of the problem.
Bill Erickson [Wed, 24 May 2017 20:00:09 +0000 (16:00 -0400)]
LP#1691473 Internal Apache HTTP port configuration
Adds an optional new Apache/mod_perl configuration variable for defining
the port Apache listens on for HTTP traffic. This resolves an issue
where added content lookups attempting HTTP requests on the local Apache
instance on port 80 failed because Apache was using non-standard ports.
To test:
[1] Set a value for OILSWebInternalHTTPPort that's not "80".
[2] Restart/reload Apache
[3] Load a record detail in the catalog
[4] Confirm opensrf logs show:
"tpac: added content connecting to <ip-address>:<new-port> / <hostname>
<new-port> should be the value configured for OILSWebInternalHTTPPort.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Chris Sharp [Wed, 31 May 2017 12:22:58 +0000 (08:22 -0400)]
LP#1694696 - Check for blank SMS Carriers in A/T reactor
Currently, the get_sms_gateway_email subroutine does not check
for the truthiness of sms_carrier, which can result in catastrophic
failure for a running server. This adds that check.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Adam Bowling [Thu, 22 Jan 2015 16:20:28 +0000 (11:20 -0500)]
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.
Update non-cat counts in the patron summary side bar and show the full
set of non-cat circs in the Non-Cataloged Circulations tab as non-cat
circs occur in the patron checkout interface.
Consistent with the XUL client, avoid updating tab-level 'items out'
counts with non-cat circs.
Adds a new work log action for 'noncat_checkout' so the correct data can
be extracted. As with the XUL client, this appears in the work log as a
'checkout' with no copy.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Dan Wells [Mon, 24 Apr 2017 18:29:04 +0000 (14:29 -0400)]
LP#1686194 Account for adjustments when generating fines
Fine generation stops at a predetermined 'max fines' amount, but this
does not account for possible adjustments which lower the effective
fine amount. This situation is common in cases where lost items are
returned, and the library wants to generate additional overdues upon
that event.
With this commit, fine generation will pull in any adjustments applied
to overdue fines, and use those to offset the current total fine when
checking for max fines.
Also includes test for this condition.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Avoid multiple .resolve() calls on the main egStartup promise by asking
egEnv to fetch the new date/time org unit settings. Related, make the
pathway for adding new universally-loaded data functions more obvious
and consistent in egStartup by putting them right up at the top.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Etheridge [Mon, 5 Jun 2017 21:32:55 +0000 (17:32 -0400)]
lp1691237 webstaff: fix Format Dates and Format Times
This change deprecates the existing Format Dates and Format Times settings
and adds two settings for use with the webstaff client:
Format Dates with this pattern
Format Date+Time with this pattern
These settings use format strings as documented here:
https://docs.angularjs.org/api/ng/filter/date
There is overlap with how the Dojo formats worked, but also some differences.
The original Format Dates and Format Times settings worked together, but the
new settings work independently. Certain field elements will use one, and
certain field elements will use the other. These distinctions are hard-coded
in the various UI templates, with the idea being that timestamp fields in
which the date component alone is sufficient information (for example, DOB)
will use the Format Dates setting. Fields where the time component is
important (for example, Checkout Time) will use the Format Date+Time setting.
When the settings Format Dates and Format Date+Time are unset, we will default
to "shortDate" (M/d/yy) and "short" (M/d/yy h:mm a), respectively.
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Etheridge [Thu, 8 Jun 2017 05:02:17 +0000 (01:02 -0400)]
lp1686459 webstaff: item editor form validation
Specifically for stat cats, we mark the select statements as required if the
corresponding stat cat is required, but we can also start using HTML5 validation
tests elsewhere in the form now as well.
I also fixed the <NONE> entries so that they display instead of blank entries,
and forced the Price, Cost, and Deposit Amount fields to be of input type number,
though you could still enter invalid numbers here from the database's POV, so
better validation tests are still needed there.
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Etheridge [Tue, 6 Jun 2017 20:59:02 +0000 (16:59 -0400)]
LP#1671596 webstaff: add Adjust to Zero option to Bill UI
To test
-------
1. Apply patch.
2. Go to a patron record that has one or more active billings.
3. Note that in the billing grid, there is now an "Adjust to Zero"
action.
4. Select one or more billings and apply the action.
5. Verify that the billings are adjusted to zero and that
the adjustments show up as "payments".
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Etheridge [Fri, 2 Jun 2017 16:59:24 +0000 (12:59 -0400)]
LP#1616980 webstaff: protect "magic statuses" when editing copies
This patch fixes a bug where the web staff volume/copy editor
could be used to put items in or out of the following status:
1 - Checked out
3 - Lost
6 - In transit
8 - On holds shelf
16 - Long Overdue
18 - Canceled Transit
To test
-------
1. Choose to "Edit Items" on an Available copy.
2. Status field is fully editable. Click to open the dropdown
3. Click "Checked out"
4. Click "Save & Exit"
5. Result is that the item status changes to 'checked out',
which should not happen.
6. Choose to "Edit Items" on an Checked out copy.
7. Status field is fully editable. Click to open the dropdown
8. Click "Available"
9. Click "Save & Exit"
10. Result is that the item status changes to 'available'.
11. Apply the patch and repeat steps 1-10. This time, the magic
status are marked as disabled in the copy status selector.
If the item is already in one of the magic statuses, if the
user attempts to change the status, the interface will appear
to allow it, but the change will be silently ignored.
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Webstaff Item Status Details => Actions menu is now scrollabled for
consistency with the matching Actions menu in the List grid. Menu is
also classed with "dropdown-menu-right" so menu entries pull left,
avoiding scroll / overflow funkiness when the menu expands.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Etheridge [Fri, 9 Jun 2017 14:11:21 +0000 (10:11 -0400)]
webstaff: Item Status bugs with Transfer Items...
...to Previously Marked Volume
Now it throws up the override dialog only if an ils event is returned,
and it doesn't prematurely refresh the screen or re-scan a barcode
while the dialog is open.
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Etheridge [Fri, 9 Jun 2017 13:38:02 +0000 (09:38 -0400)]
lp1533326 webstaff: Actions for Item Status Detail View
This patch makes the actions available to the item status
grid view also available in the detail view. It also adds an
indicator to the Detail View for when an item is deleted.
Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org> Signed-off-by: Andrea Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
In mobile view, "rotate" the temporary and permanent list
tables 90 degrees and put the column headings on the left/right
side. data-label attributes are used to stash copies of the
column labels; the end result is similar to how the current
circulations table is displayed on narrow screens.
- Moved action dropdown out of header row so that it is no longer
hidden on mobile view.
- Hid less essential columns on mobile view, leaving only title / author.
- Sized and lined up buttons more neatly on both mobile and normal view.
- Added a title to the section for editing a list title and description.
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>
Dan Scott [Thu, 8 Jun 2017 15:32:36 +0000 (11:32 -0400)]
LP#169787 High contrast text in patron summary alert buttons
Rather than displaying red text on the default blue background for alert text
on an active button, display the alert text as a much higher contrast
red-on-white.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Boyer [Fri, 12 May 2017 19:14:54 +0000 (15:14 -0400)]
LP1690434: Date Comparisons in the Reporter
Because of the way the where clause is constructed
in queries using the Year + Month Transform reports
using some types of operators could produce invalid
SQL.
To test:
put together a simple report template with a date
in the Basic Filters section, using the Year + Month
transform and the On or After operator. (a count of
circs with an xact_start filter is a simple way to
set this up.) Schedule it with a relative date
such as 1 month ago and run it.
Pre Patch: the report will fail and the error text
will reference a missing text >= double precision
comparison function.
Post Patch: you'll get a count of how many circs
were opened last month (or whatever report you
wrote).
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Galen Charlton [Tue, 30 May 2017 19:51:23 +0000 (15:51 -0400)]
LP#1694497: fix record links on 2nd+ page of grouped results
This patch fixes a bug wherein the second (and subsequent)
pages of search results in the public catalog (when group
formats and editions is in effect) does not correctly generate
links to hits that are not part of of a multi-bib metarecords.
To test
-------
1. Keyword search concerto for "piano"
2. Check the box for "Group formats and Editions"
3. Click Page 2
4. Click any result that is not a group (missing the parentheses after
the title). You will get redirected to the my account page.
5. Apply the patch and do steps #1-4 again. This time, you should
end up on the record details page.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Jason Boyer [Fri, 25 Apr 2014 16:45:34 +0000 (12:45 -0400)]
LP1312824 open-ils.circ.hold.change_title fix
Add a capture_time => undef limit to both change_title
APIs to prevent currently captured holds from being reset
when moving holds from one title to another.
More work is needed to prevent items currently in transit
from having their transits canceled.
Test plan
---------
1. Create a bib with multiple holdings
2. Add multiple holds to this title and capture one of them - Item
will have a status of On Holds Shelf
3. Open another bib record, open Actions for this Record menu,
Mark as Hold Transfer Destination
4. Return to the record that has a captured hold, open Actions for
this Record, Transfer all Title Holds
5. Check Captured hold, Item status is Available, hold has been reset
and now points to the new bib record.
With the patch applied, steps 2-5 above should be repeated, but this
time in step 5 the hold will still be on the original record and the
item's status will still be On Holds Shelf.
Adds a new 'retention_interval' column for Action/Trigger Event
Definitions and an action_trigger.purge_events() function for deleting
events that have exceeded their configured retention time, including any
outputs linked to those events.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Remington Steed [Thu, 25 May 2017 18:32:57 +0000 (14:32 -0400)]
Docs: Fix buggy AsciiDoc rendering of backticks
Apparently, AsciiDoc matches backticks (`) with single quotes (') as a
valid quote pair, and this happens before matching a pair of backticks.
So in cases where a pair of backticks is followed by only one single
quote (not within a word), the first backtick is treated as a single
quote, thus breaking the backtick pair and not applying the intended
monospace formatting.
This commit fixes two such cases by escaping the backticks. This doesn't
prevent the same problem in the future, but I haven't found any way to
change this parsing behavior.
Jason Etheridge [Fri, 9 Nov 2012 21:47:36 +0000 (16:47 -0500)]
LP#1077212: add qstore to eg_db_config.pl --update-config list
To test
-------
[1] After applying the patch, run eg_db_config --update-config --service all
as per the upgrade instructions.
[2] Verify that the <open-ils.qstore> section of opensrf.xml contains
the correct database credentials.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Michele Morgan [Mon, 8 May 2017 19:08:11 +0000 (15:08 -0400)]
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.
Galen Charlton [Fri, 19 May 2017 02:28:49 +0000 (22:28 -0400)]
LP1574141: minor code tweaks
- return the BAD_PARAMS event if client provides neither patron ID
nor contact value
- more precisely identify missing parameters
- standardize indentation
LP1574141 - Allow invalidate for all patrons with the same contact.
Teach the open-ils.actor.invalidate.* methods to allow invalidating
by the contact value, so all patrons with that contact value can have
it invalidated with one call.
This adds a new parameter for the contact value (email address, phone
number). Then all customers with that value have it invalidated from
their account.
This somewhat simplifies writing a cli script for invalidating email
addresses since the script doesn't have to look up the user first.
The ability to invalidate all with the same contact value was already
there, it just wasn't exposed.
Testing:
1. Make sure the normal staff client invalidate buttons still work.
2. Use srfsh to try the call with a contact value.
request open-ils.actor open-ils.actor.invalidate.email "<authkey>" "" "" "" "test@email.com"
Kathy Lussier [Wed, 17 May 2017 16:11:33 +0000 (12:11 -0400)]
LP#1677902: Remove search formats from advanced search limiter block
The original behavior of the advanced search limiter block was to remove
search formats from the display because it is available for limiting in the
search bar. Other code broke this behavior, and I've now restored it by
adding the ignore search format code to the searchbar.tt2 file. It also fixes
a problem where the search format limiters were incorrectly displaying on the
low hits page.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Jeff Davis [Thu, 18 May 2017 22:43:53 +0000 (15:43 -0700)]
LP#1690468: fix Exclude Electronic Resources checkbox with advanced search limiters
When advanced search limiters are applied, you cannot successfully
uncheck the Exclude Electronic Resources checkbox. When you uncheck it,
your current search is reloaded, but e-resources are still excluded
(and the box remains checked).
When you use the checkbox to exclude e-resources, the search form on the
results page contains a hidden input element:
This commit uses Javascript to remove that element from the search form
when the box is unchecked, before submitting the search.
Test plan:
[1] Enable the "Exclude Electronic Resources" checkbox in config.tt2.
[2] Do an advanced search, applying at least one search filter (e.g.
Language = "English").
[3] On the search results page, check the Exclude Electronic Resources
checkbox. This repeats your search, excluding e-resources.
[4] Uncheck the Exclude Electronic Resources box. Your search is
repeated, but e-resources are still excluded and the box remains
checked on your new results page.
[5] Apply this fix.
[6] Refresh the page or clear your browser cache, and try to uncheck the
Exclude Electronic Resources box again. This time, it should work:
e-resources will no longer be excluded, and the box is unchecked
when your new results page loads.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Technical documentation and sample stored queries for
the open-ils.qstore service, written by Scott McKellar
and copyright 2010 by the Equinox Open Library Initiative.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Galen Charlton [Fri, 19 May 2017 13:37:49 +0000 (09:37 -0400)]
LP#1564508: disable selecting Hatch status menu item
Add the "disabled" class to the <li> for the navbar menu
item that displays Hatch's status, to avoid making users
think that there's an action available to them by selecting
that menu item.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Bill Erickson [Thu, 17 Nov 2016 20:33:02 +0000 (15:33 -0500)]
LP#1564508 Hatch status in hamburger, remove statusbar
* Move the Hatch connectivity status indicator into the upper-right
hamburger menu.
* Removes the long-hidden hatch/websockets statusbar.
* Since the Hamburger forces a re-digest of the interface when opened,
the code no longer attempts to force the page to re-$apply() when
the Hatch connection opens or closes. It's no longer necesssary
(and was buggy).
* The WebSockets connectivity status is not added to the hamburger. The
websockets connection will go up and down regularly as connections
expire and reset. Having the indicator flash could lead to
unneccesary panic. Plus, if websockets are down, staff can't log in
anyway.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Add a --descendants option to marc_export to get records for an
org. unit and its descendants.
To test
-------
[1] Run marc_export with -i --library FOO. Verify that the resulting
records have 852 fields only from FOO.
[2] Run marc_export with -i --descendants FOO. Verify that the resulting
records have 852 fields from FOO *and* all descendants of FOO.
[3] Run marc_export using various combinations of --library and --descendants;
verify that items from the expected libraries show up as 852 fields.