Jason Stephenson [Thu, 15 Jun 2017 18:11:41 +0000 (14:11 -0400)]
LP 1698176: Return undef with die event in Actor.pm _add_patron function.
If the CStoreEditor create_actor_user call fails in the _add_patron
helper function in OpenILS/Application/Actor.pm, the CStorEditor's
die_event is returned as a scalar value. The caller expects a list
return with two values: the user object in index 0 and the event, if
any, in index 1.
Returning just the event causes the caller to use the event as if it
were the user object. This leads to a different error message later
in the code: Can't call method "billing_address" on unblessed
reference at /path/to/perlib/OpenILS/Application/Actor.pm line 743.
This commit changes the return value in the event of a database insert
failure to be the two member list as expected by the caller with undef
in index 0 and the die_event in index 1. This returns the proper
error message to the client.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Kyle Huckins [Mon, 30 Oct 2017 15:55:24 +0000 (15:55 +0000)]
LP#1708487 Add Title and Barcode to Bill Print Templates
- Add additional documentation to Bills, Current; Bills, Payment; and Bills,
Historical print templates.
- Convert xacts to objects containing all required information for print
templates
Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Changes to be committed:
modified: Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2
modified: Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2
modified: Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2
modified: Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
Galen Charlton [Fri, 10 Nov 2017 21:43:29 +0000 (16:43 -0500)]
LP#1723498: fix display of count of duplicate patrons
This patch fixes an issue where the patron registration
form's alert for duplicate phone numbers did not display
the count of matching records. (This was caused by code
that was expecting a string to be passed by reference
when it's passed by value in JavaScript).
Avoid clobbering duplicate patron search links by managing search URLs
individually by search type and displaying a search link per search
type.
This change includes an improvement over the XUL version in that a link
will be displayed per matching phone number so each can be searched,
instead of only searching the most recently entered phone number.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Terra McCanna <tmccanna@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Avoid attempts to create BroadcastChannel objects in contexts where the
object does not exist. Specifically, allow PhantomJS to run unit tesst
without dying on:
Galen Charlton [Tue, 7 Nov 2017 18:41:55 +0000 (13:41 -0500)]
LP#1708488: adjust how patron financial summary is exposed to checkout receipts
This patch builds on the previous patch by grabbing the patron's
financial summary from the patron stats values. The "patron_money"
template value is no longer associated with a particular loan, meaning
that you can do things like this:
<span ng-if="patron_money.balance_owed">You owe the library ${{patron_money.balance_owed}}</span>
The additional values include
* patron_money.balance_owed - current balance
* patron_money.total_paid - payments made on outstanding fines/fees
* patron_money.total_owed - total of outstanding fines/fees
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Terra McCanna <tmccanna@georgialibraries.org>
Jason Boyer [Thu, 9 Nov 2017 14:55:42 +0000 (09:55 -0500)]
LP1731281: Remove Deleted Items From acvac Table
The script that created the acvac table accidentally
included entries for deleted items which leads to confusion
when titles the library no longer owns are displayed as
available again, even though no copies appear on the record
detail page. This upgrade script removes any that are left
there.
Signed-off-by: Jason Boyer <JBoyer@library.in.gov> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Boyer [Wed, 18 Oct 2017 03:10:46 +0000 (22:10 -0500)]
LP1724223: Fix inherited FKEY triggers
When running these triggers on TG_OP=DELETE they
always fail and prevent the delete. Skipping the
triggers on DELETE allows things to continue as
usual.
To test
-------
Verify that after applying the patch that you can remove
notes and copy tags from copies and copies from buckets
and Vandely import queues.
Signed-off-by: Jason Boyer <JBoyer@library.in.gov> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Thu, 19 Oct 2017 18:46:01 +0000 (14:46 -0400)]
LP#1724915 Webstaff auth timeout works w/ multiple tabs
Adds a new API parameter to open-ils.session.retrieve which allows the
session to be fetched without extending the auth session timeout.
Teach the browser client to use the new API.
Teach the browser client to notify all webstaff tabs when a logout event
has occurred, so every tab can immediately log out.
To test
-------
[0] Apply the patch.
[1] Log in the web staff client, then open a new window/tab
and navigate to the web staff client.
[2] Log out of the web staff client in one window. Verify that
the second window automatically refreshes and goes to the
login page.
[3] Set a low staff idle timeout (optional).
[4] Repeat step 1, then wait for the timeout. Verify that the
staff client is logged out in both windows.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Chris Sharp [Mon, 30 Oct 2017 16:29:20 +0000 (12:29 -0400)]
LP#1728677 - Add survey data to concerto test dataset.
To more closely approximate a realistic test environment,
this branch adds data to the concerto test dataset. Most users
are given a randomized response to a simple 3-question survey.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Sam Link [Fri, 6 Oct 2017 15:40:47 +0000 (11:40 -0400)]
Web Client: Make Patron Email Clickable
The patch is twofold. First, "mailto" has been added to
$compileProvider.aHrefSanitizationWhitelist() throughout the project.
Second, the patron email in the patron summary has been wrapped in an
anchor with ng-href="mailto:{{patron().emaio()}}" to enable the desired
functionality.
Signed-off-by: Sam Link <slink@columbiacountyga.gov> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
With this commit we now support user-defined join order in cstore and friends.
Previously, because the join structure of oils_sql beyond the specification of
a single table was only allowed to be represented as a JSON object, it was
subject to potential hash key reordering -- thanks, Perl. By supporting an
intervening array layer, one can now specify the exact join order of the
tables in a join tree.
For example, given the following JSON object passing through a modern Perl 5
interpreter as a nested hash:
FROM acp
JOIN acn ON (acp.call_number = acn.id AND acn.record = 12345)
JOIN acpl ON (acp.location = acpl.id)
Or as:
FROM acp
JOIN acpl ON (acp.location = acpl.id)
JOIN acn ON (acp.call_number = acn.id AND acn.record = 12345)
In some situations, the join order will matter either to the semantics of the
query plan, or to its performance. The following example of the newly
supported syntax illustrates how to specify join order:
FROM acp
JOIN acn ON (acp.call_number = acn.id AND acn.record = 12345)
JOIN acpl ON (acp.location = acpl.id)
Why is this important
---------------------
While Postgres' planner is very smart, a join tree with many tables may create
a plan search space that is simply too large to be tested effeciently. In such
cases, Postgres will do its best to find a good plan for the query using its
GEQO algorithm. Often, a DBA or developer has enough understanding of the
expected relative data sizes involved to give Postgres a leg up by specifying
a join order that improves the planner's chances of generating an optimal plan.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Adds Call Number Suffixes and Prefixes to the following grids:
- Copy Buckets
- Pending Copy Buckets
- Checkin/Capture Holds
- Patron Holds
- Patron Checkout
- Patron Items Out
- Patron Bill History
- Holds Shelf
- Renew Items
- In-House Uses
- Bib Record View Holds
- Patron Bill History
- Transit List
- Copy Editor
LP#1672435: Make BR4's sample theses copy location holdable
All of the part copies in the sample dataset live in a non-holdable
copy location, usually BR4's Theses location. This commit makes
that copy location holdable so that we can better test part holds
out of the box.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <ben@evergreener.net>
Remington Steed [Wed, 8 Nov 2017 16:56:42 +0000 (11:56 -0500)]
Docs: Fix two AsciiDoc syntax warnings
A recent commit removed a docs file and integrated the content into the
3.0 release notes and the ebook_api.adoc file. This commit cleans up
two small problems left over from that commit:
- Remove the reference to the deleted file
- Fix the warning block syntax in ebook_api.adoc
Chris Sharp [Tue, 7 Nov 2017 20:41:26 +0000 (15:41 -0500)]
LP#1724885 - Alert when TCN value already exists on bib import.
To test
-------
[1] Ensure that the global flag 'cat.bib.use_id_for_tcn' is off.
[2] Import a record via Z39.50 in the web staff client.
[3] Repeat the Z39.50 search and attempt to import the record again.
Note that the import will fail silently (with error messages
in the browser console).
[4] Apply the patch and repeat step 3. This time, an alert modal
will appear pointing out that the TCN is already in use.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Mike Rylander [Thu, 5 Oct 2017 20:25:40 +0000 (16:25 -0400)]
LP#1721636: UpUp needs to know about i18n.js for offline mode
Any resource that is loaded globally, which mostly means stuff in base.tt2
and base_js.tt2, needs to be added to the UpUp resource list so that offline
mode will function in the face of a cache clearing event.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Boyer [Thu, 19 Oct 2017 03:05:05 +0000 (22:05 -0500)]
LP1724725: Handle ident_type2 in Web Staff User Editor
While it was fairly harmless to not be able to set an ident_type2
value in the webstaff editor, the way things worked out if a user
had one set from the XUL client or direct manipulation an attempt
to save such a user would crash the cstore backend.
To test
-------
[1] Use the patron editor to edit a patron that has a value set
for ident_value2. Save a change, but note that nothing is
displayed and that eventually an open-ils.cstore error is
reported in the browser console.
[2] Apply the patch and repeat step 1. This time, the patron
editor will display the secondary identification type field
and allow you to save changes to the record.
Signed-off-by: Jason Boyer <JBoyer@library.in.gov> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Mike Rylander [Tue, 7 Nov 2017 16:09:07 +0000 (11:09 -0500)]
LP#1723977: Move no-LURIs test to be a peer of no-copies test
The correct place to test the no-LURIs condition is as a peer to the
no-copies test, when searching in staff mode. We therefore move that
test with this commit.
In addition, the bib attribute vector may be null, in the case of a
record with no bib source or LURI. When testing emptiness we need to
ask if the field IS NULL rather than just testing its contents.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Boyer <JBoyer@library.in.gov> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
blake [Tue, 7 Nov 2017 16:14:32 +0000 (10:14 -0600)]
LP#1730692: fix two references to asset.copy_vis_attr_cache
Corrected the table references in metabib.pm and site_generator.
To test
-------
[1] Apply the patch.
[2] Verify that sitemap_generator no longer crashes.
[3] Verify that open-ils.storage.ordered.metabib.metarecord.records can be
called without crashing.
This patch checks for suffix and prefix of call number before merging
assets and ensures that unused call number records are marked
deleted.
To test:
[0] Apply the patch.
[1] Attempt a record merge where each record has a volumes with the
same call number label and owning library but different
affixes. Verify that the volumes and their associated copies
are not merged onto the same volume..
[2] Attempt a merge with records having matching volumes. Verify
that the copies are moved to one volume and that the other is
marked deleted.
LP#1671635: Maintain search parameters throughout place hold process
Add hidden fields to the Place Hold form for the search query, type
and locg fields so that they will appear correctly in the search bar
on the holds confirmation page. This commit also keeps the query
parameter in the URL after clicking the Place Hold link from the search
results page.
Test Plan:
Log into the public catalog and perform a search that is limited to a library
that differs from the user's preferred search library and using a search type
that is not keyword (e.g. title or author). Place a hold on any title from
either the search results or record page. After submitting the form, look
at the search parameters in the search bar on the hold confirmation page.
Pre-patch, the query terms will not appear, the search type will revert back
to the default of keyword, and the search library will be the user's preferred
search library.
Post-patch, the query parameters will be maintained in the search bar.
Jeff Davis [Fri, 6 Oct 2017 18:15:05 +0000 (11:15 -0700)]
LP#1706147: handle multiple matches on patron barcode completion in web client
To test:
1. Add a barcode completion rule for BR1, applying to users and set to
active, where "BR1" is the prefix.
2. Create a user with barcode "BR100001" and home library BR1.
3. Create another user with barcode "00001".
4. Login to the web client with BR1 as your working location. Go to
"Check Out Item" and enter barcode "00001". EG will retrieve one of
the two accounts you created; it ought to present a dialog that
allows you to choose between BR00001 and 00001 (or none of the above).
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Mon, 30 Oct 2017 15:36:29 +0000 (11:36 -0400)]
LP#1728122 Webstaff survey display avoids deep fleshing
Avoid collecting survey/question/answer data via deep pcrud fleshing.
Opt instead to organize the data locally using the values fleshed
directly on the response object.
Additional fixes included:
1. Avoid displaying survey responses for out-of-scope surveys.
2. Format survey response dates using the configured date format instead
of display a bare ISO date.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Cesar Velez [Fri, 20 Oct 2017 20:57:23 +0000 (16:57 -0400)]
LP#1679246 - add display-none css rule to eg-grid-field
This will fix the extraneous text created from any
eg-grid-field that has non IDL paths or text data.
Ex: a virtual/computed column, ie {{usr}}@{{org}}
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Remington Steed [Wed, 25 Oct 2017 14:53:44 +0000 (10:53 -0400)]
Docs: Remove duplicate lines from root.adoc
In the previous commit to root.adoc (7ecad6eb) a chunk of lines were
accidentally duplicated. This commit removes the duplicate lines. I
confirmed that this change allows the PDF to build successfully.
Support page/tab titles applied by page controllers. Each title is
composed of 2 optional components, a dynamic component and a context
component.
The dynamic component may be interpolated with real-time data (e.g. a
patron's name) and the context is generally a page or tab-level value
(e.g. Checkout).
For example: "Smith, Jane - Checkout"
Apply a title within a controller like so:
egCore.strings.setPageTitle(
egCore.strings.MY_DYNAMIC_TEMPLATE,
egCore.strings.MY_CONTEXT_STRING,
{foo : 'foo', bar : 'bar'}
);
If no values are set, the default template-level title is applied.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Conflicts:
Open-ILS/src/templates/staff/base_js.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/app.js
- Add new prompt for marking an item as damaged.
- If there is a fee when marking an item as damaged, offer the
option to charge as normal, manually bill the patron, or to waive
the charge.
-Affected interfaces: Holds pull list, Holds Shelf, Patron Holds,
Record Holds, Record Holdings, Item Status(List), Item Status(Detail)
Cesar Velez [Wed, 4 Oct 2017 18:01:25 +0000 (14:01 -0400)]
LP#1712686 - display completed barcode on copy grids not partial input
The check in, check out, and renew interfaces were not displaying
the actual complete(d) barcode when barcode completion is on.
This saves the inputted partial barcode in row_item.input_barcode
and let's the returned acp.barcode be in row_item.copy_barcode for
display.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>