koha.git
9 years agoBug 12307: Catalog details page displaying incorrect status for items with itemtype...
Brendan Gallagher [Thu, 22 May 2014 10:37:16 +0000 (06:37 -0400)]
Bug 12307: Catalog details page displaying incorrect status for items with itemtype level notforloan status

The template markup that controls that status column for
the items table in catalogue/detail.pl does not account
for the itemtypes.notforloan flag.

Test Plan:
1) Find an item that is currently available
2) Go to the itemtype editor and mark that itemtype of that item
   as being not for loan
3) Browse to the catalog details page for that item's record
4) Note the item status is still "Available"
5) Apply this patch
6) Reload the catalog details page
7) Note the item status is now "Not for loan"

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch! Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12417: adding the units tests of the module Koha::Borrower::Files.pm
Yohann Dufour [Mon, 16 Jun 2014 11:46:24 +0000 (13:46 +0200)]
Bug 12417: adding the units tests of the module Koha::Borrower::Files.pm

The module Koha::Borrower::Files.pm was not tested

To test:
1/ Execute the command: prove t/db_dependent/Borrower_Files.t
2/ The command has to print:
t/db_dependent/Borrower_Files.t .. ok
All tests successful.
Files=1, Tests=23,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.47 cusr  0.08 csys =  1.60 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Squashed patches.
Now test pass
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 12508: Follow up - corrects capitalization
Katrin Fischer [Sun, 6 Jul 2014 16:41:43 +0000 (18:41 +0200)]
Bug 12508: Follow up - corrects capitalization

Corrects 2 strings:
- 'Delete this contract'
- 'Contract deleted'

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12508: adding an error message if a contract cannot be removed
Yohann Dufour [Tue, 1 Jul 2014 07:59:36 +0000 (09:59 +0200)]
Bug 12508: adding an error message if a contract cannot be removed

If a contract cannot be removed, no errors is displayed. Now, it displays an dialog messag error and the list of contracts.

Test plan:
1) Log on with a superlibrarian permission
2) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
3) Record a vendor with a nonzero "name"
4) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
5) Click on the button "New" > "Contract" and record a new one
6) Click on "New" > "Basket" and record a basket by selectioning the created contract
7) Click on the contract name, then click on the "Contracts" item in the left menu
8) Try to delete this contract, an error is displayed : "Contract has not been deleted. Maybe a basket linked to this contract exists."
9) Delete the basket linked to the contract
10) Delete the contract, no errors is displayed

Signed-off-by: Juhani Seppälä <jseppal@student.uef.fi>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script an tests.
Also tested adding, editing and deleting unused contracts.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12332: Fix for tab "Purchase suggestions" not lighting up
Viktor Sarge [Mon, 16 Jun 2014 12:09:10 +0000 (13:09 +0100)]
Bug 12332: Fix for tab "Purchase suggestions" not lighting up

This patch changes the file purchase-suggestions.pl with "suggestionsview => 1" for the template parameter.
In circ-menu.inc i changed the condition from "suggestions" to "suggestionsview" since it seemed to conflict with the existing variable suggestions (and in that case only highlighting the tab when there were suggestions).

Please note that I fixed the troubles with the tab "Fines" in a separate patch 9245.

Test plan:
1) Verify that "Purchase suggestions" does not light up as it should when clicked.
2) Install the patch.
3) Verify that the tab "Purchase suggestions" now actually light up when clicked.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised.

9 years ago9245 Fixes visual bux with fines tab not highlighting
Viktor Sarge [Mon, 16 Jun 2014 11:21:06 +0000 (12:21 +0100)]
9245 Fixes visual bux with fines tab not highlighting

This patch makes shure that mancredit.pl, maninvoice.pl and pay.pl passes the value "finesview=1" that makes the tab active.

Test plan:
1) Go to a library user and the fines tab. Note that the "Fines" tab loses it's highlight when you click "Pay fines", "Create manual invoice" and "Create manual credit".
2) Install the patch.
3) Redo the first step and make shure that the left menu tab "Fines" is now highlighted all the time.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised, no regression found on the rest of the tabs.

9 years agoBug 11030 - Add 359, 947 and 969 fields in french unimarc_complete framework - followup
Gaetan Boisson [Tue, 1 Jul 2014 15:32:10 +0000 (17:32 +0200)]
Bug 11030 - Add 359, 947 and 969 fields in french unimarc_complete framework - followup

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11030 : add fields 947,969,359 in unimarc_complete french framework
Mathieu Saby [Wed, 9 Oct 2013 18:28:27 +0000 (20:28 +0200)]
Bug 11030 : add fields 947,969,359 in unimarc_complete french framework

This patch must be tested on top of bug 11021

This patch adds 3 fields to unimarc_complete french framework
- 359 (2-a-b-c-d-e-f-g-h-i-p-u-v) used by Sudoc network, to be displayed in tab 3
- 947 (c) used by Electre
- 969 (a-h) used by Electre
I don't know the difference between 969a and 969h so I gave them quite the same name

To test :
1) take a fresh Koha with unimarc marcflavor
2) in web installer, select french language, unimarc marflavor and "Grilles de catalogage complètes".
3) check default framework in Administration > MARC Frameworks : it should contains 359/947/969 fields

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12429 [OPAC] patron seeing fines codes
Owen Leonard [Mon, 30 Jun 2014 14:12:06 +0000 (10:12 -0400)]
Bug 12429 [OPAC] patron seeing fines codes

Bug 2546 introduced translatable handling of Koha account type codes but
missed several codes. This patch adds handling of these codes to the
bootstrap OPAC.

This patch also corrects a couple of instances of incorrect
capitalization.

To test, apply the patch and log in to the OPAC as a user who has
existing fines and charges. View the "Your fines" page. You should not
see any account type codes like CR, LR, or FU.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12429 [staff client] patron seeing fines codes
Owen Leonard [Fri, 27 Jun 2014 18:21:03 +0000 (14:21 -0400)]
Bug 12429 [staff client] patron seeing fines codes

Bug 2546 introduced translatable handling of Koha account type codes but
missed several codes. This patch adds handling of these codes to the
staff client.

This patch also corrects a couple of instances of incorrect
capitalization.

To test, apply the patch and view fines page (Patron details ->
Fines) and the pay fines page (Patron details -> Fines -> Pay fines).
You should not see any account type codes like CR, LR, or FU.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11650: multiplicated authorities after link_bibs_to_authorities.pl
Janusz Kaczmarek [Fri, 31 Jan 2014 14:09:07 +0000 (15:09 +0100)]
Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl

Under certain circumstances misc/link_bibs_to_authorities.pl creates
multiple authority with identical heading.

Test plan:
1. Have some (2-3) biblio records with some repeated headings
   Have BiblioAddsAuthorities = allow, AutoCreateAuthorities = generate
   Have no authority records
2. Run misc/link_bibs_to_authorities.pl script
3. You will get multiple authority records -- one for each occurence of a
   heading in biblio record.

4. Apply the patch.
5. Repeat 1-3 (remember to have "fresh" biblios, without $9, and no
   authorities).
6. The problem should be fixed.

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>
Works as described.

9 years agoBug 12495 - Include streetnumber in hold alert address
David Roberts [Mon, 30 Jun 2014 11:22:46 +0000 (12:22 +0100)]
Bug 12495 - Include streetnumber in hold alert address

Steetnumber is not included in the addess in the hold alert add the
field to those displayed

To test this, place a hold on an item that is on-loan, having first made
sure that the requesting user has a value in the street number field of
his address. Check the item in, and an alert should appear giving the
name and address of the requesting user. This address should include the
contents of the street number address field.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I was able to confirm three of the four template changes for the
following cases:

