]> git.koha-community.org Git - koha.git/log
koha.git
9 years agoBug 13771: Add admin help files for 3.18
Nicole [Tue, 3 Mar 2015 10:01:56 +0000 (02:01 -0800)]
Bug 13771: Add admin help files for 3.18

This patch adds a new help file for column settings and updates the
files for budgets, funds, libraries, patron categories, and circ rules.

To test:

* Visit the above listed admin pages
* Review help files

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13771: Update Circ Help File
Nicole [Mon, 2 Mar 2015 15:48:12 +0000 (07:48 -0800)]
Bug 13771: Update Circ Help File

This updates the main circulation help file with new features in 3.18.

To test:

* visit circulation page
* click help
* review text

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13771: Main Page Help fro 3.18
Nicole C. Engard [Mon, 2 Mar 2015 09:49:30 +0000 (04:49 -0500)]
Bug 13771: Main Page Help fro 3.18

This updates the main page help file for 3.18.

To test:
* Log in to staff cleint
* Click help on the mian page
* Review help file

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBUG 13771: Update Tools Help Files for 3.18
Nicole C. Engard [Mon, 2 Mar 2015 10:28:42 +0000 (05:28 -0500)]
BUG 13771: Update Tools Help Files for 3.18

This patch creates a helpf ile for the batch record delete tool
and updates the help files for notices and marc export.

To test:

* Visit tools > batch record deletion
* confirm help is right
* Visit tools > Notices & Slips
* confirm help is right
* Visit tools > export marc
* cofirm the help is right

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13789 - facets with accented utf-8 characters generate double encoded links
Dobrica Pavlinusic [Wed, 4 Mar 2015 10:38:42 +0000 (11:38 +0100)]
Bug 13789 - facets with accented utf-8 characters generate double encoded links

Bug 13425 tried to fix XSS in OPAC, by using url filter in template toolkit
on whole generated url. This doesn't work and create double encoded strings
in facets because we are creating url variable by concatenating query_cgi
(which did pass through uri_escape_utf8 on perl side) and other
parameters which have to be escaped in template.

Also, code like

[% SET limit_cgi_f = limit_cgi | url %]

doesn't do anything (at least doesn't apply url filter) so it's not needed.

This patch also fixes encoding of hidden fields used in sort by form.

And lastly, it tries to make facet changes for opac and intranet as same as
possible to simplify future maintencence of this code.

Test scenario:
1. find results in your opac which contain accented characters
2. click on them and verify that results are missing
3. apply this patch
4. re-run search and click on facets link verifying that there are
   now results
5. test sort by form and verify that results are ok
6. verify that facets are still safe from injection by constructing url like
   /cgi-bin/koha/opac-search.pl?q=123&sort_by='"><script>prompt('Happy_Holidays')</script>&limit=123
   and verifying that you DON'T see prompt window in your browser

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13635: Unimarc - On editing a notice, the title should be displayed
Jonathan Druart [Wed, 28 Jan 2015 12:03:31 +0000 (13:03 +0100)]
Bug 13635: Unimarc - On editing a notice, the title should be displayed

The title method of MARC::Record does not deal with UNIMARC, it should
not be called if the marc flavour is UNIMARC.

Test plan:
On an unimarc installation, edit a notice, with this patch you should
see
 "Editing TITLE (Record number BIBLIONUMBER)"

Without, the title was not displayed.
Same in the breadcrumbs.

Bug 13635: Remove another useless call

There is another call to the title method in additem.pl without any
check on the marc flavour.
But here the title variable sent to the template is redefined 3 lines
later.
So it can be simply removed.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on UNIMARC install, editing a 'record' (not notice) does not show
title on breadcrumbs, status bar or page title.
With patch it does!
No koha-qa errors.

Signed-off-by: joel aloi <aloi54@live.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: DBRev 3.19.00.013
Tomas Cohen Arazi [Thu, 5 Mar 2015 14:49:25 +0000 (15:49 +0100)]
Bug 11395: DBRev 3.19.00.013

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: A control field is a field with tag < 10
Jonathan Druart [Mon, 15 Dec 2014 09:29:36 +0000 (10:29 +0100)]
Bug 11395: A control field is a field with tag < 10

This patch fixes the existing test about control fields.
A control field is < 10, not <=10!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: Raise an alert if control field is used
Jonathan Druart [Wed, 3 Sep 2014 13:08:39 +0000 (15:08 +0200)]
Bug 11395: Raise an alert if control field is used

If a control field is used with a copy or move action, the interface
should block the user in some cases:
- If a control field is used with a regular field
- The subfield should be empty

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: exit should be done after displaying the output
Jonathan Druart [Fri, 10 Oct 2014 18:20:54 +0000 (20:20 +0200)]
Bug 11395: exit should be done after displaying the output

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: prevent processing no record
Jonathan Druart [Tue, 8 Jul 2014 08:01:31 +0000 (10:01 +0200)]
Bug 11395: prevent processing no record

If no record is selected, the modification should not be launched.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: Fix path for the checkboxes jQuery plugin
Jonathan Druart [Fri, 4 Jul 2014 08:40:21 +0000 (10:40 +0200)]
Bug 11395: Fix path for the checkboxes jQuery plugin

This patch fixes a bad resolution conflict (bug 12107).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: DB: Add permission tools_records_batchmod
Jonathan Druart [Thu, 12 Dec 2013 20:14:47 +0000 (21:14 +0100)]
Bug 11395: DB: Add permission tools_records_batchmod

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: The modification template should be changed on the list view
Jonathan Druart [Mon, 16 Dec 2013 16:02:25 +0000 (17:02 +0100)]
Bug 11395: The modification template should be changed on the list view

This patch fixes the following issue:
If the user comes from a basket, the list view is displayed but there is
no way to select the modification template.

Now the template can be chosen on the list view. This way, the user is
able to change the modifications to apply and see the previewed records.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: New service to preview a record.
Jonathan Druart [Thu, 12 Dec 2013 20:15:06 +0000 (21:15 +0100)]
Bug 11395: New service to preview a record.

The main patch adds the ability to preview a record. This is done using
an AJAX way. The preview record is processed on the server side.

Note: I don't think an authentification check is necessary here.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: Add links to the new tool page
Jonathan Druart [Thu, 12 Dec 2013 20:13:15 +0000 (21:13 +0100)]
Bug 11395: Add links to the new tool page

This patch adds links in the tool module to the new batch tool and in
the basket.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11395: Add a batch record modification
Jonathan Druart [Thu, 12 Dec 2013 20:13:53 +0000 (21:13 +0100)]
Bug 11395: Add a batch record modification

This patch offers a new tool to modify records in a batch.

This feature adds:
- a new pl/tt files tools/batch_record_modification
- a new permission: tools > records_batchmod

Test plan for biblios:
0/ Create a new marc modification template with some actions.
1/ Generate a list of biblionumbers you want to modify.
There are two ways to generate a list of biblionumbers:
- using the basket: do a search, add some biblio to your basket, open
  the basket and click on the "Action" button > "Modify"
- generating a list from a report
2/ On the "Batch record modification" tool verify:
- information is correct.
- the preview link show you the needed record.
3/ After clicking on the "Modify selected recors" button, verify
the records have been modified as you wanted.

