]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 19105 - XSS Stored in holidays.pl
Amit Gupta [Tue, 15 Aug 2017 03:53:13 +0000 (09:23 +0530)]
Bug 19105 - XSS Stored in holidays.pl

To Test
1. Hit the page /cgi-bin/koha/tools/holidays.pl
2. Select the date
3. Add a text in the field Title and Description that contains js
4. Save the page.
5. Notice js is execute
6. Apply patch and reload, the js is escaped

Fixed for all holidays

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1ceb4367c6879be812b600487385c53bb005260d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 16069 - XSS issue in basket.pl page
Amit Gupta [Tue, 15 Aug 2017 17:28:02 +0000 (22:58 +0530)]
Bug 16069 - XSS issue in basket.pl page

1. Hit /cgi-bin/koha/acqui/basket.pl?basketno=xx<script>alert('amit')</script>
   xx - is a basketno
2. Notice the java script is executed.
3. Apply patch.
4. Reload page, and hit the page again /cgi-bin/koha/acqui/basket.pl?basketno==xx<script>alert('amit')</script>
   xx - is a basketno.
5. Notice it is no longer executed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 91711087e93e5da6265bac329791e45afb7d354f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19079 - XSS Flaws in Membership page
Amit Gupta [Fri, 11 Aug 2017 15:38:14 +0000 (21:08 +0530)]
Bug 19079 - XSS Flaws in Membership page

1. Hit /cgi-bin/koha/members/moremember.pl?borrowernumber=xx<script>alert('amit')</script>.
   xx - is a borrowernumber
2. Notice the java script is executed.
4. Apply patch.
5. Reload page, and hit the page again /cgi-bin/koha/members/moremember.pl?borrowernumber=xx<script>alert('amit')</script>.
   xx - is a borrowernumber.
6. Notice it is no longer executed.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4f48532c4f3bede64533af6415e507640e2ed6e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19033: XSS Flaws in Currencies and exchange page
Amit Gupta [Fri, 4 Aug 2017 04:14:52 +0000 (09:44 +0530)]
Bug 19033: XSS Flaws in Currencies and exchange page

1. Hit /cgi-bin/koha/admin/currency.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> search currencies box.
3. Notice the iframe is executed
4. Apply patch
5. Reload page, and enter iframe again on search currencies box.
6. Notice it is no longer executed

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fixes the issue, follows common practice on the codebase.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 08fe6c3c3a8b3370ea212b049573a8618cf1e9e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19034: (followup 2) Fix letters.tt XSS flaw
Jonathan Druart [Tue, 15 Aug 2017 16:26:12 +0000 (13:26 -0300)]
Bug 19034: (followup 2) Fix letters.tt XSS flaw

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9877aa340e75697cdb435eddf825451a93b91eaf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19034: (followup) Fix letters.tt XSS flaw
Tomas Cohen Arazi [Mon, 7 Aug 2017 14:27:33 +0000 (11:27 -0300)]
Bug 19034: (followup) Fix letters.tt XSS flaw

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d7ffd52dfd46190e630c1f25738e77d8d6ebebc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19034: XSS Flaws in Z39.50/SRU servers administration
Amit Gupta [Fri, 4 Aug 2017 05:11:49 +0000 (10:41 +0530)]
Bug 19034: XSS Flaws in Z39.50/SRU servers administration

1. Hit /cgi-bin/koha/admin/z3950servers.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> search Z39.50/SRU servers box.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on search Z39.50/SRU servers box.
6. Notice it is no longer executed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cd0c7ad870f4c2d202e2d6e31c1078bd29da979e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19034: XSS Flaws in Cities
Amit Gupta [Fri, 4 Aug 2017 05:08:12 +0000 (10:38 +0530)]
Bug 19034: XSS Flaws in Cities

1. Hit /cgi-bin/koha/admin/cities.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> search cities box.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on search cities box.
6. Notice it is no longer executed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8b294c5a4bece7086688fb44c7c45a1ee820247c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19034: XSS Flaws in Patron categories pages
Amit Gupta [Fri, 4 Aug 2017 05:04:19 +0000 (10:34 +0530)]
Bug 19034: XSS Flaws in Patron categories pages

1. Hit /cgi-bin/koha/admin/categories.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> search patron categories box.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on search patron categories box.
6. Notice it is no longer executed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 28b9a1246781fb45427a593703542a99600f6d1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19050 - XSS Flaws in Quick spine label creator
Amit Gupta [Mon, 7 Aug 2017 15:19:56 +0000 (20:49 +0530)]
Bug 19050 - XSS Flaws in Quick spine label creator

1. Hit /cgi-bin/koha/labels/spinelabel-home.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> barcode text box.
3. Notice the iframe is executed
4. Apply patch
5. Reload page, and enter iframe again on barcode text box.
6. Notice it is no longer executed

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 18b6e1f5272ee4e2c4c1971a4346c1759df4b3d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19051 - XSS Flaws in - Batch item modification page
Amit Gupta [Mon, 7 Aug 2017 16:13:56 +0000 (21:43 +0530)]
Bug 19051 - XSS Flaws in - Batch item modification page

1. Hit /cgi-bin/koha/tools/batchMod.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> in the Barcode list (one barcode per line) text area.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on Barcode list (one barcode per line) text area.
6. Notice it is no longer executed.
7. Fixes for both barcode and itemnumber.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0726c79361a22051b847e9fe8668ab6faf81479a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19051 - XSS Flaws in Batch item deletion page
Amit Gupta [Mon, 7 Aug 2017 15:54:44 +0000 (21:24 +0530)]
Bug 19051 - XSS Flaws in Batch item deletion page

1. Hit /cgi-bin/koha/tools/batchMod.pl?del=1
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> in the Barcode list (one barcode per line) text area.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on Barcode list (one barcode per line) text area.
6. Notice it is no longer executed.
7. Fixes for both barcode and itemnumber.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 560d5e472ae30d9f0d0984cd6dbf34ca12b0cae1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19051 - XSS Flaws in - Batch record deletion page
Amit Gupta [Mon, 7 Aug 2017 15:38:36 +0000 (21:08 +0530)]
Bug 19051 - XSS Flaws in - Batch record deletion page

1. Hit /cgi-bin/koha/tools/batch_delete_records.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> in the Record number list (one per line) text area.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on Record number list (one per line) text area.
6. Notice it is no longer executed.
7. Fixes for both biblio and authority records.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 63fce3cdb10637a14efa5ac61e9fb21e4b04e364)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19052 - XSS Flaws in - Invoice search page
Amit Gupta [Mon, 7 Aug 2017 16:47:14 +0000 (22:17 +0530)]
Bug 19052 - XSS Flaws in - Invoice search page

