]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 12152: Holds to pull report - Display location descriptions
Jonathan Druart [Wed, 25 Nov 2015 16:40:37 +0000 (16:40 +0000)]
Bug 12152: Holds to pull report - Display location descriptions

...instead of their code

Test plan:
Same as before, confirm the the location codes are replaced with their
descriptions.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a901ed155a56a2c4ab95bb7bc951e2a0a7d04277)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 0ee6451023ca0c973052bcf685e9ab329a390927)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 12152: Holds to pull report - Show branch names and item type descriptions
Katrin Fischer [Sun, 22 Nov 2015 02:38:30 +0000 (03:38 +0100)]
Bug 12152: Holds to pull report - Show branch names and item type descriptions

The 'Holds to pull' report shows branch and itemtype codes without
this patch. With the patch, names and descriptions should display.

To test:
- Make sure there are some holds for available items in your system
- Go to Circulation > Holds to pull
- Verify changes mentioned above in the list of holds shown

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described, although as Magnus mentioned, Locations
still use codes instead of descriptions.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0f7f6a5cb32cd2e68bc39e8464147852347be310)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 773d7e2d1faa449ea1bd6f28d2422a195388686e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBUG 11602: [ENH] Fix localcover display
Nicholas van Oudtshoorn [Thu, 15 May 2014 05:27:48 +0000 (13:27 +0800)]
BUG 11602: [ENH] Fix localcover display

Adds a css class of thumbnail to local covers.
Don't show the 1px "No image found" image
(since we'll ususally try another image provider)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Box with "No cover image availabe" fixed when syspref OPACLocalCoverImages
set to display

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit a06793dc584212dde20f985740691b7e49074c76)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 24ba596672f6537db8fcb5b54bf5017bd6d41a6e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 13024 [QA Followup] - Add nonpublic note to relatives' checkouts
Kyle M Hall [Tue, 1 Dec 2015 17:49:55 +0000 (17:49 +0000)]
Bug 13024 [QA Followup] - Add nonpublic note to relatives' checkouts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fc050984699e6831fdb354c77d065a08567beb9f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 13c4a8e77a0a798fb63edded881d56fdafc874f1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 13024 - Nonpublic note not appearing in the staff client
Kyle M Hall [Fri, 24 Apr 2015 14:41:58 +0000 (10:41 -0400)]
Bug 13024 - Nonpublic note not appearing in the staff client

The nonpublic note for items is not displayed in the staff client. It
should be displayed in the following areas:
1) Checkouts (circulation.pl)
2) Checkins (returns.pl)
3) Record details ( moredetail.pl )

Test Plan:
1) Ensure your non-public note field is mapped to the
   items.itemnotes_nonpublic database column
2) Edit an item, add a test nonpublic note
3) Check out the item, verify the note is visible in the checkouts table
4) Check in the item, verify the note is visible in the checkins table
5) View the item details, verify the note is visible and editable
   if your account has the rights to edit items

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 717878982f985b9f40f9eedec5e576efd62976ff)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit a5b993672fc2b87a51d4944616e5f303992d4f3f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15250: Fix Perl error on acqisition stats page
Katrin Fischer [Wed, 25 Nov 2015 17:18:04 +0000 (18:18 +0100)]
Bug 15250: Fix Perl error on acqisition stats page

To test:
- Go to reports -> Acquisitions statistics
- Populate with the following values:

   Acquisitions statistics
      Received on.
         Row:    checked
         Column: checked
         From:   01/01/2015
         To:     Un-selected

    Cell value
       Count items

    Output: To screen into the browser: checked

- Running the report will trigger the following error:

   Software error:
   Can't locate object method "field" via package "aqorders.datereceived" (perhaps you forgot to load "aqorders.datereceived"?) at /usr/share/koha/intranet/cgi-bin/reports/acquisitions_stats.pl line 293.

- Apply the patch and repeat test
- Verify the report now works correctly

Note: Patch was created from notes and suggested
      fix on the bug report, written by Barton Chittenden.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d9cef35b75770104494c2f4a01d975f367b515bf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit cd693a52b8306f1bdc66804fb84fe17cadcd658f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15256: Fix items table display on the detail page
Jonathan Druart [Wed, 25 Nov 2015 17:08:43 +0000 (17:08 +0000)]
Bug 15256: Fix items table display on the detail page

Bug 14966 fixed a bug but introduced another one: With
IndependentBranches set to 'prevent', if the librarian (without the
superlibrarian permission) can edit items but not all, the table is
broken.  DataTables raises the following warning: "DataTables warning:
table id=DataTables_Table_1 - Requested unknown parameter '8' for row0."
And does not display correctly.

Test plan:
1/ Create a biblio record with 1+ items located in different places.
2/ Create/use a patron with the permission to edit items
3/ Set the IndependentBranches pref to 'prevent'
4/ With this patron logged in, go on the record detail page.
Without this patch, the display is broken (only 1 edit link and 1 td
missing, DataTables raises a warning).
With this patch, the display is correct.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  See the warning, and the broken table. Solved by this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d456acc7bfd2507ac7eaaf32bd6da1f023655886)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit ed13f4fe200352460b62376b01ba48d3ba51ae80)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15270: Add regression tests for Koha::Objects->find
Jonathan Druart [Tue, 1 Dec 2015 10:17:11 +0000 (10:17 +0000)]
Bug 15270: Add regression tests for Koha::Objects->find

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15270: Make Koha::Objects->find return undef instead of crashing
Jonathan Druart [Tue, 1 Dec 2015 10:16:43 +0000 (10:16 +0000)]
Bug 15270: Make Koha::Objects->find return undef instead of crashing

On 3.20.05, if AnonymousPatron is set to a nonexistent borrowernumber, the about.pl crashes with

  DBIC result type  isn't of the type Borrower at /home/koha/src/Koha/Objects.pm line 87.

This was fixed on master by
  commit 6882949b1b3bd1284e3d2877244a64edee3883ca
  Date:   Wed Apr 8 06:38:34 2015 -0400
      Bug 13967 - System preferences need a package

Test plan:
Set the AnonymousPatron pref to a nonexistent borrowernumber
Go on about.pl
Without this patch, you get the error.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Set AnonymousPatron pref to a nonexistent borrowernumber. Before the
patch, about.pl shows a nasty error. After applying the patch the
error is gone. Tests in t/db_dependent/Objects.t pass.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoRevert "Bug 11190: sitemap.pl -- Generate a Catalog sitemap"
Frédéric Demians [Sat, 5 Dec 2015 07:31:59 +0000 (08:31 +0100)]
Revert "Bug 11190: sitemap.pl -- Generate a Catalog sitemap"

This reverts commit ed166abbf3e4e0510d6fd14f9843b7fad1a5b686.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoRevert "Bug 11190: sitemap.pl -- Generate a Catalog sitemap"
Frédéric Demians [Sat, 5 Dec 2015 07:29:57 +0000 (08:29 +0100)]
Revert "Bug 11190: sitemap.pl -- Generate a Catalog sitemap"

This reverts commit e0a8173d10cc0f307dd95118e294c727c285e142.

This feature introduces new dependencies, and make UT failing without them,
which prevents package building.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agonew Debian package maintainer
Galen Charlton [Sat, 5 Dec 2015 01:26:11 +0000 (01:26 +0000)]
new Debian package maintainer

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
8 years agoBug 5371: (follow-up) Force no caching for private pages at the OPAC
Jonathan Druart [Thu, 1 Oct 2015 10:58:41 +0000 (11:58 +0100)]
Bug 5371: (follow-up) Force no caching for private pages at the OPAC

Same as previous patch for opac-messaging.pl and opac-readingrecord.pl

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit a988e9425ce1f8f4bf28b46473adac941d634973)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 5371: Force no caching for private pages at the OPAC
Jonathan Druart [Thu, 17 Sep 2015 11:45:15 +0000 (12:45 +0100)]
Bug 5371: Force no caching for private pages at the OPAC

In order no to slow too much the browsing, it is certainly not a good
idea to add this cache-control value for all pages at the OPAC.

This patch just adds where the author found it could be useful.