Test plan for authority:
0/ Create a new marc modification template with some actions.
1/ Generate a list of authid using a report:
2/ On the "Batch record modification" tool verify:
- authorities are display with the summary.
- the preview link show you the needed record.
3/ After clicking on the "Modify selected recors" button, verify
the records have been modified as you wanted.

Catch of errors:
if an error occurs during the modification process, the tool
displays an error message.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
9 years agoBug 13605 - _AUTHOR_ not replaced in relatives checkouts
Fridolin Somers [Wed, 21 Jan 2015 09:22:19 +0000 (10:22 +0100)]
Bug 13605 - _AUTHOR_ not replaced in relatives checkouts

In members/moremember.pl, in relatives checkouts tab, "by _AUTHOR_" appears before author.
This code sould be replaced in JS.

Test plan :
- Go to a borrower with relative's checkouts
=> without patch : you see "by _AUTHOR_" string before author name
=> with patch : you see "by" string before author name

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, fixes the problem.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13575 - Names do not appear in the Koha history Timeline.
Brandon [Tue, 13 Jan 2015 21:18:13 +0000 (21:18 +0000)]
Bug 13575 - Names do not appear in the Koha history Timeline.

This would be a good addition. The names to be added are:
Kahurangi Cormack, Alexander Cheeseman

Signed-off-by: Nicole <nicole@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9848: SIP tests, fix in 10renew_all.t (additionnal checkin)
Adrien Saurat [Tue, 19 Mar 2013 16:00:40 +0000 (17:00 +0100)]
Bug 9848: SIP tests, fix in 10renew_all.t (additionnal checkin)

Adds a checkin operation at the beginning of the test.
Otherwise, a former test leaves the test item checked out
and this generates an error.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12122: TransferSlip should accept both itemnumber and barcode
Benjamin Rokseth [Tue, 22 Apr 2014 12:09:16 +0000 (14:09 +0200)]
Bug 12122: TransferSlip should accept both itemnumber and barcode

Added small patch to allow barcode as input in TransferSlip routine, mostly
to allow generating transfer slips where only barcode is present (aka.
javascript).

Test plan:
1) find book with <barcode> and <itemnumber>
2) generate transferslips with both:
  transfer-slip.pl?transferitem=<itemnumber>3967925&amp;branchcode=MPL&amp;op=slip
  transfer-slip.pl?barcode=<barcode>&amp;branchcode=MPL&amp;op=slip
and verify that the generated slips match.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Edit:
 - Added tests in t/db_dependent/Circulation_transfers.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Passes tests and QA script.
Works with both itemnumber or barcode as described.
Tested printing transfer slips with the URL examples given
and in the UI.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13731: Suggestions reason does not save on updating the status
Jonathan Druart [Mon, 23 Feb 2015 11:32:33 +0000 (12:32 +0100)]
Bug 13731: Suggestions reason does not save on updating the status

On the suggestion list view, if you set a status, it won't be saved.

Test plan:
1/ Create a suggestion
2/ Go on the suggestion list view (suggestion/suggestion.pl)
3/ Select a suggestion and marked it as "rejected" (or the status you
want) and choose a reason
4/ Save
5/ Browse you suggestions DB table (using your favorite MySQL CLI) and
verify that the "reason" field is correctly filled.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, thx!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13745: Fix serial collection page to always show branch name
Katrin Fischer [Sat, 21 Feb 2015 21:24:03 +0000 (22:24 +0100)]
Bug 13745: Fix serial collection page to always show branch name

The serial collection page shows 2 tables, one for the subscriptions
and a second for the issues. Both show the branch, but the first
showed the code while the second showed the name.
With this patch both tables show the name.

To test:
- Search for a subscription or create one
- Navigate to the serial collection page (navigation on left side)
- Check both tables on the page show the branch name with
  the patch applied

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13741: "No fund found" is not translatable
Katrin Fischer [Sat, 21 Feb 2015 19:52:02 +0000 (20:52 +0100)]
Bug 13741: "No fund found" is not translatable

The string "No fund found" on the funds overview page is
not translatable.

To test:
- Create a new budget
- Check for the string on the funds page of the new budget
- Run an update on one of the po file sets
    cd misc/translator
    perl translate update <langcode>
- Verify that the string now appars in the po file for staff
- Verify the page still looks the same as before the patch

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13676 - OpacSuppression description says 'items' but means 'records'
Marc Véron [Tue, 10 Feb 2015 17:32:08 +0000 (18:32 +0100)]
Bug 13676 - OpacSuppression description says 'items' but means 'records'

This patch changes the wording for the OpacSuppression preference description.

Without patch:
... items marked as suppressed from OPAC search results. Note that you must have the <code>Suppress</code> index set up in Zebra and at least one suppressed item, or your searches will be broken. ...

With patch:
... items marked as suppressed from OPAC search results. Note that you must have the <code>Suppress</code> index set up in Zebra and at least one suppressed biblio record, or your searches will be broken. ...

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13759 - git-build-snapshot misses YUI and dies of sorrow during build
Mirko Tietgen [Wed, 25 Feb 2015 14:53:57 +0000 (15:53 +0100)]
Bug 13759 - git-build-snapshot misses YUI and dies of sorrow during build

Due to a line in debian/rules, git-build-snapshot tries to delete a YUI-related
path that does not exist anymore (bug 13612 I guess). Build process ends with an error.
This patch deletes the line.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13753: koha-indexer contains invalid statement
Tomas Cohen Arazi [Tue, 24 Feb 2015 13:54:57 +0000 (10:54 -0300)]
Bug 13753: koha-indexer contains invalid statement

An incorrect conditional makes the indexer daemon fail to load.

To test:
- Enable the indexer daemon on packages [1]
- Restart koha-common:
  $ service koha-common restart
- Run
  $ ps waux | grep koha-indexer
=> FAIL: there's no reference to the rebuild_zebra.pl script
  (line should look like *rebuild_zebra.pl -daemon*)
   Run ps -ef | grep rebuild_zebra.pl too to make sure.
- Apply the patch, repeat the steps
=> SUCCESS: the rebuild_zebra.pl script is ran
- Sign off :-D

Thanks

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13473 - Plugins fail
Kyle M Hall [Tue, 17 Feb 2015 11:23:35 +0000 (06:23 -0500)]
Bug 13473 - Plugins fail

When trying to execute or configure the plugin on 3.18 I got:

Template process failed: file error - doc-head-open.inc: not found at
/usr/share/koha/lib/C4/Templates.pm line 129.

Test Plan:
1) Install the Kitchen Sink plugin
2) Go to the configuration page of the plugin
3) Note the template processing error
4) Apply this patch
5) Refresh the page
6) Note the page now loads

Signed-off-by: Nick <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13523: DBIC updates
Tomas Cohen Arazi [Tue, 24 Feb 2015 17:20:31 +0000 (14:20 -0300)]
Bug 13523: DBIC updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13523: DBRev 3.19.00.012
Tomas Cohen Arazi [Tue, 24 Feb 2015 14:27:03 +0000 (11:27 -0300)]
Bug 13523: DBRev 3.19.00.012

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13523 - AddBiblio fails on mysql with STRICT_TRANS_TABLES
Benjamin Rokseth [Thu, 22 Jan 2015 11:21:47 +0000 (12:21 +0100)]
Bug 13523 - AddBiblio fails on mysql with STRICT_TRANS_TABLES

