Works around an issue where users cannot log into the web client using iOS
because Safari, which all browsers running on iOS use to some extent, does not
support BroadcastChannel.
Many thanks to Galen Charlton for providing a diff with this solution!
Galen Charlton [Thu, 25 Jan 2018 21:58:33 +0000 (16:58 -0500)]
LP#1745486: avoid retrieving user by id::numeric during auth init
During open-ils.auth.authenticate.init, if looking up the user by barcode,
the actor.usr row is subsequently fetched by ID. However, the ID was
turned into a float, meaning that the query as sent to the database
was equivalent to
SELECT * FROM actor.usr WHERE id = 123.0000;
While PostgreSQL will accept this, it ends up doing a sequential
scan of the actor.usr table rather than an index lookup, making the
retrieval up to two orders of magnitude slower than it needs to be
and adding a couple percent unecessary I/O load on large, heavily
used database. This patch fixes that.
To test
-------
[1] Turn on PostgreSQL statment logging and log in as a user
by barcode. Note that there's a retrieval of actor.usr by
a float form of the ID.
[2] Apply the patch and repeat step 1. This time, the query
retrieves the row by the integer form of the ID.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
When replacing a patron's barcode in the patron editor, discard any
previous replacement attempts done in the current edit session. This
prevents cases where secondary, etc. replacement cards are accidentally
created or NULL cards that result in ugly error messages.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Mike Rylander [Tue, 16 Jan 2018 23:54:47 +0000 (18:54 -0500)]
LP#1743650: Bib vis testing needs different handling
For bib-level visibility testing, we can only use the source helper for
positive inclusion, and have to deal with LURIs on a case-by-case basis.
This is because, unlike the copy visibility cache, the LURI cache is pre-
composed in a single value for all LURIs on a record, not separate ones
for each. This is fine, as we just need to find the effectively visible
org units and test for that subset of the relevant orgs. This commit provides
a sub to test for that, and handles LURI test composition at the perl
level rather than in the database.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Mike Rylander [Tue, 16 Jan 2018 21:26:31 +0000 (16:26 -0500)]
LP#1743639: Test location as proxy for location group
Location groups are a table remove from copies, and can cause very large
updates to the copy vis cache. So, we will expand location groups to
locations, in situ, to avoid this problem and the need to supply a trigger
to update th copy vis cache for groups. This will allow us to reclaim
the location group bit in the visibility cache namespace if necessary, at
a later date.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Mike Rylander [Tue, 16 Jan 2018 19:39:08 +0000 (14:39 -0500)]
LP#1743639: opac_visible on acplg is not what it seems
The asset.copy_location_group table has a column called opac_visible.
However, unlike other tables with a column of that name, it controls the
visibility of the location group itself, not the visibility of the copies
within the group. This is regretable because the 3.0+ search code thinks
that it should hide copies.
This commit adjusts the default location group filter applied to patron
searches so that they act as expected.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Kyle Huckins [Thu, 11 Jan 2018 18:10:51 +0000 (18:10 +0000)]
lp1742194 - Print Current Bills only printing circ bills
- Check xact for Circulation before assigning circulation data to
xact for printing.
To test
-------
[1] Set up a patron with at least one "grocery" bill.
[2] In the web staff client, go to
Patron Account > Bills > Actions > Print Bills
[3] Note that the current bills summary is not printed
and that there an error in the browser console.
[4] Apply the patch and repeat step #2. This time, the
bills summary should be printed.
Dan Wells [Wed, 27 Dec 2017 13:36:23 +0000 (08:36 -0500)]
LP#1730470 Restore XUL serial receive compatibility
The older XUL interface does not have quite the same fleshing as the
new web-staff, so adding the 'move previous' code into the unitize
function breaks the old interface.
Since we already are looking up the distribution to get the setting,
let's just tack it on when it is missing.
To test
-------
[1] Set up a serial subscription with predicted issuances, then from
the XUL serials control view attempt to receive an issue. Note
that there will be a crash.
[2] Apply the patch and repeat step #1; this time, the issuance
receive should work.
[3] Verify that receiving issues via the web staff interface continues
to work.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Boyer [Fri, 5 Jan 2018 21:55:15 +0000 (16:55 -0500)]
LP1741072: Fix JS test for template conversion
Changing 2 fields from "strings" to numbers does
cause such a test to fail, as one might expect.
Now the test is updated to meet the current
expectations of the template conversion.
Signed-off-by: Jason Boyer <JBoyer@library.in.gov> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Mike Rylander [Mon, 11 Dec 2017 21:21:39 +0000 (16:21 -0500)]
LP#1736763: Wait until the org tree is there before using it
In offline mode, we need to wait for the org tree to be fetched or recreated
before we set the working location dropdown. This commit adds a function
to loop and wait for that to happen.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Mike Rylander [Wed, 6 Dec 2017 23:18:29 +0000 (18:18 -0500)]
LP#1730758: Track record visibility on all Located URI DML
This commit simplifies the handling of Located URI call numbers by separating
them from normal call numbers. This will allow proper updating of bib-level
visibility attributes for all actions that may happen to a Located URI.
We also insure that we don't return a NULL INT[] as an attribute set for
either copies or bibs. This was always impossible for copies, but was
possible for bibs. Now both are future-proof.
The upgrade script contains a post-transaction command to forcibly update the
visibility attributes of all bibs that make use of Located URIs or bib sources.
It may take a while to run on large datasets. If it it running too long, it
can be canceled and the following psql commands will create and run a script
that will perform the same action serially over time without blocking writes to
bibs:
\t
\o /tmp/luri_visibility_update.sql
SELECT 'UPDATE biblio.record_entry SET ' ||
'vis_attr_vector = biblio.calculate_bib_visibility_attribute_set(id) ' ||
'WHERE id = ' || id || '; SELECT ' || id || ';'
FROM biblio.record_entry
WHERE id IN (
SELECT DISTINCT cn.record
FROM asset.call_number cn
WHERE NOT cn.deleted
AND cn.label = '##URI##'
AND EXISTS (
SELECT 1
FROM asset.uri_call_number_map m
WHERE m.call_number = cn.id
)
UNION
SELECT id FROM biblio.record_entry WHERE source IS NOT NULL
);
\o
\t
\i /tmp/luri_visibility_update.sql
It will output the id of each updated bib so that the script can be killed
and then edited to remove completed bibs. The remainder can be run at a
later time.
NOTE: When the internal flag 'ingest.reingest.force_on_same_marc' is enabled,
we do NOT update the bib's visibility attributes, as doing so causes a loop
and an eventual trigger stack violation. This flag should ONLY be used when
forcing reingest of record attributes (NOT visibility attributes), search,
facet, and display fields, so if using this flag under normal operation,
proceed at your own risk and know that Located URI and bib source changes
will not be reflected in the visibility attributes of the record.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Either the source or the existance of a Located URI will trigger record
visibility, so we will OR them together.
NOTE: This branch is dependant on the branch supplied on LP#1730758. Without
that fix, the bib-level visibility attributes are not updated properly when
Located URIs are added or changed.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
The site() filter and #staff modifier are used to decide when and how to
include certain query filters, such as circ_lib or luri_org. Unfortunately,
site() is sometimes excluded (whole-tree search) and the test for staff-
iness was not specific enough, leading to incorrect queries in those cases
where information was lacking. Now, we treat site() specially, forcing a
default of "top-of-tree", and we check for the #staff modifier directly
where necessary.
Note: this commit also addresses LP#1736992 which is about staff searches
using the limit-to-available modifier. As a side effect of the special
site() treatment, that issue is resolved.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Cesar Velez [Thu, 30 Nov 2017 20:36:35 +0000 (15:36 -0500)]
LP#1710405 - remove Modify + Use Edits buttons in z3950 overlay
The workflow for using a z3950 record to overlay a marked bib
was confusing since it requires first saving the z3950 marc edits
via the Modify button at the top, and only then hitting Use Edits,
at the bottom of the modals. User often miss the click Modify part,
thus this simplifies that, having just a "Save" button and a Cancel.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Jason Boyer [Thu, 4 Jan 2018 18:38:00 +0000 (13:38 -0500)]
LP1712646: Require a Billing Type to Bill User
Previously billing a user without choosing a billing type
would either fail silently or default to misc. This patch
requires staff to choose a billing type before the new
bill window can be dismissed.
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Jason Boyer [Thu, 4 Jan 2018 17:55:16 +0000 (12:55 -0500)]
LP1741072: Global String<->Num Directives for ngModel
To increase flexibility the stringToNumber directive
has been separated into int and float versions and
aditional directives are added to convert in the other
direction. The existing use of stringToNumber in the
volume/copy editor are also converted to strToFloat.
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Cesar Velez [Tue, 24 Oct 2017 18:16:33 +0000 (14:16 -0400)]
LP#1691861 - make Item Status edit items in batch in volcopy
This makes the Item Status grid action of "Edit Items" work
like the Copy Buckets grid "Edit Selected Items", in that the
copies open in the volcopy editor in batch, with no record summary.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Display org unit shortnames in the web staff bib record Holdings View
-> Owning Library column, since displaying the full names requires
significant horizontal space.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Galen Charlton [Fri, 8 Dec 2017 15:29:40 +0000 (10:29 -0500)]
LP#1729922: correctly display most recent transit in item status
This patch ensures that the 'Most Recent Transit' display in
the web staff client's item status page shows the latest transit,
not the oldest one. This also fixes a bug where the transit
receive time never got displayed. As a side effect, this patch
also ensures that only the transit in question is fetched from
the database, not all transits on the item.
To test
-------
[1] Set up an item with some closed transits and display in in
detail view in the Item Status page. Note that the
/oldest/ transit is displayed and that the transit
receive time field is blank.
[2] Apply the patch and repeat step 1.
[3] This time, the most recent transit should be displayed, and
if that transit was received, the receive time should be
displayed.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
blake [Thu, 9 Nov 2017 15:35:07 +0000 (15:35 +0000)]
lp#1724321 Web Client -- existence of record with duplicate TCN does not prevent import
This routes the MARC import execution back to the z39.50 code instead of using the generic
MARC editor. This will make use of open-ils.cat.biblio.record.xml.import instead of pcrud.
Test
1. Edit global flag variable "Cat: Use Internal ID for TCN Value" = false
2. Perform a z39.50 search, click a result and click "import"
3. Step two should be successful, now import it again and you should get an error
4. Click the same result but use "Edit then import"
5. From the MARC editor, make no changes and click "Import"
6. It won't complain about duplicate TCNs
7. Apply the patch
8. Perform steps 4 and 5
9. Notice that the editor does not allow you to import the record
Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Cesar Velez [Thu, 21 Sep 2017 14:45:23 +0000 (15:45 +0100)]
LP#1378383-WebStaff Fix Item circ history to obey max setting
The circ.item_checkout_history.max lib setting should be respected
in both Circ History tabs, and also check for the permission to
VIEW_COPY_CHECKOUT_HISTORY for the current user.
Also, There was ambiguity for the user to tell the difference
(from the displayed message) if an item truly has no circulations,
or if they see no circs due to the relevant permission setting
being set to 0 (Maximum previous checkouts.) This changes the templates
a bit to make that clearer.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Remington Steed [Thu, 7 Dec 2017 15:55:41 +0000 (10:55 -0500)]
Docs: Use new images for in-house use
The In-House Use docs previously had new web client screenshots, but a
recent commit accidentally reverted them to the old XUL client images.
This commit changes the references back to the new images.
This patch ensures that when a hard due date (or hard due date value)
is created or edited, the ceiling date is set to the end of that day.
This fixes a problem where a ceiling date would not be applied for
loans checked out earlier on the ceiling date itself.
This patch intentionally does not touch existing hard due date
values. It also does not use the database or middle layer to coerce
the ceiling dates to end of day to leave upon the possiblity that
an Angular version of the hard due date editor will allow operators
to set both date and time. (Note that Dojo does not readily have a
combined date/time picker.)
To test
-------
[1] Apply the patch, then in the hard due date editor, verify that
when creating a hard due date _value_, the date gets saved as
ending at 23:59:59 in the local time zone.
[2] Similarly, verify that when editing an existing hard due date value,
the date gets saved as ending at 23:59:59.
[3] Repeat steps 1 and 2, but this time for hard due dates.
Until the (planned for 3.1) ability to clone XUL-created reports in the web
staff client is completed, it would be useful to at least display to the user
the origin UI in which a template was created. This will allow staff to, for
the immediate term, decide which UI they should use to deal with a particular
template, re cloning etc.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Alex Cautley [Thu, 16 Nov 2017 23:03:11 +0000 (23:03 +0000)]
lp1705133 view holds patron info redaction
Removed extra or sensitive patron information from patron and record
hold grid
Signed-off-by: Alex Cautley <acautley@catalyte.io>
Changes to be committed:
modified: Open-ILS/src/templates/staff/cat/catalog/t_holds.tt2
modified: Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2
Dan Scott [Wed, 29 Nov 2017 20:31:26 +0000 (15:31 -0500)]
2nd level of bullets requires '**'
The Asciidoc for this file had two levels of indentations for the
intended bulleted list, but bullet indentation levels are set by
the number of asterisks:
In bug 1713064 I added a directive to make it possible to use
a String as a Model in an Input tag with type Number. Unfortunately
there was also a formatting function in that branch that works well
sometimes but is far more frustrating than it is helpful for enough
workflows that it should be removed.
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Galen Charlton [Mon, 27 Nov 2017 17:46:33 +0000 (12:46 -0500)]
LP#1691269: include volume fields in converted copy templates
This patch insures that call number prefix, suffix, and classification
scheme from copy templates created in the XUL unified copy editor are
brought over to web staff copy templates.
Note that in order to successfully test the call number portion of
converted copy templates in the web staff client, the volume/copy editor
default "Allow Call Number attributes in Copy Templates" should be
turned on.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Boyer [Sun, 22 Oct 2017 19:42:02 +0000 (15:42 -0400)]
LP1691269: Webstaff Copy Editor Templates
This branch will translate and transfer your XUL client templates
the first time you load the web client copy editor. From that point
on the two diverge with no further connection to each other.
This branch also allows your copy templates to travel with you
between browsers, machines, and so on, while still allowing users
that share a browser but not usernames to have their own templates.
Signed-off-by: Jason Boyer <JBoyer@library.in.gov> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
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>