- Item placed on hold for a patron at the current library, not waiting
- Item placed on hold for a patron at the current library, already
  waiting
- Item placed on hold for a patron at another library, not waiting

I don't know how to trigger the case [% IF ( diffbranch ) %].

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Note: Maybe sample slip templates should also include street number?

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12511 - Novelist Select not using https in bootstrap
Kyle M Hall [Tue, 1 Jul 2014 15:29:56 +0000 (11:29 -0400)]
Bug 12511 - Novelist Select not using https in bootstrap

In prog we have:
[% IF ( NovelistSelectProfile ) %]
<script type="text/javascript"
src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
[% END %]

but in bootstrap we have
[% IF ( NovelistSelectProfile ) %]
<script type="text/javascript"
src="http://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
[% END %]

Because bootstrap isn't using https, we get an error like this:
[blocked] The page at
'https://koha.mylibrary.com/cgi-bin/koha/opac-detail.pl?biblionumber=105315&query_desc=kw%2Cwrdl%3A%20home'
was loaded over HTTPS, but ran insecure content from
'http://imageserver.ebscohost.com/novelistselect/ns2init.js': this
content should also be loaded over HTTPS.

Test plan would require having a subscription to Novelist Select.
I think this is trivial enough to go without.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Very small change, trusting Kyle and the sign-off here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12062: Follow up - adds missing )
Katrin Fischer [Sun, 6 Jul 2014 17:04:15 +0000 (19:04 +0200)]
Bug 12062: Follow up - adds missing )

With this patch, patches pass QA script and unit tests.
Tested printing different slips successfully.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12062: Follow up to fix more untraslatable cases
Bernardo Gonzalez Kriegel [Tue, 29 Apr 2014 19:31:15 +0000 (16:31 -0300)]
Bug 12062: Follow up to fix more untraslatable cases

This patch modifies staff printslip.tt to take into account
caller. Also fixes similar problem on opac printslip.tt

To test:
staff
1. Print hold transfer slip
2. Print transfer slip
3. Print member slip
opac
4. Print self checkout slip

5. Update translation files, check new strings are present

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12062: Untranslatable "Reserve not found"
Bernardo Gonzalez Kriegel [Tue, 22 Apr 2014 11:22:14 +0000 (08:22 -0300)]
Bug 12062: Untranslatable "Reserve not found"

This patch rewrites transfer slip code to make some
strings translatable.
Also simplifies some code and parameters.

To test:
1) Produce a transfer slip, no changes must be noted.

2) Update PO file, new strings
msgid "%s %s%s%sNo hold found%s %s %s "
msgid "%s%s%sNo hold found%s "
msgid "Koha &rsaquo; Circulation &rsaquo; Transfers"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12499: adding units tests for C4::Letters
Yohann Dufour [Wed, 2 Jul 2014 07:13:44 +0000 (09:13 +0200)]
Bug 12499: adding units tests for C4::Letters

The tests for the subroutines : GetMessageTransportType, EnqueueLetter, SendQueuedMessages, GetQueuedMessages, GetLetters, getletter, addalert, getalert, delalert and GetPreparedLetter of the module C4::Letters have been added.

Test plan:
1) Apply the patch
2) Execute the unit tests by launching :
prove t/db_dependent/Letters.t
3) The result has to be a success without error or warning :
t/db_dependent/Letters.t .. ok
All tests successful.
Files=1, Tests=45,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.44 cusr  0.08 csys =  1.57 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All test pass, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12151: Remove uses of smartmatch operator from Koha/Solr/QueryBuilder.pm
Tomas Cohen Arazi [Mon, 2 Jun 2014 14:14:11 +0000 (11:14 -0300)]
Bug 12151: Remove uses of smartmatch operator from Koha/Solr/QueryBuilder.pm

Just that.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Could only verify by reading the code.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12151: Remove use of smartmatch operator in tools/batchMod.pl
Tomas Cohen Arazi [Mon, 2 Jun 2014 14:30:48 +0000 (11:30 -0300)]
Bug 12151: Remove use of smartmatch operator in tools/batchMod.pl

The '~~' smartmatch operator is used to compare MARC::Field->subfield(code)
(i.e. a string) and the text element of each MARC::Field->subfields() which
is also plain text.

Substituting '~~' for 'eq' should be harmless then.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Tested batch modification of items, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12151: Remove uses of smartmatch operator in report scripts
Tomas Cohen Arazi [Sat, 31 May 2014 03:30:32 +0000 (00:30 -0300)]
Bug 12151: Remove uses of smartmatch operator in report scripts

This patch removes the use of smartmatch operators in report scripts.

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Acquisition and Patron statistics wizard tested, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12151: Remove uses of smartmatch operator in Search.pm and opac-search.pl
Tomas Cohen Arazi [Fri, 30 May 2014 23:54:10 +0000 (20:54 -0300)]
Bug 12151: Remove uses of smartmatch operator in Search.pm and opac-search.pl

This patch removes the use of smartmatch operators in the search code.

Regards
To+

Edit: this revision uses 'grep' instead of Lists::MoreUtils::any

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested search, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12409: Follow up - Reflect from hash to array in comments
Katrin Fischer [Sun, 6 Jul 2014 19:00:40 +0000 (21:00 +0200)]
Bug 12409: Follow up - Reflect from hash to array in comments

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12409: Fix fields order on exporting to bibtex
Jonathan Druart [Thu, 12 Jun 2014 09:06:58 +0000 (11:06 +0200)]
Bug 12409: Fix fields order on exporting to bibtex

The C4::Record::marc2bibtex subroutine supposes hashref keys are sorted
which is wrong with perl 5.18

Note that the t/db_dependent/Record.t fails without this patch.

Test plan (for perl >= 5.18 only):
1/ prove t/db_dependent/Record.t should return green
2/ Try to export a record to bibtex and verify the order is correct
(should be author, title, year, published, etc.).

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

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Wrong Bug number on heading.
Work as described, test pass, no koha-qa errors.

The problem is to think that a hash returns
keys in a particular order, that's not true
and no matter which perl version.

Code as was left is... misleading.
Comments talks about a hash, which is no more.
On array asignment "a => b" is equivalent to "a, b",
but the former is usually used on hashes, so a
replacement of '=>' by ',' could clarify what are we storing.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixing the comments in a follow-up patch.
Tests pass now without problems and records export ok.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoRevert "Bug 8567: Set output directory for fines.pl in cron config created by the...
Tomas Cohen Arazi [Fri, 4 Jul 2014 18:06:26 +0000 (15:06 -0300)]
Revert "Bug 8567: Set output directory for fines.pl in cron config created by the packages"

This reverts commit 0162453a1cf20f5037bdda1cdeb662283f05f5f0.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11638: Remove HTML from addbiblio.pl
Bernardo Gonzalez Kriegel [Fri, 2 May 2014 21:38:20 +0000 (18:38 -0300)]
Bug 11638: Remove HTML from addbiblio.pl

This patch extracts variables with HTML from addbiblio.pl
and an instance of CGI::scrolling_list

As it changes how MARC editor show input fields, I prefer
not add patches for other cases mentioned on Comment #1

To test:
1. Verify there are no regressions on MARC editor
Add/Edit records, modify values
2. Update translation file for a language,
check new string 'Tag editor'

About the error message on error when deleting biblio,
it must be localized but the script is not trying to
use a template file, only prints a basic html and aborts.
Perhaps a way of handling errors more gracefully is needed,
but again it need to be solved on it's own bug.

Updated test plan

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12482: (QA followup) coding guidelines for hashrefs
Tomas Cohen Arazi [Thu, 3 Jul 2014 17:36:25 +0000 (14:36 -0300)]
Bug 12482: (QA followup) coding guidelines for hashrefs