This patch removes the NOT NULL restriction on biblioitems.marcxml and
deletedbiblioitems.marcxml due to STRICT_TRANS_TABLES default in
Mysql 5.6.22 and onwards.

Test:

1. check mysql global settings:
   mysql > SELECT @@GLOBAL.sql_mode;
   verify that STRICT_TRANS_TABLES is not set
2. set STRICT_TRANS_TABLES (or upgrade mysql to > 5.6.21)
   mysql > SET @@GLOBAL.sql_mode = 'STRICT_TRANS_TABLES';
3. try to add biblio in Cataloguing module
   verify that it fails with a "software error"
4. apply patch
5. repeat 3 and verify that there is no "software error" any more

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I confirm with the problem with mariadb and STRICT_TRANS_TABLES enabled.
On adding a biblio (C4::Biblio::AddBiblio), biblioitems is populate in
_koha_add_biblioitem but marxcml is not generated yet. It's in
ModBiblioMarc, few lines later.
The NOT NULL condition is not valid here.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13729 - Give news in Opac a unique anchor
Viktor Sarge [Wed, 18 Feb 2015 21:02:09 +0000 (21:02 +0000)]
Bug 13729 - Give news in Opac a unique anchor

This patch introduces the use of the idnew-value from the opac_news table as a base for a unique anchor on each newsitem in Opac.

The anchor can be used for linking to specific newsitems and also for improving bug 7843 (RSS stream for news) with a unique link to each item in the RSS stream.

Test plan:
* Make shure you have a few news in the opac. Best is if it's enough to hide a few beneath the bottom of the window.
* Install the patch.
* Verify that you can access newitems with links like mykoha/cgi-bin/koha/opac-main.pl#newsitem4
* Experiment with removing newsitems and verify that that the newsitem-id stay unique to each newsitem.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised. Nice enhancement!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13645: dependencies for libdbix-connector-perl
Robin Sheat [Tue, 24 Feb 2015 05:32:30 +0000 (18:32 +1300)]
Bug 13645: dependencies for libdbix-connector-perl

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13612 - Remove old YUI javacript libraries from opac-tmpl
Owen Leonard [Thu, 22 Jan 2015 16:28:35 +0000 (11:28 -0500)]
Bug 13612 - Remove old YUI javacript libraries from opac-tmpl

YUI files were left behind in opac-tmpl/lib/yui after the removal of the
prog theme. These files are unused and can be safely removed.

To test, apply the patch and search for references to any of the YUI
files. You should find none in the OPAC templates.

No references found.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13689 - Remove opac-old.css and sco-old.css
Marc Véron [Tue, 10 Feb 2015 14:57:01 +0000 (15:57 +0100)]
Bug 13689 - Remove opac-old.css and sco-old.css

The following files are obsolete and should be removed:
koha-tmpl/opac-tmpl/bootstrap/css/opac-old.css
koha-tmpl/opac-tmpl/bootstrap/css/sco-old.css

To test: Apply patch. Search for the files; they should no longer exist.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13645 [QA Followup] - Add DBIx::Connector to the list of dependancies
Kyle M Hall [Fri, 20 Feb 2015 14:54:35 +0000 (09:54 -0500)]
Bug 13645 [QA Followup] - Add DBIx::Connector to the list of dependancies

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Nice catch Kyle, I changed it to require Ubuntu 12.04's

9 years agoBug 13645: Use DBIx::Connector
Jonathan Druart [Tue, 10 Feb 2015 09:47:05 +0000 (10:47 +0100)]
Bug 13645: Use DBIx::Connector

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 years agoBug 13645: Cache the DBIx connection
Jonathan Druart [Fri, 30 Jan 2015 16:10:54 +0000 (17:10 +0100)]
Bug 13645: Cache the DBIx connection

We don't want to recreate a new connection to the DB every time we want
a new schema.

This patch creates a $database package level variable on the same way
it's done in C4::Context for $dbh.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 years agoBug 13506 [QA Follouwp] - Fix POD
Kyle M Hall [Fri, 20 Feb 2015 13:52:07 +0000 (08:52 -0500)]
Bug 13506 [QA Follouwp] - Fix POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13506: Remove unused Sip/Configuration Classes
Colin Campbell [Fri, 2 Jan 2015 09:58:55 +0000 (09:58 +0000)]
Bug 13506: Remove unused Sip/Configuration Classes

Sip::Configuration calls new on Account, Institution and Service
classes but does not store or subsequently use the returned objects
( which immediately go out of scope ). Their existence just obscures
the code and misleads the reader. Remobe them

Removed redundant commented out code from Configyration module which
was not serving any useful purpose

Ran Configuration.pm through perltidy to make layout more
consistent

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12948: Use word indexing for language (MARC21)
Zeno Tajoli [Sun, 15 Feb 2015 16:40:06 +0000 (17:40 +0100)]
Bug 12948: Use word indexing for language (MARC21)

 This patch is for MARC21. To test:
1)Setup a site with
 MARC21
2)Insert 2 record, one lang A in 041 and 008 pos
 35-37 an other with lang A in 041 and lang B in 008 pos
 35-37
3)Index them
4)Search in advanced search with filter
 'languare' for lan A. You will see 2 records
5)Search in
 advanced search with filter 'languare' for lan B. You will
 see 0 records
6)Apply the patch
7)Full reindex
8)Search in advanced search
 with filter 'languare' for lan B. You will see 1 records

http://bugs.koha-community.org/show_bug.cgi?id=12948

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
I have *not* actually tested this, but the changes are identical to the ones
done for NORMARC, which I have tested, so I think it is safe to sign off. If
anyone disagrees, please reset the bug to "Needs signoff".

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12948: Use word indexing for language (NORMARC)
Zeno Tajoli [Sun, 15 Feb 2015 16:54:48 +0000 (17:54 +0100)]
Bug 12948: Use word indexing for language (NORMARC)

This patch is for Normarc
Same test plan as patch for MARC21, except you need a setup with Normarc.

http://bugs.koha-community.org/show_bug.cgi?id=12948
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Added a record with "bul" in 008pos35-37
- Verified that this did not turn up in an advanced search with language =
  Bulgarian
- Applied the patch
- I was testing on a gitified install, so I had to copy the patched index file
  to the right location with this command:

sudo cp etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl \
/etc/koha/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl

- Did a full reindex
- Verified that the record *did* turn up in an advanced search with language =
  Bulgarian
- Signing off! Thanks Zeno!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13690: use Koha::Schema only when it's needed
Jonathan Druart [Tue, 10 Feb 2015 10:34:10 +0000 (11:34 +0100)]
Bug 13690: use Koha::Schema only when it's needed

This patch makes Koha::Database lazy-load the whole Koha::Schema libraries.
It doesn't seem to have negative effects, and makes scripts not using
DBIx::Class notably faster [1].

Regards

