]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 18570: Prove that the letter code parameter tweaks work
Mark Tompsett [Thu, 8 Mar 2018 00:13:09 +0000 (00:13 +0000)]
Bug 18570: Prove that the letter code parameter tweaks work

Run the following commands:
kshell
prove -v t/db_dependent/Letters.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18570: Tests to prove if email send was attempted
Mark Tompsett [Wed, 7 Mar 2018 23:59:54 +0000 (23:59 +0000)]
Bug 18570: Tests to prove if email send was attempted

kshell
prove -v t/db_dependent/Passwordrecovery.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20430: (See also bug 19436) Button display depends on wrong server count
Marcel de Rooy [Fri, 16 Mar 2018 08:02:36 +0000 (09:02 +0100)]
Bug 20430: (See also bug 19436) Button display depends on wrong server count

This is a QA follow-up of bug 19436, submitted separately for ease of
backporting it. (The bug was not raised by 19436.)

Obviously, the number of authority servers not biblio servers should
be the key factor for showing or hiding the button for new authority
records via Z39.50/SRU.

Trivial fix.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20341: Show authorized value description for withdrawn like damaged and lost
Fridolin Somers [Tue, 6 Mar 2018 11:26:19 +0000 (12:26 +0100)]
Bug 20341: Show authorized value description for withdrawn like damaged and lost

Actually catalog detail page shows for damaged and lost items the authorized value description if exists.
We must do the same for withdrawn information.

Test plan :
1) Set for items a subfield linked to items.withdrawn and using the authorized value category 'WITHDRAWN'
2) Edit the authorized value category to add value '2' and description 'Eaten by dog'
3) Edit an item to set this withdrawn value
4) Go to staff interface and look at items in record detail page /cgi-bin/koh/catalogue/detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'
5) Go to OPAc and look at items in record detail page /cgi-bin/koha/opac-detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'

Signed-off-by: delaye <stephane.delaye@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19908: Do not use .optional in password match validation function
Josef Moravec [Mon, 5 Feb 2018 08:25:03 +0000 (08:25 +0000)]
Bug 19908: Do not use .optional in password match validation function

Test plan:
0) Aplly only first patch
1) You will be able to submit a from on member-password.pl even if the
passwords don't match
2) Apply this patch -> you can't be able to submit the form if the
paswords don't match, but you'll be able to submit the form when
password fields are blank

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19908: Password fields in edit/add patron form should respect BorrowerMandatoryFi...
Josef Moravec [Wed, 3 Jan 2018 10:56:37 +0000 (10:56 +0000)]
Bug 19908: Password fields in edit/add patron form should respect BorrowerMandatoryField preference

Test plan:
0) Do not apply the patch, note the password field is always required
1) Apply the patch
2) Try to add and edit patron with and without "password" in BorrowerMandatoryField, it should always respect this setting
3) Use "Change password" button in patron toolbar, the password field
should be never required here - when leaved blank, the password is
unchanged
4) Play with  minPasswordLength and  RequireStrongPassword preferences,
    to ensure they work as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19953: Record page: acquisition details: add column for invoice
Victor Grousset [Fri, 5 Jan 2018 14:03:38 +0000 (15:03 +0100)]
Bug 19953: Record page: acquisition details: add column for invoice

Test plan:
1. create a vendor with minimal info
2. create a basket with minimal info
3. add a item to the basket
4. close the basket
5. receive a shipment
6. on the "receipt summary" click on "receive" for the wanted item (it
   should be the only one)
7. items → receive? → tick this checkbox
8. save
9. click on "finish receiving"
10. go to the record → Acquisition details
11. apply this patch
12. refresh the page
13. you should see the new column

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12812: (Follow-up) Fix use of C4::Circulation
Josef Moravec [Fri, 9 Mar 2018 06:58:34 +0000 (06:58 +0000)]
Bug 12812: (Follow-up) Fix use of C4::Circulation

Fixes this error:
Undefined subroutine &main::MarkIssueReturned called at
misc/cronjobs/longoverdue.pl line 316.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12812: Longoverdue.pl --mark-returned doesn't return items
Kyle M Hall [Thu, 8 Feb 2018 11:39:39 +0000 (06:39 -0500)]
Bug 12812: Longoverdue.pl --mark-returned doesn't return items

The longoverdue.pl option --mark-returned doesn't work unless the
--charge option is used as well.

Test Plan:
1) Run long overdue with --mark-returned and not --charge,
   note your items are marked lost but not returned
2) Apply this patch
3) Repeat step 1, the items should now get returned!

Tested with (for example):
misc/cronjobs/longoverdue.pl --lost 10=1 --mark-returned --verbose
--confirm

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17717: (QA follow-up) Fix typo chdir
Marcel de Rooy [Mon, 5 Mar 2018 10:30:15 +0000 (11:30 +0100)]
Bug 17717: (QA follow-up) Fix typo chdir

This test does obviously not achieve the desired result:
    [ "chdir" != "no" ]
Trivial fix.
Adding the same quotes around starting_dir (just as for Bug 19546).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17717: Make cronjobs using koha-foreach use --chdir
Tomas Cohen Arazi [Fri, 2 Mar 2018 14:51:20 +0000 (11:51 -0300)]
Bug 17717: Make cronjobs using koha-foreach use --chdir

In order to patch production sites we need to adjust the shipped
cronjobs so they are called with the --chdir option switch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17717: Add a --chdir option switch for koha-foreach
Tomas Cohen Arazi [Fri, 2 Mar 2018 14:17:40 +0000 (11:17 -0300)]
Bug 17717: Add a --chdir option switch for koha-foreach

Until Perl 5.26, the current directory is added to @INC when running a
Perl script [1]. Having the current directory in @INC means it can be
tried to be traversed when performing a lib lookup. Since version 5.18,
Perl dies when it finds an unreadable directory (permissions) in @INC
that needs to be traversed. This behaviour won't change because Perl
devs consider it an enhancement to security. [2]

Because of this, we need to make sure our scripts are ran **from** a
directory in which they have read permissions.

Ths patch adds a --chdir option switch to the **koha-foreach** wrapper
script, that makes the inner shells/scripts to be ran within the Koha
instance's user home directory.

The change is trivial and should be QAed easily. I tested this on a prod
server:

- Create a /tmp/test.pl file containing:

use Modern::Perl;

use Cwd;
my $dir = getcwd;

warn $dir;

1;