1. Hit /cgi-bin/koha/acqui/invoices.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> Invoiceno,
   ISBN/EAN/ISSN, Title, Author, Publihser, Publication year search box.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on Invoiceno,
   ISBN/EAN/ISSN, Title, Author, Publihser, Publication year search box.
6. Notice it is no longer executed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 44c25d74b64ed9f125362e9627c7f9bc5635d369)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19052 - XSS Flaws in vendor search page
Amit Gupta [Mon, 7 Aug 2017 16:34:30 +0000 (22:04 +0530)]
Bug 19052 - XSS Flaws in vendor search page

1. Hit /cgi-bin/koha/acqui/booksellers.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> vendor search box.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on vendor search box.
6. Notice it is no longer executed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d8b1c8fc7d9ba254b1e71d1501abfae4102e7eea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19054 - XSS Flaws in Report - Top Most-circulated items
Amit Gupta [Mon, 7 Aug 2017 17:04:05 +0000 (22:34 +0530)]
Bug 19054 - XSS Flaws in Report - Top Most-circulated items

1. Hit /cgi-bin/koha/reports/cat_issues_top.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> in Callnumber, Day, Month, Year search box.
3. Notice the iframe is executed.
4. Apply patch.
5. Reload page, and enter iframe again on Callnumber, Day, Month, Year search box.
6. Notice it is no longer executed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 755a1fb372b29443b7d128c4c710f7a7ed63f189)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19078 - XSS Flaws in System preferences
Amit Gupta [Thu, 10 Aug 2017 16:21:38 +0000 (21:51 +0530)]
Bug 19078 - XSS Flaws in System preferences

1. Hit /cgi-bin/koha/admin/preferences.pl
2. Enter <script>alert('amit')</script> in search system preferences box.
3. Notice the java script is executed.
4. Apply patch.
5. Reload page, and enter <script>alert('amit')</script> in search system preferences box.
6. Notice it is no longer executed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b7bb60d76041bf00f6a28fe3a55ecc2c7912a275)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18726: Fix XSS at the OPAC - biblionumber
Jonathan Druart [Wed, 9 Aug 2017 17:08:24 +0000 (14:08 -0300)]
Bug 18726: Fix XSS at the OPAC - biblionumber

The biblionumber parameter is sent by the user, we must escape all of
them to avoid XSS.

Fixes: Cross-site scripting OPAC pages
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0676334968c27337cc1f3a3407ac6eeaef75f201)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18951: Adjust Isbd.t
Marcel de Rooy [Wed, 19 Jul 2017 11:59:45 +0000 (13:59 +0200)]
Bug 18951: Adjust Isbd.t

Add schema calls.
Remove an unneeded AddBiblio call.

Test plan:
Run t/db_dependent/Biblio/Isbd.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 40c719a5248877d200920c2c9a028e273a5f1370)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18951: Create data for TransformKohaToMarc.t
Marcel de Rooy [Wed, 19 Jul 2017 11:48:55 +0000 (13:48 +0200)]
Bug 18951: Create data for TransformKohaToMarc.t

Adding schema and caching statements.
Adjust it so that the Koha to MARC mappings are not assumed to be present,
but are created as needed.
Remove the mock on marcflavour. It is no longer needed.
Resolving a small typo.

Test plan:
Run t/db_dependent/Biblio/TransformKohaToMarc.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f839955db707415368d23ae81bdb14505dd058ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18951: Some t/Biblio tests are database dependent (git mv)
Marcel de Rooy [Wed, 19 Jul 2017 11:33:34 +0000 (13:33 +0200)]
Bug 18951: Some t/Biblio tests are database dependent (git mv)

Move Isbd.t and TransformKohaToMarc.t to db_dependent.
Next patch will add a few adjustments too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 50bc4170cec172de04db2033d464c96348d5a508)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18361: [QA Follow-up] Resolve warning on undef values supplied
Marcel de Rooy [Fri, 16 Jun 2017 05:57:14 +0000 (07:57 +0200)]
Bug 18361: [QA Follow-up] Resolve warning on undef values supplied

The following warning was raised in Letters.t:
DBIx::Class::ResultSource::_minimal_valueset_satisfying_constraint():
NULL/undef values supplied for requested unique constraint 'primary' (NULL
values in column(s): 'id'). This is almost certainly not what you wanted,
though you can set DBIC_NULLABLE_KEY_NOWARN to disable this warning.

This warning is triggered by this line in C4/Letters.pm:
    Koha::SMS::Providers->find( $member->{'sms_provider_id'} );
As you already guessed, the sms_provider_id returns undef.

Resolved in sub find by testing if there are parameters and if so, they
should not be all undefined. (In most cases there will be only one
parameter; but this report is about composite keys.)

Added a trivial test case in Objects.t too.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit e1afa469f8313144c70ae91d7efa356beb8168b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18361: (QA followup) Add tests for the no params case
Tomas Cohen Arazi [Wed, 19 Apr 2017 14:57:33 +0000 (11:57 -0300)]
Bug 18361: (QA followup) Add tests for the no params case

This patch adds a test for the trivial case in which no param is passed
and the ->find method returns undef.

For completeness purposes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e1f943b9992ea1a3c5d4659ca6fa787834d66376)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18361: Additional tests for Koha::Objects->find
Marcel de Rooy [Thu, 13 Apr 2017 11:15:30 +0000 (13:15 +0200)]
Bug 18361: Additional tests for Koha::Objects->find

Adding a subtest find in t/db_dependent/Koha/Objects.t.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit de74a4e5a0ec0fcf85a42b637d07c2bcd81d63f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18361: Koha::Objects->find should accept composite primary keys
Marcel de Rooy [Fri, 31 Mar 2017 11:52:15 +0000 (13:52 +0200)]
Bug 18361: Koha::Objects->find should accept composite primary keys

Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.

Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ec288a50def5c4fdcd7b001087fed0b120e4a211)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18539: remove occurrence in ReNewSubscription.t
Jonathan Druart [Thu, 15 Jun 2017 18:46:17 +0000 (15:46 -0300)]
Bug 18539: remove occurrence in ReNewSubscription.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ad7ff09b995e5275f2c6d664b31351321b1674af)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18539: Forbid list context calls for Koha::Objects->find
Jonathan Druart [Tue, 18 Apr 2017 16:49:18 +0000 (13:49 -0300)]
Bug 18539: Forbid list context calls for Koha::Objects->find

Reading https://perlmaven.com/how-to-return-undef-from-a-function
this sound like the more correct behaviour.

Considering:
$template->param(
    stuff => Koha::Stuffs->find( $id ),
    foo   => 1,
);
without this patch, if the $id does not represent any rows in the DB,
stuff will be assigned to 'foo' and $foo will be undef in the template.
That can lead to very bad side-effects.

With this patch we make sure that it will never happen again.

Test plan:
  prove t/db_dependent/Koha/Objects.t