[1] If you read the DBIx::Class::Schema docs, it explains that it it uses
Module::Find to load all schema files...
http://search.cpan.org/~ribasushi/DBIx-Class-0.082810/lib/DBIx/Class/Schema.pm#load_namespaces

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Happy to sign this one. The only extra comment would be that DBIx::Class
performance issues remain after this patch, but is being handled in a
different bug.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 years agoBug 13593: (follow-up) 'stock number' should be 'inventory number'
Jonathan Druart [Thu, 19 Feb 2015 14:50:37 +0000 (15:50 +0100)]
Bug 13593: (follow-up) 'stock number' should be 'inventory number'

Add one more.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13593: 'stock number' should be 'inventory number'
Katrin Fischer [Sun, 18 Jan 2015 19:04:15 +0000 (20:04 +0100)]
Bug 13593: 'stock number' should be 'inventory number'

To make Koha easier to use, we should use terms consistently.
This patch fixes some occurrences of 'stock number' to be
'inventory number' as this is also the term used in the frameworks.

Item search, accessible via the link from staff's advanced search
1) Do a search for items, but choose CSV as output
2) Verify that the header row says 'inventory number'

Acquisition
3) Set AcqCreateItem to 'order'
4) Create a new order, check the labels on the item table in the order

5) Receive the order, check the labels on the item table on receive

6) Set AcqCreateItem to 'receive'
7) Check the item table on receiving an order

Followed test plan (including item search with JavaScipt disabled). Headers / labels display as expected.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12858 [QA Followup] - Don't call webservice if we have no data
Kyle M Hall [Fri, 20 Feb 2015 12:23:15 +0000 (07:23 -0500)]
Bug 12858 [QA Followup] - Don't call webservice if we have no data

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12858: Add error handling to Syndetics Index
Martin Renvoize [Tue, 2 Sep 2014 09:14:03 +0000 (09:14 +0000)]
Bug 12858: Add error handling to Syndetics Index

* Syndetics routines include a statement to check that the returned
  content from Syndetics is xml. The get_syndetics_index routine was
  missing this check and so when a 'not found' html page was returned
  the opac-detail page would take a long time to load whilst xml::simple
  attempted to parse the large html document.

  Test Plan
  1. Enable Syndetics indexes on opac.
  2. Head over to an opac-detail page on the opac.
  3. Remove the ISBN from the same item in the staff client.
  4. Reload the opac-detail page for the item noticeing a much slower
  page load.
  5. Apply the patch
  6. Reload the opac-detail page for the item and note that it now laods
  in a reasonable timescale again.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBUG 13596: Prevent utf8mb4 -> utf8 convertion
Martin Renvoize [Mon, 19 Jan 2015 13:48:42 +0000 (13:48 +0000)]
BUG 13596: Prevent utf8mb4 -> utf8 convertion

utf8mb4 is a superset of utf8 and thus is compatible.  We should not
force an entire db change upon people who have proactively set utf8mb4
encoding before now.

This patch also removed the deprecated use of ->tables stanza in favour
of the table_info stanza.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13682 - Capitalization: Holds Queue
Marc Véron [Tue, 10 Feb 2015 17:16:45 +0000 (18:16 +0100)]
Bug 13682 - Capitalization: Holds Queue

This patch changes capitalization of Holds Queue to Holds queue in koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueu$

To test:
Apply patch
Go to Circulation > Holds queue page
Verify that the capitalization is correct

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12669: Centralize the timezone handle into Koha::DateUtils
Jonathan Druart [Tue, 16 Sep 2014 11:15:57 +0000 (13:15 +0200)]
Bug 12669: Centralize the timezone handle into Koha::DateUtils

This patch adds unit tests for the previous changes and centralize the
timezone handle into the Koha::DateUtils module.
Like that the behavior will affect all date manipulations using this
module (should be all dates in Koha).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12669: Use floating timezone when handling dates without hours, minutes and seconds.
Rolando Isidoro [Fri, 1 Aug 2014 08:42:30 +0000 (09:42 +0100)]
Bug 12669: Use floating timezone when handling dates without hours, minutes and seconds.

Test plan:

1. Create a new serial record or pick an existing one;
2. Add a "New subscription" and set the "First issue publication date"
   and "Frequency" values so that the "Planned date" for a given issue
   hits a day where a transition to Daylight Saving Time (DST) occurs

   ex:. 1979-04-01 in Europe/Lisbon (http://www.timeanddate.com/time/change/portugal/lisbon?year=1979)
   ... use this website page as a source http://www.timeanddate.com/time/dst/2014.html
   to find a suitable transition to DST in your timezone in the current year.

3. From the "Subscription detail" page in Koha for the given record click
   the "Serial collection" link on the left side context menu.

Expected result:
Prior to applying the patch the error described in this bug report should occur.
After the patch is applied the "Serial collection" page should load correctly.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13679 : Bug in listing overdues
Chris Cormack [Sat, 7 Feb 2015 04:04:40 +0000 (17:04 +1300)]
Bug 13679 : Bug in listing overdues

To test
1/ Create some overdues and some issues due in the future
2/ Run the overdues script
3/ Notice item due in the future is in the list
4/ Apply patch
5/ Run script again
6/ Notice in the future not in the list

Signed-off-by: Nick <Nick@quechelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13728: koha-translate -l -a shows po files instead of language codes
Tomas Cohen Arazi [Wed, 18 Feb 2015 15:27:20 +0000 (12:27 -0300)]
Bug 13728: koha-translate -l -a shows po files instead of language codes

This patch corrects the call to 'basename' inside the script so it correctly
shows the language code when asked to list the available languages.

To test:
- On a packages install, run:
  $ koha-translate --list --available
=> FAIL: It shows:
am-Ethi-opac-bootstrap.po
ar-Arab-opac-bootstrap.po
az-AZ-opac-bootstrap.po
be-BY-opac-bootstrap.po
ben-opac-bootstrap.po
...

- Apply the patch
- Copy the patched debian/scripts/koha-translate script to your packages setup.
- Run:
  $ koha-translate --list --available
=> SUCCESS: It shows:
am-Ethi
ar-Arab
az-AZ
be-BY
ben
...

- Sign off :-D

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12970: Fix the footer if several tax rate exist
Jonathan Druart [Fri, 14 Nov 2014 14:44:46 +0000 (15:44 +0100)]
Bug 12970: Fix the footer if several tax rate exist

If more that 1 tax rate exist, 1 total ligne should be display in the
footer.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12970: Cancelled orders
Jonathan Druart [Thu, 25 Sep 2014 14:39:11 +0000 (16:39 +0200)]
Bug 12970: Cancelled orders

Previous patch does modify the code for cancelled orders.

Test plan:
Cancel 1+ orders and verify the prices are correct (i.e. the same as
the non-cancelled orders) and that the prices are formated.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12970: Format totals
Jonathan Druart [Thu, 25 Sep 2014 14:32:01 +0000 (16:32 +0200)]
Bug 12970: Format totals

The total values should be formated too.

Test plan:
1/ Go on the basket page
2/ Using the CurrencyFormat, verify the totals are correctly formated.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12970: Use the centralize VAT and prices calculation - basket.pl
Jonathan Druart [Fri, 19 Sep 2014 15:09:34 +0000 (17:09 +0200)]
Bug 12970: Use the centralize VAT and prices calculation - basket.pl

Bug 12969 introduces a subroutine to centralize VAT and prices
calculation.
It should be use in the acqui/basket.pl script.

Test plan:
0/ Don't apply the patch
1/ Create 4 suppliers with the different configurations
2/ Create a basket and create several orders
3/ Go on the basket page
4/ Apply the patch
5/ Verify you don't see any difference before and after applying the
patch

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13568 OAI Server doesn't handle properly resumption token
Frédéric Demians [Mon, 12 Jan 2015 11:18:19 +0000 (12:18 +0100)]
Bug 13568 OAI Server doesn't handle properly resumption token

When responding to ListRecords and ListIdentifiers verbs, OAI server doesn't
return proper resumption token. At the end of a result set, OAI server
generates a resumption token even if there isn't anymore records. Consequently,
OAI harverster will send a new request, based on this invalid resumption,
token. OAI Server responds with an empty resultset, which is considered as an
invalid response by most of the harvesters.

TO TEST:

- Find in your DB, a day where a few biblio records have been created. The
  number of created biblios must inferior to OAI-PMH:MaxCount.

- Let say this day is 2014-01-09. Send an OAI-PMH request to Koha OAI Server:

  /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml&from=2014-01-09&until=2014-01-09

- At the end of the result, you will see a resumption token which looks like that:

  <resumptionToken cursor="47">marcxml/47/2014-01-09/2014-01-09/</resumptionToken>

  This is wrong. No resumptiion token should be sent since there isn't anymore
  records to harvest.

- Apply the patch.

- Resend the OAI-PMH request. There is no resumption token at the end of the
  result.

- You could test also with ListIdenfiers verb in place of ListRecord.

Signed-off-by: Christophe Brocquet <christophe.brocquet@obspm.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13712 - Missing newline in DB update 3.19.00.010
Magnus Enger [Mon, 16 Feb 2015 09:50:17 +0000 (10:50 +0100)]
Bug 13712 - Missing newline in DB update 3.19.00.010

To test:
- Make sure your database is pre 3.19.00.010 (for example by loading in
  an older backup)
- Run through the web-based database update (web installer, step 3)
- Verify that updates 3.19.00.010 and 3.19.00.011 are squashed
  together on one line
- Apply the patch
- Reset the database and run the web-based database upgrade again
- Verify that the two uupdates are noe displayed on separate lines
  (as separate bullet points)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12976: Fix some comment in tests
Jonathan Druart [Mon, 17 Nov 2014 11:45:22 +0000 (12:45 +0100)]
Bug 12976: Fix some comment in tests

Previous comments were wrong.
Actually the main part of price values is correct.
Only some rounding and tax values are badly calculated.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12976: Fix the footer if several tax rate exist
Jonathan Druart [Fri, 14 Nov 2014 14:51:24 +0000 (15:51 +0100)]
Bug 12976: Fix the footer if several tax rate exist

If more that 1 tax rate exist, 1 total ligne should be display in the
footer.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12976: Use the centralize VAT and prices calculation - invoice.pl
Jonathan Druart [Mon, 22 Sep 2014 15:10:10 +0000 (17:10 +0200)]
Bug 12976: Use the centralize VAT and prices calculation - invoice.pl

Bug 12969 introduces a subroutine to centralize VAT and prices
calculation.
It should be use in the acqui/invoice.pl script.

Test plan:
0/ Don't apply the patch
1/ Create 4 suppliers with the different configurations
2/ Create a basket and create several orders
3/ Receive the items and create an invoice
4/ Go on the invoice page acqui/invoice.pl?invoiceid=XXX
5/ Verify you don't see any difference before and after applying the
patch on the invoice details table.
Note: The only different you should see is the price formating for
"Total tax exc.". Before this patch "432.10" was displayed "432.1".

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7741 [Follow-up] Clear search terms in Z3950 search page
Owen Leonard [Tue, 9 Dec 2014 18:00:02 +0000 (13:00 -0500)]
Bug 7741 [Follow-up] Clear search terms in Z3950 search page

This patch makes a follow-up change and takes as its basis a dependency
on Bug 13218 - usability enhancement for z39.50 search. If we have a
one-column search form it's possible to put the "Clear search form" link
at the bottom of the form rather than in the header, logically
associating it with the grouping of form fields which will be affected.

Doing so also allows us to eliminate all the custom styling which was an
issue for QA.

Other changes made by this patch: Fixing the indentation
error, correcting the case of the link text ("Clear search form" instead
of "Clear Search Form"), and adding "preventDefault()" to the click
handler so that clicking the link doesn't scroll the user back to the
top of the page.

To test, apply the previous patch and this one on top of Bug 13218.
Repeat the test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 7741: Added Clearing Capability to the Z39.50 Search fields
Thomas Misilo [Wed, 3 Dec 2014 01:15:07 +0000 (20:15 -0500)]
Bug 7741: Added Clearing Capability to the Z39.50 Search fields

Tested in:
/koha/cataloguing/z3950_auth_search.pl
(Home:Authorities:New from Z39.50)

/koha/cataloguing/z3950_search.pl
(Home:Cataloging:New from Z39.50/SRU)

/koha/acqui/z3950_search.pl
(Home:Acquisitions:[Bookshop]:[Basket]:Order from external source)

All three forms can now be cleared.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13672 - OPAC locks up browser when browsing items from series link with NoveList...
Kyle M Hall [Thu, 5 Feb 2015 17:19:38 +0000 (12:19 -0500)]
Bug 13672 - OPAC locks up browser when browsing items from series link with NoveList and OpacHighlightedWords

It appears that an empty string is sneaking into the list of words
to highlight and that is causing the browser to freak out.

Test Plan:
1) Enable NoveList
2) Enable OpacHighlightedItems
3) Search a title with a series (i.e. The Hunger Games)
4) Click into the record
5) Click on the series to search it
6) Click on a title in the search results
7) If Firefox doesn't crash, it gives the unresponsive script message
8) Apply this patch
9) Repeat steps 3-6
10) Browser doesn't freak our

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
could not confirm the problem, but small change and
highlighting terms on result list and couldn't find any
regressions in highlighting.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13700: Fix item search templates for translation
Julian Maurice [Fri, 13 Feb 2015 12:30:56 +0000 (13:30 +0100)]
Bug 13700: Fix item search templates for translation

Since translator rebuild HTML tags with double quotes for attributes
values, use double quotes in english template too and escape them with
backslash.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
It works well!!

Test:
1) Intall translation  (de-DE, es-ES)
2) to Go to item search, in english, do a search that gives results
3) Switch language, repeat search, result's table does not render
4) Apply patch
5) Install translation again
6) Repeat 3, now results are displayed

No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13684: C4::Budgets should not be used in C4::Output
Jonathan Druart [Mon, 9 Feb 2015 16:43:48 +0000 (17:43 +0100)]
Bug 13684: C4::Budgets should not be used in C4::Output

Bug 12844 removed the call to C4::Budgets::GetCurrency.
The use of this module can be completely removed from C4::Output.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
It makes sense and no runtime errors found.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
9 years agoBug 13603 - autoBarcode setting hbyymmincr not taking month into account when looking...
Kyle M Hall [Tue, 20 Jan 2015 15:11:24 +0000 (10:11 -0500)]
Bug 13603 - autoBarcode setting hbyymmincr not taking month into account when looking up next increment

