The UI for a coded value map is accessed from an existing coded value
via a new "Manage" link column in the CCVM table. The UI allows staff
to build tree-shaped boolean composite definitions for CCVMs in terms
of existing CCVMs.
Additionally, the record attribute definition UI now has a link from
each definition to the coded value map page for the attribute.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
QP Needs to be made aware of several new structures in the database.
First, we have added a new sort-supporting table called metabib.record_sorter
which holds values extracted by crad.sorter=true attrs. This is used instead
of the mrd.attrs->"something" hstore composite.
Next, we teach QP how to convert from a list of user-supplied values across
many dynamic filters (based on crad) into an intarray query of ids extracted
from config.coded_value_map (in the case of controlled attributes) or
metabib.uncontrolled_record_attr_value (in the case of, you guessed it,
uncontrolled attributes). This query is applied against the vlist column
of metabib.record_attr_vector_list, which is GIN indexed for speed.
Finally, metabib.record_attr is now a view over metabib.record_attr_vector_list
and is consequently going to be slow for general use. We restrict
its inclusion in the core query to only the case of a during() filter
which requires access to the value of a bib's Date2 field. For the
other common case, requiring access to the Date1 field, we instead
use the pubdate sort value now stored in metabib.record_sorter. We
might consider making the specific sorter attribute used configurable
so that we can change the definition of pubdate down the road, but it
starts out (and generally stays) defined as equivalent to Date1.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Mike Rylander [Wed, 15 Jan 2014 18:17:39 +0000 (13:17 -0500)]
LP#1269911: Teach the IDL about MVF- and CRA-related structures
IDL link from ccvm => ccraed via composite_def field
IDL selector attribute for ccvm class
ccraed gets CUD actions
In conify/global/config/coded_value_map, if the selected attr type is
composite=true, show a link from each coded value to manage the
composite definition.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
* Teach vandelay.marc21_physical_characteristics() to see all 007's
We use vandelay.marc21_physical_characteristics() to extract fixed
field data that lives in the 007. Before this change, it would
only look at the first 007 in the record. Now it will look at
all of them in turn, supporting configurations such as DVD+BluRay.
* Add intarray extension
We need intarray for GIN index support of integer arrays, which is
how we'll be storing the in-use record attribute value identifiers.
* Hidy hole in which to stick "uncontrolled" values
In order to make use of the massive speed increases provided by
intarray indexing, we need to use (you guessed it) integers. But
uncontrolled record attributes are not necessarily (or even very
often) numbers. We will store them in a table of unique (per
attribute) values, and use the id from that table in our intarray
indexing. That id comes from a DECREMENTING serial that starts
at -1 and counts downward. This avoids collision with the other
set of integers (the id from config.coded_value_map) that we will
use for controlled record attribute values.
* Add a multi flag for record attrs
We pre-coordinate which record attrs are allowed to be multi-valued
with this new bool. Most can be, we set the default to true and
adjust the seed data for those that should be false (sorters and
fields in the leader).
* New intarray-focused attribute extraction
We rewrite the record attribute extraction to capture all the
record-supplied values for each attribute (where multi is true)
and store that list in the new (fkey-corrected) metabib.record_attr_vector_list
table. Only filters make it into this table.
We also insert a parameter after the record id to accept a list of
record attributes we want to rewrite. This defaults to NULL to rewrite
all of them.
Sorters are stored in a new, separate table built specifically for them.
metabib.record_attr becomes a vew atop metabib.record_attr_vector_list
which expands the intarray stored therein into an hstore. For
multi=true attributes, only one will be returned through this view,
as is HSTORE's way, and which will be returned is undefined. However
this view is only provided for the purpose of backward compat with
reports or other locally defined logic.
And, finally, baseline seed data
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Support Stripe payments with some new code and some rearranged code ...
... behind the open-ils.circ.money.payment method.
- Also add Business::Stripe as a CPAN module to the pre-reqs installers.
- If payment processor is Stripe, only show form if Javascript enabled.
Our implementation of payments via Stripe doesn't work without Javascript.
That's part of the point. Using Stripe really limits a site's worries
about PCI compliance because users' credit card number and security
codes are never transmitted to the [Evergreen] server at all. That data
goes to Stripe instead (using Javascript) and from that we get back a
one-time token from Stripe to give to our server instead.
Thanks to Jason Boyer at the Indiana State Library for recognizing the
value of supporting approaches like that in Evergreen and for starting
the work.
Dan Wells [Thu, 20 Feb 2014 15:01:46 +0000 (10:01 -0500)]
Duplicate 0851 as 0862 for backport clarity
Rather than backport 0851 after 0852 has already been backported,
let's give 0851 a second number. It probably wouldn't have bitten
anyone, but there's no harm in running this upgrade again, and I
don't think it hurts to be extra clear.
LP1223903 - Rewrite marc_export.in in support-scripts.
This commit rewrites marc_export.in in the support-scripts src directory.
It will still be transformed into marc_export at build time. This change
replaces the current marc_export scipt with a faster, DBI based alternative.
The replacement support nearly all of the features of the original, except
for the progress output. Much of this information is harder to gather
with the new design.
This is a squashed, rebased commit of previous work.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Jason Stephenson [Tue, 10 Dec 2013 20:16:21 +0000 (15:16 -0500)]
LP1223903 - Add indexes to authority.record_entry.
We want indexes on edit_date and create_date for authority.record_entry
so that date-based searching is faster for authority record export. It
likely will prove useful for other features.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Jason Stephenson [Thu, 26 Sep 2013 05:53:35 +0000 (01:53 -0400)]
LP1223903 - Add from_bare_hash to Fieldmapper.pm.
Teach the Perl Fieldmapper.pm to build objects from a hashref in a
similar manner to how the JS Fieldmapper already can. You might use
it if you retrieved a database row as a hashref, like so:
my $hashref = {};
my $class = Fieldmapper::class_for_hint('bre');
my $bre = $class->from_bare_hash($hashref);
We also modify the Fieldmapper's properties method to sort the array of
field names it returns by position. This makes the return value a lot
more useful for on the fly object construction and other fancy tricks.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Ben Shum [Tue, 28 May 2013 18:54:27 +0000 (14:54 -0400)]
Add granular settings for requiring staff initials for notes
Up till now, there has only been one setting for making staff initials required
for all of the various note fields. Instead, let's break this up into separate
org unit settings for each type of note field, giving us more flexiblity in
making use of the append staff initials feature.
These three types of notes will now have settings to add initials for each:
LP#1272074 Physical Characteristics Wizard for the MARC Editor
Right-click in an 007 field to find a new entry in the context menu that
launches this wizard. The prompts and suggested values come from data
already found in the database.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
* Address 2 places where we were calling $e->request with a
CStoreEditor for a storage method. Since CStoreEditor assumes all
calls go to open-ils.cstore, these would have failed.
* While we're in a cleaning mood, remove some obsolete commented code.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jeff Godin <jgodin@tadl.org>
Remove open-ils.ingest service and related scripts and code.
In addition to removing OpenILS::Application::Ingest, this commit
removes code that was commented out at the time of open-ils.ingest's
replacement with in-db ingest, example configuration elements, a
use_ok test, and the following obsolete scripts which made use of or
were otherwise related to open-ils.ingest:
The included release notes recommend removal of the open-ils.ingest service
from configuration files when upgrading, and suggest removal of Ingest.pm from
its location in @INC.
Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Ben Shum [Sat, 8 Feb 2014 08:42:07 +0000 (03:42 -0500)]
LP1125471 - Use label instead of id in recording in-house use prompt
When recording multiple in-house use with the library settings for threshold
prompts, the prompt would bring up the ID as the variable instead of the name
of the non-cataloged material. This caused confusion among staff members who
might see a message like: "Are you sure you want to mark 9 as having been used
21 times?" (9 being the id, not the name of the non-cataloged material)
This commit leverages existing code which had been commented out and under
the ID to use the label name for the non-cataloged material instead. Also,
minor bugfix with a missing semi-colon at the end of the function being used.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Mike Rylander [Wed, 22 Jan 2014 16:00:24 +0000 (11:00 -0500)]
Check behavioral setting for Located URIs
When the opac.located_uri.act_as_copy Global Flag is enabled, treat
Located URIs like copies for visibility testing purposes. We use
actor.org_unit_full_path instead of actor.org_unit_descendants so
that we do not lose the desirable "licensed here" modeling that
Located URIs provide.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jeff Godin <jgodin@tadl.org>
Bill Erickson [Mon, 30 Dec 2013 18:49:01 +0000 (13:49 -0500)]
Vandelay: increase queued item creation timeout
Allow up to 10 minutes to create each queued vandelay record to avoid
timeouts in item creation caused by pathologicaly long-running record
match set queries.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Thu, 12 Sep 2013 17:26:21 +0000 (13:26 -0400)]
Keep standard INNER joins above possible OUTERs
We always join metabib.record_attr, and we always use an INNER join
to the core table, so keep that join first. Likewise with the join
to biblio.record_entry. Dynamic joins may be OUTER, though, and while
join reordering in Postgres is smart, let's not give it the chance to
fail.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Jeff Godin [Wed, 30 Oct 2013 19:42:15 +0000 (15:42 -0400)]
Add button to update expire date field
When updating/renewing a patron (expired or not), it would be
convenient to have a means of populating the expire date field with
a value of perm_interval + today. Currently, staff are required to
manually enter a date, or could toggle the profile from one profile
then back to the desired profile, but this is not ideal.
This commit adds a new button next to the expire date, which when
activated will re-calculate the date based on the current profile's
perm_interval and today's date.
This is similar to how the expire date is populated when creating a
new user, or when changing the profile group. A button is used here
so that the updating of the expire date is an intentional process,
not one that happens upon any edit.
Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Wells [Fri, 9 Nov 2012 21:12:58 +0000 (16:12 -0500)]
Prevent odd TPAC base URL redirect
As it stands, in a default install, if you browse to
http://yourserver.com/eg/opac
you are redirected to a login page, and if you login, you then get
to the 404 page. This behavior is caused by the fact that *any*
URLs which do not match a few select cases are assumed to be
"secure" resources, when in fact they might not even exist.
This commit catches any attempt to browse this 'base' and simply
redirects to the "home" page instead.
This addresses the most obvious and likely 404 of this type, but
we might consider catching some other cases (e.g. eg/opac/record/).
In addition (or as an alternative), we could also create a function
call which simply checks the validity of a URL before we ask the
user to login to see it.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Let the user know exactly what clicking on a facet will do.
Thanks to Dan Scott for the suggestion.
* Note that accessibility validators may dislike the repetitive titles,
but clearly adding them provides more information (for everyone).
Plus, as facets pile up, there's no reasonable way to differentiate
between all titles, anyway, without title attributes becoming too
long and unreadable.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
When a search is submitted with no query value, instead of silently
redirecting the user the home page, direct the user to the results page
and show a helpful message (within the low-hits template).
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Use the text_attention CSS color instead of the text_badnews for the my
account fines label, since the badnews color does not contrast highly
engouh with the dark green background for WCAG compliance.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Mike Rylander [Tue, 21 Jan 2014 17:31:13 +0000 (12:31 -0500)]
Use copy owning library as the context for finding best hold sort order setting
In the olden days before best hold sort order and proximity adjustment, there was
no need to consider any context org other than "here", because the choices were,
essentially, FIFO or Traditional applied within the hard-boundary range. However,
now we need to decided whose rule to follow, and the most correct arbiter of that
is the owning library of the call number of the copy. We avoid copy circ lib
because that can change with floating copies.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Ben Shum [Sat, 8 Feb 2014 16:14:23 +0000 (11:14 -0500)]
Fix copy_info variables one last time for library_name_link purposes
In cd056eba75038c6a1fabd2a83ba97d81a444bc75, I fixed record by inadvertently
passing around the wrong variables. In fact, we do not need the value set
there, and we broke results view as a result of the swap around.
Put things right what once went wrong.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Tue, 26 Nov 2013 17:44:51 +0000 (12:44 -0500)]
Address some remaining hardcoded install prefixes
Ran a clean install of Evergreen on Ubuntu Precise and most things were
more or less working using simple "./configure; make; make install" with
the major exception of the TPAC. It turned out that there is a simple
variable that can be tweaked in the Apache config; a better way to
handle this might be to preprocess the source file at make time, but for
now at least we set the variable.
In addition, clean up two remaining scripts that have hardcoded paths.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Kyle Tomita [Thu, 6 Feb 2014 00:23:18 +0000 (16:23 -0800)]
LP1155769: Items repeated in tpac display, others not visible
This was an issue with the query and ordering by a column that was
sometimes null (copy_number). Added barcode to be a sort rather than
replacing copy_number, per bshum's suggestion. Not replacing allows
libraries that use copy_number to continue to use them as well.
Signed-off-by: Kyle Tomita <tomitakyle@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Fri, 17 Jan 2014 01:59:13 +0000 (20:59 -0500)]
Keep dropping and creating array_accum()
We want to keep array_accum() around for now to support any custom SQL that
sites might have generated. Plus, we don't want it to show up in our search
path ahead of the native array_agg()!
We can always rebase this as a fix into the previous commit to squash history a
bit. "Nope, that never happened!"
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Tue, 3 Jan 2012 16:53:49 +0000 (11:53 -0500)]
Prevent {NULL} values from blocking bib saving
With both the old ARRAY_ACCUM and ARRAY_AGG, and with array_nulls on,
PostgreSQL 9.0 on Debian Squeeze was generating values of '{NULL}'
rather than actual nulls. This would in turn prevent bibs without ISBNs
or ISSNs from being saved successfully. A CASE statement protects
against that problem and returns a clean NULL.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Wed, 12 Oct 2011 03:53:33 +0000 (23:53 -0400)]
Replace ARRAY_ACCUM() custom function with ARRAY_AGG()
Tested each replacement to ensure that the return of NULL instead of
'{}' empty array doesn't break anything - although some functions didn't
seem to work with either function (for example,
asset.merge_record_assets() doesn't seem to actually move an 856 from
the source to the target record).
Also replace ARRAY_TO_STRING(ARRAY_AGG()) with STRING_AGG() in a couple
of places; see
http://www.depesz.com/index.php/2010/02/17/waiting-for-9-0-string_agg/
for one reason why (likely performance gain).
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Jeff Godin [Wed, 30 Oct 2013 17:20:28 +0000 (13:20 -0400)]
Skip duplicate username check when username unchanged
Changing a username, then changing back to the user's current
username results in a duplicate username detection -- a false
positive due to the API call finding a user with that username --
the current user. This prevents you from saving any other changes
you may have made to the user.
This can be prevented by skipping the duplicate username check if
the user is not new and the username in the field matches the
username stored in the in-memory Javascript representation of the
user.
There's still a potential corner case which could be avoided by
using a new/modified API call to either accept an "except this
au.id" argument or to return the au.id of the found user, but I
don't see a need for that at this point.
Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Wed, 15 Jan 2014 04:46:41 +0000 (23:46 -0500)]
Restore OpenSearch support and use TPAC search
This enables users to easily add the Evergreen search engine to their browser's
built-in set of search engines, and most importantly directs searches to the
TPAC instead of the weird old Supercat interface.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Ben Shum [Tue, 21 Jan 2014 18:52:49 +0000 (13:52 -0500)]
LP1271218 - clarify how opt-in user notifications are shown in my account
As reported in LP127128, end users may not need to be shown the message that
"No notification preferences are configured" when in fact this message is only
displayed when the user opt-in notification settings are not configured.
So, alter this to only show the table and div when there are settings to be
configured and otherwise show nothing.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <bshum@biblio.org>