Test plan:
1/ Login at the OPAC
2/ Go on the account page (opac/opac-account.pl)
3/ Click log out
4/ Use the back button of your browser
Without this patch you will see the previous page.
With this patch, the previous page will be reloaded and you will be
redirected to the login form.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 542ab0bce949eba3abc98ff1c433fe6099db105d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14978: (RM followup) DBIx update
Tomas Cohen Arazi [Wed, 4 Nov 2015 15:09:06 +0000 (12:09 -0300)]
Bug 14978: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3cab4d1efd25268441c88ce74d5a4b568773c8aa)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14978: DBRev 3.20.06.001
Frédéric Demians [Wed, 2 Dec 2015 07:32:45 +0000 (08:32 +0100)]
Bug 14978: DBRev 3.20.06.001

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14978: Add unique key constraint on issues.itemnumber
Jonathan Druart [Thu, 8 Oct 2015 08:15:57 +0000 (09:15 +0100)]
Bug 14978: Add unique key constraint on issues.itemnumber

The constraint might have existed before bug 14069.
For these DB, this patch will restore it, for others, it will add it :)

Test plan:
> show create table issues;
should not return "unique key itemnumber"
Execute the updatedb entry twice
> show create table issues;
should return only one "unique key itemnumber"

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e1d8d8c5e357a56f88c78eca52ccbb37902d43c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoKoha release 3.20.6 v3.20.06
Frédéric Demians [Mon, 30 Nov 2015 18:13:45 +0000 (19:13 +0100)]
Koha release 3.20.6

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoTranslation updates for Koha 3.20.6 release
Bernardo Gonzalez Kriegel [Mon, 30 Nov 2015 11:47:29 +0000 (08:47 -0300)]
Translation updates for Koha 3.20.6 release

New languages: Malayalam and Occitan

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 11190: sitemap.pl -- Generate a Catalog sitemap
Frédéric Demians [Sun, 3 Nov 2013 16:05:38 +0000 (17:05 +0100)]
Bug 11190: sitemap.pl -- Generate a Catalog sitemap

Add a script sitemap.pl to process all biblio records from a Koha
instance and generate Sitemap files complying with this protocol as
described on http://sitemaps.org. The goal of this script is to be able
to provide to search engines direct access to biblio records. It avoid
leaving search engine browsing Koha OPAC and so generating a lot of
traffic, and workload, for a bad result.

Thanks Magnus for testing, and helping to improve the script design.

[2015.04.16] Switch from Moose to Moo.

[2015.08.20] Add complete (more) UT.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
All options to the script work as expected and the output looks
good. Nice enhancement!

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
I signed-of my own patch after fixing various QA errors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: replace tabs with spaces.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca341f6840ad7eb9170ce49f1ed6869b3e468297)

8 years agoBug 11190: sitemap.pl -- Generate a Catalog sitemap
Frédéric Demians [Sun, 3 Nov 2013 16:05:38 +0000 (17:05 +0100)]
Bug 11190: sitemap.pl -- Generate a Catalog sitemap

Add a script sitemap.pl to process all biblio records from a Koha
instance and generate Sitemap files complying with this protocol as
described on http://sitemaps.org. The goal of this script is to be able
to provide to search engines direct access to biblio records. It avoid
leaving search engine browsing Koha OPAC and so generating a lot of
traffic, and workload, for a bad result.

Thanks Magnus for testing, and helping to improve the script design.

[2015.04.16] Switch from Moose to Moo.

[2015.08.20] Add complete (more) UT.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
All options to the script work as expected and the output looks
good. Nice enhancement!

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
I signed-of my own patch after fixing various QA errors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: replace tabs with spaces.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca341f6840ad7eb9170ce49f1ed6869b3e468297)

8 years agoBug 15198: Change wording of OpacSuppression system preference
David Cook [Tue, 17 Nov 2015 06:18:05 +0000 (17:18 +1100)]
Bug 15198: Change wording of OpacSuppression system preference

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Paragraph rewording successfully

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30a0365e915cce4e9b08bde790db69ef6d8ce9bd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15198: Make OpacSuppression work even if there are no records suppressed
David Cook [Tue, 17 Nov 2015 02:03:59 +0000 (13:03 +1100)]
Bug 15198: Make OpacSuppression work even if there are no records suppressed

This patch adds the Zebra special attribute 14 to ccl.properties and
opac-search.pl, so that we can turn on OpacSuppression and still return
results even if there are no records in Zebra for the Suppress index.

_TEST PLAN_

Before applying:

1) Make sure that you have no suppressed records indexed in Zebra
2) Turn on OpacSuppression system preference

3) Search using a keyword which should bring up records
4) Note that no records are returned in the results
5) Change UseQueryParser system preference to "Try"
6) Repeat steps 3-4

Apply the patch.

After applying:

7) Repeat step 3 (ie search using a keyword which should bring up records)
8) Confirm that records are appearing in the results!
9) Change UseQueryParser system preference to "Do not try"
10) Repeat step 3
11) Confirm that records are appearing in the results!

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. No more, won't need to have at least one record with the
value "1" in the field mapped with this index. All records in OPAC returned.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dd9a4ed6c6fbc078d43880e4adf8cfe28179888d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14264: Fix export of late orders when translated
Jonathan Druart [Sun, 24 May 2015 15:52:25 +0000 (17:52 +0200)]
Bug 14264: Fix export of late orders when translated

Bug 7298 tried to fix this issue, but it was not correct.
We have 3 files in acqui/csv:
basketgroup.tt, basket.tt and lateorders.tt
The first 2 don't contain translatable string, and are not modified on
translating the templates (`translate install`)
On the contrary, lateorders.tt has some strings to translate ('Author:',
'Published by:', etc.). After being translated, all carriage returns
between TT tags are removed.

Test plan:
1/ choose a language and update + translate the templates
for instance:
  cd misc/translate;
  ./translate update es-ES; ./translate install es-ES
2/ Go to acqui/lateorders.pl using this language
3/ Generate a csv for 1+ late orders and confirm the first line only
contains the headers.

Signed-off-by: Laurence Lefaucheur <laurence.lefaucheur@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b2706884a1916827229ad6f818790ec47a43cbf5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15215: Remove warning due to misuse of UNIVERSAL
Colin Campbell [Thu, 19 Nov 2015 12:15:34 +0000 (12:15 +0000)]
Bug 15215: Remove warning due to misuse of UNIVERSAL

Calling UNIVERSAL's internal methods will cause a depreciation
warning in perls less that 5.22 as of 5.22 the warning is a fatal
error causing compilation to abort

Replace the use UNIVERSAL with UNIVERSAL::can to work around the
buggy construct perldoc UNIVERSAL::can for more info

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No more worning/error
No qa errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d69b6c048077fc028941870d1912b325076800c1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 4502: Changing wording again...
Jonathan Druart [Tue, 22 Sep 2015 11:11:34 +0000 (12:11 +0100)]
Bug 4502: Changing wording again...

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Just a string patch, others are signed.
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 379329861d19b178f14d360d9fee2518a462d8a7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 4502: An attempt to make things more sensible.
Mark Tompsett [Mon, 6 Apr 2015 23:50:30 +0000 (19:50 -0400)]
Bug 4502: An attempt to make things more sensible.

The reason the budget_period_id was not defined was because in
two cases it was not passed! This patch adds those missing
parameters. And as a result, cuts out the attempt to default the
authcat to '' unless the budget_period_id is defined.

Additionally, the start and end months don't seem to be passed,
so rather than have it blow up, checking them forces the else
case logic.

budget_period_id is the budget id. If you have two budgets,
you can craft a URL to work with budget_period_id matching
those two ids. Anything else should trigger the new error which
was modified to reflect more of what the problem is.

Follow the test plan in comment #6. Feel free to also to attempt
crafting URLs and triggering errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Well, works and does not explode any more
No errors

To trigger the new message simply put /cgi-bin/koha/admin/aqplan.pl
on your staff page, an intriguing 'Planning for by Asort1' appears :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fea7b9b4d444a6bdf3f1326c54eddd68670be7f7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 4502: Catch software error if no active budget defined
Jonathan Druart [Tue, 24 Mar 2015 14:54:37 +0000 (15:54 +0100)]
Bug 4502: Catch software error if no active budget defined

TEST PLAN
---------
0) Back up your database.
1) In mysql client:
   > DROP DATABASE {your koha database name};
   > CREATE DATABASE {your koha database name};
   > QUIT;
2) Go to the staff client, and install all the default
   and optional things -- except patrons. :)
3) Log into staff client.
4) Create a patron -> New Patron -> Staff
5) Enter data and Save
6) More -> Set Permissions
7) Make superlibrarian
8) Log out
9) Log in as new superlibrarian
10) Acquisitions -> Budgets -> New Budget
11) Enter a non-active budget with some funds.
    -- Once saved, it should list in the inactive budgets.