should return green

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 15cbf14f4d4f8039ad7820ce37da202b19e0075d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18367 - (QA Followup) Only warn if doing a lookup and not having an item
Nick Clemens [Fri, 28 Jul 2017 11:38:33 +0000 (11:38 +0000)]
Bug 18367 - (QA Followup) Only warn if doing a lookup and not having an item

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1b73cae6eb4ce7e7ca675d6db84fe8ce0cd2f499)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18367 - Fix untranslatable string from Bug 18264
Nick Clemens [Tue, 11 Apr 2017 20:09:27 +0000 (16:09 -0400)]
Bug 18367 - Fix untranslatable string from Bug 18264

Restore display of message when no barcode found

To test:
1 - Go to course reserves
2 - Add an item to a course
3 - Try adding an invalid barcode - should get an alert
4 - Try force adding an item with itemnumber:
    http://localhost:8081/cgi-bin/koha/course_reserves/add_items.pl?op=lookpup&course_id=11&itemnumber=1234523546
5 - Should recieve an error

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1fc3751804146e92c0d8d85517ffcd6ec338808e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18991: [QA Follow-up] Use schema txn_begin and txn_rollback
Marcel de Rooy [Fri, 28 Jul 2017 09:58:24 +0000 (11:58 +0200)]
Bug 18991: [QA Follow-up] Use schema txn_begin and txn_rollback

We also need just one rollback at the end here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e5e5402f36c923775b341bd1900aa6468d42aa9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18991: Fix cleanup in t/db_dependent/Log.t
Lari Taskula [Thu, 27 Jul 2017 14:56:18 +0000 (14:56 +0000)]
Bug 18991: Fix cleanup in t/db_dependent/Log.t

There is an action_logs entry via logaction() without transaction to be rolled
back in t/db_dependent/Log.t. This leaves an entry in action_logs after
the test is over.

To replicate:
1. prove t/db_dependent/Log.t
2. Observe a new entry in action_logs table

To test:
1. Apply patch
2. prove t/db_dependent/Log.t
3. Observe there are no new entries in action_logs

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f49f5a67d3512ea75d92cb551ebd79a9de7e53d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18987 - Added Koha::Account package pragma to Patron.pm
Alex Buckley [Fri, 21 Jul 2017 08:47:48 +0000 (08:47 +0000)]
Bug 18987 - Added Koha::Account package pragma to Patron.pm

Test plan:
1. On an up to date branch go to Patrons and try to browse for a patron
by last name
2. Notice that the page processes indefinately
3. Apply patch
4. Repeat step 1
5. Notice the patron results are displayed

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac8e39d1e742b196677d395dc89d92848560b903)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 19000: Fix typo in closing p tag for items
Marcel de Rooy [Fri, 28 Jul 2017 05:56:21 +0000 (07:56 +0200)]
Bug 19000: Fix typo in closing p tag for items

Close the p tag and add a br tag to visually divide the two sections
Data problems and Warnings regarding system configuration.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Discovered the problem when testing a duplicate key in deleteditems.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3c87b6f387831053e01ecc86b91d61669af9696b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18545: Re-add call to enableCheckboxActions
Jonathan Druart [Mon, 24 Jul 2017 17:25:21 +0000 (14:25 -0300)]
Bug 18545: Re-add call to enableCheckboxActions

This call is used to refresh the page correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 37fc0d817d46d21897015a8e1df754b59ba477a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18545 [Follow-up] Remove use of onclick from OPAC Cart
Owen Leonard [Fri, 9 Jun 2017 15:50:41 +0000 (15:50 +0000)]
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart

This patch makes a few corrections:

- Use 'e.preventDefault()' instead of 'return false' in changed
  sections.
- Modify the event handler on checkboxes to successfully handle the
  un-check action as well as the check action. (QA comment 5).

To test, follow the original test plan.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 04a601ef659c64446790758ebbe369a2ce090875)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18545: Remove use of onclick from OPAC cart
Aleisha Amohia [Fri, 5 May 2017 03:58:49 +0000 (03:58 +0000)]
Bug 18545: Remove use of onclick from OPAC cart

To test:
1) Apply patch and add one or more items to your cart
2) Confirm that clicking the following things still works as expected:
 - more details
 - brief display
 - send
 - download
 - print
 - select all
 - clear all
 - selecting by clicking checkbox
 - remove title
 - add title to list
 - place hold
 - add tag
 - empty and close

Sponsored-by: Catalyst IT
Followed test plan, works as expected. Resolves issue with two
print dialogues from Bug 18544.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1b4d4f989b1d6c589a08f21ce19a48dca9072ec7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18605: Remove TRUNCATE from C4/HoldsQueue.pm
Marcel de Rooy [Mon, 15 May 2017 08:38:43 +0000 (10:38 +0200)]
Bug 18605: Remove TRUNCATE from C4/HoldsQueue.pm

Replaces TRUNCATE by DELETE, since truncate implicitly commits. We don't
need to do that here. (Would complicate testing it too.)
Fixes typo disablig.
Add a simple test to HoldsQueue.t.

Test plan:
Run t/db_dependent/HoldsQueue.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db64c94953be772fb316d508fdfffd374ea1d835)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18965 - branch transfer limits pagination save bug
Fridolin Somers [Thu, 20 Jul 2017 14:08:59 +0000 (16:08 +0200)]
Bug 18965 - branch transfer limits pagination save bug

In branch transfer limits, tables are paginated with 20 rows by default.

The bug is that datatable not only hides rows, they are not in form.
So when submitting form, rows not visible are erased.

Test plan :
Wihout patch :
- Create 22 branches, you can hack the creation form by manualling calling URL : /cgi-bin/koha/admin/branches.pl?op=add_validate&branchcode=Bxx&branchname=Bxx
- Go to Administration > Library transfer limits
- You see table first page : only 20 first rows are shown
- You see all checkboxes are checked
- Go to second page of this table
- Save
=> You see table first page with all checkboxes unchecked
With patch the is no pagination, all checkboxes are shown when you save

Signed-off-by: Axelle Clarisse <axelle.clarisse@univ-amu.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7a306d72ab98f2abf2266716761820f1098ede9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18977: Rollback branch in t/db_dependent/SIP/Message.t
Lari Taskula [Mon, 24 Jul 2017 15:30:10 +0000 (18:30 +0300)]
Bug 18977: Rollback branch in t/db_dependent/SIP/Message.t

To test:
1. Before applying patch, check the amount of branches in database
2. prove t/db_dependent/SIP/Message.t
3. See that a new branch is stored
4. Apply patch
5. prove t/db_dependent/SIP/Message.t
6. See that a new branch is no longer stored

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 139b66f65611cff0a2551662e0fd5c2e50b4c10f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18976: (follow-up) Fix t/db_dependent/Search/History.t cleanup
Lari Taskula [Mon, 24 Jul 2017 15:16:25 +0000 (18:16 +0300)]
Bug 18976: (follow-up) Fix t/db_dependent/Search/History.t cleanup

