Commit Graph

24167 Commits

Author SHA1 Message Date
Gus 856a2bd1a1 Bug 15624: Spelling mistake in suggestion.pl
Test - due to noone being in a comparison name it was not changed
1. search for choosen, see that it was removed
2. search for agregate, see that it was removed

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Typos fixed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9c2b0ea115)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ac36fe478a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:09:16 +01:00
Gus 600b83a136 15623 - Spelling mistake in boraccount.pl Test - Search for writen, if not found fix is correct
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Gus: You should try git grep writen one more time :)

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 17a2426e0f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit d5dd89ff78)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:09:02 +01:00
Gus 6a03a32898 Bug 15621: Spelling mistake in printinvice.pl
Test- search for writen, if not found patch successful

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Typo fixed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 12bd1dc601)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e23abce8dd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:08:47 +01:00
Gus 2b19f959ce Bug 15619: Spelling mistake in memberentry.pl
Test - Check file for 'konw', notice no instance

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Typo fixed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 89978bab10)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 45095c0078)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:08:20 +01:00
Chloe 5f51b6f970 Bug 15614 - Spelling mistake in circ/pendingreserves.tt: Fullfilled
To Test:

Check if "fullfilled" has been changed to "fulfilled" in line 137

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 69b5fc9aa1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 644e69cb7f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:07:40 +01:00
Jonathan Druart 231f6d9ebe Bug 15613: Fix 2 other occurrences of paramter vs parameter
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6c80367f85)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8013976d3e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:07:25 +01:00
Gus 03efedc3e9 Bug 15613 - Spelling mistake in opac-shelves.tt
Spelling mistake in opac-shelves.tt paramter ==> parameter

To test - check the change is made in the file

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9a109fde4c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 314f1f7a2f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:07:06 +01:00
Jonathan Druart 4c8945df23 Bug 15611: Fix another implimented vs implemented
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 2723e463c0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6c1b8ddffe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:06:40 +01:00
Chloe c0d4938a76 Bug 15611 - Spelling mistake in patroncards/edit-layout.tt
To Test:

check that "implimented" has been changed to "implemented" on both lines
478 and 534

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 88607dfaf1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 74680de736)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:06:10 +01:00
Aleisha edf5844893 Bug 14641: [SIGNED-OFF] Warns in subscription-add.pl
Removes warn using Jonathan's suggestion!

To test:
1) Reproduce warns by clicking New Subscription
2) Apply patch
3) Click New Subscription again
4) Confirm warns are gone

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Patch removes the warn that come when clicking "New subscription"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fe79402575)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 0e6346c614)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:05:54 +01:00
Aleisha 88d4d49b11 Bug 14480: Silences warn from editing patron
Argument "" isn't numeric in numeric lt (<)

TEST PLAN
---------
1) Go to any patron in staff client
2) Click 'Edit'
3) Check error logs
   -- warnings should exist.
4) Apply patch
5) Reload page
   -- warnings should not be triggered.
6) Add restriction and save
7) Go back to edit screen
   -- restriction should be shown
8) Remove restriction and save
9) Go back to edit screen
   -- Should say "Patron is currently unrestricted"
10) Run koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 11109501eb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c08a13593c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:05:31 +01:00
Marcel de Rooy 258cb5aaef Bug 15553: [QA Follow-up] Replace hardcoded tmp and add instance to dirname
If you use multiple instances on one server, you could have the situation
that instance A creates the cgisess subfolder and instance B could have a
permission problem. This patch resolves that by allowing each instance to
have its own cgisess subfolder.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c4934b2dab)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit d259eaac7b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:05:05 +01:00
Blou 5a0dc0c2a4 Bug 15553 - [SIGNED-OFF] cgisess_ files polluting the /tmp directory
When some users want to improve performance, one suggestion is to switch the syspref "sessionstorage" to 'tmp',
which store the session info in the /tmp directory instead of the database.

Depending on the frequency of the cleaning process (or lack thereof),
this can be heavy pollution into the /tmp directory, making it unusable.
"rm cgi*" would not even work since cgi* extends to over 8000 items...

A simple fix is to modify the target directory in C4/Auth.pm to /tmp/cgisess.