12) Click on the name.
13) Click on one of the Planning submenu options.
14) Click the 'Submit' button in the Filter area.
    -- This should trigger the blow up.
15) Apply the patch
16) Repeat steps 12-15
    -- The kaboom is avoided and a nice message given.

NOTE: This does not solve all the problems in this ugly, ugly
      module area. It does solve the one thing it is meant to:
      that nasty kaboom.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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@theke.io>
(cherry picked from commit 0a391237710aec779b000c3dff219e54b22fb76a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15047: 655 URL not clickable in opac-detail.
Winona Salesky [Thu, 22 Oct 2015 13:22:47 +0000 (09:22 -0400)]
Bug 15047: 655 URL not clickable in opac-detail.

Test Plan:

1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac  record details
3) Find or create a record with MARC tags 655
4) Perform an opac search and select records with 655 field, select record and review details page.
5) Check that 655 field is clickable.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bcec2166a4777aa9f3c406da9a2d133814fd7c58)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 13411: (QA followup) Add logging
Kyle M Hall [Mon, 2 Mar 2015 14:06:58 +0000 (06:06 -0800)]
Bug 13411: (QA followup) Add logging

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit feafa273e443e56021959153e91bd999a68daf29)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 13411: Koha's SIP server returns not ok for checking in items that are not checke...
Kyle M Hall [Thu, 27 Aug 2015 14:56:22 +0000 (10:56 -0400)]
Bug 13411: Koha's SIP server returns not ok for checking in items that are not checked out

If an item is not checked out when a checkin via SIP2 is attempted,
Koha's SIP server sends back an "ok" of 0, and the AF message "Item
not checked out". I am not entirely sure this is good and correct
behavior by the SIP2 protocol.

In particular, this will cause SIP2 book sorting devices to fail on
all items that are not checked out, causing them all to be put into
the "special handling" been that should be reserved for things like
items checked in at the wrong library and items on hold.

Test Plan:
1) Apply the patch for bug 13159 so you can use the new enhanced
   SIP2 command line emulator
2) Use a command similar to the following to check in an item:
   sip_cli_emulator.pl -a localhost -su <sip user> -sp <sip password> -l <instituation id> --item <barcode> -m checkin
3) Note the 3rd character is 0, and there is an AF field saying the item is not checked out
4) Apply this patch
5) Restart the SIP server
6) Repeat steps 2-3, note that nothing has changed
7) In the SIP config file, Add the parameter checked_in_ok="1" to the SIP account you are using.
8) Restart the SIP server
9) Repeat steps 2-3, note that this time the 3rd character is 1, and you do not recieve the item not checked out message.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 181d3aa56de8377c67247db26932c4e5a7cb83d9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15175: Respect IntranetBiblioDefaultView syspref
Frédéric Demians [Wed, 11 Nov 2015 17:59:35 +0000 (18:59 +0100)]
Bug 15175: Respect IntranetBiblioDefaultView syspref

Respect IntranetBiblioDefaultView on intra search result page, on cover image
link, when XSLTResultsDisplay is empty.

TO TEST:

1. Empty XSLTResultsDisplay
2. Activate intranet local and Amazon cover images
3. Play changing IntranetBiblioDefault, and observe the links respectively on
   biblio record title and cover image. Title's link is OK, cover image
   link goes to detail.pl page independently of IntranetBiblioDefault.
4. Apply the patch.
5. Repeat 3.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Link to right display according with IntranetBiblioDefaultView is fixed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
http://bugs.koha-community.org/show_bug.cgi?id=14175
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fe08231f427bdc65b1ff1219ad7507c284f1dbd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15171: Display subscriptions which will expire in the future
Jonathan Druart [Wed, 11 Nov 2015 09:36:16 +0000 (09:36 +0000)]
Bug 15171: Display subscriptions which will expire in the future

Since the form on the subscription check expiration page let the user choose an
expiration date > today, there is no sense to hide subscriptions which will expire in the future.

Test plan:
0/ Make sure you have at least subscription with an expiration date > today
1/ Start a seach on the check expiration page (serials/checkexpiration.pl)
with a date < today, = today and > today
=> The subscription won't never be displayed without this patch.
With this patch, it will.

Note that you will get a "No results for your query" message only if you
have search for something.

Followed testplan, 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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 78c1b0198841d832f8aca2c1a8e7d8baffe8a08c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15114: Fix typo in opac-suggestion template
Jonathan Druart [Fri, 13 Nov 2015 15:45:04 +0000 (15:45 +0000)]
Bug 15114: Fix typo in opac-suggestion template

There is a $ in front of the loggedinusername variable, which is
obviously not what is expected here.

It fixes the wrong warning message "You are not authorized to see
pending purchase suggestions." when it should be "There are no pending
purchase suggestions."

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 621f2ce9ac960d93466c9da5b4c6559e71519e3d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15189: Do not close STDERR when running in background mode
Jonathan Druart [Fri, 13 Nov 2015 16:22:03 +0000 (16:22 +0000)]
Bug 15189: Do not close STDERR when running in background mode

The batch records modification tool close STDERR, it's useless and hide
warnings/errors.

Like the other processes using the BackgroundJob module, this one should
let it open.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7be97133eeb350fa65fea667a149d000bf348ecc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15109: Make name the default sort order for all patron searches
Jonathan Druart [Fri, 13 Nov 2015 09:18:43 +0000 (09:18 +0000)]
Bug 15109: Make name the default sort order for all patron searches

Find another place where there is a patron search (add user to a basket,
add users to a fund or edit owner of a fund, set a guarantor to a child,
etc.).
Do a search a confirm that the results are now sorted by name instead of
cardnumber.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit defcfd050ebb0a4b6734274f7710f23944abf852)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15109 - Regression in patron search results ordering
Jonathan Druart [Fri, 13 Nov 2015 09:17:49 +0000 (09:17 +0000)]
Bug 15109 - Regression in patron search results ordering

In Koha 3.16 or earlier, before the introduction of the ajax datatable
for patron searching, the search results were ordered by name. In
master, the results are currently ordered by cardnumber, which is not
very useful.

Test Plan:
1) Do a "browse by last name" or a patron search
2) Note the results are sorted by card number
3) Apply this patch
4) Reload the page, start a new search
5) Note the results are sorted by name

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc65a5fed2afd27b2a45af49d6fe08d54fef7de9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15182: Conditionally load Koha::NorwegianPatronDB
David Cook [Tue, 17 Nov 2015 01:36:16 +0000 (12:36 +1100)]
Bug 15182: Conditionally load Koha::NorwegianPatronDB

This patch loads Koha::NorwegianPatronDB if it can, or adds a warning
to the log if it can't load it.

Since the Koha::NorwegianPatronDB functionality in C4::Members is
wrapped in system preferences, the loading of the module is
irrelevant unless one actually wants to use the module and its
associated functionality.

NOTE:

This patch fixes a problem where we were getting errors saying
Crypt::GCrypt couldn't be loaded even though it's not a required
dependency.

This patch will likely only affect people not using Debian-based
systems where libcrypt-gcrypt-perl is available. The current
version of Crypt::GCrypt doesn't build so it's not an option
for most non-Debian users to install this not required
dependency in order to work around this issue...

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1801a9462e190231f3303b01247b834f6e1d99bd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15133: encode correctly email generated by runreport.pl
Frédéric Demians [Thu, 5 Nov 2015 07:45:25 +0000 (08:45 +0100)]
Bug 15133: encode correctly email generated by runreport.pl

/misc/cronjobs/runreport.pl send badly encoded email in text/csv
(partially ok in HTML).

TEST:

1. Send by email a report containing a subject with accented characters
   and resultset with accented characters. For example:

   ./runreport.pl --subject="éèà" --to=me@home.org  1
   ./runreport.pl --format=html --subject="éèà" --to=me@home.org  1

   The first email contains badly encoded subject & message. The second email
   contains badly encoded subject, but correct message.

2. Apply the patch

3. Repeat 1 => No more strange characters.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Characters are correctly encoded now, thanks for that good spot.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9515db57bdd13cdff33d9056963455fb850ad877)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15120: runreport.pl cronjob doesn't allow custom subjects anymore
Liz Rea [Wed, 4 Nov 2015 02:33:40 +0000 (15:33 +1300)]
Bug 15120: runreport.pl cronjob doesn't allow custom subjects anymore

To test, well do something like

misc/cronjobs/runreport.pl --subject="My fancy subject!" --to=you@youraddress.com 1
where 1 is the number of your favourite saved report.

