Galen Charlton [Thu, 26 Feb 2009 16:42:53 +0000 (10:42 -0600)]
bug 2988: apply correct hold policy
Item type was not retrieved in a query, leading to a case
where an item could be selected by build_holds_queue.pl
to fill a hold request even where forbidden by the
library and item type-level policy.
John Beppu [Thu, 26 Feb 2009 19:19:28 +0000 (13:19 -0600)]
bug 1546 - REPLACE statements
A REPLACE statement in tools/letter.pl was indirectly corrupting data
in the message_transports table. It has been replaced with code that
does an UPDATE or INSERT depending on whether the row existed or not.
Also, to protect data in the message_transports table further, letters
which have entries in the message_transports table are no longer
deletable.
Michael Hafen [Tue, 24 Feb 2009 19:05:50 +0000 (12:05 -0700)]
Add option to inventory tool to ignore copies on loan
This adds an option to the inventory tool causing it to ignore copies
currently on loan. This is good if you want to do inventory, but don't
want to update the date-last-seen on items currently on loan.
Galen Charlton [Thu, 12 Feb 2009 23:04:20 +0000 (17:04 -0600)]
bug 2952 followup
The feature in question is described in bug 2952; to
summarize the enhancement, which the earlier patch
description did not do, the list of bibs in an
import record batch now includes a column linking
each import record to the bib that was actually created
or updated when the import batch was committed.
The improvements in this patch are:
* If bib in import batch has not been committed, it
has not been linked to a matching new or updated bib.
In that case, do not create a link to a guaranteed
404 (/cgi-bin/koha/catalogue/detail.pl?biblionumber=)
* When reverting an import batch, set matched_biblionumber
to NULL for affected records - otherwise, the Bib
column will include links to bibs that may no longer
exist.
kohabug 2955 (2/2) GetMarcFromKohaField now requires $framework
Failure to pass the $framework parameter by dateaccessioned.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.
This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.
kohabug 2955 GetMarcFromKohaField now requires $framework
Failure to pass the $framework parameter by barcode.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.
This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.
Galen Charlton [Tue, 10 Feb 2009 22:38:11 +0000 (16:38 -0600)]
reduce bib fetches during search and OPAC display
Speed up bib search and OPAC bib display, especially
when the XSLT OPAC results and details display sysprefs are
ON, by passing an existing MARC::Record object to three
functions:
These functions previously fetched the bib from the
database, incurring the cost of DB retrieval and MARCXML
parsing even though client code already had a
MARC::Record object available.
Galen Charlton [Thu, 12 Feb 2009 20:20:43 +0000 (14:20 -0600)]
bug 2126: reduce round-off errors in fine balance
If a patron has a number of fine transactions, the
total could be wrong. This is particularly noticeable
when a patron has a zero balance, as summing a group
of floating point values derived from decimal(6,2) columns
can result a scalar value that is not zero.
Koha really should be using integral arithmetic
or appropriate accounting modules to do fine and
acquisitions calculations. Using floating point scalars
for monetary amounts is always a mistake.
This patch also prevents an account maintenance
fee from being applied when renewing a patron if the
amount would be 0.
Joshua Ferraro [Wed, 4 Feb 2009 16:46:24 +0000 (10:46 -0600)]
Fixes to two issues with status display on OPAC:
1. rather than testing for notforloan == -1, test for any negative values to set the On order status
2. in cases where itemcallnumber is blank or null, don't display the itemcallnumber brackets []
Joshua Ferraro [Wed, 4 Feb 2009 16:46:23 +0000 (10:46 -0600)]
Distinguish between items marked 'not for loan' and 'Available'
This patch works with XSL* sysprefs == ON, a future patch will address XSL sysprefs==OFF
Items with notforloan set to a negative number still designate an 'ordered' status
Some items are marked 'not for loan' by setting that value at the item level, others by assigning
that value to that item's itemtype. This patch works for both scenarios.
Specific changes this patch introduces to the OPAC:
* Adds a new OPAC results page key 'Copies available for reference:'
* Changes 'Copies available at:' to 'Copies available for loan:'
* Changes the availability limit label in opac-advsearch from:
'Only items currently available' to 'Only items currently
available for loan or reference
* Displays the authorised value for the specific notforloan value in the OPAC detail page in
parentheses next to 'Not for Loan'
Galen Charlton [Fri, 30 Jan 2009 21:21:29 +0000 (15:21 -0600)]
holds policies fixes
* use item branch instead of patron's branch to
look up the applicable hold policies - this makes
requesting in the OPAC consistent with the intranet.
* when generating pick list using build_holds_queue.pl, only match items
to patrons if request is allowed.
Joe Atzberger [Mon, 2 Feb 2009 20:36:19 +0000 (14:36 -0600)]
Bug 2940 - private shelf (list) display error on 2nd and subsequent pages.
The before/after URL for the 2nd page of list elements:
http://atz.dev.kohalibrary.com/cgi-bin/koha/opac-shelves.pl?display=privateshelves?viewshelf=120&itemoff=2
http://atz.dev.kohalibrary.com/cgi-bin/koha/opac-shelves.pl?viewshelf=120&display=privateshelves&itemoff=2
The change in query string arguments is incidental, the prevention of multiple "?" is essential.
Michael Hafen [Tue, 3 Feb 2009 23:46:25 +0000 (16:46 -0700)]
tweak Inventory tool and sub in C4/Items so call number min and max are not required
This changes the setting if default values in the inventory tool where
the min and max call number are concerned. Also changes how the query
is formed in C4/Items so that these two are not required.
John Beppu [Tue, 3 Feb 2009 22:02:12 +0000 (16:02 -0600)]
bug 323: Item Circulation Alerts UI Fixes
- fixed cross browser issues. (IE and Safari don't let you say
someobject.class, presumably because "class" is a keyword that's reserved
for future versions of JS. Firefox and Opera allow it.)
- added text to the grid for added clarity.
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
John Beppu [Tue, 3 Feb 2009 22:02:09 +0000 (16:02 -0600)]
Perl Modules
- C4::Letters:EnqueueLetter() is aware of new fields in message_queue table
- C4::Circulation::SendCirculationAlert() actually works
- C4::Category cleanup
- C4::ItemType cleanup
- C4::Message is a new module.
It presents yet another way to interact with the message_queue.
You can now take messages that have already been queued and modify
their contents before they're sent out.
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
John Beppu [Tue, 3 Feb 2009 22:02:08 +0000 (16:02 -0600)]
Brand New UI for Alert Configuration
- grid layout (javascript required now)
- makes distinction between checkin and checkout messages
- no longer have to click on a button to submit the branch selection form
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
John Beppu [Tue, 3 Feb 2009 22:02:06 +0000 (16:02 -0600)]
Revised Schema
- removed 'rss' transport
- made the messages non-digest
- updated the default text of the templates in the letters table
- [table] item_circulation_alert_preferences
- added notification column
- removed is_enabled column
- [table] message_queue
- added metadata column
- added letter_code column
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
John Beppu [Tue, 3 Feb 2009 22:02:04 +0000 (16:02 -0600)]
Sending Circulation Alerts part 1
- Added code to AddIssue to send an alert when appropriate.
- Added code to AddReturn to send an alert when appropriate.
- Added a sub called SendCirculationAlert() that DOESN'T ACTUALLY WORK YET.
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
John Beppu [Tue, 3 Feb 2009 22:02:03 +0000 (16:02 -0600)]
New C4 Modules
* C4::Category
- patron categories as objects
- an all() method to return all the categories as a list
* C4::ItemType
- itemtypes as objects
- an all() method to return all the item types as a list
* C4::ItemCirculationAlertPreference
- wrapper around the item_circulation_alert_preference table
- create() and delete() methods for easy manipulation of the preferences
- I regret giving it such a long name.
- The item_type column should've been named itemtype to make it
more similar to pre-existing tables. Oh well.
(C4::Category and C4::ItemType were made so that I wouldn't have to
write SQL inside my CGI scripts.
Their main purpose is to provide an easy way to get a list of
patron categories and item types.
Do not be fooled by the amount of POD.
There's actually very little code in these modules.)
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
John Beppu [Tue, 3 Feb 2009 22:01:58 +0000 (16:01 -0600)]
Schema Changes for Email Checkout Slips
- new table, item_circulation_alert_preferences
- new data:
- letter -- 2 new templates
- message_transport_types -- feed
- message_attributes -- Item Check-in and Item Checkout
- message_transports -- for each attribute and for each transport_type...
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com> Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
this patch add a report for serials.
It's have to limit branch/bookseller, and excluding expired serials.
It's possible to export in CSV format.
This patch will have another, to add this report in menus.
Joe Atzberger [Wed, 21 Jan 2009 01:18:22 +0000 (19:18 -0600)]
Prevent js failure if syspref "gist" is undefined.
The javascript is malformed and therefore fails the onsubmit check if
gist does not receive a value. This patch allows failover to default 0.
Also removed an unused dbh.
Joe Atzberger [Wed, 21 Jan 2009 01:18:25 +0000 (19:18 -0600)]
Minor rework of template js.
Lines explicitly ended with semicolons. Allow some better behavior if TMPL_VAR's
are undefined or zero.
Note FIXME added. I believe this is part of the fragmentary integration of
Katipo code for GST. Would be obliged if someone with access there can confirm.
Joe Atzberger [Wed, 28 Jan 2009 19:25:48 +0000 (13:25 -0600)]
Cleanup and perltidy.
Add "use warnings", remove unused variables and unnecessary finish/disconnect
at the end. This script could be improved to run only on tables that need to
be altered instead of touching all of them. It should also probably contain
warnings to the effect that it does not rescue your DATA that was forced into
whatever encoding the table used previously.
Jesse Weaver [Thu, 15 Jan 2009 21:26:13 +0000 (15:26 -0600)]
Add holds policies
This adds holds policy creation support to smart rules and read support to
C4/Circulation.pm, and the two reservation pages. It also adds a system
preference, AllowHoldPolicyOverride, to control whether the staff can override
these policies.
Owen Leonard [Fri, 9 Jan 2009 02:03:53 +0000 (20:03 -0600)]
Related to earlier patch: adding body id to add flexibility to CSS customizations.
This patch adds a different id to opac-shelves, opac-suggestions, and opac-tags based on whether or not the user is logged in, allowing for changes to style based on logged-in status.
this patch change the attachment encoding, else if the file is too large, koha throws an error.
This solution was found on koha list in a Joshua's e-mail
This patch add the form for sending shelf by e-mail, and add a button in shelves that allow the user to send a shelf.
It's an approximate copy of the send basket feature.
The default syspref setting for intranetuserjs should be empty. At one
time, an unwanted value accidently got put in there. This removes the
syspref only if it equals the unwanted value.
Galen Charlton [Fri, 9 Jan 2009 18:16:43 +0000 (12:16 -0600)]
bug 2505: more warnings fixes in C4/Context.pm
* more portable way to determine uname for
crash messages
* C4::Context->userenv now returns undef instead
of 0 if no userenv has been set yet; returning
undef when necessary is almost always better
than returning a scalar when a hashref is
normally expected.
Joe Atzberger [Thu, 8 Jan 2009 03:47:36 +0000 (21:47 -0600)]
Bug 2900: fix GetPendingIssues.
GetPendingIssues did several bad things:
~ select * on a 4 table join,
~ including multiple namespace collisions,
~ including large fields marc and marcxml from biblioitems,
~ return ($count, \@array_being_counted).
Not everything is fixed here (see FIXMEs), but the situation is
improved considerably, with bug 2900 resolved. The "timestamp"
namespace collision in query should be resolved by separate patch.
Joe Atzberger [Wed, 7 Jan 2009 20:57:29 +0000 (14:57 -0600)]
GetAuthValCode calls were positioned inside the loop,
despite the same values being supplied each time. Then
the conditional assignments would repeat the same calls again!
That means execution was liable to query the DB at least once
and as many as four times per item. With a large number of items
this is an unnecessary burden. By moving the calls outside
the loop, we can guarantee that we never have to call the DB for
that info more than twice (once for lost, once for damaged).
Michael Hafen [Wed, 27 Aug 2008 22:46:57 +0000 (16:46 -0600)]
javascript redirect when selecting a patron on circulation.pl Patron Selection Screen
This adds a little javascript to the Patron Selection form input after searching for a patron to check out to.
On click it redirects to checking out to the clicked patron.