Testing scenario:
1) change the syspref SessionStorage to 'tmp'
2) Log into the OPAC, validate that a file named /tmp/cgisess_(something) got created
3) Apply the patch
4) Log into the OPAC, validate that a file /tmp/cgisess/cgisess_(something) got created

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Session files are created in /tmp/cgisess/ instead
of directly in /tmp. I usually store sessions in memcached, but a
couple of times memcached has died on me, and before I knew it, /tmp
was so full of sessions files, I could not easily delete them with
"rm /tmp/cgisess*". Being able to delete /tmp/cgisess/ should be a
bit easier.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 3815915a33)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6efb2ebc0f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:04:30 +01:00
Chloe 66e9870a3e Bug 15468 - Search links on callnumbers with parentheses fails on OPAC results page
To Test:
1-before plugin search in opac for a call number with either a "(" or a ")" in it
2-it should come back with no results
3-use plugin
4-re-search the call number with "(" or ")"
5-the search should come back with results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
It seems this only works with OPAC XSLT for results page turned off
and OPACItemsResultsDisplay turned on. - Then the callnumbers
in the result list will be linked for searching.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6d9a75014e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 27f9eb0119)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:03:55 +01:00
Chloe 4ccc345110 Bug 15592 - spelling mistake in ~/Koha/koha-tmpl/intranet-tmpl/p./plugins/plugins-upload.tt
To Test:

checkthat "extention" has been changed to "extension" on line 27

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 70086f1681)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 841aa118e5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:03:30 +01:00
Winona Salesky 31a50f6eb7 Bug 15444 - MARC21: Repeated 508 not correctly formatted (missing separator)
This patch adds a separator for multiple 508 fields to the XSLT display
in the staff and OPAC detail view.  Separator is wrapped in span with
class=‘separator’ for easy manipulation via css.

To test:
* Search the OPAC
* Click the title with multiple 508 fields
* Make sure the fields display properly
* Repeat for a few more titles
* Repeat in the Staff Client

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 1c5f75fde5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit c68d58259e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:02:55 +01:00
Marc Véron a51ef6e248 Bug 15476: Listname not always displayed in shelves.pl
To reproduce:
  - In staff client, go to List and click on the name of an
    existing list.
  - At the bottom of the screen, you see a title "Add an item to "
    but no list name.

To test:
  - Apply patch
  - Verify that listname appears after "Add an item to "

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Label/legend for listname displayed Ok

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit df13a5d3e7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 67c26ef476)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 20:01:45 +01:00
Natasha 85df138772 Bug 14624 - <<items.content>> for advance_notices.pl wrongly documented
To Test Check perldoc for misc/cronjobs/advance_noitces.pl
and see that the documentation matches.

Ran:
$ perldoc misc/cronjobs/advance_noitces.pl
Saw expected changes.
Koha QA test tools pass too.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Switched due date for the name of the database column
date_due as the parameter expects a list of database
column names.

(cherry picked from commit 4120e48b0f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit b3586e5dc7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:59:37 +01:00
Chloe 14d59c8869 Bug 15609 - spelling mistake in :692: writen ==> written
To test:

Check that "writen" has been changed to "written" on line 692

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f37ce198fe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 87e96810fc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:59:10 +01:00
Jonathan Druart 44a331a2b4 Bug 15299: Ask for confirmation when deleting a report from second page
Some link are hidden when loading the page, by DataTables, we need to
use the delegate jQuery method to attach a handler to the click event
for all delete links (the ones existing when loading the page, and the
ones displayed in the future).

Test plan:
Have more than 20 reports defined
Go on the report list view, then change the number of elements
displayed, click "action>delete". You should get a warn.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Confirm that there is now a confirmation on delete from the list -> action menu

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit dcce65c8fd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

(cherry picked from commit dfdf3c15de)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:58:30 +01:00
Briana cacbfbf834 Bug 14810 Improve messages in patron anonymizing tool
To test:
Create circulation records
Go to 'http://localhost:8081/cgi-bin/koha/tools/cleanborrowers.pl'
Anonymize patron checkout history
Message should read 'All checkouts older than [date] have been
 anonymized
When patch is not applied, message reads 'All patrons with checkouts
 older than [date]  have been anonymized"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e38564d213)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 2f3843af99)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:57:58 +01:00
Martin Stenberg 8e554c8581 Bug 14555: Warns in opac-search.pl
Avoid use of uninitialized value in split

== Test plan ==
1. Go to opac advanced search
2. Click "Search" without any search query
3. Log file will show "Use of uninitialized value in split at ..."
4. Apply this patch
5. Repeat step 1 and 2
6. Log file should no longer show "Use of uninitialized value in split at ..."

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
At step 2 you have to check a criteria

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ab81a0feee)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 34f20412f8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:57:17 +01:00
Jonathan Druart fa83ce9b6e Bug 12636: Do not display unique patron attributes in the batch patron modification
Batch patron modification should not offer to update patron attributes
with values which are designated as unique since such attributes are
required to be unique to a single patron.