Success is your email arrives with the subject "My fancy subject!" Failure is
(with --subject defined) you get either the description of the report, or "Koha
saved report" as the subject. This is success without --subject defined.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Bug repeatable and fixed by this patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4f8476e09c2de223f73692521b8f8e533ef8400f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14542: Transliterate rule for all single quote forms
Fridolin Somers [Thu, 16 Jul 2015 15:48:14 +0000 (17:48 +0200)]
Bug 14542: Transliterate rule for all single quote forms

Single quotes in common language (not in programming) are usually ', but
there is also the form known as &rsquo; in HTML.  See
https://fr.wikipedia.org/wiki/Apostrophe_%28typographie%29

This bug proposes to transliterate all forms into a space.

Test plan :
(I'll use the code &rsquo; instead of the unicode character)
- Without the patch
- Create a record with title : L&rsquo;avion d&rsquo;argile
- Index this record
- Search for "L&rsquo;avion d&rsquo;argile" => You find the record
- Search for "L'avion d'argile" => You do not find the record
- Apply patch
- Search for "L&rsquo;avion d&rsquo;argile" => You find the record
- Search for "L'avion d'argile" => You find the record
- Search for "L avion d argile" => You find the record

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b11eb03a4c9674f4f4dedadaa8790257e30fb1d0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14078: (followup) converting from ISO5426 is not complete
Fridolin Somers [Wed, 29 Apr 2015 10:35:00 +0000 (12:35 +0200)]
Bug 14078: (followup) converting from ISO5426 is not complete

Conversion of MARC from ISO5426 is defined in C4::Charset::char_decode5426().
Each character or combined characters conversion is defined in a map.

This patch adds missing conversions.

See http://www.gymel.com/charsets/MAB2.html

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 636050f9be374fc15acad8b047c1ae227d38b225)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14078: converting from ISO5426 is not complete
Fridolin Somers [Wed, 29 Apr 2015 10:24:23 +0000 (12:24 +0200)]
Bug 14078: converting from ISO5426 is not complete

Conversion of MARC from ISO5426 is defined in C4::Charset::char_decode5426().
Each character or combined characters conversion is defined in a map.

This patch changes some odd actual conversions.

In char_decode5426(), only characters between 0xC0 and 0xDF will be used for combining with following charater :
  ($char >= 0xC0 && $char <= 0xDF)
So conversion like "$chars{0x81d1}=0x00b0" will never be used.
Rules for "h with breve below" use combining with 0xf9 but looks like the correct caracter is 0xd5.

See http://www.gymel.com/charsets/MAB2.html

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e3882bcecede59f24a6b3c4aa9c4324390a29c3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15154: Allow correct translation for upload local cover image
Hector Castro [Sat, 7 Nov 2015 06:16:02 +0000 (00:16 -0600)]
Bug 15154: Allow correct translation for upload local cover image

To test:
-Set syspref LocalCoverImages and OPACLocalCoverImages to Allow
-A new tab 'Images' appear in bib record detail on Intranet.
-Notice about the phrase "Please upload one"
-Apply the patch and reload the page.
-New phrase appear "Select the image file to upload" with button Upload
-Update translation files : cd misc/translator; perl translate update es-ES
-You will see in es-ES-staff-prog.po the new entry
"Select the image file to upload. %sUpload%s"
-You can see the result installing the translation
cd misc/translator ; perl translate install es-ES

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  A native English speaker could confirm that the wording is ok: Please select
  the image file to upload

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dfa757af927aaa5b80a4dd8c90210d12531cfcd7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15137: Display ISBN and author info when sending list by email
Jonathan Druart [Fri, 13 Nov 2015 15:18:56 +0000 (15:18 +0000)]
Bug 15137: Display ISBN and author info when sending list by email

Disclaimer: this is not caused by bug 14544 :)
And can be backported!

Both isbn and author information are missing when a list is sent by
email.
Emails sent from OPAC and staff should be (almost) the same.

Test plan:
1/ Sent a list by email (Button "Send list")
2/ The email you will receive should contain the isbn and author info

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
On top of last patch of Bug 14544
Works ok, mail with authors and ISBN
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb286ebbc3c594e8e81e1e8b1848ca1d52b8bccb)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 6657: Prevent biblionumber to be duplicated
Jonathan Druart [Thu, 17 Sep 2015 13:31:55 +0000 (14:31 +0100)]
Bug 6657: Prevent biblionumber to be duplicated

If the biblionumber field is displayed in the framework, on editing a
biblio the field/subfield will be duplicated.
To prevent that this patch adds a check when building the field list.

Test plan:
1/ map biblio.biblionumber with 999$c
2/ Display 999$c in a framework
3/ Edit a biblio using this framework
4/ Save => The field should not have been duplicated

5/ map biblio.biblionumber with 001
6/ Display 001 in a framework
7/ Edit a biblio using this framework
8/ Save => The field should not have been duplicated

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, aldo removes duplicate values.
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9ae556a21243ecae669bda2c5f42a67769ae9d78)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14795: Prevent modifying a record without using the original framework
Jonathan Druart [Fri, 13 Nov 2015 16:30:32 +0000 (16:30 +0000)]
Bug 14795: Prevent modifying a record without using the original framework

The origin framework is not passed on modifying the records and so the
default one is used.
This can caused data lost.

Test plan:
- Create a bibliographic record and specify a framework (not the default
one).
- Use the Batch records modification tools to modify it.
=> Without this patch, the default framework (framework code "") is used
and can deteriorate the record
=> With this patch, the record is saved using the original framework

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested framework is lost using tool without patch
Problem gone with patch
No qa errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c1aeaf62b9c08d35449aa9822504de8ce79fec62)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15079: Batch Delete Records Error
Kyle M Hall [Thu, 29 Oct 2015 11:48:02 +0000 (07:48 -0400)]
Bug 15079: Batch Delete Records Error

When using the batch deletion tool, if the script attempts to delete an
undeletable item, the script will die with the error:

Label not found for "next BIBLIONUMBER" at
/usr/share/koha/intranet/cgi-bin/tools/batch_delete_records.pl line 172.

Test Plan:
1) Attempt to batch delete a record with an item that cannot be deleted
2) Note error
3) Apply this patch
4) Repeat step 1
5) Note the error no longer occurs

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Follow comment 5 to reproduce the issue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I have not tested this patch, but looking at the code it is obviously a mistake.
If an error occured, we rollback and skip this record.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 706a31b50d52ef1ba48c568d7e60c376cfe87983)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14553: Silencing warn triggered when clearing item rating on OPAC
Aleisha [Tue, 21 Jul 2015 18:38:58 +0000 (18:38 +0000)]
Bug 14553: Silencing warn triggered when clearing item rating on OPAC

To test:

1) Go to any item and clear the star rating (don't have to set a rating first)
2) Notice the warn
3) Apply patch and reload page
4) Clear star rating
5) Notice no warn
6) Click a star to add a rating
7) Make sure your rating, the average rating and amount of votes are all
   correct
8) Could be beneficial to log in as another user and try to add a rating on the
   same item from their account. Check the average rating is
   cacalculated and amount of votes increases
9) Confirm still no warns

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Can see the warning in logs, and its disappearance with this patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 94c5f8d5f06b588da0903c9607349adbf16344be)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14735: Save cache_expiry on modifying a report
Jonathan Druart [Tue, 10 Nov 2015 15:17:12 +0000 (15:17 +0000)]
Bug 14735: Save cache_expiry on modifying a report

The cache_expiry is not saved when updating a SQL report.

Test plan:
0/ Enable memcached
1/ Create a sql report
2/ Edit it and change the cache expiry value
3/ Edit again
=> The value should have been updated.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Repeatable bug. Solved with this patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 27a15d5a429620dbad0a16292d714e3389ea057e)

8 years agoBug 15011: koha-indexer should define the --pidfiles on starting the daemon
Jonathan Druart [Wed, 14 Oct 2015 13:20:38 +0000 (13:20 +0000)]
Bug 15011: koha-indexer should define the --pidfiles on starting the daemon

The --pidfiles options is not provided on starting the daemon and the is_indexer_running consider that the daemon is not running

Test plan:
koha-indexer start
koha-indexer stop

should start and stop the zebra daemon wuthout any error.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested on kohadevbox:ansible

sudo debian/scripts/koha-indexer --stop kohadev
sudo debian/scripts/koha-indexer --start kohadev
sudo debian/scripts/koha-indexer --restart kohadev

All work as expected on the different scenarios.