As of the public coding guidelines, $$variable{key} usage is discouraged. $variable->{key} should be used instead.

Btw, honour the "FIXME - Bug 2505" line :-D

Regards
To+

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12482 [QA Followup]
Kyle M Hall [Wed, 2 Jul 2014 18:49:01 +0000 (14:49 -0400)]
Bug 12482 [QA Followup]

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12482: removing the use of the module C4::SQLHelper.pm, it is replaced by DBIx...
Yohann Dufour [Thu, 26 Jun 2014 12:28:58 +0000 (14:28 +0200)]
Bug 12482: removing the use of the module C4::SQLHelper.pm, it is replaced by DBIx::Class

This patch includes:
- removing the use of subroutines InsertInTable, UpdateInTable, SearchInTable replaced by subroutines of DBIx::Class in the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods and admin/aqbudgetperiods.pl
- removing old database fields in OrderFromSubscription.t, Bookseller.t, Budgets.t, Serials.t, Serials_2.t
- improvement of unit tests in t/db_dependent/Budgets.t
- adaptation of calls to the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods in order to match with the use of DBIx::Class

Test plan:

1) Execute the UT of all of files wich uses AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod or GetBudgetPeriods by launching the command :
prove t/Budgets/ t/Budgets.t t/db_dependent/Budgets.t t/db_dependent/Acquisition.t t/db_dependent/Acquisition/ t/db_dependent/Bookseller.t t/db_dependent/Serials.t t/db_dependent/Serials_2.t

2) The result has to be a success :
t/Budgets/CanUserModifyBudget.t ........................... ok
t/Budgets/CanUserUseBudget.t .............................. ok
t/Budgets.t ............................................... ok
t/db_dependent/Budgets.t .................................. ok
t/db_dependent/Acquisition.t .............................. ok
t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t .. ok
t/db_dependent/Acquisition/GetOrdersByBiblionumber.t ...... ok
t/db_dependent/Acquisition/Invoices.t ..................... ok
t/db_dependent/Acquisition/OrderFromSubscription.t ........ ok
t/db_dependent/Acquisition/TransferOrder.t ................ 1/11 # Transfering order to basket2
t/db_dependent/Acquisition/TransferOrder.t ................ ok
t/db_dependent/Acquisition/close_reopen_basket.t .......... ok
t/db_dependent/Bookseller.t ............................... 16/72 WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/yohann/koha/C4/Bookseller.pm line 135.
t/db_dependent/Bookseller.t ............................... ok
t/db_dependent/Serials.t .................................. ok
t/db_dependent/Serials_2.t ................................ ok
All tests successful.
Files=14, Tests=571, 22 wallclock secs ( 0.17 usr  0.03 sys + 20.26 cusr  1.10 csys = 21.56 CPU)
Result: PASS

3) Go on the page admin/aqbudgetperiods.pl : Koha Administration > Budgets
4) Click on the button "New Budget" and record a new budget with a "nonzero amount" and "make budget active"
5) Click on the button "New Budget" and record another budget without "make budget active"
6) Verify there is the firt budget displayed in "Active budgets" and the second budget in "Inactive budgets"
7) Edit a budget and verify the new values are updated
8) Click on the budget active name in order to go on the page admin/aqbudgets.pl
9) Click on the button "New fund for ..." and record a new fund
10) Click on the button "Edit" then "Duplicate budget ..." in order to duplicate the budget
11) Verify there are two budgets in "Active Budgets" and one in "Inactive Budgets"
12) Click on "Funds" in the menu and verify there are two identical funds and each is associated to a different budget.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11703: (followup) svc/holds invoked with trailing .pl
Tomas Cohen Arazi [Thu, 3 Jul 2014 16:58:30 +0000 (13:58 -0300)]
Bug 11703: (followup) svc/holds invoked with trailing .pl

On my followup I forgot to fix js/holds.js. This patch rectifies that.

Regards
To+

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11703: DBRev 3.17.00.009
Tomas Cohen Arazi [Thu, 3 Jul 2014 15:13:26 +0000 (12:13 -0300)]
Bug 11703: DBRev 3.17.00.009

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11703: (qa followup) consistency in svc
Tomas Cohen Arazi [Thu, 3 Jul 2014 15:26:23 +0000 (12:26 -0300)]
Bug 11703: (qa followup) consistency in svc

This patch removes the trailing .pl from the introduced svc scripts.
Also removes a leftover (wrong license text)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11703 [QA Followup] - Change "No data available in table" to "Loading..."
Kyle M Hall [Wed, 2 Jul 2014 11:11:37 +0000 (07:11 -0400)]
Bug 11703 [QA Followup] - Change "No data available in table" to "Loading..."

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703 [QA Followup] - Allow keyboard navigation of tabs
Kyle M Hall [Tue, 1 Jul 2014 17:54:54 +0000 (13:54 -0400)]
Bug 11703 [QA Followup] - Allow keyboard navigation of tabs

Signed-off-by: Britta Cramer <britta.cramer@inm-gmbh.de>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703 [QA Followup] - Stop IE from caching ajax request
Kyle M Hall [Tue, 1 Jul 2014 17:12:54 +0000 (13:12 -0400)]
Bug 11703 [QA Followup] - Stop IE from caching ajax request

Signed-off-by: Britta Cramer <britta.cramer@inm-gmbh.de>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703: (qa-followup) fix update database entry
Jonathan Druart [Thu, 26 Jun 2014 13:41:39 +0000 (15:41 +0200)]
Bug 11703: (qa-followup) fix update database entry

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703 [QA Followup] - Restore showing earliest renewal date for 'too early' renewals
Kyle M Hall [Wed, 7 May 2014 15:17:38 +0000 (11:17 -0400)]
Bug 11703 [QA Followup] - Restore showing earliest renewal date for 'too early' renewals

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703 [QA Followup] - Use interface instead of themelang for checkboxes plugin
Kyle M Hall [Wed, 7 May 2014 14:56:52 +0000 (10:56 -0400)]
Bug 11703 [QA Followup] - Use interface instead of themelang for checkboxes plugin

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703 [QA Followup] - Use format instead of replace for string translation
Kyle M Hall [Wed, 7 May 2014 14:54:14 +0000 (10:54 -0400)]
Bug 11703 [QA Followup] - Use format instead of replace for string translation

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703 [QA Followup]
Kyle M Hall [Mon, 14 Apr 2014 17:45:22 +0000 (13:45 -0400)]
Bug 11703 [QA Followup]

* Bold record title, fix table width
* Change output_pref_due to output_pref
* Retain functionality of IssuesDefaultSortOrder system preferences
* Use datatables.inc in circulation.tt
* Fix up holds table details
* Add plugin to about
* fix relatives' checkouts
* add too_many string
* remove dead syspref from db
* Sort relatives' checkouts and holds tables client side
* Provide context for translation of strings
* Fix unterminated string literal, add missing paren
* Add replacement of _AUTHOR_ with title's author for holds
* Format prices correctly
* Format checkout dates correctly

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 11703 - Convert checkouts table to ajax datatable
Kyle M Hall [Tue, 4 Feb 2014 17:42:55 +0000 (12:42 -0500)]
Bug 11703 - Convert checkouts table to ajax datatable

When a patron has many checked out items, circulation.pl can take a very
long time to load ( on the order of minutes in some cases ). This is
primarily due to the processing of the previous checkouts list. If we
convert to this table to a datatable that fetches its data via ajax, we
can make circulation.pl far more responsive. The same should be done
with relative's checkouts as well.

Test Plan:
1) Apply this patch
2) Observe that the checkouts and relatives' checkouts tables
   are now loaded asynchronously