Same problem in t/db_dependent/Search/History.t.

To replicate:
1. Check the row count of borrowers, branches, categories, sessions, sms_providers
   tables
2. prove t/db_dependent/Search/History.t
3. Repeat step 1
4. Observe borrowers the following tables have increased in row count:
   - borrowers
   - branches
   - categories
   - sessions
   - sms_providers

To test:
1. Before applying the patch, go through steps at "To replicate" plan
2. Apply patch
3. Go through steps at "To replicate" plan
4. Observe step 4 no longer applies and those tables have the same number of
   rows as before executing the test.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6d8b26b01f505771fe0d359d29fff8bc963e5291)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18976: Fix t/db_dependent/Auth.t cleanup
Lari Taskula [Mon, 24 Jul 2017 13:43:18 +0000 (16:43 +0300)]
Bug 18976: Fix t/db_dependent/Auth.t cleanup

Test t/db_dependent/Auth.t seems to have an ineffective test data cleanup.
Data generated by TestBuilder is left in borrowers, branches, categories,
sms_providers and sessions tables after the test.

To replicate:
1. Check the row count of borrowers, branches and categories tables
2. prove t/db_dependent/Auth.t
3. Repeat step 1
4. Observe borrowers the following tables have increased in row count:
   - borrowers
   - branches
   - categories
   - sessions
   - sms_providers

To test:
1. Before applying the patch, go through steps at "To replicate" plan
2. Apply patch
3. Go through steps at "To replicate" plan
4. Observe step 4 no longer applies and those tables have the same number of
   rows as before executing the test.

This issue has been happening in REST tests as well, and this solution is
directly copy-pasted from t/db_dependent/api/v1/cities.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 99d18bf0f3f729261b6560f0dd3c5d757aba3a19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18832: Missing space between icon and label in button 'Patron lists'
Marc Véron [Wed, 21 Jun 2017 07:47:13 +0000 (09:47 +0200)]
Bug 18832: Missing space between icon and label in button 'Patron lists'

On page Home > Patrons the button 'Patron lists' misses a space between
icon and text. This patch adds it to make the button display like the other
ones.

To test, apply patch and verify that the button displays as expected.

Signed-off-by: fcouffignal <fcouffignal@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 85b895c2dfdf9499fdb12bd108c740144597c89e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18839: Suggestion.pl spelling mistake
Chris Kirby [Wed, 21 Jun 2017 18:27:21 +0000 (18:27 +0000)]
Bug 18839: Suggestion.pl spelling mistake

On the suggestion management page, 'unknown' is spelled 'unkown'

This patch corrects this spelling mistake in

suggestion/suggestion.pl

koha-tmpl/intranet-tmpl/prog/en/include/strings.inc

koha-tmpl/intranet-tmpl/prog/en/include/search_indexes.inc

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit afddf4145fbbfd978e4c5cd22f0ae2cbbef70560)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18918: Disable CSV option if no CSV profiles exist
Aleisha Amohia [Mon, 10 Jul 2017 02:31:22 +0000 (02:31 +0000)]
Bug 18918: Disable CSV option if no CSV profiles exist

To test:
1) Confirm you have no MARC CSV profiles (tools -> csv profiles)
2) Go to Tools -> Export data
3) Select the CSV file format for biblios
4) Notice the CSV profile dropdown shows up but the dropdown is empty
5) Click the Export button, notice Koha breaks
6) Go back and apply the patch, refresh
7) Notice the CSV option is now disabled in the file format menu
8) If you hover over CSV, an appropriate message should show explaining
why it is disabled
9) Create a CSV profile for MARC
10) Go back to Export and you should be able to use CSV now without
problem

Sponsored-by: Catalyst IT
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7723ffdd130996ec946d5b9149f90cb0cdc447fc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18982: Remove data in the correct order
Jonathan Druart [Wed, 26 Jul 2017 16:50:14 +0000 (13:50 -0300)]
Bug 18982: Remove data in the correct order

To respect FK

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6cb3abcbd95fe673d5b0426f5f8c23a0c7683e65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18982: Create a circ rule for the data we created
Jonathan Druart [Tue, 25 Jul 2017 19:49:38 +0000 (16:49 -0300)]
Bug 18982: Create a circ rule for the data we created

No need to have a default circ cule, we create one for the categorycode
and itemtype we are going to use.
The 3 checkouts will not be rejected (5 are allowed)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5b84987f28b43f0c92eeff9ed1067ed61f822a4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18982: Create a specific itemtype for these tests
Jonathan Druart [Tue, 25 Jul 2017 19:48:06 +0000 (16:48 -0300)]
Bug 18982: Create a specific itemtype for these tests

No need to require rentalcharge=0 for all itemtypes, we create our own.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ca0568f58393cff3fce6b362e59e90daa1b1524a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18982: category.categorycode must be uppercase
Jonathan Druart [Tue, 25 Jul 2017 19:46:08 +0000 (16:46 -0300)]
Bug 18982: category.categorycode must be uppercase

Otherwise it is not selected in the dropdown list and the patron created
does not belong to this category

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 60478e6544ddfd37dc82829f684c3837b534d146)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18982: Use KOHA_INTRANET_URL instead of syspref staffClientBaseURL
Jonathan Druart [Tue, 25 Jul 2017 17:37:27 +0000 (14:37 -0300)]
Bug 18982: Use KOHA_INTRANET_URL instead of syspref staffClientBaseURL

That way we do not need to set the syspref, we can define it setting an
env var, like other tests.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 78d77163af407dc639764cdf1b8936b8f0f715d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoIncrement version for 17.05.02 release v17.05.02
Fridolin Somers [Thu, 27 Jul 2017 12:10:29 +0000 (14:10 +0200)]
Increment version for 17.05.02 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoMerge remote-tracking branch 'translate/17.05.02-translate-20170727' into 17.05.x
Fridolin Somers [Thu, 27 Jul 2017 12:04:18 +0000 (14:04 +0200)]
Merge remote-tracking branch 'translate/17.05.02-translate-20170727' into 17.05.x

7 years agoUpdate release notes for 17.05.02 release
Fridolin Somers [Thu, 27 Jul 2017 11:58:22 +0000 (13:58 +0200)]
Update release notes for 17.05.02 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoTranslation updates for Koha 17.05.02
root [Thu, 27 Jul 2017 11:44:56 +0000 (08:44 -0300)]
Translation updates for Koha 17.05.02