A) then create a cronjob entry to run it using koha-foreach:
(in /etc/cron.d/test):
1/* * * * * root koha-foreach perl /tmp/test.pl
- Once I noticed the cronjob ran, I used mutt to read the emails in the
root user.
=> FAIL:
...
Subject: Cron <root@koha> koha-foreach --enabled perl /tmp/test.pl

"/root"
"/root"
"/root"
"/root"
"/root"
...

B) I then used the patched koha-foreach with different results:
=> SUCCESS:
...
Subject: Cron <root@koha> /root/koha-foreach --chdir --enabled perl /tmp/test.pl

"/var/lib/koha/acaderc"
"/var/lib/koha/agro"
"/var/lib/koha/anc"
"/var/lib/koha/arico"
"/var/lib/koha/artes"
...

So this patch's approach works. But...

C) master's koha-foreach seems to work just the same... I think it is
because of my previous attempt to fix this by using sudo in koha-shell.
So I think environmental conditions affect the behaviour (which shell is
configured for cron, sudo configuration, etc).

====

In conclusion, I think we should go ahead with this patch as it will solve
peoples issues, and it is a right solution (option #5 on the list) to
this Perl behaviour change. It doesn't cover other commands, but
followup patches could do.

I avoided /tmp as it is writable by any user... so it is an easy path
for both exploiting by replacing some lib, and also because the
existence of an unreadable dir that the interpreter could try to
traverse (unreadable /tmp/Authen or /tmp/Koha will trigger the same
error, and I assume people know what they are putting on the instance's
dir, at least it will be easier to track).

A followup patch takes care of making the cronjobs use --chdir when
calling koha-foreach

[1] https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
[2] https://rt.perl.org/Public/Bug/Display.html?id=123795

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20286: Fix filter for BakerTaylor* prefs
Jonathan Druart [Tue, 27 Feb 2018 18:30:18 +0000 (15:30 -0300)]
Bug 20286: Fix filter for BakerTaylor* prefs

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20286: Correctly escape URI characters in OPAC RSS template
Jonathan Druart [Mon, 26 Feb 2018 13:48:18 +0000 (10:48 -0300)]
Bug 20286: Correctly escape URI characters in OPAC RSS template

Bug 19568 use the TT filter url whereas it must have escaped the URI
characters with the uri filter.

Test plan:
Subscribe to an OPAC search
=> Without this patch you will get an empty page
=> With this patch applied you will see result list.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20311: Prevent get_age tests to fail on Feb 28th
Jonathan Druart [Wed, 28 Feb 2018 16:54:32 +0000 (13:54 -0300)]
Bug 20311: Prevent get_age tests to fail on Feb 28th

Today Feb 28th 2018:
If we subtract 18y to this DateTime object 29/02/2000 and so the patron is not major yet

use Koha::DateUtils qw( dt_from_string );
say dt_from_string('28/02/2018')->add(years => -18);
say dt_from_string('28/02/2018')->add(years => -18, end_of_month => 'limit');

will display:
2000-02-29T00:00:00
2000-02-28T00:00:00

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20234: Update service description in koha-common.init
Tomas Cohen Arazi [Sat, 17 Feb 2018 14:50:16 +0000 (11:50 -0300)]
Bug 20234: Update service description in koha-common.init

The service description is very old and outdated. This patch fixes this.

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20234: Make maintenance scripts use koha-zebra instead of koha-*-zebra
Tomas Cohen Arazi [Sat, 17 Feb 2018 14:34:58 +0000 (11:34 -0300)]
Bug 20234: Make maintenance scripts use koha-zebra instead of koha-*-zebra

This patch makes all maintenance scripts use **koha-zebra** instead of
the old **koha-*-zebra** scripts.

To test:
- Run:
  $ perl misc4dev/cp_debian_files.pl
  $ sudo service koha-common stop
=> SUCCESS: No errors and the Zebra-related sevices are stopped
  $ sudo service koha-common start
=> SUCCESS: No errors and the Zebra-related services are started
  $ sudo service koha-common restart
=> SUCCESS: No erros and Zebra-related services are running
  $ sudo koha-create --create-db test
=> SUCCESS: Instance created and zebra running for it
  $ sudo koha-disable test
=> SUCCESS: No errors and Zebra is stopped for instance test
  $ sudo koha-zebra --start test
  $ sudo koha-remove test
=> SUCCESS: No errors, instance removed, no Zebra running for test
- Sign off :-D

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20302: Allow translating Delete button in Patron batch mod tool
Pasi Kallinen [Tue, 27 Feb 2018 10:59:56 +0000 (12:59 +0200)]
Bug 20302: Allow translating Delete button in Patron batch mod tool

There is an untranslatable Delete-button in the patron batch modification
tool. Allow translating it.

Test plan:

1) Go to Home -> Tools -> Batch patron modification, put a patron's
   card number in the box, and click on Continue
2) At the bottom of the screen there is an drop-down entry for
   Attribute, click on the "New" at the nd of that line
3) There should now be another Attribute -line, with "Delete" -link
   at the end of that line
4) Apply patch, install a language
5) Repeat 1-3 in that language, the Delete-link should be shown in
   the correct language, if the msgid "Delete" was translated
   in xx-YY-staff-prog.po

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt

6 years agoBug 20301: Allow translating "View" in manage MARC import
Pasi Kallinen [Tue, 27 Feb 2018 07:10:17 +0000 (09:10 +0200)]
Bug 20301: Allow translating "View" in manage MARC import

When looking at the table showing the staged MARC records, the "View"
text in the Diff-column is not translatable. Make it so.

Test plan:

1) Go to Home -> Tools -> Stage MARC records for import
2) Select eg. t/db_dependent/www/data/marc21record.mrc and upload the file
3) Click on Stage for import
   -> Manage staged records
   -> Import this batch into the catalog
4) Wait for zebra to reindex, or trigger it yourself by
   running rebuild_zebra.pl -a -b -r
5) Go to Home -> Tools -> Stage MARC records for import
6) Select the same file as in part 2 and upload the file
7) Change the Record matching rule to ISBN (020$a)
8) Click on Stage for import
   -> Manage staged records
9) In the table below, there should now be a line showing
   the staged MARC record matches biblio
10) Note the "View"-text in the "Diff"-column
11) Apply patch
12) Install a language, view the same batch in the
    Manage staged MARC records -page in that language
13) The "View" should show up correctly, and if the
    msgid "View" was translated in the xx-YY-staff-prog.po,
    should show up in the correct language

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt

6 years agoBug 20141: Untranslatable string in transport cost matrix
Pasi Kallinen [Tue, 6 Feb 2018 10:19:17 +0000 (12:19 +0200)]
Bug 20141: Untranslatable string in transport cost matrix

Make the "Disable" checkboxes in transport cost matrix translatable

Test plan:

1) Go to Home -> Administration -> Transport cost matrix
2) Click on any cell
3) Note the "Disable" checkbox text
4) Install patch, add a language, translate the text, etc
5) Repeat 1-3, the "Disable" text should now be translated

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt

6 years agoBug 20296: Untranslatable "All" in patrons table filter
Pasi Kallinen [Mon, 26 Feb 2018 10:08:27 +0000 (12:08 +0200)]
Bug 20296: Untranslatable "All" in patrons table filter

There's an untranslatable "All" in the "Show X entries" filter
when browsing the patrons.

Test plan:

1) Home --> Patrons --> Browse by last name.
2) In the table filtering toolbar, there's a dropdown with
   "Show [20] entries" and the last in the dropdown is "All".
3) Update and install a language, check that msgid "All" is
   translated and isn't fuzzy.
4) Check the "All" in the dropdown, it is not translated.
5) Install patch, repeat 1-3, and check the "All" in the dropdown,
   it should now be translated.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt

6 years agoBug 20295: Allow translating link title in ILL module
Pasi Kallinen [Mon, 26 Feb 2018 09:10:10 +0000 (11:10 +0200)]
Bug 20295: Allow translating link title in ILL module

Allow translating "View borrower details" link title in the ILL module.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20290: Fix capitalization of "Routling List"
Katrin Fischer [Tue, 20 Feb 2018 21:42:13 +0000 (21:42 +0000)]
Bug 20290: Fix capitalization of "Routling List"

This fixes some strings to be properly capitalized.

To test:
- Create a new routing list, check title and breadcrumbs
- View the routing list tab in the patron account in staff,
  check title and breadcrumbs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20142: Allow translating offline circ message
Pasi Kallinen [Tue, 6 Feb 2018 11:01:36 +0000 (13:01 +0200)]
Bug 20142: Allow translating offline circ message

Allow translating the notification saying you cannot change branch or
logout while offline.

Test plan:

1) Enable AllowOfflineCirculation
2) Go to Home -> Circulation -> Built-in offline circulation interface
3) Try to change your branch. Note the notification message
4) Apply patch, install language, translate the notification
5) Repeat 2 and 3 in that language. The message should be translated

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt

6 years agoBug 20147: Allow translating prompt in label edit batch
Pasi Kallinen [Tue, 6 Feb 2018 12:17:45 +0000 (14:17 +0200)]
Bug 20147: Allow translating prompt in label edit batch

Fix one untranslatable prompt in the label batch edit.

Test plan:

1) Go to Home -> Tools -> Label creator
2) Click on New -> Label batch
3) Add items to the batch
4) Select any of the items
5) Click on "Remove selected items"
6) Note the popup text
7) Apply patch, update a language, translate the msgid
   "Are you sure you want to remove label number(s): %s from this batch?"
8) Repeat 1-6. The popup text should now be translated.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20140: Allow translating more of OAI sets
Nick Clemens [Fri, 6 Apr 2018 15:40:56 +0000 (15:40 +0000)]
Bug 20140: Allow translating more of OAI sets

Allow translating two strings in the OAI set config:
"setDescription" and "Remove"

Test plan:

1) Go to Home -> Administrator -> OAI sets config -> Add a new OAI set
2) Click on "New set"
3) Click on "Add description"
4) Note the "setDescription:" and "Remove" -texts
5) Install patch, update language, translate the new strings
6) Redo 1-4, note how the strings in part 4 are now translated

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
6 years agoBug 20240: Remove space before : when searching for a vendor in serials (Vendor name :)
Owen Leonard [Wed, 21 Feb 2018 17:40:06 +0000 (17:40 +0000)]
Bug 20240: Remove space before : when searching for a vendor in serials (Vendor name :)

This patch removes the space before the colon in the "vendor" label in
the vendor search pop-up window.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for a vendor" link next to the vendor form field.
- In the pop-up window, confirm that there is no space before the colon
  in the "vendor" label.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20239: Fix spelling on authority linker plugin
Owen Leonard [Wed, 21 Feb 2018 17:59:49 +0000 (17:59 +0000)]
Bug 20239: Fix spelling on authority linker plugin

This patch corrects the capitalization of the "Choose" link in the
pop-up window for selecting an authority record to link to a MARC field.

This patch also converts the link, and the "Edit authority" link, to
Bootstrap buttons.

To test:
- Create a new record
- Go to the 100 field
- Click on plugin link behind $a
- Look for an existing authoriy in your system
- In the table of search results, confirm that the "Choose" and "Edit
  authority" links look correct and work correctly.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20229: Explicitly list the SQL modes we support
Jonathan Druart [Fri, 16 Feb 2018 15:23:26 +0000 (12:23 -0300)]
Bug 20229: Explicitly list the SQL modes we support

In our installation procedure we ask the administrator to edit the
MySQL|MariaDB configuration file to specify the SQL modes we support
(see bug 17258 comment 6 and 7 for more information).

We are on the way to catch and fix all these issues and support these
stricter modes (as they highlight problem in our codebase/DB structure)
but in the meanwhile it may be good to remove this step and revert the
changes when we are ready.

TODO:
- Remove that for dev installations (to let developers catch these bugs)
- Edit the wiki page to remove this step

Test plan:
0. Do not apply this patch
1. Edit your MySQL|MariaDB config and add:
sql-mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
to the [mysqld] section (or edit it)
2. Restart your DBMS
3. Try to make the app explode (watch the logs)
(tips: you should get "'koha_kohadev.me.id' isn't in GROUP BY" when
editing an order)
4. Apply the patch, restart_all, restart your DBMS
5. Try to recreate the failure
=> You should no longer see the error in the logs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoUpdate relase notes for 17.11.04 release v17.11.04
Nick Clemens [Mon, 26 Mar 2018 15:29:06 +0000 (15:29 +0000)]
Update relase notes for 17.11.04 release

6 years agoBug 20083: Follow up - use same logic in opac-showmarc
Mark Tompsett [Tue, 30 Jan 2018 22:35:39 +0000 (22:35 +0000)]
Bug 20083: Follow up - use same logic in opac-showmarc

It was correctly pointed out that opac-showmarc would leak
the same way as catalogue/showmarc.pl, and so this patch
moves the authentication step up to the top where it
should be so as to prevent inappropriate data leaks.

TEST PLAN
---------
1) Set your OpacPublic system preference to Disabled
2) Open your OPAC and login
3) Find a biblio with items
4) Go to the opac details, particularly MARC view.
5) Copy the "view plain" shortcut link.
6) log out.
7) Paste the link into the address bar.
   -- the information will leak!
8) apply the patch
9) restart_all
10) Refresh the OPAC link
    -- log in screen will appear.
11) run koha qa test tools

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20083 - Information disclosure when (mis)using the MARC Preview feature
Andreas Roussos [Fri, 26 Jan 2018 01:12:47 +0000 (14:12 +1300)]
Bug 20083 - Information disclosure when (mis)using the MARC Preview feature

The MARC Preview feature in the Staff client (catalogue/showmarc.pl) does not
check whether a user is logged in or not. As a consequence, it can be used to
obtain information that would normally be available to logged-in users only.
For example, you can view any bibliographic record by passing a value to the
'id' argument, but you can also view records as they were imported (normally
done via the 'Staged MARC management' tool).

All three 17.11 installations currently listed at
https://wiki.koha-community.org/wiki/Koha_Demo_Installations
are affected by this issue, as demonstrated by the URLs below:

http://koha.adminkuhn.ch:8080/cgi-bin/koha/catalogue/showmarc.pl?importid=1&viewas=html
http://pro.demo1711-koha.test.biblibre.eu/cgi-bin/koha/catalogue/showmarc.pl?id=1000&viewas=html
https://staff-kohademo.equinoxinitiative.org/cgi-bin/koha/catalogue/showmarc.pl?id=1&viewas=html

It should be noted that this only applies to XSLT-enabled installations.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoIncrement version for 17.11.04 release
Nick Clemens [Mon, 26 Mar 2018 15:16:25 +0000 (11:16 -0400)]
Increment version for 17.11.04 release

6 years agoTranslation updates for Koha 17.11.04
Koha translators [Mon, 26 Mar 2018 15:05:45 +0000 (12:05 -0300)]
Translation updates for Koha 17.11.04

6 years agoBug 20446 Revert to using syspref for item creation
Colin Campbell [Mon, 19 Mar 2018 10:45:26 +0000 (10:45 +0000)]
Bug 20446 Revert to using syspref for item creation

Using a per-basket setting is nonsensical when baskets
are created automatically by quote processing a few lines before
this attempts to read it. cron job aborts with a runtime error
leaving basket for quote half-created.
This reverts to the previous code using the global setting.
(Basket itself will have been set to the global setting
by default)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20466: Fix fixture syntax in t/Prices.t
Jonathan Druart [Fri, 23 Mar 2018 16:13:16 +0000 (13:13 -0300)]
Bug 20466: Fix fixture syntax in t/Prices.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid
Lari Taskula [Fri, 9 Mar 2018 13:49:27 +0000 (15:49 +0200)]
Bug 20367: Avoid resetting userid when BorrowerUnwantedField contains userid

To test:
1. In staff client, set your username to firstname
2. Add userid to BorrowerUnwantedField system preference
3. Go to your patron modification screen (memberentry.pl) and click Save
4. Observe you get kicked out into login screen, saying:
Error: You do not have permission to access this page.
Log in as a different user

5. Apply patch and restart plack

6. Set your username back to firstname
7. Repeat step 3
8. Observe you were not kicked out and your userid stays the same

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20348: SIP2 patron identification fails to use userid
Jose Martin [Wed, 7 Mar 2018 12:21:39 +0000 (15:21 +0300)]
Bug 20348: SIP2 patron identification fails to use userid

Replaces "or" with "||" in variable assignment

second attempt to retrieve borrower was not being executed due
to changed precedence

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20303: Do not explode when receiving an order if authorisedby not set
Jonathan Druart [Tue, 27 Feb 2018 18:54:38 +0000 (15:54 -0300)]
Bug 20303: Do not explode when receiving an order if authorisedby not set

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20167: Make changing a hold pass the itemnumber to ModReserve
Tomas Cohen Arazi [Mon, 5 Mar 2018 16:36:50 +0000 (13:36 -0300)]
Bug 20167: Make changing a hold pass the itemnumber to ModReserve

If you have an item-level hold, changing an attribute (like priority,
pickup location or suspended until date) makes the hold a biblio-level
hold, because ModReserve is not passed the current itemnumber.

This patch uses the hold's itemnumber and passes it to the ModReserve
call.

To test:
- Run the regression tests from the previous patch:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail
- Apply this patch
- Run the tests:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20167: Regression test
Tomas Cohen Arazi [Mon, 5 Mar 2018 16:35:33 +0000 (13:35 -0300)]
Bug 20167: Regression test

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Conflicts:
t/db_dependent/api/v1/holds.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20218: Fix matching of uri in tracklinks
Nick Clemens [Fri, 16 Feb 2018 12:31:39 +0000 (12:31 +0000)]
Bug 20218: Fix matching of uri in tracklinks

The current code matches using a regex, this breaks when the url
contains special characters. We swtich it to equality check

To test:
1 - Enable TrackClicks (either track or anonymous)
2 - Find the URL of a biblio in the OPAC
3 - Paste this into the 856$u of another record
    (or use any url containing a '?' or other characters)
4 - View the record in the opac
5 - Click the URL
6 - 404 Error!
7 - Apply patch
8 - Try again
9 - Success!

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20201: Silence warnings triggered by admin/aqplan.pl
Mark Tompsett [Wed, 14 Feb 2018 20:19:01 +0000 (20:19 +0000)]
Bug 20201: Silence warnings triggered by admin/aqplan.pl

TEST PLAN
---------
0) back up DB
1) Run the following commands on a kohadevbox:
    reset_all
    git bz apply 20185
    echo | sudo tee /var/log/koha/kohadev/plack-error.log
    restart_all
2) Navigate in a staff client:
    Home -> Administration -> Budgets -> Edit -> Planning by libraries
   -- could be any of the planning, but by libraries is nicely visible
   on screen.
3) Run the following commands:
    cat /var/log/koha/kohadev/plack-error.log
   -- several warnings.
4) Run the following commands:
    git bz apply 20201
    echo | sudo tee /var/log/koha/kohadev/plack-error.log
    restart_all
5) repeat step 2 and refresh the staff client page.
   -- this time warnings related to aqplan.pl are not there.
6) run koha qa test tools

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
admin/aqplan.pl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19979: ->count can be called directly on Koha::Objects
Jonathan Druart [Tue, 27 Feb 2018 14:40:13 +0000 (11:40 -0300)]
Bug 19979: ->count can be called directly on Koha::Objects

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19979: Fix get_facets_info test in Search.t
Marcel de Rooy [Tue, 16 Jan 2018 13:28:36 +0000 (14:28 +0100)]
Bug 19979: Fix get_facets_info test in Search.t

The test should remove the holdingbranch key in the expected results when
there is only one branch.
See the logic in C4::Koha.

Test plan:
[1] Run Search.t on a database with multiple branches.
[2] Run Search.t on a database with one branch. Without this patch the test
    would fail: Failed test '_get_facets_info returns the correct data'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20250: (bug 19529 follow-up) Prevent NoIssuesChargeGuarantees.t to fail randomly
Jonathan Druart [Mon, 19 Feb 2018 20:40:06 +0000 (17:40 -0300)]
Bug 20250: (bug 19529 follow-up) Prevent NoIssuesChargeGuarantees.t to fail randomly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
t/db_dependent/Circulation/NoIssuesChargeGuarantees.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20148: Prevent adding same user multiple times to an order
Jonathan Druart [Sun, 18 Feb 2018 18:10:30 +0000 (15:10 -0300)]
Bug 20148: Prevent adding same user multiple times to an order

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20148: Prevent adding same user multiple times to acq basket
Pasi Kallinen [Wed, 7 Feb 2018 07:45:20 +0000 (09:45 +0200)]
Bug 20148: Prevent adding same user multiple times to acq basket

When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.

Test plan:

1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
   the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. You should now get an error message saying
   the user is already in the list.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19452: [17.11.x] Remove the truncate option
Marcel de Rooy [Thu, 12 Oct 2017 11:13:41 +0000 (13:13 +0200)]
Bug 19452: [17.11.x] Remove the truncate option

The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.

Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.

This makes it possible to remove the truncate option altogether.

Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
    value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20145: Do not insert 0000-00-00 in patron tests (and more)
Jonathan Druart [Wed, 14 Feb 2018 18:15:39 +0000 (15:15 -0300)]
Bug 20145: Do not insert 0000-00-00 in patron tests (and more)

We should call Koha::Patron->is_expired in CanBookBeIssued instead of
doing the same calculation.

Tests have been adapted to pass with new SQL modes.

We should not need to update the values in DB, we already have
  Bug 14717: Prevent 0000-00-00 dates in patron data (3.21.00.023)

Test plan:
  prove t/db_dependent/Circulation/dateexpiry.t
  prove t/db_dependent/Koha/Patrons.t
must return green

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
C4/Circulation.pm
t/db_dependent/Koha/Patrons.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoUpdate release notes for 17.11.03 release v17.11.03
Nick Clemens [Thu, 22 Feb 2018 11:08:24 +0000 (11:08 +0000)]
Update release notes for 17.11.03 release

6 years agoIncrement version for 17.11.03 release
Nick Clemens [Thu, 22 Feb 2018 11:00:43 +0000 (11:00 +0000)]
Increment version for 17.11.03 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoTranslation updates for Koha 17.11.03
Koha translators [Thu, 22 Feb 2018 10:45:17 +0000 (07:45 -0300)]
Translation updates for Koha 17.11.03

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19978: Fix ITEMTYPECAT behaviour
Jonathan Druart [Tue, 16 Jan 2018 13:25:00 +0000 (10:25 -0300)]
Bug 19978: Fix ITEMTYPECAT behaviour

ITEMTYPECAT permits to group and hide item types at the OPAC (see bug
10937 for a complete description).

Since commit 091d6c513bcbee224ff06477e79be48cea7fe825
    Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes
the code assume that they are item types. Before it just assigned undef
to the description.

Test plan:
Create ITEMTYPECAT authorised values
Assign an item type to this authorised value group
Search for a item using this item type at the OPAC
Without this patch applied you get:
Can't call method "translated_description" on an undefined value at
/home/vagrant/kohaclone/opac/opac-search.pl line 231.

With this patch applied the search result is displayed.

Make sure the original feature still works.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18975: Retrieve up-to-date CGISESSID when just logged in
Jonathan Druart [Thu, 21 Dec 2017 20:15:43 +0000 (17:15 -0300)]
Bug 18975: Retrieve up-to-date CGISESSID when just logged in

If a user is asked to login before sending a card, the wrong (old)
CGISESSID cookie is used.
We need to retrieve the one that has just been created.

This will certainly need more work, I guess other scripts are affected
too.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20227: Check for categorycode in default_borrower_circ_rules
Marcel de Rooy [Fri, 16 Feb 2018 11:01:36 +0000 (12:01 +0100)]
Bug 20227: Check for categorycode in default_borrower_circ_rules

Fixes silent crash when adding the same category twice.
DBD::mysql::st execute failed: Duplicate entry 'ST' for key 'PRIMARY' [for Statement "
                INSERT INTO default_borrower_circ_rules
                    (categorycode, maxissueqty, maxonsiteissueqty, max_holds)
                    VALUES (?, ?, ?, ?)
            " with ParamValues: 0="ST", 1=undef, 2=undef, 3="3"] at /usr/share/koha/devclone/admin/smart-rules.pl line 309.

(Line number affected by bug 15524.)

Very trivial solution.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19530: Don't update the date arrived for closed transfers
Kyle M Hall [Tue, 30 Jan 2018 16:22:52 +0000 (11:22 -0500)]
Bug 19530: Don't update the date arrived for closed transfers

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19530: Added commentary for last test when prove -v
Mark Tompsett [Thu, 26 Oct 2017 01:28:10 +0000 (21:28 -0400)]
Bug 19530: Added commentary for last test when prove -v

Before patch, prove -v had no comment for the last test.
After patch, it says something in line with second last test.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19530: Prevent multiple transfers from existing for one item
Kyle M Hall [Wed, 25 Oct 2017 18:24:18 +0000 (14:24 -0400)]
Bug 19530: Prevent multiple transfers from existing for one item

We have found multiple open branch transfers for a given item. While I'm not sure how it is happening at this point, it seems that it would make sense to cancel any existing branch transfers when initiating a new one.

Test Plan:
1) prove t/db_dependent/Circulation/transfers.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4319: (QA follow-up) Rename hasItemswaitingOrInTransit to has_items_waiting_or_in...
Alex Arnaud [Fri, 12 Jan 2018 09:51:45 +0000 (09:51 +0000)]
Bug 4319: (QA follow-up) Rename hasItemswaitingOrInTransit to has_items_waiting_or_intransit

and udate pod

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4319: (QA follow-up) Use ReservableItems in all scripts
Marcel de Rooy [Fri, 15 Dec 2017 09:49:44 +0000 (10:49 +0100)]
Bug 4319: (QA follow-up) Use ReservableItems in all scripts

[1] Call CountItemsIssued or hasItemswaitingOrInTransit when needed only.
[2] Add this logic to ISBD and MARC detail too, since they also use
    this include.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirming that Place hold now comes up if you have a waiting item and
circulation rule == If any unavailable.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4319: (QA follow-up) Consistency in IsAvailableForItemLevelRequest
Marcel de Rooy [Fri, 15 Dec 2017 09:09:29 +0000 (10:09 +0100)]
Bug 4319: (QA follow-up) Consistency in IsAvailableForItemLevelRequest

[1] For consistency going back to IsItemOnHoldAndFound in this sub.
    This call is used in the on_shelf_holds == 2 case too.
    The routine will be refactored quite soon.
    Adding the else branch for on_shelf_holds == 0 for more clarity.
[2] Removing the test for found==F in reserves. In Koha F is only used
    when the hold is filled and moved to oldreserves.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4319: [OPAC] Allow holds on waiting/transit items
Alex Arnaud [Tue, 3 Oct 2017 14:50:36 +0000 (14:50 +0000)]
Bug 4319: [OPAC] Allow holds on waiting/transit items

Test plan:

 - Checkout an item
 - Place hold on this item,
 - Return the item
 - Make sure the hold is waiting (found W) and AllowOnShelfHolds is
   not to 'Allow'
 - Check that the button "Place hold" appears in opac detail page of
   the biblio

 - do the samewith items/reserves in transit

Changes on C4::Reserves::IsAvailableForItemLevelRequest

Make sure this tests pass:
  - t/db_dependent/Reserves.t
  - t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t

Rebased - 2017-12-12 - Alex Arnaud

Bug 4319 - [QA fix] Create Koha::Biblio->hasItemswaitingOrInTransit

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19671: Map itemtypes to hash for correct display in issues_stats.pl
Jonathan Druart [Wed, 20 Dec 2017 16:17:50 +0000 (13:17 -0300)]
Bug 19671: Map itemtypes to hash for correct display in issues_stats.pl

To test:
1 - Run the circulation wizard with itemtypes as columns, shelving
locations as rows - display on screen
2 - Note all itemtype values are blank
3 - Switch rows/columns - same issue
4 - Apply patch
5 - Re-run reports
6 - Itemtypes should display correctly

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20135: Prevent staff client language choose pop-up from appearing off-screen
Owen Leonard [Mon, 5 Feb 2018 15:30:48 +0000 (15:30 +0000)]
Bug 20135: Prevent staff client language choose pop-up from appearing off-screen

This patch fixes a bug which was introduced by Bug 19851 ("Improve
responsive layout handling of staff client menu bar."). The changes in
that patch did not take into account the effects it would have on the
language menus in the footer.

This patch adds some additional classes to some menus and adds some CSS
for those classes so that menus are correctly aligned left or right
based on their position on the screen.

To test, apply the patch and clear your cache if necessary. You should
have multiple translations installed and enabled, at least one of which
should have more than one "sub-language" (e.g. en-GB and en-US).

In the staff client, test the appearance of various drop-down menus with
the browser width above and below 800 pixels wide:

- Search and More menus in the header
- User/Library menu in the header
- Language selection in the footer
- Language selection in the header

In all cases, menus should look correct and should not be aligned in
such a way that they disappear off the left or right sides of the
screen.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20166: Untranslatable course reserves delete prompt
Pasi Kallinen [Fri, 9 Feb 2018 06:35:18 +0000 (08:35 +0200)]
Bug 20166: Untranslatable course reserves delete prompt

Having a Template Toolkit statements inside the javascript
translation function _() prevents it from being picked for
translation.

The only example of such is the course reserve delete prompt.
Move the TT statement outside the string.

Test plan:

1) Update and install language xx-YY. Check that the msgids
   "Are you sure you want to delete this course? There is %s attached item."
   and
   "Are you sure you want to delete this course? There are %s attached items."
   do not exist in the xx-YY-staff-prog.po
2) Check the translated file
   intranet-tmpl/prog/fi-FI/modules/course_reserves/course-details.tt
   It should have two prompt texts above in English
3) Install patch
4) Update the language. Check that the msgids show up in
   xx-YY-staff-prog.po, translate them, and install the language.
5) Repeat 2, the prompts should now show up in the correct language.
6) Enable UsecourseReserves
7) Go to Home -> Course reserves
8) Create a new course, and add reserves to it
9) See the course details. Click on Delete course, the prompt
   should be correctly translated
10) Remove all but one of the reserves from the course
11) Repeat 9

To see if there are other such TT statements:

    rgrep -E '\b_\("[^"]*\[%' koha-tmpl/

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20054: Remove attribute "text/css" for <style> element in OPAC
Indranil Das Gupta (L2C2 Technologies) [Sun, 21 Jan 2018 18:29:35 +0000 (23:59 +0530)]
Bug 20054: Remove attribute "text/css" for <style> element in OPAC

Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: maksim <maksim@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19928: Mock delimiter pref in tests
Jonathan Druart [Fri, 9 Feb 2018 17:49:21 +0000 (14:49 -0300)]
Bug 19928: Mock delimiter pref in tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 10032: (follow-up) Move title attribute to button container
Owen Leonard [Thu, 4 Jan 2018 14:16:42 +0000 (14:16 +0000)]
Bug 10032: (follow-up) Move title attribute to button container

This patch modifies the "Close basket" button markup so that the title
attribute on a disabled button is added to the button wrapper <div>
instead of the <a> tag. This allows the title attribute tooltip to
appear when the cursor is hovered over the button.

To test, follow the original patch's test plan and confirm that when the
"Close basket" button is disabled, hovering the mouse over the button
triggers the title attribute tooltip.

Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 10032: Improve GUI when uncertain price prevents closing the basket
Jon Knight [Tue, 12 Dec 2017 17:50:36 +0000 (17:50 +0000)]
Bug 10032: Improve GUI when uncertain price prevents closing the basket

Added disabled "Close this basket" button when uncertain
prices are present.
Note that whilst this has a "title" attribute, there is no tooltip
shown because JQueryUI disabled buttons don't get DOM events.

https://bugs.koha-community.org/show_bug.cgi?id=10032

Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20156: Display a markup for the current language in header menu
Owen Leonard [Wed, 7 Feb 2018 17:42:09 +0000 (17:42 +0000)]
Bug 20156: Display a markup for the current language in header menu

This patch replaces Glyphicon markup with Font Awesome markup so that a
check mark appears next to the currently-selected language in the staff
client header's language menu.

Also changed in this patch: Some classes have been removed because they
are not used in staff client CSS.

To test you must have multiple languages installed and enabled in the
staff client.

 - Set the StaffLangSelectorMode system preference to "top" or "both top
   and footer"
 - Confirm that the currently-select language in the langauge menu has a
   check mark next to it.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20134: Remove /api/v1/app.pl from the generated URLs
Tomas Cohen Arazi [Mon, 5 Feb 2018 13:28:37 +0000 (10:28 -0300)]
Bug 20134: Remove /api/v1/app.pl from the generated URLs

This patch removes the /api/v1/app.pl prefix from generated baseUrl.
It has the consequence of hardcoding / as the base path for the API.

This is ok because we don't currently support mounting Koha pieces in
different than hardcoded paths (/cgi-bin/koha?), but certainly worth
mentioning because this will need to depend on a syspref or config entry
when someone chages this behviour.

To test:
- On master, point your browser to:
  http://kohadev.mydnsname.org:8080/api/v1/
=> FAIL: basePath looks like /api/v1/app.pl/api/v1
- Apply this patch
- Restart memcached and plack:
  $ restart_all
or
  $ sudo systemctl restart memcached && sudo systemctl restart
  koha-common
- Reload http://kohadev.mydnsname.org:8080/api/v1/
=> SUCCESS: basePath is /api/v1
- Sign off :-D

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19928: Acquisitions' CSV exports now honors syspref "delimiter"
Victor Grousset [Wed, 10 Jan 2018 15:07:36 +0000 (16:07 +0100)]
Bug 19928: Acquisitions' CSV exports now honors syspref "delimiter"

Bonus fixes:
- Basketgroup: there was an unnecessary space.
  " RRP tax excluded" replaced by "RRP tax excluded"
- Late orders:
  - leading spaces before every line
  - surrounding spaces for [% orders.size %]

Other changes:
- quoted "Total orders in late" to no worry about additional spaces
- Late orders: additional spaces which shouldn't be a problem because
  all the fields are enclosed by quotes.

Test plan:
1. Set syspref "delimiter" to "#'s"
2. Change the language e.g. FR-fr

3. Create a vendor with minimal info
4. Create a basket with two items
5. Go to the basket. URL should be
   /cgi-bin/koha/acqui/basket.pl?basketno=XXXXX
6. Close this basket
7. "Export as CSV"
8. You should see that the file contains commas "," This is the bug.
   Leave the file open for future comparison to ensure that there are
   no regressions.

9. Create a basket group with two baskets
   (tick the close this basket group check box)
10. Go to the "Closed" tab to see your basket group
11. "Export as CSV"
12. You should see that the file contains commas "," This is the bug.
    Leave the file open for future comparison to ensure that there are
    no regressions.

13. Go to /cgi-bin/koha/acqui/lateorders.pl
14. Tick two orders. Of the same vendor, otherwise Koha won't let you tick
    orders of different vendors.
15. "Export as CSV"
16. You should see that the file contains commas "," This is the bug.
    Leave the file open for future comparison to ensure that there are
    no regressions.

17. Apply this patch
18. Translation stuff
    1. cd misc/translator
    2. perl translate update YOUR_LANG
    3. manually edit the po file, remove the fuzzy tags.
       And translate the string. You can just copy the original and
       replace some parts by gibberish.
    4. perl translate install YOUR_LANG

19. Re-export the same CSVs and compare with the original version to check that
    - delimiter syspref is honored
    - the headers are translatable
    - there is no whitespace regression (additional newlines or spaces)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20124: Make "Save configuration" translatable on "did you mean?" config
Pasi Kallinen [Fri, 2 Feb 2018 07:45:42 +0000 (09:45 +0200)]
Bug 20124: Make "Save configuration" translatable on "did you mean?" config

When saving the "Did you mean?" setting, a popup with the
message "Successfully saved configuration" is shown, but
it cannot be translated. Make it translatable.

Test plan:

1) Go to Home -> Administration -> Did you mean?
2) Change the settings, click on "Save configuration"
3) Popup with "Successfully saved configuration"
4) Apply patch, update po-files, etc.
5) Check that the msgid "Successfully saved configuration"
   is in fi-FI-staff-prog.po, and translate the message
6) install the fi-FI language
7) Change your UI language to finnish
8) Repeat 1, 2, 3. You should now see the same popup
   message translated.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20110: Adding same user multiple times to same budget
Pasi Kallinen [Wed, 31 Jan 2018 09:11:56 +0000 (11:11 +0200)]
Bug 20110: Adding same user multiple times to same budget

In javascript, using indexOf to test if a number exists in an array
of strings doesn't work, and makes it possible to add the same user
multiple times into the same budget fund.
Make borrowernumber into string and compare that instead.

Test plan:

1) Go to Home -> Administration -> Budgets -> Funds -> Add Fund
2) Add a user to the fund
3) Try to add the same user again to the same fund. No error.
4) Apply patch
5) Do 1, 2, and 3 again. You should now get an error message
   saying the user is already in the list.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20109: Make "Remove" translatable when adding a fund
Pasi Kallinen [Wed, 31 Jan 2018 06:51:30 +0000 (08:51 +0200)]
Bug 20109: Make "Remove" translatable when adding a fund

When a user has been added to the fund, the link to "Remove" that user
is not translatable.

Test plan:

1) Install language xx-YY
2) Go to Home -> Administration -> Budgets -> Funds -> Add Fund
3) Add a user to the fund
4) Notice how the "Remove" link after the user's name is not translated
5) Apply patch
6) Look in xx-YY-staff-prog.po, and if needed, translate the msgid
   "Remove"
7) Update and reinstall the language
8) Do 2 and 3 again. The "Remove" link should now be translated.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
https://bugs.koha-community.org/show_bug.cgi?id=10209

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20098: Inventory tool: CVS export: fix itemlost column
Victor Grousset [Mon, 29 Jan 2018 15:09:24 +0000 (16:09 +0100)]
Bug 20098: Inventory tool: CVS export: fix itemlost column

It was mapped with "lost" instead of "itemlost".

== Test plan ==
1. Have a lost item
2. Go to staff:/cgi-bin/koha/tools/inventory.pl
3. Tick "Optional filters" → "items.itemlost" →
      "name of Authorized values for the lost state"
4. Tick "Export to CSV file"
5. Submit
6. Open the CSV
7. Check that the lost item is in the list
8. You should observe that the "Lost status" column is empty for all items
     This is the problem
9. Apply this patch
10. Click submit to re-export the CSV
11. Open the CSV
12. Check that the lost item is in the list
13. You should observe that the "Lost status" column now filled with the
      expected values.
14. Smile because it works! :D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20060: Resolve uninitialized warn from Koha::Template::Plugin::Branches
Marcel de Rooy [Mon, 22 Jan 2018 12:04:33 +0000 (13:04 +0100)]
Bug 20060: Resolve uninitialized warn from Koha::Template::Plugin::Branches

The warn comes from undefined C4::Context->userenv->{branch}.
Can be triggered by calling mainpage.pl when being logged out in staff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12932: Check the Perl version even if all modules installed
Mark Tompsett [Tue, 30 Jan 2018 18:22:42 +0000 (18:22 +0000)]
Bug 12932: Check the Perl version even if all modules installed

The description in comment #0 is quite true, because the
scope of the $checkmodule variable is local to just the
module checking. If we change the scope, we can include the
perl check as part of the new scope, and thus properly set
its value.

As Debian Jessie, Stretch and Ubuntu Xenial all have good
versions of Perl by default, the easiest way to test this
is to:
- make sure to have some optional modules not installed.
- change the system preference 'Version' to one just under
  the current version in your SQL client.
- modify the version check line to 5.030000
- restart_all and try going to the staff client.
  -- This should not inform you that your perl version is bad.
- git reset hard back to origin/master
- apply the patch
- modify the version check line to 5.030000
- change the system preference 'Version' to one just under
  the current version in your SQL client.
- restart_all and try going to the staff client.
  -- This should trigger the patch, and you should
     be informed your perl version is bad.
- git reset hard back to origin/master
- apply the patch
- run koha qa test tools

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11827: (follow-up) Use double quote instead of simple-quote
Jonathan Druart [Mon, 5 Feb 2018 12:56:42 +0000 (09:56 -0300)]
Bug 11827: (follow-up) Use double quote instead of simple-quote

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11827: Make "Cancel Rating" translatable in jQuery rating plugin
Pasi Kallinen [Thu, 25 Jan 2018 11:04:09 +0000 (13:04 +0200)]
Bug 11827: Make "Cancel Rating" translatable in jQuery rating plugin

- Make the "Cancel rating" text translatable (and change
  capitalization to conform to Koha coding guidelines)
- Improve the two other messages to use formatted strings
  instead of concatenation.
- Use the exact same text for the "your rating" text, so it
  only appears once in the po-file.

Test plan:

1. See that the "Cancel rating" -text doesn't appear in
   po/xx-YY-opac-bootstrap.po
2. Note how there's two versions of the your rating -text
   ("your rating: %s, " and "your rating:") in the po-file
3. Apply patch
4. Update the xx-YY translation
5. Check the po-file. It should now contain the "Cancel rating"
   and a single "your rating: %s, "
6. Translate those texts, and update & install the language.
7. Go to the OPAC detail page of a biblio, and check the
   rating texts.
8. Hovering over the rating minus -sign should show the translated
   "Cancel rating"
9. Check that the text after the stars is correct with and without
   your rating

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20031: CGI param in list context warn in guided_reports.pl
Marcel de Rooy [Thu, 18 Jan 2018 14:40:15 +0000 (15:40 +0100)]
Bug 20031: CGI param in list context warn in guided_reports.pl

Resolve warn:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_shadowclone_reports_guided_reports_2epl line 794, this can lead to vulnerabilities. [NOTE: line number from older Koha version.]

Test plan:
Looking at this change should convince you already. Another look at this
routine in C4/Output.pm would be bonus.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19730: (follow-up bug 17196) Use biblio_metadata.timestamp in export_records.pl
Julian Maurice [Fri, 1 Dec 2017 15:51:16 +0000 (15:51 +0000)]
Bug 19730: (follow-up bug 17196) Use biblio_metadata.timestamp in export_records.pl

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.

REVISED TEST PLAN
-----------------
0. Do not apply patch

1. Find a biblio record, remember the biblionumber for step 3

2. Edit the record, modify a field (e.g. 003, 015$q) that is
   not mapped to a DB column, so biblio_metadata.timestamp will
   be modified but not biblioitems.timestamp

3. In MySQL with the koha database selected:
   > select timestamp from biblio where biblionumber=###;
   > select timestamp from biblio_metadata where biblionumber=###;
   -- you'll need to change the ###'s based on the biblionumber
      you remembered in step 1.
   -- the two timestamps will differ.
   -- Remember the timestamp of biblio_metadata for step 4.

4. Run this command:
   $ sudo koha-shell -c bash kohadev
   $ export DATE="YYYY-MM-DD HH:mm:SS"
   -- use the timestamp remembered in step 3.

5. Run this command:
   $ ./misc/export_records.pl --date="$DATE"
   $ ls -la koha.mrc
   -- the file should be 0 bytes.

6. Run this command:
   $ exit
   $ git bz apply 19730
   $ restart_all
   $ sudo koha-shell -c bash kohadev
   $ export DATE="YYYY-MM-DD HH:mm:SS"
   -- use the timestamp remembered in step 3.

7. Run this command:
   $ ./misc/export_records.pl --date="$DATE"
   $ ls -la koha.mrc
   -- the file should be a lot more than 0 bytes.

8. Run this command:
   $ /home/vagrant/qa-test-tools/koha-qa.pl -v 2 -c 1
   -- this should pass.

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20126: Add simple test for ModBiblioMarc
Marcel de Rooy [Fri, 2 Feb 2018 11:06:00 +0000 (12:06 +0100)]
Bug 20126: Add simple test for ModBiblioMarc

Just to confirm that we see record length and base address in a record
that has been passed through ModBiblioMarc.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20126: (follow-up bug 10455) Restore MARC field length calculation in ModBiblioMarc
Marcel de Rooy [Fri, 2 Feb 2018 10:32:49 +0000 (11:32 +0100)]
Bug 20126: (follow-up bug 10455) Restore MARC field length calculation in ModBiblioMarc

Trivial fix. Problem raised by bug 10455.

Test plan:
[1] Create or edit biblio record.
[2] Save and check leader field lengths in MARC view.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20051: Invalid markup in staff client's header.inc
Owen Leonard [Fri, 19 Jan 2018 19:41:35 +0000 (19:41 +0000)]
Bug 20051: Invalid markup in staff client's header.inc

This patch corrects markup errors in header.inc which introduced by
Bug 19851. For id attributes on <span>s have been replaced with classes,
eliminating an HTML validator error about duplicate ids.

Minor unrelated change: Updated an element's id with a more descriptive
name.

Test plan the same as Bug 19851's:

 - Log in to the staff client and confirm that the appearance of the
   menu bar at the top of the screen looks correct at various browser
   widths.
 - Confirm that the logged-in user menu label and help link expand and
   collapse according to browser width.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fix for QA: Corrected ID reference in circ/offline.tt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19750: Overdues without a fine rule add warnings to log
Kyle M Hall [Tue, 5 Dec 2017 15:23:45 +0000 (10:23 -0500)]
Bug 19750: Overdues without a fine rule add warnings to log

When running fines.pl, any overdue items that have no corresponding circulation rule will generate the following warning:

Use of uninitialized value $amount in numeric gt (>) at /usr/share/koha/bin/cronjobs/fines.pl line 133.

Test Plan:
1) Create a single circ rule
2) Backdate a checkout so it is overdue
3) Delete the circ rule
4) Run fines.pl, note the warning
5) Apply this patch
6) Run fines.pl, note the warning is gone

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18497: (follow-up) Chomp newlines in BLOCK
Nick Clemens [Tue, 30 Jan 2018 14:34:10 +0000 (14:34 +0000)]
Bug 18497: (follow-up) Chomp newlines in BLOCK

To test:
Run report
Validate results page at: https://validator.w3.org/

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18497: Use report id to retrieve saved SQL instead of passing param
Nick Clemens [Wed, 3 Jan 2018 13:13:40 +0000 (13:13 +0000)]
Bug 18497: Use report id to retrieve saved SQL instead of passing param

This patch takes some of the code when executing report and moves it to
a sub to be reused when downloading

To test:
1 - Run some very long report (see comment #1)
2 - Try to download, erk!
3 - Apply patch
4 - Run report, results hould not have changed
5 - Try to download, success!
6 - Ensure reports work as before

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17108 - Automatic debian/control updates (stable)
Mirko Tietgen [Tue, 23 Jan 2018 13:00:05 +0000 (14:00 +0100)]
Bug 17108 - Automatic debian/control updates (stable)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20088: Fix uninitialized warning from svc/holds
Marcel de Rooy [Thu, 25 Jan 2018 11:01:30 +0000 (12:01 +0100)]
Bug 20088: Fix uninitialized warning from svc/holds

Use of uninitialized value in array element at svc/holds line 56.

Test plan:
Check if the warn is no longer in the logs; the warning is triggered by
an ajax call from the circulation template in staff.

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20056: Resolve uninitialized warn in cmp_sysprefs.pl
Marcel de Rooy [Mon, 22 Jan 2018 08:49:36 +0000 (09:49 +0100)]
Bug 20056: Resolve uninitialized warn in cmp_sysprefs.pl

When running a compare with --upd flag, I got the following warn:
    Use of uninitialized value in addition (+) at misc/maintenance/cmp_sysprefs.pl line 125.
This is simply resolved by not returning undef but 0 in case of the Version
syspref in the sub UpdateOnePref.

Test plan:
Look at this simple change.

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19827: Removing &checkuniquemember from the export in C4/Members.pm
Zoe Bennett [Wed, 17 Jan 2018 23:16:38 +0000 (23:16 +0000)]
Bug 19827: Removing &checkuniquemember from the export in C4/Members.pm

Test Plan:
- Check that the line &checkuniquemember has been removed from the
export in C4/Members.pm

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20091: Moved FailedLoginAttempts out of Norwegian Patron Database heading
Nick Clemens [Fri, 26 Jan 2018 12:43:58 +0000 (12:43 +0000)]
Bug 20091: Moved FailedLoginAttempts out of Norwegian Patron Database heading

To test:
1 - View systempreferences patron tab
2 - Note FailedLoginAttempts is uner 'Norwegian Patron Database'
3 - apply patch
4 - Now it is under 'General'

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13990: (follow-up) silence warnings on testing
Mark Tompsett [Sun, 28 Jan 2018 06:41:01 +0000 (01:41 -0500)]
Bug 13990: (follow-up) silence warnings on testing

prove t/db_dependent/ILSDI_Services.t

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13990: (QA follow-up) Add unit test coverage
Mark Tompsett [Sun, 28 Jan 2018 06:18:54 +0000 (01:18 -0500)]
Bug 13990: (QA follow-up) Add unit test coverage

prove t/db_dependent/ILSDI_Services.t

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13990: (follow-up) fix various whitespace errors
Mark Tompsett [Fri, 26 Jan 2018 16:20:20 +0000 (16:20 +0000)]
Bug 13990: (follow-up) fix various whitespace errors

- tabs to 4 spaces
- trailing whitespace
- missing vertical whitespace before =head3

Without this patch, this bug fails qa test tools.

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13990: ILS-DI LookupPatron requires ID Type
Jon Knight [Tue, 7 Nov 2017 17:27:56 +0000 (17:27 +0000)]
Bug 13990: ILS-DI LookupPatron requires ID Type

Patch provides a constrained set of borrower attributes to try in turn if the
ID type is not specified.  Also added "email" to the POD documented list of
id types seeing as its quite a useful one for integration developers.

Test plan:

1) without the patch applied, turn on ils-di interface in your admin sysprefs
   and then try accessing the URL:

   https://your-server/cgi-bin/koha/ilsdi.pl?service=LookupPatron&id=Mabel

   replacing "your-server" your Koha dev test domain name (localhost:8080 if
   you're using a kohadevbox VM) and "Mabel" with the first name of a patron
   (Mabel is in the test database already if you're using that).

   You should get back an error message in the XML.

2) Apply the patch and repeat. This time you should get an <id> element in
   the XML with Mabel's patron ID in it.

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19230: (follow-up) Preventing warn when deleting course
Jonathan Druart [Tue, 30 Jan 2018 17:06:27 +0000 (14:06 -0300)]
Bug 19230: (follow-up) Preventing warn when deleting course

Simplify 'unless' statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19230: Preventing warn when deleting course
Aleisha Amohia [Thu, 21 Dec 2017 00:57:21 +0000 (00:57 +0000)]
Bug 19230: Preventing warn when deleting course

To test:
1) Ensure UseCourseReserves is enabled
2) Go to Course Reserves, create a course
3) When you are taken to the course page, you should notice the
'Argument "" isn't numeric in numeric gt' warn
4) Delete course
5) Notice warn, and that no confirm message popped up
6) Apply patch
7) Create a course again. Confirm the 'Argument "" isn't numeric in
numeric gt' warn did not show
8) Delete the course
9) Notice no warn and the confirm message pops up

Sponsored-by: Catalyst IT
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt

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