3) Observe and verify the renew and return actions are now
   ajax based and function in a manner equivilent to how they
   used to.

This bug had quite a few followups, so I squashed all of them into one
change so that code is easier to follow. Original commit messages are below:

Bug 11703 - Use the ajax datatables on patron details page

Bug 11703 - Convert holds tables to ajax datatables

Bug 11703 [QA Followup 1] - Center bProcessing message over table

Bug 11703 [QA Followup 2] - Remove icons from checkout and clear buttons

Bug 11703 [QA Followup 3] - Remove references to UseTablesortForCirc

Bug 11703 [QA Followup 4] - Add back in Today's checkouts/Previous checkouts rows

Bug 11703 [QA Followup 5]

Bug 11703 [QA Followup 6] - Move strings to an include file for translation purposes

Bug 11703 [QA Followup 7] - Fix issues spotted by koha-qa.pl

Bug 11703 [QA Followup 8] - Speed up api/checkouts.pl as much as possible

Bug 11703 [QA Followup 9] - Move scripts from api directory to svc directory

Bug 11703 [QA Followup 10] - Fix errors caused by rebase

Bug 11703 [QA Followup 11] - Prevent multiple fetchs from ajax source

Bug 11703 [QA Followup 12] - Fix problem detected by koha-qa.pl

Bug 11703 [QA Followup 13] - Removed uneccessary data from renewal box during renewal

Bug 11703 [QA Followup 14] - Fix table column span

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Test plan on bug report:
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11703#c98

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
9 years agoBug 12451 - circulation rule cant be edited if itemtype contains a space character
Fridolin Somers [Thu, 19 Jun 2014 08:17:53 +0000 (10:17 +0200)]
Bug 12451 - circulation rule cant be edited if itemtype contains a space character

When an itemtype description contains a space character like " Book"
(often used to set this itemtype as first in sorted lists), the edition
of an existing circulation rule does not work, it selects the default
itemtype. Same for patron category.

It's because the JavaScript code performs a trim on value existing in
table itm = itm.replace(/^\s*|\s*$/g,''); This patch adds trim on select
options in editing line.

Test plan :
- Create an itemtype with a leading or trailling space in description :
  ie " Book"
- Go to cgi-bin/koha/admin/smart-rules.pl
- Create a rule with this itemtype, Unit=hours and Hard due date=Exactly
  on 31/12/2015 (any date)
- Click on Edit on this rule line
  => Without this patch, the default itemtype is selected in edition
     line
  => With this patch, the correct itemtype is selected in edition line

Check others selects are ok :
  - Create a rule with Unit=hours and Hard due date=Exactly on
    31/12/2015 (any date)
  - Click on Edit on this rule line
    => The correct options are selected
Same tests with a patron category containing a leading or trailling space in description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8567: Set output directory for fines.pl in cron config created by the packages
Reed Wade [Thu, 26 Jun 2014 20:38:58 +0000 (16:38 -0400)]
Bug 8567: Set output directory for fines.pl in cron config created by the packages

Modified debian/koha-common.cron.daily adding instance output dir option to
the fines.pl entry as described in the ticket.

Requires patch from Bug 8566 which provides the __instancename__ feature for
koha-foreach.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12220 - bootstrap not responsive on all devices
Owen Leonard [Wed, 25 Jun 2014 17:07:52 +0000 (13:07 -0400)]
Bug 12220 - bootstrap not responsive on all devices

The bootstrap theme includes a meta tag attribute which disables zooming
on some devices. This was unintentional and not desirable. This patch
removes the problematic attribute.

See:
http://blog.javierusobiaga.com/stop-using-the-viewport-tag-until-you-know-ho

To test: Apply the patch and view the OPAC on a device with a touch
interface. Attempt to zoom in on any OPAC page. Zooming should work.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Reproduced using a smartphone.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12237: Remove the "horrible hack" in C4::Templates
Julian Maurice [Tue, 13 May 2014 08:21:43 +0000 (10:21 +0200)]
Bug 12237: Remove the "horrible hack" in C4::Templates

Use C4::Languages::getlanguage() instead of
C4::Templates::_current_language()

Test plan:
1/ Set one of the 4 XSLT sysprefs to 'default'
2/ Go to the corresponding page
3/ Switch language and check that the right XSLT is used
4/ Set the same syspref to something with '{langcode}' in it. For
example:
"../koha-tmpl/opac-tmpl/bootstrap/{langcode}/xslt/UNIMARCslim2OPACDetail.xsl"
5/ Go back to the corresponding page
6/ Switch language and check that the right XSLT is used
7/ Change a compact.xsl for a language (for example
koha-tmpl/intranet-tmpl/prog/fr-FR/xslt/compact.xsl) to be able to see
differences
8/ Go to a biblio detail page in staff interface and click on "MARC
Preview: Show"
9/ Close the popup, switch language and click again on the same link
10/ Check that the correct XSLT is used.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No problems found, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 10652 - Ajaxfileupload.js failing in IE9 for local image upload
David Cook [Mon, 29 Jul 2013 03:02:26 +0000 (13:02 +1000)]
Bug 10652 - Ajaxfileupload.js failing in IE9 for local image upload

This patch adds a try/catch to the Javascript for adding the iframe
element. The try will work for IE8 and older versions, while newer
versions and other browsers will be covered by the check.

Test Plan:

1) Try uploading a local cover image in IE9
2) Notice that your page is reloaded with no result (except the
pop-up of a Javascript error, if you have error reporting on in
your browser).

3) Apply the patch

4) Trying uploading a local cover image again
5) Notice that it uploads correctly

6) Repeat steps 4 and 5 for IE8, IE7, and/or other modern browsers.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested in IE10 in IE10 "browser mode" and IE9 mode as well as in
Firefox. Uploads work correctly with book cover images and in MARC
uploads.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Also verified as working in Chrome.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Doesn't break functionality and fixes a known problem. I'll push this for
stable branches to use it, but will fill a new bug for updating AjaxFileUpload.js
from upstream.

9 years agoBug 12150: Add missing space and correct innerHTML typo
Jonathan Druart [Wed, 11 Jun 2014 10:47:28 +0000 (12:47 +0200)]
Bug 12150: Add missing space and correct innerHTML typo

The previous patch forgot to add a space between the string "Edit
action" and the placeholder.

Trying to test it, I found a typo: innerhtml does not exist, it should
be innerHTML.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12150 - Use more javascript string formatting in intranet for translated strings.
Pasi Kallinen [Mon, 28 Apr 2014 05:27:38 +0000 (08:27 +0300)]
Bug 12150 - Use more javascript string formatting in intranet for translated strings.

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

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No bug number on description
No commit message
No test plan
No koha-qa errors

I only signed this because it's useful for translations
but we can live without it, so is up to QA now

Tested some easy messages (e.g. syspref saving), and
updated PO files to check new strings.
Inspected the code, I think that there are no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12481: Staff client detail-view "next" link is greyed out when the last search...
Juhani Seppälä [Thu, 26 Jun 2014 08:28:19 +0000 (11:28 +0300)]
Bug 12481: Staff client detail-view "next" link is greyed out when the last search result of any results page is clicked or navigated into

When doing a staff client catalog search with more than 1 page of results
and clicking the last result on any search result page, the top-left navigation
button for "next" is greyed out.

Tested on newest Firefox & Chromium. Attempts to restore originally planned checks for navigation
with the exception of not using results.length due to buggy behaviour where the results get concatenated
upon page reload & "return to results" navigation - a separate issue?