7 years agoBug 18572: Remove AddRenewal parameter
Jonathan Druart [Mon, 24 Jul 2017 17:04:06 +0000 (14:04 -0300)]
Bug 18572: Remove AddRenewal parameter

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 51e8b7bbc9d4fe1d560b65eef3285ec3c0b74e71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18572 - QA Followup
Nick Clemens [Wed, 19 Jul 2017 18:26:07 +0000 (18:26 +0000)]
Bug 18572 - QA Followup

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9b92d79817c359635f463fd5a1e5715affe96356)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18572 - Improper branchcode set during OPAC renewal
Nick Clemens [Fri, 23 Jun 2017 12:27:19 +0000 (12:27 +0000)]
Bug 18572 - Improper branchcode set during OPAC renewal

To test:
1 - Set 'OpacRenewalBranch' to various settings
2 - Renew an item for a ptron under each setting
3 - Confirm action_log entries reflect the correct branch for each
secnario
4 - prove t/db_dependent/Circulation/issue.t

Signed-off-by: David Kuhn <techservspec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e9374dcf6308256f4597e1c83920559d2673b90c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18826 - (QA Followup) Add mock SessionStorage to patrons.t
Nick Clemens [Fri, 21 Jul 2017 12:07:19 +0000 (12:07 +0000)]
Bug 18826 - (QA Followup) Add mock SessionStorage to patrons.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a696843f82dc026ab6545f18b113af8efc753715)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18826: rollback transaction for api tests
Jonathan Druart [Wed, 12 Jul 2017 20:24:24 +0000 (17:24 -0300)]
Bug 18826: rollback transaction for api tests

The holds.t tests for the REST api do no rollback properly and modify
the DB (no cleanup).
This comes from a bug caused by SessionStorage = mysql (default)

The error is:
    "rollback ineffective with AutoCommit enabled"

Test plan:
  select count(*) from borrowers;
  prove t/db_dependent/api/v1/holds.t
  select count(*) from borrowers;
=> The number of entry must be the same before and after the tests have
been executed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d5dc473382ccfa118e78e91507384245ce0dcfcb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18955 - autocomplete is on in OPAC password recovery
Fridolin Somers [Wed, 19 Jul 2017 07:48:04 +0000 (09:48 +0200)]
Bug 18955 - autocomplete is on in OPAC password recovery

In OPAC password recovery form autocomplete is not disabled.
So when login or email is entered, it is saved in browser input history for autocomplete.
This is a major issue for OPAC on computers with public access.

This patch adds autocomplete off on forms.

Test :
- Enable system preferences OpacPasswordChange and OpacResetPassword
- Go to OPAC
- Be sure to not be logged in
- Click on "Forgot your password?"
- Enter a loggin and email and Submit
=> Without patch there is an autocompletion with values you entered
=> With patch there is no autocompletion

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 214a0e61021934c7e6deee5a24cf11606a57199b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18910: Revert "Bug 18152 : fix unimarc label in SetMarcUnicodeFlag"
Jonathan Druart [Mon, 17 Jul 2017 18:58:49 +0000 (15:58 -0300)]
Bug 18910: Revert "Bug 18152 : fix unimarc label in SetMarcUnicodeFlag"

This reverts commit bf551a07222a7b9beffd7ca6cba38c675aa3ab28.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8e0bb409aef75ac0f18a50d3a34a749f4e87da84)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18910: Revert "Bug 18152: Add tests"
Jonathan Druart [Mon, 17 Jul 2017 18:58:33 +0000 (15:58 -0300)]
Bug 18910: Revert "Bug 18152: Add tests"

This reverts commit a807d7199ea025aa507e0ca7e3ff2330902844f8.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dd60cd9635fd51073d01ec5a24340564f61cd5e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years ago(17.05.x) Bug 18966: Do not deal with duplicate issue_id on checkin
Jonathan Druart [Thu, 20 Jul 2017 16:39:43 +0000 (13:39 -0300)]
(17.05.x) Bug 18966: Do not deal with duplicate issue_id on checkin

Koha suffers of big bugs due to its history: When data are deleted, they are moved to another tables.
For instance issues and old_issues: when a checkin is done, it is moved to the old_issues table.
That leads to a main problem that is described on https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

However we tried first to fix the problem (for issues/old_issues) at code level on bug 18242.
The goal was to prevent data lost.
Data lost may happens in this case:
Check an item out (issue_id = 1)
Check an item in (issue_id = 1)
Restart MySQL (reset auto increment for issue_id to 1)
Check an item out (issue_id = 1)
Check an item in => BOOM, the issue_id is a PK in old_issues and the move fails.
Before bug 18242 the data were lost, we inserted the value into old_issues, which fails silently (because of RaiseError set to 0 in Koha::Database), then delete the row from issues.
That has been fixed using a transaction.

This patch introduced a regression we tried to fix on bug 18651 comment 0, the patron was charged even if the checkin was rejected.
A good way to fix that would have been to LOCK the tables:
1- Start a transaction
2- LOCK the table to make sure nobody will read id and avoid race conditions
3- Move the content from one table to the other, dealing with ids
4- UNLOCK the table
5- Commit the transaction
But there were problems using LOCK and DBIx::Class (See commit 905572910b3a - Do no LOCK/UNLOCK the table).

Finally the solution implemented is not acceptable for several reasons:
- batch checkins may fail
- issue_id will always stay out of sync (between issues and old_issues)
See 18651 comment 66.

Since the next stable releases are very soon, and we absolutely need to fix this problem, I am suggesting to:
1- Execute the move in a transaction to avoid data lost and reject the checkin if we face IDs dup
=> It will only reject 1 checkin (max is 1 * MySQL restart), no need to deal with race conditions,
2- Display a warning on the checkin page and link to a solution/explanation
3- Communicate as much as we can on the proper fix: Update auto increment values when the DBMS is restarted - https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix
4- Display a warning on the about page for corrupted data (see bug 18931)
5- Write and make available a maintenance script to fix corrupted data (TODO LATER)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18931 - Follow up - Typo fix in template for holds
Mason James [Wed, 26 Jul 2017 06:42:19 +0000 (18:42 +1200)]
Bug 18931 - Follow up - Typo fix in template for holds

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 45ff2ef129ea8a52ad7d08a531aad6b3e1e665f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18931: (followup) Tidy text
Tomas Cohen Arazi [Tue, 25 Jul 2017 17:37:55 +0000 (14:37 -0300)]
Bug 18931: (followup) Tidy text

Some minor style and idiomatic issues.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f5988bb3d233fa29f2af649748bbca611c99b739)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18931 - Follow up - Typo fix in SQL statement
Katrin Fischer [Mon, 24 Jul 2017 21:26:04 +0000 (23:26 +0200)]
Bug 18931 - Follow up - Typo fix in SQL statement