Test plan:
Create some patron attributes, some should be unique.
Use the batch patron modification tool to modify patrons.
With this patch, the patron attributes marked as unique won't be
display anymore.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit b7b94b7012)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 4c0506f33e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:56:55 +01:00
Jonathan Druart e56a39f657 Bug 14133: Print notices should be generated with the print template
If the overdue notice to send is an email or a SMS and the patron does
not provided such information, a print notice is generated.
But it will be generated with the email or sms template, which is not
useful, especially in the SMS case.

The template to use should be the print one.

Test plan:
0/ Does not apply this patch and Correctly define the overdue rules to generate
an overdue notice to the message_queue table.
Check email + SMS
1/ Define an email address and a SMS number for a patron
2/ Generate the overdue notices (misc/cronjobs/overdue_notices.pl [-t])
3/ 2 notices should have been generated:
    mtt=email with the email template used
    mtt=sms   with the sms template used
4/ Truncate the message_queue table
5/ Remove the email address and repeat 2
6/ Only 1 notice should have been generated:
    mtt=print with the email template used
7/ Truncate the message_queue table
8/ Remove the sms alert number and repeat 2
9/ 2 notices should have been generated:
    mtt=print with the email template used (or sms I suppose)

10/ Apply this patch and repeat previous steps.
The print notices should be generated with the print template.

IMPORTANT NOTE: This test plan does not take into account the notices
generated for the staff ("These messages were not sent directly to the
patrons."). However the behavior will also change, the print template
will be used in all cases. Is it what we want?

Signed-off-by: Chris <chris@bigballofwax.co.nz>

Seems fine by me

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 581759e985)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit d55a5ca464)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:55:43 +01:00
Aleisha 822cb51586 Bug 15577: Correcting link redirect
To test:
1) Add a restriction to a user
2) Log in as that user in the OPAC
3) Click 'your account page' link in the yellow mesage
4) Confirm you are taken to opac-account.pl

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5b6457087d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 7cfa560631)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:51:49 +01:00
Jonathan Druart 05ef470ecb Bug 15357: Display existing holds even if no items exist
If all the items have been deleted for a record and holds exist, the
holds are not displayed.  You are not able to delete the items from the
record detail page, but you can from the items page.

Test plan:
1 - Place 1 or more title level holds on a record.
2 - Delete each item individually.
3 - Note that you see the number of holds on the record details page
With this patch, that holds are accessible via the holds tab.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0e4b703d23)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 2903bc2909)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:49:19 +01:00
Jonathan Druart dead28ef19 Bug 15353: Display the patron image where needed
On the 3 following pages, the patron image was not displayed:
   members/discharge.pl
   members/pay.pl
   members/paycollect.pl

Test plan:
Apply this patch and confirm the image is now displayed

Followed test plan, image displays as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit bb0c2fce1b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 64eb1f88ea)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:45:30 +01:00
Jonathan Druart 1692d597e2 Bug 15398: Hide Staff members only in the patron deletion/anonymization tool
On bug 9076 (commit 568a4c1230), the plan
was to hide the Staff members from the tool.
But the test was wrong, it was done on the category_code instead of the
category_type value.

Test plan:
1/ Create a category 'Student' which is not part of the Staff
(category_code=S, category_type!=S)
2/ Create a staff category (category_type=S)
3/ Go on the deletion/anonymization tool (tools/cleanborrowers.pl) and
confirm that the category Student category is displayed in the dropdown
list.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6f0cdee69b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 5349313187)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:40:42 +01:00
Jonathan Druart c5c3d47621 Bug 15391: Fix HoldsQueue.t tests
Prior to this patch, in HoldsQueue.t:
 63 my @item_types = C4::ItemType->all;
 64 my $itemtype = grep { $_->{notforloan} == 1 } @item_types
 65   or BAIL_OUT("No adequate itemtype");

