Remove the grid-tooltip logic that captured the cell content into a
template-level variable so the content only needed to be generated once
for both the tooltip and cell display. This logic fails to handle cases
where the cell content is dynamic, typically the result of row
attributes being modified via external process.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
LP#1789442: turn of Perl taint-checking on 14-OpenILS-Utils.t
This works around a bug in DateTime::TimeZone 1.63
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737265> that
causes one of the new tests to spuriously fail on Ubuntu 14.04 LTS.
As the comment indicates, taint checking is not typically enabled
when running Evergreen, but we may want to consider changing
that should tuits arise.
LP#1789442: fix editing due date of hourly loans in web staff
This patch fixes a bug where editing the due date of an hourly
loan would result in the time portion always getting set to 00:00.
To test
-------
[1] Set up some daily and hourly loans in your database.
[2] Apply the patch.
[3] From the items out page, edit the due date for one or
more hourly loans. Verify that the resulting due date
is set correctly.
[4] From the items out page, edit the due date for some
daily loans and verify correctness. In particular,
verify that the resulting due date is /not/ the
following day if testing in time zones in the Americas.
LP#1552778: add timepicker to webstaff checkout page
This patch adds a timepicker to go along with the datepicker
if the operator invokes the option to set a specific due
date.
To test
-------
[1] Arrange circ policies to have both hourly and daily loans.
[2] Apply the patch.
[3] Check out an item for an hourly loan. Verify that the
due date and time is per policy.
[4] Check out an item for a daily loan. Verify that the
due date is per policy.
[5] Check out an item for an hourly loan, but set a specific
due date and time. Verify that the due date and time matches
the selected value.
[6] Check out an item for a daily loan, but set a specific
due date. Verify that the due date matches the selected
value; note that any time component is ignored since
for daily loans the time gets normalized to 23:59.
LP#1552778: make clean_ISO8601 recognize 'Z' as a timezone specifier
Prior to this patch, clean_ISO8601 would ignore 'Z' as a timezone
specifier (e.g., '2018-09-21T15:34:21Z') and treat it as if the
timestamp were in the server's time zone, leading to incorrect
results (e.g., '2018-09-21T15:34:21-04:00') unless user, client,
and server all happen to be in UTC+0. In particular, this allows
date strings emitted by the JavaScript Date object's toISOString()
method to be correctly parsed, as those strings invariably use
'Z' as the timezone specifier.
To test
-------
[1] Apply patch.
[2] Verify that regression test in t/14-OpenILS-Utils.t passes.
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.
In our effort to consistently call items/copies items, we accidentally replaced
the action "Copy Current Row" with "Item Current Row." This branch restores
the correct language.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
For some reason, parts were protected during item transfer, but stat cats were
not. This commit protects them by fleshing stat cat entries in the outer
item transfer method.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Dan Wells [Fri, 21 Sep 2018 14:45:59 +0000 (10:45 -0400)]
LP#1791340 Webstaff: Don't backdate when we're not
There was code in the webstaff checkin interface which attempted to
remove the backdate parameter when it wasn't needed, as its mere
presence has a negative effect on the checkin process. This fail-safe
was not working, however.
Instead, let's build on the same check function used for the display,
so we can be more sure that if the user doesn't see that they are
backdating, the interface will not treat it as a backdate, and
vice-versa.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1745427: account for change in prediction patterns
This patch fixes a bug in the web staff client where changing
the active prediction pattern for a subscription would not
reset the base issue when predicting the next run of issues.
To test
-------
1. Set up a subscription in the web staff client with a prediction
pattern (e.g., monthly). Predict some issues.
2. Create/select a new prediction pattern for a new publishing schedule,
e.g., quarterly.
3. Activate the new pattern and deactivate the old pattern.
4. Click Predict New Issues.
5. Enter in the new publication date/enumerations/chronology as needed.
6. Enter a prediction count and select Save. Note that new issues
appear to be based on the previous pattern.
7. Apply the patch, delete the issues created in step 6, then repeat
steps 4-6. This time, new issues should be created using the new
prediction pattern.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
This commit lightly refactors the badge org logic and includes the ancestors
of location group owners in the list of badge orgs, instead of only the direct
owners.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jeanette Lundgren <jlundgren@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Mike Rylander [Mon, 17 Sep 2018 15:33:29 +0000 (11:33 -0400)]
LP#1781480: Closures remeber values in subtle ways...
... and we must take care to avoid that. This commit forces a state variable
to be statically assigned an empty list rather than depending on the idiomatic
undef to vivicate an empty list. This is important for all OpenSRF methods,
and manifests here as a search "remembering" a previously chosen location
group. A comment to that point is included for our future selves.
The core probably arises from the fact that, in the end, OpenSRF methods are
generated closures.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jeanette Lundgren <jlundgren@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Mike Rylander [Mon, 9 Jul 2018 20:31:50 +0000 (16:31 -0400)]
LP#1732761: Fetch locations immediately for display
This commit closes a race condition where location labels cannot be rendered
for the "multiple locations" widget because fetching them takes longer than
the initial render of the attribute editor.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Mike Rylander [Tue, 3 Jul 2018 20:57:27 +0000 (16:57 -0400)]
LP#1732761: Batch item edit and multiple values per field
Previous to this commit, the display of multiple different values for a field
in the item attribute editor was simply to display no value. Here we add a UI
component that presents the list of unique values, the number of selected
copies that use each value, and the ability to select just those copies using
a particular value by clicking on the desired value.
Jason Boyer [Thu, 13 Sep 2018 11:39:06 +0000 (07:39 -0400)]
LP1792371: Fix De-select Whole Page Action
When using the checkbox to select or de-select the
entire page of results, the de-select action changes
the check and highlight states of the items on page
but doesn't actually remove the records from the
basket. This branch corrects that so that you can
select and de-select the entire page of results
and your basket contents are what you would expect.
Bill Erickson [Sun, 16 Sep 2018 22:48:59 +0000 (18:48 -0400)]
LP#1792484 Patron preferred name in hold shelf dialog
Display the patron preferred name in addition to the primary name in the
route-to-holds-shelf dialog. As with primary name, preferred name is
hidden when an alias is applied.
To test
[1] Add a primary first, middle, and/or last name value to a patron.
[2] Place a hold for the patron with the pickup library matching the
login library.
[2] Capgture the hold via the Checkin interface (instead of the hold
capture interface) and note the preferred name display.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
For more consistency: Changing all staff client instances of Copy Location to
Shelving Location. We also replace Volume with Call Number and use Holdings
for a combination of copies/volumes. Also replacing the 'Add Copies' option
on the bib record page with 'Add Holdings' as was previously discussed on
the open-ils-general list.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
For better consistency for the terms used in the client, let's use items instead
of copies, which was the preference of most people who provided feedback on bug 1538691.
Adds a new row to the patron account preferences page for Preferred
Name. The field only displays when a preferred first, middle, or last
value is present and follows the same display logic as preferred names
in the staff client, where first and last fall-through to the primary
name.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Bill Erickson [Sun, 16 Sep 2018 23:25:44 +0000 (19:25 -0400)]
LP#1792482 Only require first/last in pref name display
When displaying a patrons preferred name, always show a value for first
and last name, starting with the preferred name and defaulting to the
primary name, but only show values for prefix, middle name, and suffix
when a preferred variant is applied.
This avoids scenarios where patrons use their middle name as their first
name, with no preferred middle name applied, resulting duplicate
first/middle names displaying.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Adds constraint triggers to action.*transit_copy tables to prevent
creation of new transits for a copies when an existing transit of any
type exists for the copy with a NULL dest_recv_time and cancel_time
values (i.e. an open transit).
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
In the staff client checkin service, track which copies are currently
in-flight to the checkin API call and prevent additional checkin API
calls for any copy that is currently in flight.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Jason Boyer [Thu, 21 Jun 2018 19:57:41 +0000 (15:57 -0400)]
LP1735816: Delete Copy Notes in the Web Client
A combination of calling convention errors and
template picky-ness prevented the deletion of
copy notes in the web client. This patch returns
that ability.
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Amy Constantino <aconstantino@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
With the new hold targeter battle-tested for over a year,
it's now time to promote it to default, deprecating the
older version. This commit renames the old targeter to
"hold_targeter_legacy.pl" and the new to "hold_targeter.pl",
and adapts the example crontab to use the new targeter's
parameter syntax.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
This patch allows report templates of version 4 and earlier
(which would have been created by the XUL staff client) to
be upgraded to template version 5 (used by the web staff
client) when the user clones a report. This closes a limitation
introduced in the reporter module for the web staff client.
Note that during the conversion, inner joins are used by
default when IDL classes have a 'has_a' relation rather than
defaulting to left outer joins, improving correctness of the
generated SQL query.
To test
-------
[0] Apply the patch.
[1] In a test database that has reporter templates created
by (or for) the XUL staff client, create clones of
those templates.
[2] Verify that the output of reports created using the new
templates matches output of reports from the original
templates.
- Apply scaffolding fixes to Aquisition Patron Requests,
Circ Age to Lost, and Auto Print settings UIs, preventing
Org Selector from taking up entire width of screen.
The display behavior of the org selector changed when migrating to a
typeahead. In some cases, the boundaries of the input need to be more
clearly defined or it will fill the page horizontally.
This allows for type-to-entry of the org selector. A few additional
bits of logic are added to support click-to-open of the selector
regardless of the selected value.
Jason Etheridge [Tue, 10 Jul 2018 23:46:04 +0000 (19:46 -0400)]
lp1739286 default search box in Z39.50
This change tweaks the layout of search fields in the web client Z39.50
interface and adds radio buttons for the default search field to auto-focus.
The behavior is "sticky" without the need for an explicit Save action. If the
current default field is not present due to a given combination of selected
services, then no field will be focused by default.
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP#1792429: calculate queue position in correct order
This patch ensures that the relative hold queue position
displayed in the webstaff Hold Shelf and Record -> View Holds
interfaces is calculated in the correct order, i.e., (cut-in-line aside)
with holds requested earlier having a lower queue position than
holds requested later.
To test
-------
[1] Set up a bib with a number of hold requests.
[2] Under Record -> Viwe Holds, note that the queue
positions are reversed, with later holds having lower
queue positions.
[3] Apply the patch and repeat step #2. This time, the queue
positions should be correct.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Two long-overdue org unit settings made reference to "lost", being
apparently copied from the similar settings about lost items. This fixes
the wording, both in the settings database table and in the docs.
Signed-off-by: Remington Steed <rjs7@calvin.edu> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Kathy Lussier [Wed, 29 Aug 2018 14:58:20 +0000 (10:58 -0400)]
LP#1738688: Add cancel time to Most Recent Transits
Adds the transit cancel time to the Most Recent Transits section of
the Item Status Holds / Transit tab.
Test plan:
Place an item in transit and then cancel the transit. Retrieve the item in
Item Status / Detail View. In the Holds / Transit tab, there is no indication
the transit has been canceled before loading the patch. Post-patch, the
cancel time will display.
open a new staff client tab to the record's opac view, not a new opac tab
Signed-off-by: a. bellenir <ab@grpl.org> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
This patch ensures that somebody who installs a maintenance
release of 3.0 or 3.1 that includes update 1130, then subsequently
upgrades to 3.2 *and* applies the schema update scripts piecemeal
doesn't suffer a regression on actor.usr_merge not updating
Vandelay session ownership or patron name keywords.
It's possible to merge a user with itself using the actor.usr_merge
database function. This does not produce a useful result. One ends
up with a user that is flagged deleted, has a null card field, and is
likely to have their addresses and other cards deleted from the
database.
A simple check at the top of the database function to bail if the
src_usr and dest_usr are the same prevents this from happening. That
is the change that this commit makes.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Chris Sharp [Tue, 7 Nov 2017 21:49:37 +0000 (16:49 -0500)]
LP#1269574 - Exclude backordered copies from deletion.
When canceling a lineitem with a cancel reason that
keep debits = true, make sure we don't delete those copies.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: John Amundson <jamundson@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Without the required attribute in the grid template
declaration, the Bill# column *had* to be enabled for
bill payments to work. This adds required attribute to
the Bill #, so that it's fetched regardless of whether
displayed or not, so posting payments work correctly.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: John Amundson <jamundson@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Jane Sandberg [Mon, 10 Sep 2018 18:23:12 +0000 (11:23 -0700)]
LP 1743654: Removing a duplicate flesh_fields array entry
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: John Amundson <jamundson@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Jane Sandberg [Mon, 10 Sep 2018 18:16:51 +0000 (11:16 -0700)]
LP1743654: Fleshing out the Created By column in Item Status
To test:
1) Scan an item into Item Status.
2) Turn on the Created By column.
3) Note that the Created By column shows the ID of the user
that created the record.
4) Apply this commit and repeat steps 1-2.
5) Note that the Created By column now shows the creator's
user name as a link, which opens the creator's record in
a new tab.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: John Amundson <jamundson@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Change "Circulation Modifer" to "Circulation Modifier" in two files.
This commit only addresses the obvious typos. I leave the Circ
Modifier versus Circulation Modifier debate as an open question. One
of my concerns is changing them all to one string may require some
reorganization of interfaces to avoid clunkiness.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Ben Shum <ben@evergreener.net>
Jane Sandberg [Mon, 10 Sep 2018 16:23:29 +0000 (09:23 -0700)]
LP1665052: Fix checkin workstation display on recent circs view
To test:
1) Go to Item Status > Detail View > Recent Circ History for
an item that is currently checked out.
2) Note that the Checkin Workstation field says
"{{circ.checkin_workstation.name()}}"
3) Apply this commit.
4) Note that the Checkin Workstation field is empty if an
item is an item hasn't been checked in, but is filled with
the appropriate workstation name after it has been checked
in.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Ben Shum <ben@evergreener.net>
Apply the edi_message.account value when sending EDI order messages via
edi_order_pusher.pl. This solves a problem where EDI ORDERS message
were not visible in the interface, because there was no way to complete
the permission check.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Jane Sandberg [Sun, 3 Jun 2018 22:50:40 +0000 (15:50 -0700)]
LP1010635: Make bre dates populate in Item Status grid
To test:
1) Enable the Date Record Created and Date Record Last Edited columns
in Item Status.
2) Scan an item barcode into Item Status. Note that the two columns
you enabled are empty.
3) Apply this commit.
4) Reload the Item Status screen, and scan your barcode again. The
dates should now be populated.
Add support for approving pending patron addresses in the webstaff
patron edit interface.
To test:
[1] Enable the pending address org unit setting.
[2] Log into the catalog and "edit" an address.
[3] Edit same user in staff client and use the Approve action.
Dan Scott [Sun, 3 Jun 2018 18:34:04 +0000 (14:34 -0400)]
LP#1774886 Distinguish Phys Char Wizard with an edit icon
As both authority fields and the Physical Characteristics Wizard for 007 use
the same glyphicons-link class, it's not obvious to new users of the MARC
editor that the icons result in radically different actions.
Change the 007 icon to glyphicons-edit to reflect that it opens an editor
interface.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1791184: ensure that 'make clean' doesn't delete pingest.pl
This patch corrects an issue where pingest.pl was treated as if
it were generated from a pingest.pl.in source file during the configure
step, meaning that it got deleted by 'make clean'. This patch also
adds a couple helpful comments.
To test
-------
[1] Apply the patch.
[2] From a git checkout, run the configure and make steps, followed
by a 'make clean'. Verify that pingest.pl is not deleted from
the source tree.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
This patch discourages use of the legacy XUL staff client
by adjusting the installation process so that a versioned XUL
server directory is not created. Instead, by default XUL
server files (which is still needed by a few web staff client
interfaces) end up in /openils/var/web/xul/legacy. During installation
and upgrade, the /openils/var/web/xul/server symbolic link is
set to point to /openils/var/web/xul/legacy/server if possible.
If for some reason a given installation of Evergreen 3.2.x does not
wish to stop using the XUL staff client, STAFF_CLIENT_STAMP_ID
can still be provided during the 'make install' step, and the
make_release script can still create the XUL client installers
if given the -x switch.
Note, however, that use of the XUL staff client in 3.2.x is
NOT RECOMMENDED and no longer under any guarantee of community
support.
To test
-------
[1] Perform a fresh installation and verify that /openils/var/web/xul/legacy
is created and that /openils/var/web/xul/server is a symlink
pointing to /openils/var/web/xul/legacy/server.
[2] Verify that the web staff client works and that the
user permissions editor in particular continues to work.
[3] Perform an upgrade; verify that /openils/var/web/xul/legacy exists
and that if /openils/var/web/xul/server started out as a symlink,
it has been repointed.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
LP#1775466: tweak how make_release prunes eg2/node_modules
Need the -f since some stuff under eg2/node_modules/.cache
ends up as 0444 for some reason, meaning that 'rm -r' doesn't
remove those files and complains about it.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Bill Erickson [Wed, 5 Sep 2018 20:04:19 +0000 (16:04 -0400)]
LP#1775466 AngularJS updates for Angular integration
Changes include:
* Navbar links to Angular acquisitions admin page.
* Auth cookie migration tool for moving AngularJS cookies from /eg/staff
to /.
* Store last printed receipt (etc) in its final compiled form so it can
be directly reprinted without having to recompile (via AngularJS).
This allows the reprint-last action to work in the Angular app.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>