Galen Charlton [Mon, 13 Jan 2020 18:59:11 +0000 (13:59 -0500)]
BookNet Canada export: fix incorrect counts
Various "COUNT(foo.id)" needed to become "COUNT(DISTINCT foo.id)"
when gathering lending counts to avoid duplication of rows due
to the outer joins in the query.
replacing the 'current use' with static zero because it is being used as renewals and renewals circs are being double counted since they are also in the circ count
Jason Etheridge [Fri, 25 Sep 2015 18:10:22 +0000 (14:10 -0400)]
osrfsys log parser
Some tweaks probably needed to the regular expressions within based on the log format.
./trace_logs.pl [--follow-pid] [--follow-auth] [--follow-trace] [--include-errors] [--search="substring"] [logfile1] [logfile2] [...]
or ./trace_logs.pl [-p] [-a] [-t] [-e] [-s "substring"] [logfile1] [logfile2] [...]
This script searches the specified (or piped) logfiles and spits out lines containing the "substring".
It optionally parses the logfiles and prints out related lines based on PID, threadtrace, and authtoken
values that it encounters in the matching lines. --include-errors will pull in lines containing [ERR
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
newitems.cgi - simple CGI script for linking to a list of new items in an Evergreen catalog.
It accepts a list of one or more Evergreen location IDs (passed via
the "loc") CGI parameter and an optional count. It then fetches
the list of bib IDs of the $count newest items in those locations,
then generates an HTTP redirect to a TPAC search results page.
To use, place it on the Evergreen web server in a directory that's
configured to run CGI scripts.
Jason Boyer [Thu, 13 Feb 2014 20:44:44 +0000 (15:44 -0500)]
Limit circ_modifier selection to items owned by submission lib(s)
Without limiting the items considered to the submission library
it's possible that the circ_modifier chosen may not be in use
anywhere at that library.
Signed-off-by: Jason Boyer <jboyer1@library.in.gov> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Mon, 30 Dec 2013 18:14:11 +0000 (13:14 -0500)]
fix return type of two collectionHQ functions
The write_*_rows_to_stdout() functions return nothing, so
set the return type accordingly to avoid
"control reached end of function without RETURN" warnings.
EvergreenReportTemplates.sql contains patron, circulation, and cataloging
and collection reports, while EvergreenAdditionalReportsTemplates.sql
contains additional patron, circulation, cataloging, and acquisitions reports.
The reports were written by Shae Tetterton and packaged by Steve
Callender. Sponsorship and testing were provided by Bibliomation,
the King County Library System, Kirtland Community College, and the
Pioneer Library System.
various speed improvements to the collectionHQ extract
This is the result of a first pass to remove inefficient
queries on metabib.real_full_rec and auditor.asset_copy_history.
Most of the changes don't affect the output, but there are a
couple exceptions:
- the new version is more likely to pick the first 082$a
for the class number (which is also more correct)
- the script now bases the "current use count" on the date that
the item was last transited to the current circ lib, rather than
the date the circ lib simply changed.
The last change is the most uncertain. One the one hand, it helps
proof the extract against pruning of the asset.copy auditor table.
On the other hand, if items change their circ library without getting
formally transited (which might be theoretically possible for
some workflows) the current use count *might* be calculated
differently than expected.
Jeff Godin [Thu, 2 Aug 2012 16:01:03 +0000 (12:01 -0400)]
Scope collectionHQ extract to org unit + children
Enable collectionHQ extract functions to scope to a specified org
unit ID and that org unit's children. Specify a default org unit of
1 to closely reproduce previous behavior.
NOTE: Even with an org unit of 1, this work-in-progress changes
previous behavior due to requiring an asset.call_number with
owning_lib in scope. Previously ALL bibs were included.
Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>