To test:
1) Do an intranet catalog search that has more than 1 page of results.
2) Click on the last result on a page that is not the last one & confirm that the navigation button "next" is greyed out.
4) Apply patch.
5) Do an intranet search with more than 1 but less results than fit on a single page.
6) Click on the last result on the page and confirm that the "Next" navigation button is greyed out.
6) Do an intranet search with more than 1 page of results.
7) Click on the last result of a page that's not the final page of the results & confirm that "Next" is not grey out.
8) Navigate to the last page of the results and click on the final result & confirm that "Next" is greyd out.

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

This patch prevents the "Next" button on detail view to be grayed out at the end of e result page.
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 12485 - Show OPAC search history when opacuserlogin is OFF
Owen Leonard [Thu, 26 Jun 2014 19:03:37 +0000 (15:03 -0400)]
Bug 12485 - Show OPAC search history when opacuserlogin is OFF

In the boostrap OPAC the link to search history is missing if
opacuserlogin is turned off. OPAC search history should be available
whether or not users can log in. This patch removes this dependency.

To test, apply the patch and test with various combinations of
opacuserlogin and EnableOpacSearchHistory:

- opacuserlogin and EnableOpacSearchHistory both enabled
- opacuserlogin enabled and EnableOpacSearchHistory disabled
- opacuserlogin disabled and EnableOpacSearchHistory enabled

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.
Passes QA script and tests.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 12463 - Capitalization: Calendar tool, headings for different types of holidays
Owen Leonard [Thu, 26 Jun 2014 19:33:07 +0000 (15:33 -0400)]
Bug 12463 - Capitalization: Calendar tool, headings for different types of holidays

There are several instances of incorrect capitalization in the Calendar
tool. This patch corrects them.

To test, apply the patch and go to Tools -> Calendar. Headings and
labels on the page should have correct capitalization.

Signed-off-by: Juhani Seppälä <jseppal@student.uef.fi>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String changes in the template, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12386 - 'Days in advance' pull down in bootstrap OPAC is huge
Owen Leonard [Mon, 30 Jun 2014 18:05:21 +0000 (14:05 -0400)]
Bug 12386 - 'Days in advance' pull down in bootstrap OPAC is huge

The "days in advance" form field on the "Your messaging settings" page
in the OPAC has a Bootstrap-default width which is too wide. This patch
adds a class to give it a more reasonable size.

To test you must have the EnhancedMessagingPreferences preference set to
"Allow." Log in to the OPAC and view the messaging settings page. The
dropdown menu of numbers should look correct.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands
Reed Wade [Thu, 26 Jun 2014 06:24:07 +0000 (02:24 -0400)]
Bug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands

koha-foreach has been modified to replace __instancename__ with $name
on each iteration using sed.

The docbook file for koha-foreach has also been updated to reflect the
new functionality.

To test:

    koha-foreach ls -ld /etc/koha/sites/__instancename__

should list directories instead of giving an error message.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
The suggested example with ls works as expected, as does my
more complex example with fines.pl:

koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl \
--out /var/log/koha/__instancename__/

The man page looks good too.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoug 11857 - Number of patrons on a patron list not accurate
Fridolin Somers [Thu, 5 Jun 2014 15:21:28 +0000 (17:21 +0200)]
ug 11857 - Number of patrons on a patron list not accurate

When creating a patron list with only 1 patron, the patron
lists page says that the list contains 3 patrons.
When creating a patron list with only 1 patron, it works fine.

This is caused by the fact that access on "patron_list_patrons"
Koha::Schema::Result::PatronList object returns an hash if one
result and an array if more results.
See similar problem at
http://permalink.gmane.org/gmane.comp.lang.perl.modules.template-toolkit/7250

This patch replaces by the call on resultset and then the use of
"count" method.

Test plan :
- Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl
- Create a new patron list LIO
- Add one patron
- Create a new patron list LIM
- Add 2 patrons
- Go to patron lists : /cgi-bin/koha/patron_lists/lists.pl
=> Without this patch you see :
  Name  Patrons in list
  LIO   3
  LIM   2
=> With this patch you see :
  Name  Patrons in list
  LIO   1
  LIM   2

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Confirmed the problem and that
the patch fixes it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBUG 12304: LDAP auto-provisioning set default messaging preferences
Martin Renvoize [Wed, 21 May 2014 14:18:14 +0000 (14:18 +0000)]
BUG 12304: LDAP auto-provisioning set default messaging preferences

LDAP auto-provisioning should set default messaging preferences upon
creation of a user.

Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Manually applied to 3.12.9 and it works beautifully in test and production.

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 12456: The file C4/Maintainance.pm, and by extension the file t/Maintainance...
Yohann Dufour [Fri, 20 Jun 2014 09:22:31 +0000 (11:22 +0200)]
Bug 12456: The file C4/Maintainance.pm, and by extension the file t/Maintainance.t, has been removed

The file C4/Maintainance.pm is not used anywhere, it can be removed, and by extension, the file t/Maintainance.t too.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
A relic from the past :)
No references to this file or it's subs
No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811 [QA Followup] - Enable bProcessing
Kyle M Hall [Wed, 2 Jul 2014 14:17:37 +0000 (10:17 -0400)]
Bug 9811 [QA Followup] - Enable bProcessing

It's a bit disconcerting to not have any feedback while paging
through the patrons. Enabling bProcessing helps resolve that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Fix wording branch vs library
Jonathan Druart [Wed, 11 Jun 2014 13:20:37 +0000 (15:20 +0200)]
Bug 9811: Fix wording branch vs library

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

1) Top search
- OK no regressions found

2) New filters

- OK Terminology
- OK Search fields, search types, category, library
- OK Clear button

3) Result list

- OK Cardnumber
- OK Name, address and email
- OK Fines, checkouts and overdues
- OK Adding patrons to patron lists
- OK Select all/unselect all
- OK Sorting on the various columns
- OK Paging
- OK PatronsPerPage system preference

4) Performance
Tested with a database containing 40.000 patrons.
Search results were displayed with a little delay,
overall performance seemed pretty good.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Cardnumber could be alphanumeric
Jonathan Druart [Wed, 11 Jun 2014 13:05:31 +0000 (15:05 +0200)]
Bug 9811: Cardnumber could be alphanumeric

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Various fixes
Jonathan Druart [Mon, 9 Jun 2014 15:35:43 +0000 (17:35 +0200)]
Bug 9811: Various fixes

This patch fixes the issues raised in bug 9811 comment 105, 106 and 107:
1/ Add missing space between category and type.
2/ Fix error on searching an empty string (caused by a previous rebase).
3/ Remove sort option on checkbox/borrowernumber column.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Remove useless orderby management
Jonathan Druart [Mon, 9 Jun 2014 15:35:15 +0000 (17:35 +0200)]
Bug 9811: Remove useless orderby management

I don't know what is this stuff. I didn't find a call to member.pl with
an orderby parameter.
I am not sure this is in used.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Display email address in patron result list
Jonathan Druart [Mon, 9 Jun 2014 15:33:48 +0000 (17:33 +0200)]
Bug 9811: Display email address in patron result list

This patch restores the enhancement introduced by Bug 10318.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: QA follow-up: Fix license version
Jonathan Druart [Mon, 28 Apr 2014 09:06:06 +0000 (11:06 +0200)]
Bug 9811: QA follow-up: Fix license version

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811 - datetime does not respect DateFormat-system prefrence
Olli-Antti Kivilahti [Fri, 14 Mar 2014 11:39:03 +0000 (12:39 +0100)]
Bug 9811 - datetime does not respect DateFormat-system prefrence

To test:
Try searching by the date of birth using the left filter column. Good luck.

After applying this patch:
You can search using your preferred DateFormat.