(cherry picked from commit 0ba1fb9e7739e66f57199bba2b4809e539a00237)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14575: Fix typo in opac-basket.tt
Jonathan Druart [Tue, 10 Nov 2015 09:06:32 +0000 (09:06 +0000)]
Bug 14575: Fix typo in opac-basket.tt

No more typo in the codebase.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a0460ecc0abbe5f69554ab3885775e55b6a25fe0)

8 years agoBug 14575: Fix typo OPACurlOpenInNewWindow vs OPACURLOpenInNewWindow
Jonathan Druart [Mon, 9 Nov 2015 11:01:02 +0000 (11:01 +0000)]
Bug 14575: Fix typo OPACurlOpenInNewWindow vs OPACURLOpenInNewWindow

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 004fa5ac4448fc1dedf9a74774b2ee0b1ec67f77)

8 years agoBug 14575: OPACURLOpenInNewWindow should apply to item-level urls too
David Cook [Tue, 21 Jul 2015 03:09:39 +0000 (13:09 +1000)]
Bug 14575: OPACURLOpenInNewWindow should apply to item-level urls too

This patch applies the OPACURLOpenInNewWindow system preference
to item-level urls (in addition to the pre-existing bib-level url
handling).

_TEST PLAN_

Before applying:

1) Set OPACURLOpenInNewWindow to "don't" and click on an item-level url
2) Note that the current tab changes to that url
3) Set OPACURLOpenInNewWindow to "do" and click on an item-level url
4) Note that the current tab changes to that url

Apply the patch.

After applying:

5) Click on an item-level url
6) Note that the url opens in a new tab (as OPACURLOpenInNewWindow
should be set to "do")
7) Set OPACURLOpenInNewWindow to "don't" and click on an item-level
url
8) Note that the url opens in the current tab

9) Repeat the above steps 5-8 alternating
"TrackClicks" between "Don't track" and either "Track" or
"Track anonymously".

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e815d1e010a20b73327cba1eaa78d08f06ec50a8)

8 years agoBug 14743: addorder.pl redirect problems under plack behind apache 2.4.10
Kyle M Hall [Thu, 5 Nov 2015 13:24:51 +0000 (13:24 +0000)]
Bug 14743: addorder.pl redirect problems under plack behind apache 2.4.10

I can't quite figure this out. When I run CGI version of Koha, I see following response (recorded using tcpdump):

HTTP/1.1 302 Found
Date: Thu, 27 Aug 2015 13:28:41 GMT
Server: Apache/2.4.10 (Debian)
Location: /cgi-bin/koha/acqui/basket.pl?basketno=5610
Vary: User-Agent
Content-Length: 0
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: text/x-perl

However, when running behind apache 2.4.10 on Debian wheezy I see chunked response:

HTTP/1.1 302 Found
Date: Thu, 27 Aug 2015 13:21:28 GMT
Server: Apache/2.4.10 (Debian)
Vary: User-Agent
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/x-perl

60
Transfer-Encoding: chunked
Date: Thu, 27 Aug 2015 13:21:28 GMT
Connection: keep-alive

0

0

This response doesn't work in firefox (where it reports page not found) nor in chrome (where it returns lines below 60 on screen).

In the template the hidden input 'basketno' is listed twice. What the cgi script reads in the parameter, what is does is concat the values of the multiple basketno instances together createing what is likely an invalid basketno. For reasons beyond my understanding this is what triggers this error!

Test Plan:
1) Using plack, add an order to a basket from an external source
2) Note the error
3) Apply this patch
4) Add an order to a basket from an external source
5) Note you get no error!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 237c1483ddf22babb4f1bfd4dfa3e7120c2d8cd9)

8 years agoBug 15036: Do not overwrite complete status in basket ops
Colin Campbell [Tue, 20 Oct 2015 13:19:35 +0000 (14:19 +0100)]
Bug 15036: Do not overwrite complete status in basket ops

Reopening or closing a basket should preserve the completed
status for receipted orders.

This patch excludes orderlines with the completed status
from having their status rewritten as a result of the
change in basket status

Made the subroutines involved more efficient by removing an
unnecessary loop and by not fetching a large amount of
superfluous data

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4a4dbbf1237c93e0233eef0600015c9be3320bf0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14867: userid not generated when defined in BorrowerUnwantedField
Fridolin Somers [Tue, 22 Sep 2015 07:49:39 +0000 (09:49 +0200)]
Bug 14867: userid not generated when defined in BorrowerUnwantedField

When userid is not provided when creating a new patron, it is generated
using surname and firstname.  The bug is when userid is defined in
syspref BorrowerUnwantedField, the input text is missing in patron
creation form. When saving you always get an alert message :
"Username/password already exists". No patron can be created.

This patch corrects by adding this case to userid generation conditions.

Test plan :
- add 'userid' in syspref BorrowerUnwantedField
- try to create a new patron : /cgi-bin/koha/members/memberentry.pl
- there is not input text for userid
- choose non-existing surname and firstname
- click on save
  => Without patch : patron is not created, you see the alert message
     "Username/password already exists"
  => With patch : patron is created, userid is generated with surname
     and firstname
- remove 'userid' in syspref BorrowerUnwantedField and check it can be
  defined in patron creation form

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  The issue is there, and this patch fixes it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0cbc65111c735e699d94d50ad09c17fb7b7b8913)

8 years agoBug 14388: Funds should be sorted by budget_code
Jonathan Druart [Thu, 2 Jul 2015 15:42:16 +0000 (16:42 +0100)]
Bug 14388: Funds should be sorted by budget_code

Before this patch, the funds were sorted by budget_id, which does not
make any sense.

This patch adds a sort by budget_code on the fund list (acqui/acqui-home.pl and
admin/aqbudgets.pl)

Test plan:
On both pages (acqui/acqui-home.pl and admin/aqbudgets.pl) confirm that
the funds are now sorted by fund code (DB column budget_code)

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e0032c46e98b4cf31d76abb93d12041ea362d81e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14687: Patron's transaction history changes items' order after paying fines.
Joonas Kylmälä [Mon, 17 Aug 2015 12:40:05 +0000 (12:40 +0000)]
Bug 14687: Patron's transaction history changes items' order after paying fines.

Sorts Patron's accounting data consistently from newest to oldest.
It doesn't depend on anymore to timestamp (which can be same for multiple
entries) from database but instead uses accountline's id to sort.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 307fe0ac533c2dc8116a183d104c864717a91fc5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 12540: Display "Every" on editing a MMT action if previously selected
Jonathan Druart [Tue, 22 Sep 2015 10:16:28 +0000 (11:16 +0100)]
Bug 12540: Display "Every" on editing a MMT action if previously selected

On creating a marc modification template action, the "All" is changed with
"Every" if the condition field is the same as the original field.

But on editing, the "All" value is not replaced. For consistency, it
should.

Test plan:
1/ Create the following action:
    Copy field 650$x to 650$y if 650$z matches "foobar"
Note that the "All" is replaced with "Every" when the condition is the
same field as the original field.
2/ Save
3/ Edit the action.
The "Every" should be selected.

Without this patch, "All" is selected.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 384dceeef583c444ac8350c928a2e1aed34e536b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15151: Avoid DB access to load C4::Members
Tomas Cohen Arazi [Fri, 6 Nov 2015 14:21:56 +0000 (11:21 -0300)]
Bug 15151: Avoid DB access to load C4::Members

In order to avoid loading Koha::NorwegianPatronDB a DB query was
used. Instead, a require should be used. This causes non-db_dependent
tests that load C4::Members to fail.

To test:
- Shut mysql down
  $ sudo service mysql stop
- Run the tests:
  prove t/Circulation_barcodedecode.t
=> FAIL: DB connection is expected, tests fail
- Apply the patch
- Run the tests:
  prove t/Circulation_barcodedecode.t
=> SUCCESS: Tests pass
- Sign off .-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
cherry-picked from f25fe6ddb4a340f12613784dc841ab5bfd672d6b
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15035: Anti-spam for opac-suggestions - FOLLOW-UP
Mason James [Wed, 16 Sep 2015 01:56:23 +0000 (13:56 +1200)]
Bug 15035: Anti-spam for opac-suggestions - FOLLOW-UP

to test this patch...

1/ enable 'suggestion' and 'AnonSuggestions' sysprefs

2/ edit the koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt file,
    to reveal the hidden 'negcap' field

   replace line 87 opac-suggestions.tt, from...
     <li id="negcap" style="position: absolute; left: -2000px;">
   to ...
     <li id="negcap">

