Mark Tompsett [Tue, 31 Jul 2012 15:09:27 +0000 (23:09 +0800)]
Bug 8485 - Make koha_perl_deps.pl batch friendly Added a -b flag for brief which outputs only the perl library name (Foo::BaR), and added a -r flag for required which filters the list to required=Yes perl libraries.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Robin Sheat [Tue, 31 Jul 2012 11:22:48 +0000 (13:22 +0200)]
Bug 8532 - improve robustness when converting dates
If undef is passed to the date format conversion function, it dies. This
can happen when you have old data in the database. Better to handle it
in some fashion rather than die, so now it just returns undef too.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I replace "return undef" with just "return" to pass perlcritic
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8637: Lack of control on mandatory in orderreveive.tt
Just add a check in Jscript when the form is submited, the same as in additem.tt
On Owen's suggestion I have added the red color and 'Required', the same as in additem.
On Jonathan's suggestion I have used the CSS class for red and italic and I have changed a variable's name (alertString2). Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Mandatory fields are now correctly checked on saving.
On other Jonathan's suggestion I have created a new class "missing" and I have added the background to staff-global.css.
The same for additem.tt.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Retested because of minor CSS change. Works nicely.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Owen Leonard [Tue, 7 Aug 2012 19:09:35 +0000 (15:09 -0400)]
Bug 8588 - Duplicate field IDs cause problems with SQL report parameter entry
Changes to markup and script to enable unique ids on form
fields. These changes allow for working label+input pairs
on one or more text and select inputs and multiple working
datepickers.
To test, create a report with more than one date parameter,
at least one text parameter, and one or more authorised
value parameters. The datepickers should each work properly,
and labels should by clickable.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Owen Leonard [Tue, 14 Aug 2012 14:02:38 +0000 (10:02 -0400)]
Bug 8596 - Reports interface date picker doesn't force ISO formatted dates
Datepickers follow Koha's preference for date format, but the
guided reports system doesn't intelligently handle different date
formats. ISO is required. This patch adds some additional
configuration to override the date format.
To test, create a guided or SQL report which takes a date
parameter. The datepicker fields should return an ISO-formatted
date.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Works as advertised.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Katrin Fischer [Sun, 12 Aug 2012 20:33:24 +0000 (22:33 +0200)]
Bug 8621: Alternative template for cart email
- uses less list elements, in favour of paragraphs and line breaks
- reimplements a link to the opac for each record
Note: In order for the URLs to be correct this needs to be tested
together with the patch for bug 8626.
To test:
- Add several records to the cart, add items with and without items
- Send yourself the cart as email and check formatting
- Update po files for any language, translate the po file for OPAC
and install language
- Send yourself the cart email again from the translated templates,
check formatting
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Katrin Fischer [Tue, 14 Aug 2012 06:02:59 +0000 (08:02 +0200)]
Bug 8626: Fix encoding in cart emails for use of quoted-printable
When using quoted-printable data needs to be encoded accordingly.
Content-Transfer-Encoding: quoted-printable
Without the patch = in URLs or data will be interpreted as the beginning
of a special character resulting in broken URLs.
To test:
- Check diacritics in records display correctly
- Check various URLs with = to make sure they all work correctly
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This is only a partial fix, as the subject line is not encoded,
but it is a huge improvement over what it was before.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Kyle M Hall [Tue, 14 Aug 2012 17:17:38 +0000 (13:17 -0400)]
Bug 8640 - GetHardDueDate functions incorrectly
GetHardDueDate works just like GetIssuingRule, but it not only tests for having
found an row of results before returning, but checks for the existence of a
hard due date as well. That means that even if it finds a matching rule, unless
that rule has a hardduedate set it will toss it and keep looking!
So, for example, even though there is a matching rule for say "STAFF / VIDEO / *",
but it has no hardduedate. So it gets tossed and the subroutine keeps looking.
If the next match, "STAFF / * / *" *has* a hardduedate, it is the one returned.
This means that if a more specific rule has no hard due date,
it is overridden by a less specific rule that does have a hard due date.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Owen Leonard [Fri, 17 Aug 2012 17:59:47 +0000 (13:59 -0400)]
Bug 8655 - Re-order items on administration page to better match configuration priority
Circulation and Fine Rules should have a higher priority than
cities and road types.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tested on main admin page and the menu on the left of all of the
other admin pages. Looks a-ok to me.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Owen Leonard [Mon, 20 Aug 2012 14:59:26 +0000 (10:59 -0400)]
Bug 8657 - Default sort by call number does not work
If you choose to sort search results in the OPAC or staff
client by call number by default, the wrong value will
be saved by the system preferences editor. It should be
"call_number" instead of "callnumber." This patch
corrects the pref file and updates the database in cases
where defaultSortField or OPACdefaultSortField are
set to the incorrect value for call number sort.
To test: Set defaultSortField and/or OPACdefaultSortField
to "call number" and perform a search. Results will be
sorted by relevance. Apply the patch, update the database,
and search again. Results should now be sorted by call number.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
with the caveat that this will not fix the issue unless the sort order is first set to descending and back to ascending per bug 8012.
However, with the sort order set to a proper sort value, this patch does fix the issue.
Owen Leonard [Mon, 27 Aug 2012 20:04:48 +0000 (16:04 -0400)]
Bug 8679 [REVISED] Remove usage of Amazon API
This patch removes the AmazonReviews and AmazonSimilarItems
features from the OPAC and staff client. With on Amazon
feature remaining, cover images, the *AmazonEnabled preference
is also removed in favor of checking the *AmazonCoverImages
preference. Two other system preferences, AWSAccessKeyID and
AWSPrivateKey are removed as they were required only by the
removed features.
Handling of book cover images from Amazon is unchanged.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Turned on amazon covers in opac and staff client and all
worked as expected. Then tested to make sure other cover image
services still worked and they do.
Signing off.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Prior to this patch, attempting to view an invalid authority in the
OPAC gave a system error instead of a 404. With this patch, the user
will just get a 404, as is the case with invalid bibs.
To test:
1) Try to view an invalid authority by going to:
/cgi-bin/koha/opac-authoritiesdetail.pl?authid=999999999999
(presuming that you don't have an authority with authid 999999999999
in your database) before and after applying this patch
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Cache::Memcached::Fast is used for caching
Test::YAML::Valid is used for tests Signed-off-by: Marc Veron <veron@veron.ch>
Dependencies appear as expected...
...and I see that they are not instaled yet on my server :-)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Robin Sheat [Fri, 20 Jul 2012 10:20:47 +0000 (12:20 +0200)]
Bug 8162: allow packages to work on Ubuntu Precise
The newer version of MySQL in Ubuntu 12.04 installs a default
'localhost' user with no username. Due to the way that MySQL looks up
user details when you connect, if you connect from localhost and the
user was only created with a wildcard host (%), the anonymous localhost
user will be found instead. This means that your username is lost for
the connection, and you have no privileges.
This patch creates a second user with a hostname of 'localhost'. This
will not work if your database is on a remote server, but you probably
know what you are doing if that's the case. Patches to determine this
server's name relative to the MySQL server are welcome (or even ideas on
how to do it.)
It also fixes up a couple of other small things:
* make koha-remove stop zebra properly
* stop the warning that the password file is missing on create
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Works as promised.
Valid download attempts were being denied thanks to an incorrect
regular expression. This patch fixes that, and makes it easier to
understand what's going on in the code.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Julian Maurice [Tue, 24 Jul 2012 10:24:11 +0000 (12:24 +0200)]
Bug 8495: Fix JS error when creating a new order
bug introduced by bug 7178
(http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7178)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Julian Maurice [Fri, 3 Aug 2012 14:26:34 +0000 (16:26 +0200)]
Bug 5600 follow-up: Fix commandline check in order to work under Plack
With plackup, @ARGV can contains elements so we can't check the size of
@ARGV to tell whether we are in command line mode or not.
Instead we check environment variable GATEWAY_INTERFACE.
Also fix the use of a global variable in a subroutine
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
* format is either 'xml' or 'marc' (default)
* date should be entered as the 'dateformat' syspref is set
(dd/mm/yyyy for metric, yyyy-mm-dd for iso, mm/dd/yyyy for us)
* records exported are the ones that have been modified since 'date'
* if --deleted_barcodes is used, a list of barcodes of items deleted
since 'date' is produced (or from all deleted items if no date is
specified)
* --clean removes NSE/NSB
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Kyle M Hall [Wed, 4 Apr 2012 13:56:11 +0000 (09:56 -0400)]
Bug 3383 - Item due reminder digests - cannot display title information
Adds the ability to use branches.* fields in digest notices and
have them be parsed correctly. Also adds a warning to the notices
editor for digests.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I like the idea to show a warning, but I would perhaps move
it under the message body label to be more obvious.
Patch works nicely, branch data of my user's home library
is displayed in the notice.
Marcel de Rooy [Mon, 18 Jun 2012 09:42:50 +0000 (11:42 +0200)]
8263 Consistent stylesheet prefs
This patch makes the use of opaccolorstylesheet and opaclayoutstylesheet more consistent. They may be: 1) just a file name, 2) a complete local path or 3) a full URL starting with http: for a remote css file.
This makes the syspref opacstylesheet that was only used for a remote css file obsolete.
June 20, 2012 Rebased.
July 18, 2012: Regex allows https too (thanks to Owen Leonard).
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
To make this work, C4::Barcodes::next was modified to call process_tail with
new incremented value so that process_tail can generate correct checksum.
Since process_tail is currenlty not used by any barcodes, this change is safe.
C4::Barcodes is used by addbiblio.pl when adding multiple records, while value_builder
is used in all other cases.
Test scenario:
1. prove t/Barcodes_EAN13.t
2. KOHA_CONF=/etc/koha/sites/fer/koha-conf.xml prove t/db_dependent/Barcodes.t
this will check C4::Barcode implementataion
3. in systempreference change autoBarcode to incremental EAN-13 barcode
4. edit two items of any biblio assigning barcodes and verify that numbers
are increasing. Have in mind that last digit is check digit, and it
doesn't increment, but is calculated from barcode itself. Example with
checksum in brackets: 000000086275[2], 000000086276[9], 000000086277[6]
5. Add Item and verify that it gets assigned next barcode
6. Add & Duplicate item and verify barcode increase
7. Add Multiple Copies and verify that barcode increase for each copy
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This filter which check validity of EAN-13 barcode and padd it with zeros
up to full 13 digit number. This will also expand 12 digit UPC-A barcodes
to EAN-13 automatically which is useful for older barcode readers which tend
to ignore first zero in EAN-13 if they have just UPC-A support.
It should be noted that EAN-13 or UPC-A product codes printed on books are not
good choice for barcodes in Koha since each item has to have unique barcode.
Test scenario:
1. prove t/Circulation_barcodedecode.t
this checks expansion of 12 digit UPC-A to 13 digit EAN-13 and zero padding
2. in systempreferences search for itemBarcodeInputFilter and select EAN-13
3. edit one item and assign it valid EAN-13 barcode, eg. 0000000695152, check it out
4. test checkin with just 695152 to test leading zero expansion
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
David Cook [Tue, 17 Jul 2012 08:30:13 +0000 (18:30 +1000)]
Bug 8455 - Check ins processed through "Check Out" tab of the Patron Record ignore Circulation System Preferences
If you check-in an item through the "Check Out" tab of the Patron Record, the return/check-in ignores the "InProcessingToShelvingCart" and "ReturnToShelvingCart" circulation system preferences. Or rather, there just isn't any logic to handle them in the renewscript.pl file.
I'm pretty much just bringing the code straight across from returns.pl, although some minor changes need to be made due to context.
Both system preferences are important to include, since you can check-out an in processing item to a patron. While a regular check-in will clear the in processing status, a check-in through the Patron module will cause the item to have its status returned to "In Processing" rather than going to "Shelving Cart", if the preference is set, of course.
To test the scenario, turn on one of (or both of) these settings and try checking books in through the Circulation module and the Patron module.
Before the patch, you will see that only the Circulation module will change the shelving location.
After the patch, you should see identical behaviour.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
http://bugs.koha-community.org/show_bug.cgi?id=7189
Kyle M Hall [Thu, 5 Jul 2012 14:33:40 +0000 (10:33 -0400)]
Bug 4198 - deleting an authority refreshes the page
Makes clicking a Delete link refresh the search that
was performed so that the results are still on the screen.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Works as advertised. Very usefull. Still the issue that indexing being
not in real time, the search result displays the just deleted authority.
But there is no way to do better.
Elliott Davis [Wed, 11 Jul 2012 10:52:53 +0000 (05:52 -0500)]
Added a URI filter to encode a cardnumber for borrowers as to not break patronimage.pl
To Test:
Add a + (or any char that would need to be encoded) to a card number of a patron with an image attached.
Go to member/moremember.pl.
If the patrons image is there, you are golden.
http://bugs.koha-community.org/show_bug.cgi?id=8421 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
David Cook [Mon, 2 Jul 2012 00:16:46 +0000 (10:16 +1000)]
Bug 7839 [ENH] : Add tab in patron record to show patron's routing lists
dcook: fixed SQL error and removed blank targets
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Thanks. Works as described. Valuable addition on patron information
page.
Ideas of enhancement:
- For some library, and some patron, the routing lists table could be
very long, and a paged table would be a plus.
- In the table, a new Vendor column.
- The possibility to sort the table entries by Title and Vendor column.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Kyle M Hall [Tue, 10 Jul 2012 14:57:46 +0000 (10:57 -0400)]
Bug 8408 - Odd OPAC message when OPAC Renewals are disabled and OPACFineNoRenewals is set to blank
If OpacRenewalAllowed is set to "Don't allow" and OPACFineNoRenewals is set to blank ( i.e. disabled ).
A user who owes any fines, when logged in to the OPAC will receive the following message:
Please note: You have more than 0.00 in fines.
This is a rather odd message, and is not very sensible. The message should either be modified or removed altogether.
This patch modifies the message to the following:
Please note: You currently owe $fines in fines
where $fines in the formatted amount the borrower currently owes
in fines.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Marc Veron [Sun, 29 Jul 2012 07:30:54 +0000 (09:30 +0200)]
Bug 8518 - Self checkout does not display debt amount if syspref AllowFineOverride is set to allow
If the patron has depts that prevent issuing and the system preference 'AllowFineOverride' is set to 'allow', the amount is not displayed in the user message.
Additionally, patch adds currency symbol to amount.
Test plan:
Do self checkout with patron who has debts that are over the limit.
Test with and without preference 'AllowFineOverride' set.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Jonathan Druart [Tue, 10 Jul 2012 14:00:54 +0000 (16:00 +0200)]
Bug 7955: Followup : Check the syspref value (avoid sql injection)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Works as expected. Fields with disallowed characters do not show up.
Added 'if $debug' to an pseudo-unconditional warn.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8207: Allow see also fields in auths to link to thesauri
Right now if you were to link a field in an authority to a thesaurus, it
would not work properly. The authority type frameworks require some
adjustments to allow see also headings to be linked to thesauri (such as
adding subfield $9).
This patch adds subfield $9 and thesaurus links to existing installs
for those 5xx fields (under MARC21 and NORMARC only) which do not yet
have any subfield $9 or thesauri configured, as well as adding that to
new English language installs. There will be a follow-up patch adding
the subfields to new non-English language install files later, once
it is clear that the changes proposed and demonstrated in the English
files are accepable to the community.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested frameworks install cleanly on a new installation.
Tested database update and made sure, that configuration and subfields
of a field were not changed if
- a $9 subfield already existed for a 5xx field
- a $9 subfield and a link to another thesaurus in $a existed
- no $9 but a link to another thesaurus in $a existed
Chris Cormack [Sat, 28 Jul 2012 08:07:36 +0000 (20:07 +1200)]
Bug 8486 - Follow up making the tests db independent
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Makes the test db independant by specifying the date format. Thus, there is no call to ->preference() that retrieve a systempreference
Bug 8204: Add user friendly authority view to OPAC
Up until now, the only authority view in the OPAC was a
rather-unfriendly expanded MARC view. This patch adds a user-friendly
view similar to the biblio details view.
Specific features to be aware of:
* Right-to-left text in the MARC21 880 field will show up in the
appropriate location with the appropriate alignment and wrapping
* There is very little CSS styling. Any suggestions for how to make
the display more attractive would be gratefully received.
To test:
1) Do a search for an authority in the OPAC.
2) Choose an authority record to view.
3) Observe that the view is more user-friendly and polished.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works very nicely now. The old view is still available, but the
user is presented with a nicer non-MARC view first.
Bug 8208 follow-up: move Clear and Create new buttons out of results
Turns "Clear" and "Create new" links into buttons that are visible
before a search is performed, so that the user does not have to do
a search just to clear the field or create a new authority. This
commit also changes the formatting from textual links to buttons.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Nicer and more logical display.
Allows creating of a new authority without doing a search first
or when no results were found.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
When performing subject analysis, it is not uncommon to find that an
authority record you need does not exist. This commit adds a link in
the search results to enable the cataloger to create an authority on
the fly and have the heading populated by the new authority.
To test:
1. Use the auth finder plugin the cataloguing module to search for a
heading you do not have an authority record for.
2. Click the "Create new" link.
3. Fill in your authority and save it.
4. Note that the heading field was populated with the data you entered
in the authority record.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
1) Added a new authority using the plugin
2) Used an existing authority using the plugin
3) Created a new authority in the authority module
Elliott Davis [Wed, 11 Jul 2012 03:38:28 +0000 (22:38 -0500)]
[PATCH] bug_7420: Added overduefinescap to issuingrules
Replaced existing MaxFine syspref logic with overduefinescap.
Repurposed MaxFine to be the overall overdue limit for all items
overdue. Implemented new MaxFine logic in UpdateFine().
Signed-off-by: Elliott Davis <elliott@bywatersolutions.com>
Tested according to Srdjan's test plan and everything worked like he said it would. I set fined equal to $2 and max fine equal to $1. When I ran the fines script for overdue items fines assessed were only $1.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Colin Campbell [Wed, 25 Jul 2012 09:55:56 +0000 (10:55 +0100)]
Bug 8486 Merge Calendar test files
Moves the tests previously in t/Kalendar.t to t/Calendar.t
and removes the old file.
Note the existing minimal test of C4/Calendar still called in
t/Calendar
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
HTML::FormatText is used by Template::Plugin::HtmlToText which is called in the template for opac-sendbasket.pl.
This is not a core Perl 5.10 module. I had to install it additionally on a test server. So I am adding it to PerlDependencies.
I just picked an old version 1.23 that I still could find as min_ver.
Changed the version information for Test::Strict too (not required, only for tests).
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>