Merci bocu

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: FIX encoding issue on patron categories
Jonathan Druart [Fri, 14 Mar 2014 10:03:34 +0000 (11:03 +0100)]
Bug 9811: FIX encoding issue on patron categories

The patron categories should use the html_entity filter (on the current
master).

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
This fix solves the issue of double encoding some utf8-characters by html_encoding the
patron categories, which are not marked as utf8.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Fixing JSON validation error for non-javascript string literal characters
Olli-Antti Kivilahti [Thu, 13 Mar 2014 10:58:18 +0000 (11:58 +0100)]
Bug 9811: Fixing JSON validation error for non-javascript string literal characters

Issue:
When a patron has backslashes in his circulation notes, the JSON transportation
layer cannot send the message because it will fail JSON validation when trying to
validate backslashed non-literal characters (\s \d ...).
This causes the whole search to fail when even one Borrower has a non-literal
backslashed character in his notes.

Solution:
The Borrowers' circulation notes are filtered through a regexp which doubles all
backslashes to prepare them for the JSON validation routine.

Result:
Backslashes pass through unchanged.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: FIX branches loop was not correctly set
Jonathan Druart [Fri, 10 Jan 2014 10:24:48 +0000 (11:24 +0100)]
Bug 9811: FIX branches loop was not correctly set

The branches loop was not set with the values.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 9811: Patron search improvement
Jonathan Druart [Tue, 19 Mar 2013 10:12:26 +0000 (11:12 +0100)]
Bug 9811: Patron search improvement

This patch add DataTables using server-side processing for the patrons
search.

It adds:
- 1 module C4/Utils/DataTables/Members.pm
- 2 services svc/members/search and svc/members/add_to_list
- 1 template members/tables/members_results.tt
- 1 new practice which is to add template for DataTables in a
  subdirectory named 'tables'.

Impacted scripts: members/members-home.pl and members/members.pl

To go further: We can imagine that all patrons searches use the same
service with no big changes: 1 little template creates a JSON file and
to implement DataTables on the template page, that's all.

Amended patch: Since bug 10565 has been pushed, these patches don't
apply cleanly. I had to rewrite a part of the patron list feature.
I removed the choice to add all resultant patrons from a search. I think
this choice is useless with this patch: we are able to display the
number of patrons we want and to select all of them.

Test plan:
- Check that there is no regression on searching patrons.
- Try filters on the left of the screen.
- Try to sort each column.
- Try the "Browse by last name" links.
- Check that the "Clear" button clears yours filters.
- Try with IndependantBranches ON and OFF.
- Verify this feature does not break the patron list feature (cf bug
  10565).

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, couldn't find any regressions
or problems. Some notes left on the bug.

Bug 9811: Add unit tests for C4::Utils::DT::Members

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Bug 9811: QA followup

- removes 2 tabs
- removes mysqlisms
- add sort on borrowernotes
- fix wrong capitalization
- cat => Category

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for fixing these!

Bug 9811 - multilines notes brakes JSON

In new patron search feature, the search results are fetched using Ajax and returned in JSON format.
The JSON is created by TT using koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt.
One of the fields is the borrower notes. When this notes contains several lines, the JSON is broken.

This patch uses TT fileters to consert in notes linefeeds into HTML line break (html_line_break) and then remove linefeeds (collapse).

Test plan :
- perform a member search that does not return a borrower with a circ note
- edit one of the borrowers returned by this search
- enter serveral lines of text in "Circulation note" and save
- reperform the member search
=> circ note is well displayed on several lines

Bug 9811: use count(primary_key) instead of count(*)

Bug 9811: A limit clause should be always added.

By default, we want to retrieve 20 first results.

Bug 9811: Load the page without any data.

Displaying the first 20 patrons is not useful. With this patch, the
table is hidden and no record is retrieved by default.
On the same way, the existing side effect on redirect disappears.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
-------------
-TEST REPORT-
-------------
For the filter: Tested all the search fields, branches, search type.
Found a bug with "date of birth", followup provided.
Tested display limits and verified that AJAX-queries are
  efficient (using LIMIT clause) to not stress DB needlessly.
Tested adding Patrons to a list.
A good feature, which seems to work quite well.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adding my test plan to the last patch of this bug.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12337 - Multi-clicking the renewal buttons on circulation.pl can trigger "renewal...
Kyle M Hall [Fri, 30 May 2014 11:17:25 +0000 (07:17 -0400)]
Bug 12337 - Multi-clicking the renewal buttons on circulation.pl can trigger "renewal failed" message.

Each time the "renew all" or "renew or return" buttons are click, the
renewal process is triggered. If the patron only has one renewal left,
and the button is multi-clicked, the librarian may receive a
"renewal failed" message even though the renewal did occur. In
addition, this can just unwanted multiple consecutive renewals
as well.

Test Plan:
1) Check out an item to a patron that can have 1 renewal
2) Click the "renew all" button multiple times, fast and furiously
3) Note the "renewal failed" messaged
4) Apply this patch
5) Repeat steps 1 and 2
6) Note the item is now renewed without the failure message

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11357 - biblioitems.size value not correctly displayed in list emails sent from...
Fridolin Somers [Thu, 19 Jun 2014 12:47:15 +0000 (14:47 +0200)]
Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from OPAC and intranet

The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable.

It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places:

[% END %]
   [% IF BIBLIO_RESULT.size %]
   , [% BIBLIO_RESULT.size %]
[% END %]

This patch corrects by using item() TT method.
See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-containing-illegal-identifier-characters-in-template.

Test plan :
In each display :
=> Without this patch you see biblioitems.pages and then a number
=> With this patch you only see biblioitems.pages

- Create a record with biblioitems.pages defined (like "12p") but without biblioitems.size defined
Same for OPAC and intranet :
- Add it to the cart
- Open the cart
- Check the "Title" column
- Click on "More Details"
- Check the "Details" row
- Send the basket via email and check the result
- Add to a list
- Send the list via email and check the result

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well!!
Tested on staff & opac, cart & list.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 11810: (followup) regenerate CSS due to conflict
Tomas Cohen Arazi [Mon, 30 Jun 2014 19:15:18 +0000 (16:15 -0300)]
Bug 11810: (followup) regenerate CSS due to conflict

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11810: Input fields in OPAC suggestion form are a bit short (Bootstrap)
Owen Leonard [Fri, 27 Jun 2014 15:30:17 +0000 (11:30 -0400)]
Bug 11810: Input fields in OPAC suggestion form are a bit short (Bootstrap)

The default Bootstrap input size (absent any specific input size or
class) is too short for the suggestion form. This patch adds a Bootstrap
class to fields which need more room and adjusts the OPAC CSS to allow
for better handling of input width at lower screen widths.

To test apply the patch and clear your browser cache if necessary. Open
the "new suggestion" form in the OPAC and confirm that the entry fields
for title, author, publisher, and collection title are sized well.

Adjust the width of your browser window up and down to confirm that the
field sizes adjust well at various screen widths.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12419: Not for loan items are not listed
Jonathan Druart [Fri, 13 Jun 2014 13:27:45 +0000 (15:27 +0200)]
Bug 12419: Not for loan items are not listed

On the cataloguing search (cataloguing/addbook.pl), if an item has a
notforloan value > 0, the item is not listed in the Location column.

It is quite confusing, the current behavior let patrons believe that
there is not item for the biblio (or less than the real count).