Fixes the table alias in the SQL statement for items and
adds items to the if clause for showing data problems.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c3dca8c24b53aa63838687f536a5509855ccc21c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18931: Add items/deleteditems tables
Jonathan Druart [Mon, 24 Jul 2017 20:46:27 +0000 (17:46 -0300)]
Bug 18931: Add items/deleteditems tables

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 193ecb0a2bb397bf67488f6342f02adda0328031)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18931: Add a "data corrupted" section on the about page - MySQL AI
Jonathan Druart [Wed, 12 Jul 2017 18:52:19 +0000 (15:52 -0300)]
Bug 18931: Add a "data corrupted" section on the about page - MySQL AI

See the following wiki page for more information
https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix

Test plan:
Create (at least) a patron, a checkout, a biblio and a hold
Then fill the old_* or deleted* tables with:
 INSERT INTO deletedborrowers SELECT * from borrowers WHERE  borrowernumber=XXX;
 INSERT INTO deletedbiblio SELECT * from biblio WHERE biblionumber=XXX;
 INSERT INTO old_issues SELECT * from issues WHERE issue_id=XXX;
 INSERT INTO old_reserves SELECT * from reserves WHERE reserve_id=XXX;

Go to the about page, 'System information' tab. You should see a new
"Data problems" section with the list of the ids that are wrong

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1d1d6ddc9d1e4929d9eb232e0745bcf31749cfdb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 16711: OPAC Password recovery: Handling if multiple accounts have the same mail...
Marc Véron [Sun, 21 May 2017 16:28:48 +0000 (18:28 +0200)]
Bug 16711: OPAC Password recovery: Handling if multiple accounts have the same mail address

To reproduce:
- Create 3 Accounts, login names are test01, test02, test03, Email is the same
for all.
- Go to OPAC -> Password recovery and indicate E-Mail only
- You will get an email for only one of the accounts above.

To test:
- Apply patch, restart memcached and plack
- Go to db, delete from borrower_password_recovery;
- Try steps above to reproduce. You will get an error message:
    Account identification with this email address only is ambiguous.
    Please use the field 'Login' as well.
- Verify that other cases work as before (provide valid / invalid login only,
  provide valid email for an existing account, provide unknown email, provide
  both login and email with all combinations of valid / invalid)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 16711: (QA-followup) Use count directly

See comment # 13

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3829020c2664ec531354f78f0c04d00f5dd6795d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18613: Add unit tests for getletter
Baptiste Wojtkowski [Tue, 11 Jul 2017 09:12:37 +0000 (09:12 +0000)]
Bug 18613: Add unit tests for getletter

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ad367a47003f341e1c517c6fbcc96246cbf21609)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18613: Remove letter rule correctly as superlibrarian
Baptiste Wojtkowski [Fri, 19 May 2017 09:23:17 +0000 (09:23 +0000)]
Bug 18613: Remove letter rule correctly as superlibrarian

TEST PLAN

(reproducing bug)
1 - Set 'IndependantBranches' to enable
2 - Log in as Superlibrarian.
3 - Create 3 rules
    - 1 for all librairies (1)
    - 1 for the library of the superlibrarian (2)
    - 1 for another library (3)
4 - Try to delete them and see them and see that (3) isn't the good one

(checking patch)
5 - Apply patch
6 - Try again 3-
7 - Connect as not superlibrarian
8 - Try again 3-

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 648e2a2b808efac22a8b88545d53b05112a1f6f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18901: [QA Follow-up] Do not translate zzpref either
Marcel de Rooy [Wed, 12 Jul 2017 11:33:51 +0000 (13:33 +0200)]
Bug 18901: [QA Follow-up] Do not translate zzpref either

Adding one backslash makes a difference :)
We need to escape the dot in the regex to exclude a file like zzpref
from translation too. Perfect_regexes++

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a2c9513b1c3449a34f942d8fa53f8ce1fe374e3f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18901: Sysprefs translation: translate only *.pref files (not *.pref*)
Julian Maurice [Thu, 6 Jul 2017 12:39:20 +0000 (14:39 +0200)]
Bug 18901: Sysprefs translation: translate only *.pref files (not *.pref*)

Text editors can create temporary files in this folder and this can
confuse the translator.
For instance, vim can create a file named '.opac.pref.swp' which will
make the translator dies with the following error message:

Can't use string ("b0VIM 8.0") as a HASH ref while "strict refs" in use
at LangInstaller.pm line 248.

Test plan:
1. echo 'Oops' > .../en/modules/admin/preferences/whatever.pref.whatever
2. cd misc/translator && ./translate update fr-FR
3. Verify that you have the error message mentioned above
4. Apply patch
5. cd misc/translator && ./translate update fr-FR
6. No more errors!

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ec51335e9cc4e090ef80f592cc0cc7a0786661f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18748: Noisy t/db_dependent/AuthorisedValues.t
Mark Tompsett [Wed, 7 Jun 2017 16:53:52 +0000 (12:53 -0400)]
Bug 18748: Noisy t/db_dependent/AuthorisedValues.t

This noise is from a failure. This patch expands the delete
to 952$c for the ACQ framework as per comment #5.

TEST PLAN
---------

insert into marc_subfield_structure (tagfield,tagsubfield,liblibrarian, libopac, repeatable, mandatory, kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue,maxlength) values (952,'c','Shelving location','Shelving location',0,0,'items.location',10,'LOC','','',0,0,'ACQ','','',null,9999);
-- this makes sure you have a pre-existing 952$c ACQ record.

prove t/db_dependent/AuthorisedValues.t
-- should have ugly message like in comment #0
apply patch
prove t/db_dependent/AuthorisedValues.t
-- should be green
run koha qa test tools

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 441f6fac33975f7e0f7c96b262bc0c0ee3b0c82e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoRevert "Bug 18938: (bug 17829 follow-up) Replace 2 occurrences of GetMember left...
Fridolin Somers [Tue, 18 Jul 2017 14:38:23 +0000 (16:38 +0200)]
Revert "Bug 18938: (bug 17829 follow-up) Replace 2 occurrences of GetMember left behind"

This reverts commit 8af64fe6128d20917ca413613ce387a3ef196632.

7 years agoBug 18938: (bug 17829 follow-up) Replace 2 occurrences of GetMember left behind
Jonathan Druart [Fri, 14 Jul 2017 15:19:13 +0000 (12:19 -0300)]
Bug 18938: (bug 17829 follow-up) Replace 2 occurrences of GetMember left behind

Between patch submission and push, 2 new occurrences appeared in the
codebase.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2f1a1fc4b96a91fc054646f91643d8ff46456055)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18880: [QA Follow-up] Finishing touch
Marcel de Rooy [Fri, 14 Jul 2017 06:07:31 +0000 (08:07 +0200)]
Bug 18880: [QA Follow-up] Finishing touch

Do not fill @return if retval == -1 for LDAP (see cfc484b17).
No need to call store after an DBIx update. Rearranged the if statement.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 313e1f2f271bad995f33db6884b553efe79e9438)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18880: Fix authentication fallback for external authentications
Jonathan Druart [Tue, 11 Jul 2017 15:24:36 +0000 (12:24 -0300)]
Bug 18880: Fix authentication fallback for external authentications