3/ attempt to add another suggestion, and populate the 'negcap' field
   adding the suggestion is supposed to fail, but actually succeeds!?  :/

4/ apply patch

5/ repeat step 3, suggestion attempt should fail as expected

modified:   opac-suggestions.pl

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Confirmed insertion with negcap before patch.
With negcap value suggestion fails silently
Without negcap suggestion is inserted
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6b31947c3bb6517ecdc7d21440ba79895c270749)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15130: useless unitialization warnings when updating authorities
Lyon3 Team [Wed, 4 Nov 2015 16:06:10 +0000 (17:06 +0100)]
Bug 15130: useless unitialization warnings when updating authorities

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Fixes a trivial coding error.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c94dc79878c727b47f0617548613e1b7f5794a3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14632: Fix alert message for single item batch
Indranil Das Gupta [Mon, 3 Aug 2015 04:27:53 +0000 (09:57 +0530)]
Bug 14632: Fix alert message for single item batch

Fixes the incorrect msg "Please select at least label to delete."
for attempts to delete from single patron batches. Notifies the
user that doing so will delete the batch. It disallows direct
deletion, instead suggests the users to use the 'Delete batch'
option assuming the users know what they are doing.

Test plan
=========

1/ Load a single patron batch in edit mode and attempt to delete
   the single record. The JS alert message will inform that "Please
   select at least label to delete."
2/ Apply patch and refresh page and try to delete the single record
   again.
3/ This time the alert will inform the user that doing so will delete
   the batch and should that be desired action to choose the 'Delete
   batch' option from the toolbar.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  It works as before but with an understantable warning message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 85ae12e5864d8fd35f42a53c66440f00f7f4a35d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15117: Transfer Order: Better user information and translation handling
Marc Véron [Wed, 4 Nov 2015 09:13:46 +0000 (10:13 +0100)]
Bug 15117: Transfer Order: Better user information and translation handling

While transferring an order, a untranslatable JavaScript confirmation
dialog pops up.

This patch moves the information about the order to be transferred to the
top of the screen to better inform the user what order is to be transferred,
and simplifies the confirmation dialog.

To test:
- Apply patch
- Transfer an order from a basket to another basket
- Verify, that on top of the screen an information is displayed about which
  order from which vendor and basket is to be transferred
- Verify that the transfer works OK
- Update a po lang file and confirm you see the string and you are able
  to translate it.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Dialog box with readable & translatable info.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 571ec9a94b9323cd23f9012d9b1f837fd9bf974c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14673: Work around change to AddIssue return
Colin Campbell [Tue, 11 Aug 2015 15:51:53 +0000 (16:51 +0100)]
Bug 14673: Work around change to AddIssue return

Return from AddIssue used to be due date or undef.
Now it is less straightforward returning am issue object
if an issue row is created or undef. If the issue is a renewal
undef is returned. As that case was not handled properly it
caused the server site to crash the listener causing a
communications error on the client.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b4967bf0ed60c5cca0c7f60591d21d2919f477a1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14781: Creation of barcode types 2of5 not functional
Marc Véron [Fri, 4 Sep 2015 07:50:07 +0000 (09:50 +0200)]
Bug 14781: Creation of barcode types 2of5 not functional

This patch fixes the rendering of "COOP2of5" or "Industrial2of5" barcodes in the label creator module.

To test:
- Create a label layout with COOP2of5 barcode type
- Create labels (make sure that the items's barcode values are numeric only!)
- Export batch and download PDF.

Without patch:
- No barcodes rendered
With patch
- Barcodes should render as expected. Test for both barcode types.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, tested both formats.
Non digit barcode is not printed.

No koha-qa errors, no t/ & xt/ errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: To be printed, barcode should be numerical.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2b88f0cb38d74da93a723fd1cf3cbcf68030649e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14157: Notices tab in the patron record should not depend on EnhancedMessagingPre...
Sophie Meynieux [Wed, 4 Nov 2015 18:04:26 +0000 (19:04 +0100)]
Bug 14157: Notices tab in the patron record should not depend on EnhancedMessagingPreferences to display

Overdue and Hold notices can be sent even if EnhancedMessagingPreference
is set to "Don't Allow", so Notices tab have to be visible in all cases.

Test plan :
  - without patch :
    - set EnhancedMessagingPreference to "Don't Allow" and go to patron
      record : there is no Notices tab
    - set EnhancedMessagingPreference to "Allow" and og to patron
      record: there is a Notices tab

  - apply this patch :
    - go to patron record, you cas see a Notices tab
    - change the value of EnhanceMessagingPreferences, Notices tab is
      always visible.

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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 471b1a8b69ff3842fbddda1e0aa068d439c85a0d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15123: Acquisition: Better context for "Transferred from..." to avoid ambiguity...
Marc Véron [Wed, 4 Nov 2015 09:58:50 +0000 (10:58 +0100)]
Bug 15123: Acquisition: Better context for "Transferred from..." to avoid ambiguity in translation

This patch moves the word "basket" out of the <a> tags to have a better context for translation.

To test:
- Transfer an order from one basket to another basket
- Verify that "basket" is detached from the strings "Transferred to" rsp
  "Transferred from" by th <a> tag (See screenshot)
- Apply patch
- Verify that the word "basket" is now otuside the <a> tags

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 25bd92bc3e7271541817660963155468e12b4eda)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14955: Don't double encode chars in the "Show more" link
Jonathan Druart [Mon, 5 Oct 2015 10:17:23 +0000 (11:17 +0100)]
Bug 14955: Don't double encode chars in the "Show more" link

Bug 13789 has fixed this issue for the facet links (select/unselect) but
not for the "Show more" facets link.

This patch reuses the "url" variable, generated for the facets, for
these links. A new "local_url" variable is used to build links for each
entry.

Test plan (for OPAC and intranet):
- Search for a very common term
- Filter the results using facets
- You should get more than 5 entries for a facet and 1 selected:
Author
 author 1
 author 2 [x] # Selected
 author 3
 author 4
 author 5
 Show more # you see this link if there is 5+ values for this facet
- Click on the Show more link
Without this patch, the url contains double-encoded characters and you
will certainly don't get any results
With this patch, you should get results.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit abe5c30973bb708c1a6e72ff450152c6466fd04b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15066: Make transfer rotating collection works under Plack
Jonathan Druart [Tue, 27 Oct 2015 09:21:24 +0000 (09:21 +0000)]
Bug 15066: Make transfer rotating collection works under Plack

This patch the 2 following errors:
Undefined subroutine &C4::RotatingCollections::transferbook called at
C4/RotatingCollections.pm line 451.
Undefined subroutine &C4::RotatingCollections::GetTransfers called at
C4/RotatingCollections.pm line 450.

And this warning:
"my" variable $colId masks earlier declaration in same scope at
/home/koha/src/rotating_collections/transferCollection.pl line 75.

Test plan:
Create a rotating collection
Transfer it to another branch
It should work with this patch

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1ef0b3c47168c13c98bc839a2de9ef4d76b44560)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15014: Returns 0 if everything went fine
Jonathan Druart [Fri, 16 Oct 2015 09:02:26 +0000 (09:02 +0000)]
Bug 15014: Returns 0 if everything went fine

Be kind and return 0 if the sample file has been generated correctly.
Otherwise you are a bad guy and you make Plack returns an internal error
(exited nonzero: 1 at /home/vagrant/kohaclone/tools/import_borrowers.pl line 390.)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Works as expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected here too.

(cherry picked from commit 314f3e22d969b05ffd0590153707fd0c673987be)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15059: Line break in html attribute in branchoverdues.tt
Fridolin Somers [Mon, 26 Oct 2015 07:44:17 +0000 (08:44 +0100)]
Bug 15059: Line break in html attribute in branchoverdues.tt

In circ/branchoverdues.tt, there is a line break inside href attribute.
This generates an attribute with a lot of spaces %20.

Test plan :
- at intranet go to ciculation module
- click on "Overdues with fines"
- look at links "Phone", "Notice" and "Considered lost"
=> Without patch the URL contains a lot of spaces
=> With patch the URL is correct

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3e0b35c15db408593b0d1a1a4c381750f8d3bec8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 10799: Limit the SCO user to the SCO module
Jonathan Druart [Wed, 2 Sep 2015 16:13:41 +0000 (17:13 +0100)]
Bug 10799: Limit the SCO user to the SCO module

The SCO user should only be allowed to access to the SCO module.

This patch make the session ends if the user tries to access another
page after the SCO module.