Then we use the $itemtype variable (which contains the number of item types not for loan):

 92 $dbh->do("INSERT INTO biblioitems (biblionumber, marcxml, itemtype)
 93           VALUES                  ($biblionumber, '', '$itemtype')");

There is obviously something wrong here.

The code should be

 64 my @not_for_loan = grep { $_->{notforloan} == 1 } @item_types
 65   or BAIL_OUT("No adequate itemtype");
 66 my $itemtype = $not_for_loan[0]->{itemtype};

But then some tests don't pass:

Actually the problem comes from:
commit bfbc646fdd
  Bug 10336: HoldsQueue.t needs to create its own data

-my $itemtype = $dbh->selectrow_array("SELECT min(itemtype) FROM itemtypes WHERE notforloan = 0")
+my @item_types = C4::ItemType->all;
+my $itemtype = grep { $_->{notforloan} == 1 } @item_types

The line should have been:
my $itemtype = grep { $_->{notforloan} == 0 } @item_types

Test plan:
Confirm that the tests still pass after this patch applied.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
All tests pass pre and post patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit b340d1f5bd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 31ab3b277c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:39:55 +01:00
Marcel de Rooy c5cb615f9c Bug 9754: koha-remove optionally includes var/lib and var/spool
Currently, the files in the folder /var/lib/koha/[instance] and also
in /var/spool/koha/[instance] are not removed.
This patch adds the option -p|--purge-all to include those two
directories when removing files.

Note: There was a small bug in the for loop. On the -k line the extra
shift statement is one too much.

NOTE: Verify that you use the adjusted koha-remove in the test plan
and not accidentally an older version of this script.

Test plan:
[1] Create an instance test.
[2] Run koha-remove and verify that /var/lib/koha/test still exists.
[3] Create an instance test2.
[4] Run koha-remove -k -p and verify that the sql database still exists
    but the two instance folders in var/lib/koha and var/spool/koha are
    gone.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 1d99fa026b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 69fd29942c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:38:56 +01:00
Jonathan Druart 11796d60fa Bug 15209: Check the parameter at the beginning of the subroutines
It seems better to check if parameters exist at the beginning of a
subroutine.
It makes the code easier to read and there is 1 indentation level less.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 372881ebfd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 7132c9b49c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:38:14 +01:00
Jonathan Druart 87388b7d3a Bug 15209: Add tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c273e888b0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit bc287802a9)
2016-02-11 19:37:22 +01:00
Colin Campbell 60e9074bec Bug 15209 Validate passed MARC::Record objs in C4::Koha
Ensure that a passed MARC::Record is defined before calling
its methods. Otherwise you are open to occurences of the
error 'Can't call method "field" on an undefined value'
In a CGI environment you can live with such sloppiness but
in a persistent environment the error can cause the instance
to abort.
Made all routines passed a MARC::Record validate it before calling
its methods. Changed the parameter name from the meaningless
record to marcrecord to indicate its content. Added an explicit return
for all cases where no valid data returned. Cleaned up some logic for
clarity. I think we can assume that GetNormalizedOCLCNumber meant to
look at all 035s till it found an OCLC number not just the first.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 960458dee4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 958985b2ff)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:33:50 +01:00
Marcel de Rooy 7d81810d14 Bug 15240: [QA Follow-up] Minor adjustments
This patch does:
[1] It removes some unused modules.
[2] It adds some options not listed in the synopsis.
[3] It removes an unused sql expression from one query.
    Note: In fines related code the third parameter of CalcFine sometimes
    is named as days_overdue too.
[4] Corrects a few typos in comments or pod.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 8d072272fa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit b94fc3419d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:31:26 +01:00
Jonathan Druart 153877f10f Bug 15240: Do not process issues with a date due later than today
There is no need to do this job in Perl, MySQL could do it instead.
The idea is to only retrieve the issues info which could be overdued.

To test:
1/ Run the script
2/ Apply the patch
3/ Run the script again, notice the exact same results but execution time is faster

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0d36c27678)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit e46923af88)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:21:30 +01:00
Kyle M Hall 7ab00713f0 Bug 15680 - Fresh install of Koha cannot find any dependencies
Revert "Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Installer/PerlModules.pm"

This reverts commit 0e356b214e.

Fixing the evals in PerlModules.pm to pass perl critic has caused
a regression. If appears that using a block eval will not work here,
at least not in its current form.

(cherry picked from commit c2f667b4f2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ff73d0415f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:13:31 +01:00
Chloe 4ebed3e636 Bug 12045 - Transfer impossible if barcode includes spaces
have changed the code which strips the white space to only remove the leading and trailing white space instead

To Test-
1- go to circulation -> transfer
2- attempt to tranfer an item where the barcode has a space in the middle of it
3- it should fail
4- apply patch
5- try again
6- it should work

NOTE: I purposefully added: die "($barcode)";
      Before, all spaces were removed.
          '    white space    ' became '(whitespace)'
      After, only external spaces were remove
          '    white space    ' became '(white space)'

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 47caf69a46)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8fa06fdfde)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 19:10:26 +01:00
Kyle M Hall 9e456ee006 Bug 15530 - Editing a course item via a disabled course disables it even if it is on other enabled courses
It appears that if the course item is edited by clicking the edit link
from an active course, the course item will be set to enabled and the
fields will be swapped, if the same course item is edited from a course
that is *not* active, the course item will be set to *not* enabled, and
the original fields will be swapped back in!