A regression in commit cfc484b17 / bug #18314 breaks the local
authentication fallback for all external authentications like LDAP, CAS
and Shibboleth.

The regression itself is a logical error as "@return = (0)" is
considered to be "false" when checked with "unless" (line 1814). That's
wrong as "unless" tests the number of elements in a list.

This patch tries to simplify the logic by adding a $passwd_ok and
$check_internal_as_fallback flags to be more verbose and hopefully more
understandable.
The goal here is simply to restore back the same logic as before cfc484b17

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d852b332666da212f1ab8667fa044b16eb151717)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18854: Protect few other occurrences of offset
Jonathan Druart [Mon, 10 Jul 2017 14:56:46 +0000 (11:56 -0300)]
Bug 18854: Protect few other occurrences of offset

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f47bd88252e201f9f06fd734dae154d9bc41543)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18854: Make sure offset will not be < 0 - protect from DoS
Jonathan Druart [Wed, 5 Jul 2017 13:44:55 +0000 (10:44 -0300)]
Bug 18854: Make sure offset will not be < 0 - protect from DoS

There was a bug that meant a very large offset in the search params
will cause the search script to run forever (or long enough to crash
the machine)

To test

1/ Get ready with sudo top so you can kill the thread before it causes
your machine to OOM
2/ Hit a page like yourdomain.com/cgi-bin/koha/opac-search.pl?q=1&offset=-9999999999999999999
3/ Notice the process runs for a long time
4/ Kill the process
5/ Apply the patch
6/ Hit the page again, notice the it loads (offset is set to zero)
7/ Do the same to search in the staff client

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit aabf001232fc46ee04cecb3a43fe8c0366a091df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18854 - Protect from DOS
Chris Cormack [Sun, 25 Jun 2017 05:34:12 +0000 (17:34 +1200)]
Bug 18854 - Protect from DOS

There was a bug that meant a very large offset in the search params
will cause the search script to run forever (or long enough to crash
the machine)

To test

1/ Get ready with sudo top so you can kill the thread before it causes
your machine to OOM
2/ Hit a page like yourdomain.com/cgi-bin/koha/opac-search.pl?q=1&offset=-9999999999999999999
3/ Notice the process runs for a long time
4/ Kill the process
5/ Apply the patch
6/ Hit the page again, notice the it loads (offset is set to zero)
7/ Do the same to search in the staff client

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: changed -2 to 0 in opac-search.pl.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 99b32717cd2596ce89a2d46b8cb4ddbba2dea5ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 17639 - Remove white filling inside of Koha logo
Owen Leonard [Tue, 6 Jun 2017 15:50:19 +0000 (15:50 +0000)]
Bug 17639 - Remove white filling inside of Koha logo

This patch modifies the Koha logo SVG file to remove the fill from two
letters. This patch also optimizes the file and converts the text object
to paths for better cross-platform portability.

To test you could:

- Open the file in an editor and confirm that the change is correct
  - or -
- Open the file in a browser and use the code inspector to add a
  background-color attribute to the top-level <svg> tag. The logo should
  appear transparent, with no white fills.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 068db9aaabb0694b4d12404bda16525efad0fde7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18934: Preventing warns in Admin -> SMS providers
Aleisha Amohia [Thu, 13 Jul 2017 05:16:53 +0000 (05:16 +0000)]
Bug 18934: Preventing warns in Admin -> SMS providers

This patch initialises the $op variable to prevent the warns

To test:
1) Go to admin -> sms providers
2) Notice warns in error log
3) Apply patch and refresh page
4) Notice warns are gone

Sponsored-by: Catalyst IT
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 88ab0ef5791d2b428399690c505ac42aba4616df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18858: Prevent warn when deleting a borrower debarment
Aleisha Amohia [Tue, 27 Jun 2017 01:40:48 +0000 (01:40 +0000)]
Bug 18858: Prevent warn when deleting a borrower debarment

To test:
1) Look at intranet log
2) Go to delete a debarment on a borrower
3) Notice warn
4) Apply patch
5) Add a new debarment
6) Delete this debarment
7) Notice warn is gone

Sponsored-by: Catalyst IT
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7ed66a6c8ae1c3c824e496c2d312e23db1dd8e41)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18577: Add FIXME about the missing FK
Jonathan Druart [Mon, 10 Jul 2017 21:09:23 +0000 (18:09 -0300)]
Bug 18577: Add FIXME about the missing FK

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5d6813e0708a54a9113cd74cc6a2558c77b5fc33)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18577 - Importing a batch using a framework not fully set up causes and endless...
Nick Clemens [Fri, 23 Jun 2017 14:11:44 +0000 (14:11 +0000)]
Bug 18577 - Importing a batch using a framework not fully set up causes and endless loop

To test:
1 - Create a new framework - don't set it up
2 - Stage some records for import
3 - Manage the import, note your new framwork is in the list
4 - Apply patch
5 - Reload the page
6 - Note the framework is no longer an option

Followed test plan,  worked as intended
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 96b1f92ae218bc889d1490385f934deec28f630a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18633: Remove remaining use of CGI.param in template
Julian Maurice [Mon, 12 Jun 2017 07:18:30 +0000 (09:18 +0200)]
Bug 18633: Remove remaining use of CGI.param in template

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2f7bad7039137fe1b3263cbaded1ce68f8daba04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18633: Remove useless use of CGI TT plugin
Julian Maurice [Wed, 28 Jun 2017 17:05:42 +0000 (13:05 -0400)]
Bug 18633: Remove useless use of CGI TT plugin

The form is sent using AJAX so there is never a query string in
the URL (no POST parameters either)

Tested both patches together, item search behaves as before, log
entries are gone
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a000d95a4d322607eccdbf08abc94dd78d4e5617)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18830: Fix phrasing of screen message
Colin Campbell [Tue, 20 Jun 2017 15:35:35 +0000 (16:35 +0100)]
Bug 18830: Fix phrasing of screen message

Verb should be plural in this message

Signed-off-by: Israelex A Veleña for KohaCon17 <israelex19@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8a0ecda6c4ff368b9ff7a18593d7bdf4fc07e541)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18824: Remove stray i from matching-rules.tt
Marc Véron [Mon, 19 Jun 2017 19:23:54 +0000 (21:23 +0200)]
Bug 18824: Remove stray i from matching-rules.tt

The file
koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt
contains a stray i that should not be there.
This patch removes it.

Signed-off-by: Chris Kirby <chris.kirby@ilsleypubliclibrary.org>
Applied patch.
Checked line 516. Stray i had been removed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ce176fd170227456fa725e5f1f2f6b1b04fd044d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18848: borrowers.lastseen comment typo
Lee Jamison [Thu, 22 Jun 2017 16:42:15 +0000 (16:42 +0000)]
Bug 18848: borrowers.lastseen comment typo