Test plan:
0/ Configure the SCO module correctly
1/ Go on the sco main page (sco/sco-main.pl)
2/ Try to go somewhere else: you should not be logged in

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 02feeca14f4c27a05f46920545734c3a9e5455d7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15061: Can't add item to rotating collection
Bernardo Gonzalez Kriegel [Tue, 3 Nov 2015 15:16:08 +0000 (12:16 -0300)]
Bug 15061: Can't add item to rotating collection

This patch prevents adding items to invalid (empty)
rotating collection id

To test:
1) Go to /cgi-bin/koha/rotating_collections/addItems.pl
2) Try to add an item, you get error show in attached pictures
3) Apply the patch
4) Go again to /cgi-bin/koha/rotating_collections/addItems.pl
5) Can't add any items

I don't know if this is a real problem

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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fff73a73837d577214fa3a9198fa97f8a50471f3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15068: Get rid of warnings in members/summary-print.pl
Marc Véron [Tue, 27 Oct 2015 11:38:32 +0000 (12:38 +0100)]
Bug 15068: Get rid of warnings in members/summary-print.pl

This patch removes warnings when printing a summary from a member's
detail page, like:

- use of uninitialized value in sprintf
  at /usr/share/kohaclone/members/summary-print.pl line 47

- Use of uninitialized value $roadtype in concatenation (.) or string
  at /usr/share/kohaclone/members/summary-print.pl line 61

- Use of uninitialized value in addition (+)
  at /usr/share/kohaclone/members/summary-print.pl line 87

- Argument "2015-11-03 23:59:00" isn't numeric in numeric comparison
  (<=>) at /usr/share/kohaclone/members/summary-print.pl line 103

To test:
- Apply patch
- Go to a detail page with a member who has a lot of fines
- Print summary
- Verify that warnings like the ones above do no longer appear.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Have been able to see those warnings in Apache log file, and notice
  their disappearance after applying this patch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c292dde75b5e206045cef47d0be51235159a4b6d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14821: Do not list not returned items
Jonathan Druart [Tue, 15 Sep 2015 07:24:07 +0000 (08:24 +0100)]
Bug 14821: Do not list not returned items

On the checkin page, the table is always filled with info of the scanned
barcode, even if the checkin has failed.
When the checkin fails, there is already an error displayed, so there is
no need to keep a row for fails.

Test plan:
Confirm that the failed checkins don't appear anymore in the checkin
table.
- checkin an item which is not issued;
- BlockReturnOfWithdrawnItems is set and item is withdrawn;
- Not returned at the right place;
- privacy=2 and AnonymousPatron not correctly set;

Before this patch this behavior existed only for bad barcode.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I confirm that the checkin table hasn't to be populated with info on items
  which haven't been checked in.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8122df1f8788cbd695e06aa4c1acfa345da8cadc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14773: Move help link back out of the dropdown menu
Joonas Kylmälä [Tue, 8 Sep 2015 10:23:37 +0000 (10:23 +0000)]
Bug 14773: Move help link back out of the dropdown menu

This moves the help link back out of the dropdown menu
like it used to be.

To test:

1. Notice that in intra the help link is inside the dropdown
   menu.
2. Apply the patch
3. Notice that the help link is now clearly visible in the
   top right corner of the page.

Sponsored-by: Vaara-kirjastot
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 47e2b8f7d8360c059a66032f80dbb5f68b8fa925)

8 years agoBug 15094: Update link to Windows Offline Circ
Nicole C. Engard [Fri, 30 Oct 2015 20:28:09 +0000 (15:28 -0500)]
Bug 15094: Update link to Windows Offline Circ

This patch updates the link on the main circulation
page to point to the newest release of the offline
circulation tool.

To test:

* Go to Circulation
* Click 'Get desktop application'
* Confirm the link goes to github

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17bcc6a242fce21e759653b2b6c6778cdda336e8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 15010: Import patron tool creates 'duplicate' restrictions ( debarments )
Kyle M Hall [Wed, 14 Oct 2015 12:48:30 +0000 (08:48 -0400)]
Bug 15010: Import patron tool creates 'duplicate' restrictions ( debarments )

If a patron has restrictions and a CSV file of patrons to be overwritten
is uploaded but has no debarred / debarredcomment columns, the a new
restriction will be added that combines all the existing restrictions (
i.e. a new debarment based on the existing borrowers.debarred
and borrowers.debarredcomment fields ).

Test Plan:
1) Create a patron with one or more restrictions
2) Import a CSV file that updates that patron, but with no debarred columns
3) Note a new restrictions is created
4) Delete the new restriction
5) Apply this patch
6) Re-import the CSV file again
7) Note that no new restriction is created
8) Add debarred and debarredcomment columns to the CSV file with a test
   date and description
9) Re-import the CSV file again
10) Note the new restriction is added to the patron

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Daniel Grobani <dgrobani@samuelmerritt.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd123903651435c56ca14d88897e9ce4d7a38bb5)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
8 years agoBug 14671: Allow correct translation of CAS authentication
Fridolin Somers [Tue, 11 Aug 2015 08:19:05 +0000 (10:19 +0200)]
Bug 14671: Allow correct translation of CAS authentication

In authentication pages with CAS, the use of acronym or abbr tags does not allow a correct translation of the text.
See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5983#c7

It does not help a lot end users to know that CAS is Central Authentication Service, I think. Now one can custom the login page with NoLoginInstructions syspref to describe how to use the authentication.

This patch removes the use of acronym and abbr is authentication pages.

Test plan (example with fr-FR locale) :
- Without patch
- Update translation files : cd misc/translator ; perl translate update fr-FR
- You see in fr-FR-opac-bootstrap.po : msgid "If you have a "
- Is is translated in : msgstr "Si vous avez un compte "
- Apply patch
- Update translation files : cd misc/translator ; perl translate update fr-FR
- You see in fr-FR-opac-bootstrap.po : msgid "If you have a CAS account, %s please "
- You can now translate it : msgstr "Si vous avez un compte CAS, %s veuillez "
- Same test for intranet authentication page
- Install the translation : cd misc/translator ; perl translate install fr-FR
- Look at the result

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tranlated OK, tested in spanish es-ES

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9bdd33de213632168d7b4838fd6d83b5a9db00b8)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
8 years agoBug 10181: Acq - Improve message for deleted records
Jonathan Druart [Wed, 15 Apr 2015 09:30:17 +0000 (11:30 +0200)]
Bug 10181: Acq - Improve message for deleted records

There are some issues here:
1/ Message not translatable (set in the pl file)
2/ ' by 'displayed even if no author defined
3/ Message not the same every where
4/ Nothing displayed on the invoice page

Test plan:
1/ Create a basket
2/ Add 4 orders A, B, C, D
3/ On the basket, you see "$title by $author", or "$title" if no author
defined
4/ Delete order A, B
5/ Close the basket
6/ Receive B, C
7/ Delete record created for A, C
8/ Go on the basket page, you should see the title and "Deleted
bibliographic record, can't find title" for the deleted record
9/ Go on the invoice page, you should see the title and "Deleted
bibliographic record, can't find title" for the deleted record

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 431d217a5185af747a8e80080cb1f381585471fc)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
8 years agoBug 10181: Make string translatable
Jonathan Druart [Wed, 15 Apr 2015 08:54:48 +0000 (10:54 +0200)]
Bug 10181: Make string translatable

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 49f2837b2e75511becd09059db99d209917647a7)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBumping version number for 3.20.5 v3.20.05
Chris Cormack [Tue, 27 Oct 2015 20:42:10 +0000 (09:42 +1300)]
Bumping version number for 3.20.5

9 years agoRelease notes
Chris Cormack [Tue, 27 Oct 2015 20:28:25 +0000 (09:28 +1300)]
Release notes

9 years agoBug 15042: Barcode hbyymmincr does not work when receiving serials
Magnus Enger [Wed, 21 Oct 2015 11:11:28 +0000 (13:11 +0200)]
Bug 15042: Barcode hbyymmincr does not work when receiving serials

To test:
- Set autoBarcode = <branchcode>yymm0001
- Make sure you have a serial that is set to "create an item record
  when receiving this serial"
- Receive an issue
- Click in the barcode field - nothing happens
- Apply patch and reload page
- Receive an issue
- Click in the barcode field - a barcode conforming to the
  hbyymmincr setting appears