The hbyymmincr autoBarcode builder looks up all barcodes that begin with
any number of letters ( the branchcode ) and a two-digit year directly
afterward ( e.g. MPL15 ), then grabs the last four digits as the
increment counter. The problem is, this does not take months into
account, so unlike the description that says the system is limited to
10,000 items a month, it is limited to 10,000 items per *year*.

This situation can easily be corrected my adding the month into the
lookup ( e.g. MPL1501 ).

Test Plan:
1) Enable autoBarcode, set to hbyymmincr
2) Catalog an item, let the barcode.pl plugin generate
   the next barcode.
3) Catalog an item with the barcode MPL15009999
4) Catalog another item, use the barcode.pl plugin to
   generate the next barcode.
5) Note the barcode is generated ends with '0001' instead of the
   correct increment
6) Apply this patch
7) Repeat step 4
8) Note the barcode now ends with the correct increment

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jeanne Heicher <nppublib@pa.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Problem confirmed - the continuing number bit was not reset
to start counting from 1 again on the beginning of a new month.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13417: DBRev 3.19.00.011
Tomas Cohen Arazi [Fri, 13 Feb 2015 16:56:07 +0000 (13:56 -0300)]
Bug 13417: DBRev 3.19.00.011

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13417: Remove warnings
Jonathan Druart [Fri, 9 Jan 2015 15:10:11 +0000 (16:10 +0100)]
Bug 13417: Remove warnings

Without this patch
  perl -wc C4/VirtualShelves.pm
failed:
Constant subroutine C4::VirtualShelves::SHELVES_MASTHEAD_MAX redefined
at /usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHELVES_COMBO_MAX redefined at
/usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHELVES_MGRPAGE_MAX redefined at
/usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHELVES_POPUP_MAX redefined at
/usr/share/perl/5.20/constant.pm line 156.
Constant subroutine C4::VirtualShelves::SHARE_INVITATION_EXPIRY_DAYS
redefined at /usr/share/perl/5.20/constant.pm line 156.
Subroutine GetShelves redefined at C4/VirtualShelves.pm line 103.
Subroutine GetAllShelves redefined at C4/VirtualShelves.pm line 159.
Subroutine GetSomeShelfNames redefined at C4/VirtualShelves.pm line 189.
Subroutine GetShelf redefined at C4/VirtualShelves.pm line 230.
Subroutine GetShelfContents redefined at C4/VirtualShelves.pm line 262.
Subroutine AddShelf redefined at C4/VirtualShelves.pm line 315.
Subroutine AddToShelf redefined at C4/VirtualShelves.pm line 353.
Subroutine ModShelf redefined at C4/VirtualShelves.pm line 394.
Subroutine ShelfPossibleAction redefined at C4/VirtualShelves.pm line
454.
Subroutine DelFromShelf redefined at C4/VirtualShelves.pm line 545.
Subroutine DelShelf redefined at C4/VirtualShelves.pm line 589.
Subroutine GetBibliosShelves redefined at C4/VirtualShelves.pm line 603.
Subroutine ShelvesMax redefined at C4/VirtualShelves.pm line 628.
Subroutine HandleDelBorrower redefined at C4/VirtualShelves.pm line 648.
Subroutine AddShare redefined at C4/VirtualShelves.pm line 683.
Subroutine AcceptShare redefined at C4/VirtualShelves.pm line 703.
Subroutine IsSharedList redefined at C4/VirtualShelves.pm line 731.
Subroutine RemoveShare redefined at C4/VirtualShelves.pm line 750.
Subroutine _shelf_count redefined at C4/VirtualShelves.pm line 764.
Subroutine _CheckShelfName redefined at C4/VirtualShelves.pm line 788.
C4/VirtualShelves.pm syntax OK

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13417: Add the permission for all languages
Jonathan Druart [Mon, 5 Jan 2015 09:42:32 +0000 (10:42 +0100)]
Bug 13417: Add the permission for all languages

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13417: (qa follow-up) Rename the permission to delete_public_lists
Jonathan Druart [Mon, 5 Jan 2015 09:36:33 +0000 (10:36 +0100)]
Bug 13417: (qa follow-up) Rename the permission to delete_public_lists

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13417: Limit the permission to delete
Jonathan Druart [Wed, 17 Dec 2014 15:27:11 +0000 (16:27 +0100)]
Bug 13417: Limit the permission to delete

It's preferable to limit the permission to delete shelves.

Apply both patches before testing, then follow this test plan

Currently a public list can only be deleted by its owner.
This means lists can exist infinitely.
This will introduce a new permission for list. With this permission, a
staff member will be allow to delete any public lists.

Test plan:
1/ Add the manage_shelves permission to a patron.
2/ Login with this patron
3/ Go on the public list view
4/ You should be able to delete all public lists

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13417: Allow staff members to manage public lists
Jonathan Druart [Fri, 5 Dec 2014 11:30:08 +0000 (12:30 +0100)]
Bug 13417: Allow staff members to manage public lists

Currently a public list can only be deleted by its owner.
This means lists can exist infinitely.
This will introduce a new permission for list. With this permission, a
staff member will be allow to delete any public lists.

Test plan:
1/ Add the manage_shelves permission to a patron.
2/ Login with this patron
3/ Go on the public list view
4/ You should be able to edit all public lists

Followed test plan. Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13142 - Change "mobile phone" label back to "other phone"
Owen Leonard [Wed, 12 Nov 2014 19:42:37 +0000 (14:42 -0500)]
Bug 13142 - Change "mobile phone" label back to "other phone"

Labeling a phone number field "mobile phone" eliminates the usefulness
of having the labels "primary" and "secondary." Generic labels let the
user populate the fields according to their importance rather than their
type.

To test I recommend editing a patron record so that the values in the
patron record contain a label matching the table column:

borrowers.phone : 555-555-1234 (primary - phone)
borrowers.phonepro : 555-555-5678 (secondary - phonepro)
borrowers.mobile : 555-555-9012 (other - mobile)

View this patron's information in the various affected templates and
verify that the labels correctly match the data:

 - OPAC "your personal details" (opac-memberentry.pl)
 - Submit changes to primary, secondary, and other phone via the OPAC.
   In the staff client, view the confirmation for those changes.
 - Patron details in the staff client (moremember.pl)
 - Patron entry/edit in the staff client (memberentrygen.pl)
 - Patron duplicate confirmation in the staff client
   (you can navigate directly to
   /members/moremember.pl?borrowernumber=XXXX&print=brief)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13545 [QA Followup] - Complete POD documentation
Kyle M Hall [Fri, 13 Feb 2015 16:18:39 +0000 (11:18 -0500)]
Bug 13545 [QA Followup] - Complete POD documentation

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13545: (followup) POD and error handling
Tomas Cohen Arazi [Tue, 10 Feb 2015 15:52:25 +0000 (12:52 -0300)]
Bug 13545: (followup) POD and error handling

This patch adds POD to the new /svc/barcode service, and also implements some
error handling.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13545 - Add barcode image generator service
Kyle M Hall [Thu, 4 Dec 2014 12:48:35 +0000 (07:48 -0500)]
Bug 13545 - Add barcode image generator service