Test plan:
1/ Create 2 biblio records A and B
2/ Create some items for A
3/ Create 1+ item(s) for B with a notforloan status > 0
4/ Reindex both records
5/ Launch a search on the cataloguing module and verify that the
notforloan items are not listed in the 'Location' column.
6/ Apply this patch and verify the not for loan items are listed ("Not
for loan (XXX)").

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, not for loan items now show up.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12419: (QA followup) regression tests
Tomas Cohen Arazi [Mon, 30 Jun 2014 17:55:04 +0000 (14:55 -0300)]
Bug 12419: (QA followup) regression tests

Changes to searchResults deserve unit tests.

Edit: minor tweaks:
 - Remove warning in line 702
 - Modernize
 - License added
 - "This file is a stub" removed

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12455: (QA followup) license text missing
Tomas Cohen Arazi [Mon, 30 Jun 2014 15:27:45 +0000 (12:27 -0300)]
Bug 12455: (QA followup) license text missing

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12455: adding unit tests for the module C4/SMS.pm
Yohann Dufour [Fri, 20 Jun 2014 08:42:13 +0000 (10:42 +0200)]
Bug 12455: adding unit tests for the module C4/SMS.pm

The module C4/SMS.pm was not tested

Test plan:
1/ Execute the command : prove t/SMS.t
2/ The result has to be a success without error or warning :
t/SMS.t .. ok
All tests successful.
Files=1, Tests=7,  1 wallclock secs ( 0.03 usr  0.01 sys +  0.17 cusr  0.02 csys =  0.23 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Replace stub test, all test pass.
Removed "use strict/warnings", no need for that with "use Modern::Perl"
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12223 - members-update.tt has misspelled field B_phone name
Bernardo Gonzalez Kriegel [Fri, 27 Jun 2014 19:42:39 +0000 (16:42 -0300)]
Bug 12223 - members-update.tt has misspelled field B_phone name

This patch fixes a misspelled word

To test:
1. login in opac, clic personal details, change Alternate phone
number and submit
2. go to staff, Patrons, clic on link 'Patrons requesting modifications'
Alternate phone has mispelled label
3. apply the patch
4. reload, label is fixed

Followed test plan. Typo is fixed.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a typo, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12361 - No default value for opaccolorstylesheet syspref
Fridolin Somers [Thu, 5 Jun 2014 07:28:29 +0000 (09:28 +0200)]
Bug 12361 - No default value for opaccolorstylesheet syspref

After install, the syspref opaccolorstylesheet will by default contain colors.css.
This file exist in OPAC prog theme but not in bootstrap theme.

This patch set the syspref empty by default in installer/data/mysql/sysprefs.sql.

Test plan :
- Create a fresh install
- Look at opaccolorstylesheet content
=> without this patch : is contains colors.css
=> with this patch : it is empty
- Enable opac bootstrap theme
- Go to opac main page
- Look at HTTP errors (with firebug for example)
=> without this patch : there is a 404 error because colors.css does not exist
=> with this patch : no such error

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12479: (QA followup) minor fixes, and tcohen added
Tomas Cohen Arazi [Mon, 30 Jun 2014 13:03:11 +0000 (10:03 -0300)]
Bug 12479: (QA followup) minor fixes, and tcohen added

David's name gets alphabeticaly sorted, and Tomás is added.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12479 - [SIGNED-OFF] Update mailmap for master
David Cook [Wed, 25 Jun 2014 06:52:54 +0000 (16:52 +1000)]
Bug 12479 - [SIGNED-OFF] Update mailmap for master

Just wanted to add a mailmap entry so that GitStats merges together
the commits I made as "David <dcook@prosentient.com.au>" versus
"David Cook <dcook@prosentient.com.au>".

Also increases accuracy if myself or others does a git shortlog...

_TEST PLAN_

Before applying:

1) Run 'git shortlog --author="dcook@prosentient.com.au"'
2) Note two entries: one for "David" and one for "David Cook".

3) Apply patch

4) Repeat step 1
5) Note only one entry for "David Cook"

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Works as advertised.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
9 years agoBug 7143: Updating new developers
Chris Cormack [Mon, 23 Jun 2014 20:15:47 +0000 (08:15 +1200)]
Bug 7143: Updating new developers

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Edit: Switched from spaces to tabs in history.txt.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12464 - Bootstrap XSLT view no longer displaying 505 correctly formatted
Owen Leonard [Thu, 26 Jun 2014 18:13:40 +0000 (14:13 -0400)]
Bug 12464 - Bootstrap XSLT view no longer displaying 505 correctly formatted

505 contents notes are not displayed correctly in the Bootstrap theme
because the relevant CSS was not included in the transfer from prog.
This patch adds it.

To test, apply the patch and view a record in the OPAC which contains a
505 note with contents details. Clear your browser cache if
necessary. The contents should appear correctly, with a line break for
each entry.

I tested with the same biblio as shown in attachment #1 (imported from Library of Congress)
After applying patch the record displays the same as in prog theme
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
CSS change only. Works as expected, no problems found.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12443: (QA followup) Unit tests for _build_initial_query
Tomas Cohen Arazi [Wed, 25 Jun 2014 19:29:18 +0000 (16:29 -0300)]
Bug 12443: (QA followup) Unit tests for _build_initial_query

This followup adds uint tests for the newly introduced function.
It is really basic, but covers all scenarios for the new function,
and will help us prevent regressions in future patches.

Regards
To+

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12443 - Initial re-factoring of buildQuery
David Cook [Wed, 18 Jun 2014 06:26:31 +0000 (16:26 +1000)]
Bug 12443 - Initial re-factoring of buildQuery

This patch reduces three repeated code fragments into a single
internal subroutine, which is easier to read, has comments,
and should make it easier to refactor more buildQuery code
in the future.

_TEST PLAN_

Before applying

1) Run a bunch of different searches in the staff client and OPAC
in separate tabs

2) Apply the patch

3) Run the same searches again (maybe in yet more tabs) and notice
that the results are exactly the same.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Same results, no errors.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12143 - hiding alternate address on patron self registration doesn't hide heading
Jacek Ablewicz [Mon, 23 Jun 2014 10:08:26 +0000 (12:08 +0200)]
Bug 12143 - hiding alternate address on patron self registration doesn't hide heading

This patch fixes the following issue: in OPAC self registration form,
even if all alternate address fields are configured as hidden,
the heading for "Alternate address" still shows.

To test:

1/ Confirm the issue: hide all alternate adres field names (i.e., enter
B_address|B_address2|B_city|B_state|B_zipcode|B_country|B_phone|
B_email|contactnote into PatronSelfRegistrationBorrowerUnwantedField
system prefrence).
2/ Observe that "Alternate address" section heading still shows
in patron self registration form ("your personal details" tab),
despite that all section fields are configured as hidden.
3/ Apply patch.
4/ Reload OPAC self registration form; confirm that "Alternate address"
is not displyed any longer, and the issue is now fixed.
5/ Remove some field name (e.g. B_address2) from
PatronSelfRegistrationBorrowerUnwantedField; ensure that "Alternate
address" heading does show if at least one section field is not
hidden.
6/ Test steps 1-5 should be performed/repeated in both bootstrap
and prog OPAC themes.

Followed test plan with prog and bootstrap themes, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 11715: Update POD for get_template_and_user
Jonathan Druart [Fri, 2 May 2014 10:06:30 +0000 (12:06 +0200)]
Bug 11715: Update POD for get_template_and_user

If flagsrequired is set, authnotrequired should be 0.

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 11715: require authentication for various staff scripts
Galen Charlton [Tue, 29 Apr 2014 17:04:02 +0000 (17:04 +0000)]
Bug 11715: require authentication for various staff scripts

To test:

[1] Verify that item record creating and editing during the
    acquisitions process continues to work.
[2] Verify that calling  services/itemrecorddisplay.pl without
    a valid user session fails.