Patch works as advertised.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 55127d50fb0a00f70d5de06dee76ddfad54bd094)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoTranslation updates for Koha 3.20.5 release
Bernardo Gonzalez Kriegel [Sun, 25 Oct 2015 09:29:48 +0000 (06:29 -0300)]
Translation updates for Koha 3.20.5 release

9 years agoBug 15027: Correct Type in C4::Items perldoc
Mark Tompsett [Mon, 19 Oct 2015 13:26:11 +0000 (09:26 -0400)]
Bug 15027: Correct Type in C4::Items perldoc

As noted in the bug report, there is a typo.
This corrects that typo in documentation.

TEST PLAN
---------
1) perldoc C4::Items
2) Find GetItemsForInventory
   -- note that status is spelt incorrectly.
3) Apply patch
4) repeat steps 1-2
   -- note that status is spelt correctly now.
5) git diff origin/master
   -- note only that line changed.
6) run koha qa tools

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  This typo patch could hit the highway to master at high speeds.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: add a comma at the end of the line
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad9c1733f8c7c7c38e02dc71c78d60e02260779f)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 15012: use sudo instead of su in koha-shell
Jonathan Druart [Wed, 14 Oct 2015 13:45:24 +0000 (13:45 +0000)]
Bug 15012: use sudo instead of su in koha-shell

Not sure this is the best way to fix it but it looks to work.

Test plan:
  sudo koha-shell kohadev
should not return any error
Without this patch, you should get
  bash: cannot set terminal process group (-1): Inappropriate ioctl for device
  bash: no job control in this shell

Confirm that other options work as before

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Tested on kohadevbox:ansible.
KOHA_CONF and PERL5LIB are correctly set on the child shell.
Bonus point: koha-shell doesn't die if the user issues Ctrl+C to abort an execution.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0e9e51db94abdabe6e603d98a05bf315c8d3fa91)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14154: 608$9 defined twice in UNIMARC biblio-koha-indexdefs.xml
Fridolin Somers [Wed, 6 May 2015 07:14:42 +0000 (09:14 +0200)]
Bug 14154: 608$9 defined twice in UNIMARC biblio-koha-indexdefs.xml

In DOM config file :
etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml, the 608$9 is
defined a second time instead of 610$9.  Just a type I think.

Test plan :
- Apply patch
- Install a UNIMARC + DOM instance
- Define in a framework 610 using a thesaurus
- Create a new biblio
- Create a new authority (same type as the thesaurus defined above)
- Index : rebuild_zebra.pl -a -b -x -z
- Link the field 610 to the new authority
- Index : rebuild_zebra.pl -a -b -x -z
- In authorities search, search for the new authority
=> You see Use in 1 Records(s)

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I confirm the typo.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aaf3ff3fec54011b30ba302e0c13e3ec5e41a142)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 15029: Make the IssueSlip tests pass even if launched after 23:00
Jonathan Druart [Mon, 19 Oct 2015 15:17:31 +0000 (16:17 +0100)]
Bug 15029: Make the IssueSlip tests pass even if launched after 23:00

Prior to this patch, the tests did not pass if they were launched after
23:00.
DateTime complains if you ask for creating a date with hour => 24 (which
is logical so far).

Test plan:
0/ Don't apply this patch
1/ sudo date -s "2015-10-19 23:50:00";prove
t/db_dependent/Members/IssueSlip.t
2/ Apply this patch and repeat 1.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 00a4e802edf999ffbd16b15704eeb5fca4a73f84)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14937: Expiration date for holds based onReservesMaxPickUpDelay should not requir...
Kyle M Hall [Thu, 1 Oct 2015 16:59:26 +0000 (12:59 -0400)]
Bug 14937: Expiration date for holds based onReservesMaxPickUpDelay should not require ExpireReservesMaxPickUpDelay

C4::Letters::_parseletter will replace reserves.expirationdate with the
date a hold will be marked as problematic ( holds over ) if both
ReservesMaxPickUpDelay and ExpireReservesMaxPickUpDelay are enabled.
There is no reason this feature needs to rely on
ExpireReservesMaxPickUpDelay as there are many libraries that would like
to send the last day to pick up a hold in notices, but would rather deal
with the expired waiting holds manually rather than have Koha cancel
them automatically.

Test Plan:
1) Apply this patch
2) Set ReservesMaxPickUpDelay to 7
3) Disable ExpireReservesMaxPickUpDelay
4) Add reserves.expirationdate to your HOLD notice
5) Fill a hold for a patron
6) View the message, not that reserves.expirationdate is replaced
   with the date the hold will be marked as problematic

Signed-off-by: Karl Holton <kholten@switchinc.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c6d0202569146f52898363eda621f771b61cc918)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 11298: Don't force the renew time to 23:59
Jonathan Druart [Tue, 4 Aug 2015 15:33:00 +0000 (16:33 +0100)]
Bug 11298: Don't force the renew time to 23:59

If you try to renew an item using the "Renewal due date" at the bottom
of the checkouts table, the time will be hardcoded to 23:59 no matter
what the user has chosen.

Test plan:
Check an item out to a patron
renew the item and specify a due date using the datetime picker plugin
at the bottom of the table
Confirm the time you have chosen is correctly used.

Followed test plan. It works as advertised.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a011cbd2e2658598e4c2eac7377b9b1edb9dd720)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14990: Format the date template-side for moremember
Jonathan Druart [Fri, 9 Oct 2015 08:14:33 +0000 (09:14 +0100)]
Bug 14990: Format the date template-side for moremember

Test plan:
print slip and show the member detail page, the 3 dates date of birth,
date enrolled and date of expiry should be displayed correctly.

Followed test pan, 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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6506ddd1e859c3afbb9519d6a956495c06d628ce)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Conflicts:
members/moremember.pl

9 years agoBug 14966: Table header broken at detail.tt
Rafal Kopaczka [Tue, 6 Oct 2015 12:57:52 +0000 (14:57 +0200)]
Bug 14966: Table header broken at detail.tt

For user without item edit permission, table at catalogue/detail.pl is
corrupted.

Test plan:
1) Log in as staff member, without edit item permission.
2) Go to biblio view, with items attached:
/cgi-bin/koha/catalogue/detail.pl?biblionumber=X. Confirm that table
does not display correctly.
3) Apply patch.
4) Repeat steps 1 and 2. Confirm patch works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 390233a10c789a241f948f0f41df92fda3e51052)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14653: Acq planning export always use default active period
Fridolin Somers [Thu, 6 Aug 2015 08:49:03 +0000 (10:49 +0200)]
Bug 14653: Acq planning export always use default active period

In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code
- IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);

This patch corrects the export form.

Test plan :
- Create an active budget "B_ACTIVE" with 1 fund
- Create an inactive budget "B_OLD" with 3 funds
- Go to "B_OLD" planning by libraries
- You see 3 funds
- Click on "Submit" in export form
=> Without patch, you get the planning of "B_ACTIVE" with 1 fund
=> Without patch, you get the planning of "B_OLD" with 3 funds by libraries

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

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 852075d48e84c519c6bf0a28d492c1dafd291f0d)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14653: Acq planning filter always use default active period
Fridolin Somers [Thu, 6 Aug 2015 08:49:03 +0000 (10:49 +0200)]
Bug 14653: Acq planning filter always use default active period

In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code :
- IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);

This patch corrects the filter form.

Test plan :
- Create an active budget "B_ACTIVE" with 1 fund
- Create an inactive budget "B_OLD" with 3 funds
- Go to "B_OLD" planning by libraries
- You see 3 funds
- In filter form, select "by months" in "Select planning type"
=> Without patch, you see planning of "B_ACTIVE" with 1 fund
=> Without patch, you see planning of "B_OLD" with 3 funds

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 837fa140e7c6621b3cfa9b0ce825844cac4543f5)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14858: removed record length limit test
Barton Chittenden [Mon, 21 Sep 2015 15:57:43 +0000 (08:57 -0700)]
Bug 14858: removed record length limit test

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1acb998beb245ff038ea81e72d765eb101ca6b0a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14950: Fix day formatting if < 10
Jonathan Druart [Thu, 15 Oct 2015 12:50:44 +0000 (13:50 +0100)]
Bug 14950: Fix day formatting if < 10

$dt->day return a single digit if < 10, we want to display it on 2
digits

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14950: Remove unused variable $today_iso
Jonathan Druart [Tue, 6 Oct 2015 10:50:36 +0000 (11:50 +0100)]
Bug 14950: Remove unused variable $today_iso

This variable is not used anymore in the template (and has never been
used...).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1cd0bff64b3e0cae8808c9f8872dd57a66bb8de)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>