If we add a script to Koha that can be passed a barcode, we will be able
to easily embed item and patron barcodes into html printable slips and
notices. This can be very helpful for librarians, as it means scanning
an image instead of typing in the barcode manually.

This patch adds a barcode image generator that can be passed a barcode
and an optional type ( defaults to Code39, all GD::Barcode types should
work ). This image can be embedded in html slips and notices.
( e.g. <img src="/cgi-bin/koha/svc/barcode?barcode=<<items.barcode>>"></img> )

Test Plan:
1) Apply this patch
2) Browse to /cgi-bin/koha/svc/barcode?barcode=123456789 on your server
3) Note the barcode image

Signed-off-by: Brandon <brandon_h27@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13189 - Patron card creator patron search browse by last name broken by extended...
Kyle M Hall [Mon, 3 Nov 2014 14:31:27 +0000 (09:31 -0500)]
Bug 13189 - Patron card creator patron search browse by last name broken by extended attributes

The browse by last name letters on the patron search for the patron card
creator doesn't work quite right. If extended patron attributes are
disabled, it works fine, but if they are enabled, they are searched even
when using the browse last name. Thus, if a searchable attribute has a
"D" in it, and one clicks the "D" link for the last name browser, that
patron will show even if he or she has no "D" in his or her hame!

Test Plan:
1) Enable extended patron attributes
2) Add a new searchable patron attribute
3) Create a new patron with the last name "Ace"
4) Add the value "D" to the attribute for this patron
5) Browse to the patron card maker, start a new patron batch
6) Click "Add item(s)" to bring up the patron search
7) Click the letter "D" in the patron search box
8) Note that "Ace" shows in the results list
9) Apply this patch
10) Repeat step 7
11) Note that "Ace" no longer shows in the results list
12) Perform a regular search by putting the letter "D" in the "Name:"
    field, and hit the "Search" button
13) Note this time the results *do* have Ace in them

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Well described for a tricky bug. Reproducible. Fixed with this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This works as described, no problems or regressions found.

9 years agoBug 13343: Embed items when send a basket/shelf
Jonathan Druart [Wed, 26 Nov 2014 14:14:59 +0000 (15:14 +0100)]
Bug 13343: Embed items when send a basket/shelf

When a basket/shelf is downloaded, items are embedded, but not when
sending it by email.

We would expect to get the same file.

Test plan:
On Opac and intranet:
1/ Add records with items to your basket and send it by email.
Verify the file contains items.
2/ Add records with items to a list and send it by email.
Verify the file contains items.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13019 [QA Followup] - Fix stale unit test
Kyle M Hall [Tue, 10 Feb 2015 19:01:51 +0000 (14:01 -0500)]
Bug 13019 [QA Followup] - Fix stale unit test

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13019 [QA Followup] - Allow chaining
Kyle M Hall [Tue, 10 Feb 2015 18:30:32 +0000 (13:30 -0500)]
Bug 13019 [QA Followup] - Allow chaining

By returning the object itself instead of a boolean, we can chain
methods together while retaining the exact same functionality.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13019 [QA Followup] - Remove use of encode
Kyle M Hall [Mon, 24 Nov 2014 11:09:54 +0000 (06:09 -0500)]
Bug 13019 [QA Followup] - Remove use of encode

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13019: [QA Follow-up] Rename new_from_dbic and few typos
Marcel de Rooy [Mon, 24 Nov 2014 11:46:43 +0000 (12:46 +0100)]
Bug 13019: [QA Follow-up] Rename new_from_dbic and few typos

Since new_from_dbic is not meant as a public method, this patch adds
a prefix to the name of this internal routine. For the same reason I
removed it from t/Borrower.t.
Removed one use overload-line in Objects (not used).
Resolved a few typos.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13019 [QA Followup] - Allow find() and search() to be called as static methods
Kyle M Hall [Fri, 21 Nov 2014 16:40:48 +0000 (11:40 -0500)]
Bug 13019 [QA Followup] - Allow find() and search() to be called as static methods

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13019: (follow-up) Remove smartmatch operator
Jonathan Druart [Mon, 10 Nov 2014 11:55:35 +0000 (12:55 +0100)]
Bug 13019: (follow-up) Remove smartmatch operator

This patch also adds 1 test.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13019 - Add base classes on which to build Koha objects
Kyle M Hall [Tue, 30 Sep 2014 19:05:30 +0000 (15:05 -0400)]
Bug 13019 - Add base classes on which to build Koha objects

The idea behind this is to have a pair of base classes on which to build
our new generation of Koha objects. Koha::Object is a base class, which
in it's most basic form, is to represent a row in a table. For example,
Koha::Borrower inherits from Koha::Object. So too could Koha::Biblio
and Koha::Item for example.

Koha::Objects is to represent a way to fetch and manipulate sets of
objects. For example, Koha::Borrowers has a method to get a
Koha::Borrower object by id and a method to search for an get a list
of Koha::Borrower objects. Right now Koha::Objects has only the
essentials but can easily be extended and those enhancements will be
passed down to all the child classes based on it.

By using these classes as a base, we will add consistency to our
code, allow us to keep our code DRY, reduce bugs, and encapsulate our
database access among other benefits.

Test Plan:
1) Apply this patch
2) prove t/Object.t t/db_dependent/Object.t t/db_dependent/Objects.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13335 - Holds and priority display via OPACShowHoldQueueDetails confusing
Kyle M Hall [Tue, 25 Nov 2014 15:16:47 +0000 (10:16 -0500)]
Bug 13335 - Holds and priority display via OPACShowHoldQueueDetails confusing

No matter what the selection of OPACShowHoldQueueDetails is, if it is
enabled it displays a line "Holds and priority:" even if you've opted to
hide one of those!

Test Plan:
1) Apply this patch
2) Test each setting of OPACShowHoldQueueDetails
3) Ensure each setting displays the correct fields ( or lack thereof )

Signed-off-by: Christopher Brannon <cbrannon@debian.localdomain>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13636 - Staff search results item status incorrect for holds
Kyle M Hall [Wed, 28 Jan 2015 13:31:30 +0000 (08:31 -0500)]
Bug 13636 - Staff search results item status incorrect for holds

Imagine this scenario: we have one record with four items. Two of those
items are checked out, one of those items is a waiting hold, and one of
those items is available. We would expect to see this on the search
results page. Instead, we will see both non-checked out items as
unavailable due to waiting holds.

This is due to a semantic issue GetReserveStatus.
C4::Search::searchResults uses GetReserveStatus to get the reserve
status of each item, but unlike all other calls to the sub, this one
passes in not only itemnumber, but biblionumber.

When no reserve is found for the available item, the subroutine uses the
biblionumber to grab what is essentially an arbitrary reserve to use for
the status. This makes no sense and this functionality should be
entirely removed from the subroutine so regressions like this will be
prevented in the future.

Test Plan:
1) Create one record with 4 items
   a) check two of the items out to patrons
   b) set one of the items as a waiting hold
   c) leave the fourth item as available
2) Run a search where this record will be in the results list
3) Note that the results list 2 items on loan, two unavailable
4) Apply this patch, reload the search results
5) Note that the results list 1 available, 2 on loan, 1 unavailable