Typo in comment for the lastseen column in the borrowers table.

To test:
1. Verify lastseen column displays "last time a patron has been seed"
2. Apply patch
3. Verify lastseen column changed to "last time a patron has been seen"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e3bf4fc8bb821456305d587a8d49fe39b07abd06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18848: borrowers.lastseen comment typo
Lee Jamison [Thu, 22 Jun 2017 16:42:15 +0000 (16:42 +0000)]
Bug 18848: borrowers.lastseen comment typo

Typo in comment for the lastseen column in the borrowers table.

To test:
1. Verify lastseen column displays "last time a patron has been seed"
2. Apply patch
3. Verify lastseen column changed to "last time a patron has been seen"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 23b84c0b6532d9c42894b648891d835e7624db49)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18881: [QA Follow-up] Remove even more
Marcel de Rooy [Mon, 3 Jul 2017 07:31:52 +0000 (09:31 +0200)]
Bug 18881: [QA Follow-up] Remove even more

Removing the commented section from the template: If it does not work, it should not be here.
When it works again, put it back in.

Since @itemtypesloop is not used, remove it from the script too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e48a5fb560123bac31e9a692026601ddd320f966)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18881: Remove dead code from view_holdsqueue.pl
Marc Véron [Fri, 30 Jun 2017 18:20:44 +0000 (20:20 +0200)]
Bug 18881: Remove dead code from view_holdsqueue.pl

Aleisha spotted the typo in $itemtypes and proposed a correction on bug 18859.
The description was not even used. Template calls GetDescription.

To test:
Verify that viewing the holds queue still works as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f40c093c19e21c6a8aa7a41d4e51fc4e3fc1d8e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, durin...
Rodrigo Santellan [Wed, 21 Jun 2017 18:40:43 +0000 (15:40 -0300)]
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT

Removing all the id from the columns on the inserts and removing the
parameter '' of the values for the id.

Test plan:
1) Go to tools -> calendar
2) Add a Holiday only on this day.
3) Add a Holiday repeated every same day of the week.
4) Add a Holiday repeated yearly on the same date.
5) Add a Holidays on a range.
6) Add a Holidays repeated yearly on a range.
7) You should have the five calendars displayed.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b94b16f67963b03fd17170d2c2f2efa581c12c0f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18755: Allow empty passwords in Patron Info to return OK
Colin Campbell [Thu, 8 Jun 2017 11:59:55 +0000 (12:59 +0100)]
Bug 18755: Allow empty passwords in Patron Info to return OK

With this patch a parameter 'allow_empty_passwords="1" can be added to a
login in the SIP configuration file to allow the behaviour as was normal
before the patch for bug 16610 was applied. Some sip clients rely on
this behaviour sending an empty password field when they wish to
validate to user but do not have the password.
If a password is supplied it will be validated

A test has been added to Message.t to confirm this behaviour

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ebb887e5c93c96c6fc51d95b76de6a221ba4463e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18771: CGI.pm: Subroutine multi_param redefined
Mark Tompsett [Fri, 9 Jun 2017 17:01:14 +0000 (13:01 -0400)]
Bug 18771: CGI.pm: Subroutine multi_param redefined

The commands in the test plan are examples, and may need varying
depending on your installation. This was created as a result
of attempting to clean the installation process up. However,
I believe the redefine might exist normally too. I just didn't
check. This is tested on a Debian 8 box sudo apt-get update'd
fully.

TEST PLAN
---------
empty error log
$ echo > ~/koha-dev/var/log/koha-error_log

drop and recreate and empty db
> drop database koha_library;
> create database koha_library;
> quit

run the web installer, but DO NOT LOG IN!
*opening chrome to Staff Client URL*

check the error log
$ less ~/koha-dev/var/log/koha-error_log
...
[Fri Jun 09 13:08:52.793627 2017] [cgi:error] [pid 5802] [client 192.168.71.101:58169] AH01215: [Fri Jun  9 13:08:52 2017] CGI.pm: Subroutine multi_param redefined at /usr/share/perl5/CGI.pm line 419.
...

apply patch

empty error log
$ echo > ~/koha-dev/var/log/koha-error_log

refresh the installation login page

recheck the error log
$ less ~/koha-dev/var/log/koha-error_log

notice no reference to "Subroutine multi_param redefined"

run koha qa test tools

Notice that it is just a require CGI; and comment added.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d222da0602ba96f08cc6c026f39451b0aa7de01e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18634: Handle colliding translation for preference sections
Marcel de Rooy [Wed, 14 Jun 2017 13:37:55 +0000 (15:37 +0200)]
Bug 18634: Handle colliding translation for preference sections

Problem on this report was caused by translating the tabs Privacy
and Payments by the same string. This caused overwriting a hash entry.

This patch tests if the key already exists and if so, it merges the
entries instead of overwriting the old contents.

Test plan:
[1] Make sure that e.g. Privacy and Payments translate to e.g Vie privee.
[2] Run translate install fr-CA (or the language you altered)
[3] Without this patch you should loose preferences from either Privacy or
    Payments. With this patch, they should be merged.

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

Signed-off-by: Blou <philippe.blouin@inlibro.com>
Reset the .po files, reproduced the problem.  Applied the patch and suddenly 'paypal' appeared.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0d98089ec701bc96893e68408ce2dedad36f7235)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18434 - Followup fix tests for sorting and factes
Nick Clemens [Mon, 3 Jul 2017 09:42:21 +0000 (09:42 +0000)]
Bug 18434 - Followup fix tests for sorting and factes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 540d488e980b2521b424bed0f0267002c6dbd03e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18434 - Followup - same changes for sort and facet fields
Nick Clemens [Fri, 16 Jun 2017 14:01:12 +0000 (10:01 -0400)]
Bug 18434 - Followup - same changes for sort and facet fields

To test:
1 - Index some stuff with multiple fields defined for sorting
  i.e. Authorites - make heading sortable - default is 110a and 111a for
  heading - a record with 111a empty will make the sort field empty
2 - view the record:
curl http://localhost:9200/koha_kohadev_authorities/data/30?pretty=true
3 - Note the blank field
4 - Apply patch
5 - Reindex
6 - Fields should be correctly populated

Unit tests to follow (once I have the originals working for all)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 241be8ff1ae24fff6165c8d6877945637467ee9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
7 years agoBug 18434: (QA followup) Move _convert_marc_to_json tests into Indexer.t
Tomas Cohen Arazi [Mon, 15 May 2017 14:46:00 +0000 (11:46 -0300)]
Bug 18434: (QA followup) Move _convert_marc_to_json tests into Indexer.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b5529c3abca87afb4f66f5bc7d3aa0fe005c1aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>