The short term work-around is to only edit course items from an enabled
course if the item has a course that is enabled. If all the courses it
is on are disabled, it doesn't matter what course the item is edited
from.

Test Plan:
1) Create two courses, 1 enabled and 1 disabled
2) Add an item as a course reserve to both courses
3) Edit the course reserve data for the item via the enabled course
4) Note the course item is enabled ( easy way is to check the database )
5) Edit the same course reserve data, but via the disabled course
6) Note the course item is now disabled even though it is part of
   an enabled course!
7) Apply this patch
8) Repeat steps 1 through 5
9) Note the course item is still enabled

Signed-off-by: Margaret Holt <mholt@bastyr.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit d10adb26aa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 4739952294)
2016-02-11 19:07:20 +01:00
Kyle M Hall 56242f3452 Bug 15530 - Add Unit Test
Signed-off-by: Margaret Holt <mholt@bastyr.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 31ffdbf49a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit cd7d29440f)
2016-02-11 19:00:14 +01:00
Jonathan Druart 5ffe29c646 Bug 15188: Do not remove unused auths if zebra is not reachable
Other conn errors should be checked (wrong user/pwd, etc.)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a60943bc1b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 67b3f0196e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 18:59:02 +01:00
Alex Arnaud 61c4621217 Bug 15188 - Fixes remove_unused_authorities.pl will delete all authorities if zebra is not running
Test plan:

1) Shut down zebra: koha-zebra-ctl.sh stop
2) Execute the script: remove_unused_authorities.pl (with -t if you
   don't want to really delete from your database).
3) Check that the script would have deleted all the authorities (eg:
   31449 authorities parsed, 31449 deleted and 0 unchanged because
   used).
4) Apply patch
5) Run, notice that the script dies because zebra is unavailable

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 128e7f54b1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 6b6213deea)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 18:57:37 +01:00
Jonathan Druart c3ed8d4152 Bug 6679: (follow-up) fix 9 perlcritic violations in C4/TmplTokenType.pm
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 8ca35dc7a9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8022419f58)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 18:56:39 +01:00
Mason James cf83f047ca Bug 6679 - Fixing code so it passes basic Perl:::Critic tests
opac/ilsdi.pl: Stricture disabled at line 217, column 17.  See page 429 of PBP.  (Severity: 5)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f2eb968145)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit a6f2231b4f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 18:55:50 +01:00
Mason James e6282f66ca Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Installer/PerlModules.pm
Expression form of "eval" at line 71, column 9.  See page 161 of PBP.  (Severity: 5)

Expression form of "eval" at line 85, column 13.  See page 161 of PBP.  (Severity: 5)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0e356b214e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit f8bd7e7179)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 18:55:01 +01:00
Mason James f44d4ba891 Bug 6679 - [SIGNED-OFF] fix 9 perlcritic violations in C4/TmplTokenType.pm
- Subroutine prototypes used at line 86, column 1.  See page 194 of PBP.  (Severity: 5)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ae546e3ade)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 25344fa446)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 18:54:29 +01:00
Jonathan Druart af677b11d1 Bug 2669: Change checkboxes to radio buttons on dictionary
On creating new dictionary for report, the choice between "All dates"
and "Date range" should be a real radio button, not 2 radio buttons with
different names (which means they could be selected altogether...)

Note that I don't understand what means 'All dates', there is no
condition generated for the dictionary. We should not have to select a
field if we don't want to add a condition on it :)

Test plan:
Create a new dictionary for the Patron module, then a date field
(dateenrolled or birthdate, etc.)

Confirm that the radio buttons now behave as radio buttons...

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Looks so much nicer too!

Radio buttons display as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit bb6658c2e6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 58f3635e6c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-02-11 18:51:59 +01:00
Frédéric Demians da58b67a1a Release notes 3.20.8 2016-01-28 10:35:34 +01:00
Frédéric Demians 01387008e9 Update .po files 2016-01-28 10:29:49 +01:00
Frédéric Demians 89ee474548 RMaint Increment version to 3.20.8
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-01-25 19:49:10 +01:00
Jonathan Druart 97a888908a Bug 15602: Remove cursor:pointer
With the href attribute, the cusor will be displayed as a pointer.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 394d32eb35)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 8f2f6fab0a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2016-01-25 17:13:24 +01:00