Signed-off-by: John Andrews <jandrews@washoecounty.us>
Signed-off-by: Sheila Kearns <sheila.kearns@state.vt.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: This is for the staff search result list!

Works as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13431 [QA Follow-up]: Shared FastMmap file causes issues
Jacek Ablewicz [Tue, 30 Dec 2014 09:30:30 +0000 (10:30 +0100)]
Bug 13431 [QA Follow-up]: Shared FastMmap file causes issues

1) Removed 'use C4::Context;' because it can lead to introduction
of circular reference in the near future
2) Put fastmmap initialization code into an eval {} block, to catch
various kinds of errors which can still occur during it's init in
some [less usual] Koha setups and/or more unusual circumstances
3) Do not include UID in the sharefile name (it will be constructed
using namespace + database name + database host instead).

Test plan addendum:

   s/and UID//

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13431 - Shared FastMmap file causes issues
Jacek Ablewicz [Tue, 16 Dec 2014 11:48:09 +0000 (12:48 +0100)]
Bug 13431 - Shared FastMmap file causes issues

Koha::Cache package does not take into account that, when using
fastmmap caching variant, mmaped cache file created in /tmp
(typically: /tmp/sharefile-koha-koha), would only be further
accessible to the one given OS user - the one which created it.
In many Koha setups, in the circumstances when various system scripts
are executed by 2+ users with diffrent UIDs (like multi-tenant servers,
for example) this may cause many kinds of issues. Observable symptom
is usually the appearance of the below error when searching, or looking
at MARC Framework pages and a few other places:

Open of share file /tmp/sharefile-koha-koha failed: Permission denied
at /usr/lib/perl5/Cache/FastMmap.pm line 640.

This patch:
- disables initialisation of fastmmap caching subsystem unless it is
explicitly requested by the user (CACHING_SYSTEM=fastmmap)
- disables fastmmap cache usage for command line scripts
(i.e. when GATEWAY_INTERFACE environment variable is not defined)
- adds the database name, host name and an ID of the OS user to the
mmaped file name created in /tmp, to prevent various kinds of
unintentional conflicts and/or permission problems from happening

To test:

1) remove the /tmp/sharefile-koha-* file[s] (if any)
2) do something which would lead to its re-creation (e.g., performing
any search in OPAC should be sufficient to cause that)
3) observe that /tmp/sharefile-koha-koha got created
4) remove it
5) apply patch
6) redo step 2)
7) observe that aforementioned file is no longer created in /tmp
8) set CACHING_SYSTEM environment variable to 'fastmmap'
9) redo step 2), observe that /tmp/sharefile-koha-* file got created
and that it's name now contains hostname, database name and UID
10) ensure that everything still works like it should and that there
are no regressions of any kinds anywhere in the system ;)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13240 [QA Followup]
Kyle M Hall [Fri, 6 Feb 2015 14:44:33 +0000 (09:44 -0500)]
Bug 13240 [QA Followup]

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13240: Remove commented warns
Jonathan Druart [Wed, 12 Nov 2014 11:24:10 +0000 (12:24 +0100)]
Bug 13240: Remove commented warns

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13240: Remove some code obfuscation
Jonathan Druart [Wed, 12 Nov 2014 11:23:38 +0000 (12:23 +0100)]
Bug 13240: Remove some code obfuscation

my $bar;
my $foo = $bar->{borrowernumber} ||= {};
$foo->{one} ||= 'something';
$foo->{two}++;

What does $bar contain?

$VAR1 = {
          'borrowernumber' => {
                                'two' => 1,
                                'bar' => 'something'
                              }
        };

Not really obvious.

Maybe something I did not see is hidden.

Test plan:
Verify the digest for DUE and PREDUE work as before.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13670 - Patron holds table not loading when holds tab anchor is used
Kyle M Hall [Thu, 5 Feb 2015 14:21:12 +0000 (09:21 -0500)]
Bug 13670 - Patron holds table not loading when holds tab anchor is used

If a link to a patron record ends with #reserves, the holds tab is selected
on page load, but the holds table does not load.

Test Plan:
1) Build your holds queue
2) From the holds queue report, open any patron link
3) Note the patron's reserves do not load
4) Apply this patch
5) Clear your browser cache
6) Repeat step 2
7) Note the holds table now loads

Signed-off-by: Sean McGarvey <seanm@pascolibraries.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13319: Fix Koha::Acq::Order should set parent_ordernumber
Jonathan Druart [Fri, 14 Nov 2014 15:18:09 +0000 (16:18 +0100)]
Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber

The tests highligh the problem: if the parent_ordernumber attribute is
not set on inserting an order, the object returned by the method does
not contain the value (undef).

Test plan:
Verify the tests are consistent and
    prove t/db_dependent/Acquisition/CancelReceipt.t
should return green.

You can also verify that receive partially an order and cancel the
receipt work as expected.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber
Kyle M Hall [Wed, 21 May 2014 18:09:04 +0000 (11:09 -0700)]
Bug 12323 [SIGNED OFF] - Acquisitions search results fixed in order of biblionumber

The acquisitions search is exhibiting the same behavior as bug 11410.
Results are always fixed in order of biblionumber, among other possible
issues ( including the ampersand issue ).

Test Plan:
1) From an open basket, choose "Add to basket"
2) Run a search for "From an existing record"
3) Note the "View MARC" URLs are fixed in order of biblionumber
4) Apply this patch
5) Refresh the page
6) Note the results are no longer fixed in order of biblionumber

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

I think the code could be a bit tidier, but I think it makes sense to
use buildQuery here. It'll detect CCL, CQL, and PQF queries, as well
as parsing a regular keyword search as one would expect when searching
the catalogue.

It also has the added bonus of performing relevance searching,
so long as QueryAutoTruncation is off, and so long as library staff
avoid using the "*" truncation wildcard (see bug 12430).

While there are simpler ways to fix this acq bug, I think this was
probably the best move, as it adds a bit to the consistency of what
librarians can expect from their search results.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Same result with and without the patch but I agree with the changes.
BuildQuery should be called before SimpleSearch if QP is not used.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 13675: Do not set aqorders.budget_id to NULL
Jonathan Druart [Fri, 6 Feb 2015 15:19:14 +0000 (16:19 +0100)]
Bug 13675: Do not set aqorders.budget_id to NULL

C4::Acquisition::ModReceiveOrder updates the aqorders with
budget_id=NULL if no budget_id given in parameter.
Actually the same budget_id should be used.
In tests (especially t/db_dependent/Acquisition/TransferOrder.t),
ModReceiveOrder is not called with a budget_id param and set to NULL the
budget_id value.

test plan:
  prove t/db_dependent/Acquisition/TransferOrder.t
should return green

Note that this bug should not appear using the interface.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The fix makes sense, and running
 $ prove t/db_dependent/Acq*
returns all green. koha-qa.pl also likes it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 5511: DBRev 3.19.00.010
Tomas Cohen Arazi [Mon, 9 Feb 2015 19:59:21 +0000 (16:59 -0300)]
Bug 5511: DBRev 3.19.00.010

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10900: 2 occurrences more
Jonathan Druart [Fri, 29 Aug 2014 15:26:43 +0000 (17:26 +0200)]
Bug 10900: 2 occurrences more

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>