[3] Verify that authentication is required for making a new
    order from a suggestion, transferring an order, doing a
    Z39.50 search from acquisitions, displaying the record
    card view in the staff interface, and running the till
    reconciliation report (/cgi-bin/koha/reports/stats.screen.pl)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified all changed scripts are not accessible witout a valid
user session, but are with one.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11715 : require authentication for the cataloging authorities Z39.50 search
Chris Cormack [Sun, 16 Mar 2014 20:15:05 +0000 (09:15 +1300)]
Bug 11715 : require authentication for the cataloging authorities Z39.50 search

To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl notice you now
   need to login

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11715: require authentication for the cataloging Z39.50 search
Chris Cormack [Mon, 10 Mar 2014 21:56:53 +0000 (10:56 +1300)]
Bug 11715: require authentication for the cataloging Z39.50 search

To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_search.pl notice you now need
to login

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11715: Set the default of authnotrequired = 0 in get_template_and_user
Chris Cormack [Mon, 10 Mar 2014 21:51:00 +0000 (10:51 +1300)]
Bug 11715: Set the default of authnotrequired = 0 in get_template_and_user

To test:

Verify that pages in the OPAC and staff interface display correctly.

Note that there are cases where 'authnotrequired' was not passed
at all to get_template_and_user, so there may be pages that start
requiring authentication.  Whether that is correct or not depends
on context.

Follow up patches are to remove all the unnessecary setting of this
value, so that the only places we set are when we do want
authnotrequired=1

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12427: Allow execution of UTs on a DB with issues
Jonathan Druart [Thu, 19 Jun 2014 11:50:31 +0000 (13:50 +0200)]
Bug 12427: Allow execution of UTs on a DB with issues

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12427: adding unit tests of module C4::Members::Attributes.pm
Yohann Dufour [Tue, 17 Jun 2014 14:53:14 +0000 (16:53 +0200)]
Bug 12427: adding unit tests of module C4::Members::Attributes.pm

The subroutines UpdateBorrowerAttribute, SearchIdMatchingAttribute, DeleteBorrowerAttribute, GetBorrowerAttributes, GetAttributes, GetBorrowerAttributeValue, SetBorrowerAttributes and CheckUniqueness of the module C4::Members::Attributes.pm were not tested.

Test plan:
1/ Execute the command: prove t/db_dependent/Members_Attributes.t
2/ The result has to be:
t/db_dependent/Members_Attributes.t .. ok
All tests successful.
Files=1, Tests=60,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.45 cusr  0.08 csys =  1.58 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test with patrons on db having issues and attributes
New test file, all test pass
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler
Kyle M Hall [Mon, 16 Jun 2014 11:30:03 +0000 (07:30 -0400)]
Bug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11292 - barcode scanner clicking 'save'
Kyle M Hall [Thu, 22 May 2014 12:35:16 +0000 (08:35 -0400)]
Bug 11292 - barcode scanner clicking 'save'

When cataloging a bib record if you scan an ISBN barcode in the barcode
scanner clicks the 'save' button before the cataloging is done. This did
not happen in 3.10, but is happening again in 3.12.

Test Plan:
1) Open the marc editor
2) Focus on a field, hit the enter key
3) Note the record tries to save
4) Focus on an indicator, hit the enter key
5) Note the record tries to save
6) Apply this patch
7) Repeat steps 2 and 4, note the record no longer
   tries to save upon carriage return

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Patch tested with a sandbox.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12428: remove debugging leftover
Tomas Cohen Arazi [Mon, 23 Jun 2014 23:23:08 +0000 (20:23 -0300)]
Bug 12428: remove debugging leftover

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12428: (QA followup) regression tests.
Tomas Cohen Arazi [Mon, 23 Jun 2014 19:36:43 +0000 (16:36 -0300)]
Bug 12428: (QA followup) regression tests.

Just that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 12428 - "OPAC info" is not displayed in the OPAC
Owen Leonard [Mon, 16 Jun 2014 16:56:24 +0000 (12:56 -0400)]
Bug 12428 - "OPAC info" is not displayed in the OPAC

The changes made by Bug 7720 ("Ambiguity in OPAC Details location")
broke the display of OPAC branch information tooltips by making changes
to the markup which the tooltip plugin needs to function.

This patch corrects the markup to enable tooltips to work again. This
patch also makes changes to Items.pm so that branch information tooltips
can be shown for both home and holding branches (which are optionally
displayed now via the changes by Bug 7720). Before this patch the
tooltip would always display the information for the holding branch
regardless of the OpacLocationBranchToDisplay setting.

This patch also changes the footer include, adding an alias for the
jQueryUI tooltip function to prevent conflict with Bootstrap's function
of the same name.

To test, you must have at least two libraries configured with "OPAC
info" for display in the OPAC.

Modify the holdings of a title so that there is at least one item which
has different holding and home branches matching your library configured
above.

View the detail page for that record under various values of the
OpacLocationBranchToDisplay system preference:

- "holding library" : The table of holdings should show a column for
  only the holding library. Hovering your cursor over the library name
  should display the branch information you configured for that library
  in a tooltip .

- "home and holding library" : The table of holdings should show columns
  for both home and holding library. Hovering your cursor over each
  should show the corresponding library information tooltips.

- "home library" : The table of holdings should show a column for
  only the home library. Hovering your cursor over the library name
  should display the branch information you configured for that library
  in a tooltip.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Works with all settings of OpacLocationBranchToDisplay.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11742: (QA followup) wrong number of tests
Tomas Cohen Arazi [Mon, 23 Jun 2014 18:22:37 +0000 (15:22 -0300)]
Bug 11742: (QA followup) wrong number of tests

The number of tests was wrong.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
9 years agoBug 11742: FIX the code parameter was not take into account
Jonathan Druart [Mon, 9 Jun 2014 10:21:31 +0000 (12:21 +0200)]
Bug 11742: FIX the code parameter was not take into account

In C4::Letters::GetLetters, the code filter was not used as a query
parameter.

Moreover, the JS code was buggy. We only need to check the letter code,
except if it is an edit and the letter code has not been changed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
9 years agoBug 11742: A letter code should be unique.
Jonathan Druart [Wed, 7 May 2014 14:12:39 +0000 (16:12 +0200)]
Bug 11742: A letter code should be unique.

This patch is a dirty way to fix a design issue on notices.
Currently the code assumes that a letter code is unique. Which is wrong,
the primary key is module, code, branchcode.

Maybe we should add a primary key (id) for the letter table in order to
pass the id to the template and correctly manage the letter code
duplication.

Test plan:
Try to duplicate a letter code using edit, add and copy actions.
If you manage to do it, please describe how you did.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
9 years agoBug 11742: Change return type for GetLetters
Jonathan Druart [Wed, 7 May 2014 13:55:54 +0000 (15:55 +0200)]
Bug 11742: Change return type for GetLetters

The GetLetters subroutine should return an arrayref with different
letters for a module.

Test plan:
0/ Delete your notices with module=claimacquisition, claimissues,
serial
1/ Go on the late orders page (acqui/lateorders.pl) and verify you
cannot choose a notice for claiming
2/ Create a notice with module=claimacquisition
3/ Go on the late orders page (acqui/lateorders.pl) and verify you
can choose the notice for claiming
4/ Go on the Claim serials page (serials/claims.pl) and repeat the same
thing with the a "claimissues" notice
5/ Create a new subscription (serials/subscription-add.pl) and verify
you cannot choose a notification for patrons.
6/ Create a notice with module "serial" and verify you can.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Additional tests done:

- copy notice ODUE, on saving you are now prompted to choose
  a new CODE for the notice
- edit new notice, try to set code back to ODUE. You are
  prompted that the code is already in use.

This will prevent people from accidentally overwriting a letter
with the same letter code.