]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 17602: fix RecordedBooks results pagination
Srdjan [Mon, 27 Nov 2017 04:38:02 +0000 (17:38 +1300)]
Bug 17602: fix RecordedBooks results pagination

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: Translations rework
Srdjan [Mon, 13 Nov 2017 01:25:33 +0000 (14:25 +1300)]
Bug 17602: Translations rework

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: Fix few minor QA issues
Jonathan Druart [Wed, 8 Nov 2017 13:18:53 +0000 (10:18 -0300)]
Bug 17602: Fix few minor QA issues

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: Adapt test plan to make the tests pass
Jonathan Druart [Wed, 8 Nov 2017 13:13:35 +0000 (10:13 -0300)]
Bug 17602: Adapt test plan to make the tests pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: Handle '60+' if there are more than 60 results
Jonathan Druart [Wed, 8 Nov 2017 13:06:49 +0000 (10:06 -0300)]
Bug 17602: Handle '60+' if there are more than 60 results

The service returns "60+" if there are more than 60 results.
Without this patch the "Found %s results in RecordedBooks collection"
line is removed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: Ease translation
Jonathan Druart [Wed, 8 Nov 2017 13:06:30 +0000 (10:06 -0300)]
Bug 17602: Ease translation

Use String.format() to make translation easier

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: (follow-up) t/Koha_ExternalContent_RecordedBooks.t
Srdjan [Tue, 10 Oct 2017 01:26:22 +0000 (14:26 +1300)]
Bug 17602: (follow-up) t/Koha_ExternalContent_RecordedBooks.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: OPAC integration of RecordedBooks
Srdjan [Fri, 23 Sep 2016 06:13:10 +0000 (18:13 +1200)]
Bug 17602: OPAC integration of RecordedBooks

Add RecordedBooks to the users page in the public interface

To Test:
1/ Apply all 3 patches
2/ Set the sysprefs to valid values (you will need a test account with RecordedBooks)
3/ Try a search
4/ Login to the OPAC, try to place a hold, or check an item out
5/ Check the opac-user page, see if your items are showing on the oneclickdigital tab

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: RecordedBooks Integration to Koha
Srdjan [Fri, 23 Sep 2016 06:08:30 +0000 (18:08 +1200)]
Bug 17602: RecordedBooks Integration to Koha

This patch introduces the required sysprefs and Koha::ExternalContent::RecordedBooks

Koha::ExternalContent::RecordedBooks - a wrapper around
WebService::ILS::RecordedBooks::PartnerPatron

RecordedBooks* sysprefs

Nothing functional to test with this patch yet.
But you can run the tests that come with it

 t/db_dependent/Koha_ExternalContent_RecordedBooks.t

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17602: Koha::ExternalContent->koha_patron() will retutn undef rather than die...
Srdjan [Tue, 18 Apr 2017 02:33:38 +0000 (14:33 +1200)]
Bug 17602: Koha::ExternalContent->koha_patron() will retutn undef rather than die if user not logged in

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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21437: Update two-column templates with Bootstrap grid: Patron lists
Owen Leonard [Wed, 2 May 2018 18:37:11 +0000 (18:37 +0000)]
Bug 21437: Update two-column templates with Bootstrap grid: Patron lists

This patch modifies the patron lists templates to use the Bootstrap grid
instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Tools -> Patron lists
   -> View patron list

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 9188: Remove 'debug' information from patron statistics
Mark Tompsett [Wed, 7 Jun 2017 19:28:11 +0000 (15:28 -0400)]
Bug 9188: Remove 'debug' information from patron statistics

TEST PLAN
---------
run patron statistics without filtering
-- notice lots of text at top.
run patron statistics with filtering
-- notice lots of text at top.
apply patch
run it without and without filtering
-- amount of text should be small or none and be related to the filtering selected.
run koha qa test tools

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as expected, i.e. only filtering information is displayed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21376: Add date accessioned to items table on catalogue detail page
Josef Moravec [Mon, 24 Sep 2018 10:13:53 +0000 (10:13 +0000)]
Bug 21376: Add date accessioned to items table on catalogue detail page

Changes in this patch (page catalogue/detail):
    - added date accesioned to items table

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21376: Add ability to date sorting in items table on catalogue detail
Josef Moravec [Wed, 19 Sep 2018 06:05:12 +0000 (06:05 +0000)]
Bug 21376: Add ability to date sorting in items table on catalogue detail

Changes in this patch (page catalogue/detail):
- enable sorting by date in items table

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17282: (follow-up) Compiled CSS
Nick Clemens [Mon, 1 Oct 2018 13:39:40 +0000 (13:39 +0000)]
Bug 17282: (follow-up) Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17282: add template's variable filters
Alex Arnaud [Mon, 24 Sep 2018 12:22:09 +0000 (12:22 +0000)]
Bug 17282: add template's variable filters

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17282: Ability to create charts for SQL reports
Alex Arnaud [Mon, 24 Sep 2018 13:09:35 +0000 (13:09 +0000)]
Bug 17282: Ability to create charts for SQL reports

Add a form under report's result that allow to configure and draw a
chart (pie, bar, line and combination).

Pie: Usefull only for a two-column report's result

bar: Horizontal: Can be horizontal or vertical (check/uncheck
horizontal checkbox),
     Group: allows to group columns (stacked bar chart),
     Line: show some columns as line in a bar chart (combination)

line: line chart :)

This patch adds 2 new js libraries: d3js and c3js:
  - c3.min.css
  - c3.min.js
  - d3.min.js

Test plan:
- Apply this patch,
- execute a report,
- click on show chart settings button (in the tool bar),
- draw chart (click on draw button),
- check the chart

Features:
- Include all rows (ignore pagination),
- Download the chart (svg),
- Choose x column and y columns,
- Exclude last line (Rollup)

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19271: Show vendor name on ordered/spent lists
Katrin Fischer [Thu, 27 Sep 2018 11:29:08 +0000 (12:29 +0100)]
Bug 19271: Show vendor name on ordered/spent lists

 Improvements to the display of lists of ordered and received orders:
 - Show the vendor's name instead of the internal number

 To test:
 - Make sure you have some pending and received orders
 - Access the Spent and Ordered pages by clicking on the
   amount ordered or spent on the acq start page
   - Verify that
     - Vendor name shows

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15971: Add biblioitems to available fields for serial claim notices and fix notic...
Katrin Fischer [Fri, 10 Aug 2018 03:21:56 +0000 (05:21 +0200)]
Bug 15971: Add biblioitems to available fields for serial claim notices and fix notices editor display

This fixes 2 related problems:

1) The editor only offered 3 entries from biblio for adding to the notice:
title, author, serial
It was not clear that actually all fields from biblio can be used.

2) It was not possible to use fields from biblioitems in the notices
which left out important fields like the ISSN.

The patch adds the biblioitems table and changes the editor to show
all entries from biblio and biblioitems table are shown on the left.

To test:
- Create a subscription
- Generate next issue a few times to get late issues
- Create a new notice in the "Claim serial issue" module
  - Use fields from different/all tables
- Make sure an email address is set for
  - the vendor (also check for 'receives claims for late issues')
  - your staff user
- Go to serials > claims
- Claim multiple issues
- Verify the email is generated and contains the correct information

Example notice:

Title: <<biblio.title>>
Author: <<biblio.author>>
ISSN: <<biblioitems.issn>>
ISBN: <<biblioitems.isbn>>
Issue: <<serial.serialseq>>
--

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21454: Remove html filter for Price filtered variables
Jonathan Druart [Sat, 29 Sep 2018 16:12:38 +0000 (13:12 -0300)]
Bug 21454: Remove html filter for Price filtered variables

Generated with:
perl -p -i -e 's/\|\s?\$Price\s?\|\s?html\s%]/| \$Price %]/g' **/*.tt **/*.inc

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21454: Do not require html filter on Price
Jonathan Druart [Sat, 29 Sep 2018 16:10:19 +0000 (13:10 -0300)]
Bug 21454: Do not require html filter on Price

Test plan:
- Apply first patch
- Confirm that tests is failing (t/template_filters.t)
- Apply second patch
- Confirm that tests return green
- Apply last patch
- Confirm that prices are displayed correctly

QA step:
Edit a template and add the following 2 lines:
[% SET p = '<script>alert("foo");</script>' %]
[% x | $Price %]
=> Display '0.00'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21454: Update the tests
Jonathan Druart [Sat, 29 Sep 2018 16:09:59 +0000 (13:09 -0300)]
Bug 21454: Update the tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21393: Add line nubmers to ease fixing
Jonathan Druart [Fri, 21 Sep 2018 15:33:19 +0000 (12:33 -0300)]
Bug 21393: Add line nubmers to ease fixing

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21393: Add tests
Jonathan Druart [Fri, 21 Sep 2018 15:03:05 +0000 (12:03 -0300)]
Bug 21393: Add tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21393: Move missing filters code to a module
Jonathan Druart [Fri, 21 Sep 2018 13:26:03 +0000 (10:26 -0300)]
Bug 21393: Move missing filters code to a module

To make it reusable easily from QA test tools
https://gitlab.com/koha-community/qa-test-tools/issues/3

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12027: (follow-up) Add missing filter
Nick Clemens [Mon, 1 Oct 2018 12:57:47 +0000 (12:57 +0000)]
Bug 12027: (follow-up) Add missing filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12027: (QA follow-up) Fix spelling and tab characters
Julian Maurice [Wed, 26 Sep 2018 14:18:25 +0000 (16:18 +0200)]
Bug 12027: (QA follow-up) Fix spelling and tab characters

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12027: (QA follow-up) Update tests
Martin Renvoize [Fri, 28 Apr 2017 14:23:18 +0000 (15:23 +0100)]
Bug 12027: (QA follow-up) Update tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12027: (follow-up) Added missing documentation
Martin Renvoize [Tue, 27 Jan 2015 13:34:14 +0000 (13:34 +0000)]
Bug 12027: (follow-up) Added missing documentation

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12027: Added shibboleth authentication to the staff client
Martin Renvoize [Thu, 31 Jul 2014 06:21:55 +0000 (06:21 +0000)]
Bug 12027: Added shibboleth authentication to the staff client

- This patch adds shibboleth authentication to the staff client.
- Depending upon how your url structure works, you may or may not need a
  second native shibboleth service provider profile configured for this
  to work.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17877: Add the order's notes to the table
Jonathan Druart [Wed, 19 Sep 2018 22:54:35 +0000 (19:54 -0300)]
Bug 17877: Add the order's notes to the table

This patch adds the vendor and internal note from the acquisition order
to the subscription detail page

Test plan:
- Create an order from a subscription, fill the internal and vendor
notes
- Go to the subscription's detail page
- Confirm that the columns are displayed in the "Acquisition details"
table and contain the correct values
- Make sure the "Home › Administration › Columns settings" admin page
let you hide them by default (for those who will not need them).

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17877: Add columns settings to the orders table on subscription-detail
Jonathan Druart [Wed, 19 Sep 2018 22:45:12 +0000 (19:45 -0300)]
Bug 17877: Add columns settings to the orders table on subscription-detail

Test plan:
- Apply this patch and make sure to restart memcached (to re-read the yaml
file that is cached)
- Go to Home › Administration › Columns settings
- Confirm that a new "Serials" tab contain the different columns of the
"Acquisition details" table displayed on the subscription detail page
(if an order exist for this subscription)
- Play with it
- Go to Home › Serials › Details for subscription #ID
- Confirm that the "Column visibility" button is now displayed on top of
the table that it works correctly.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21340: Add spans with classes around callnumbers in OPAC for additional styling
Kyle M Hall [Wed, 12 Sep 2018 16:38:42 +0000 (09:38 -0700)]
Bug 21340: Add spans with classes around callnumbers in OPAC for additional styling

It would be nice if the callnumber portion of the callnumber + label was in a span, and it also makes sense to wrap the entire callnumber string in a span as well.

Signed-off-by: Petter <petter@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21166: Add column settings to the acquisition table on bib detail
Jonathan Druart [Sat, 28 Jul 2018 15:42:31 +0000 (12:42 -0300)]
Bug 21166: Add column settings to the acquisition table on bib detail

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12747: DBRev 18.06.00.033
Nick Clemens [Mon, 1 Oct 2018 12:04:23 +0000 (12:04 +0000)]
Bug 12747: DBRev 18.06.00.033

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12747: (QA follow-up) Rephrase system preference description
Katrin Fischer [Mon, 24 Sep 2018 20:55:39 +0000 (20:55 +0000)]
Bug 12747: (QA follow-up) Rephrase system preference description

Just a suggestion for a little change to the pref description.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12747: (QA follow-up) Treat 010 according to marcflavour
Charles Farmer [Wed, 29 Aug 2018 15:43:49 +0000 (11:43 -0400)]
Bug 12747: (QA follow-up) Treat 010 according to marcflavour

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 12747: Add extra column in Z3950 search
David Bourgault [Fri, 4 May 2018 19:38:11 +0000 (15:38 -0400)]
Bug 12747: Add extra column in Z3950 search

This patch makes it possible to add an extra column to Z3950 search results.
The system preference AdditionalFieldsInZ3950ResultSearch decides which MARC field/subfields are displayed in the column.

Testing:

I Apply the patch
II Run updatedatabase.pl

ACQUISITIONS
0) Enter a field/subfield in the AdditionalFieldsInZ3950ResultSearch
1) Create a new basket or use an existing one
2) In -Add order to basket-, click "From an external source"
3) Select some search targets and enter a subject heading ex. house
4) Click Search bouton
5) Validate "Additional fields" column with the field/subfield value.

CATALOGUING
0) Shares same syspref as above
1) Go to cataloguing, click New from z3950
2) Fill to result in a successful search
3) Validate column Addition Fields

prove t/db_dependent/Breeding.t

Sponsored-by: CCSR (https://ccsr.qc.ca)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21425: Display basketno correctly in Order error msg
Colin Campbell [Thu, 27 Sep 2018 11:25:28 +0000 (12:25 +0100)]
Bug 21425: Display basketno correctly in Order error msg

carp will display the hash value instead of the desired basketno
in the error message unless we change its behaviour

Use the simpler but effective option of concatenating
the errormessage with the basketno. Error is shown if no
sender or receipient ean is passed in instantiating
an Koha::Edifact::Order object

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 13272: (follow-up) add missing type="text"
Mark Tompsett [Wed, 26 Sep 2018 22:57:32 +0000 (22:57 +0000)]
Bug 13272: (follow-up) add missing type="text"

This addresses comment #13.
This also applies cleanly.

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 13272: (follow-up) Replace tabs with spaces
Mark Tompsett [Wed, 19 Sep 2018 18:49:02 +0000 (18:49 +0000)]
Bug 13272: (follow-up) Replace tabs with spaces

Cleaned up whitespace issues tab vs. space in template.
After applying all patches:
    git diff -w origin/master
For the koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
only the changed type="text" lines will show, but without the
-w, there will be more whitespace changes.

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 13272: (follow-up) fix concerns from comment #5
Mark Tompsett [Wed, 19 Sep 2018 16:48:13 +0000 (16:48 +0000)]
Bug 13272: (follow-up) fix concerns from comment #5

Correct the two issues I pointed out.

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 13272: Adds type="text" to inputs missing it
Christopher Brannon [Sun, 16 Sep 2018 22:06:10 +0000 (22:06 +0000)]
Bug 13272: Adds type="text" to inputs missing it

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 21404: Refactor _build_query subroutines
Josef Moravec [Tue, 25 Sep 2018 07:04:03 +0000 (07:04 +0000)]
Bug 21404: Refactor _build_query subroutines

Test plan:
1) Apply the patch
2) prove t/db_dependent/Breeding.t
3) Try to search using Z39.50, both, authority and biblio should still
work

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21404: Update test
Josef Moravec [Tue, 25 Sep 2018 06:33:02 +0000 (06:33 +0000)]
Bug 21404: Update test

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21404: Remove unused variables in C4::Breeding->_auth_build_query
Josef Moravec [Tue, 25 Sep 2018 06:04:30 +0000 (06:04 +0000)]
Bug 21404: Remove unused variables in C4::Breeding->_auth_build_query

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21318: Add control number as an option to search authority using Z39.50
Josef Moravec [Thu, 6 Sep 2018 09:46:35 +0000 (09:46 +0000)]
Bug 21318: Add control number as an option to search authority using Z39.50

1) Apply the patch
2) Go to administration and set up a z39.50 authority server, which does
support searching by control number (use attribute 12), you can use czech
national library server:
host: aleph.nkp.cz
port: 9991
base: aut-utf
format: MARC21
encoding: UTF-8
3) Try to find an authority by control number using z39.50 - if you use the server
recomended in point 2) there is web access to the base at
http://aleph.nkp.cz/eng/aut

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed a typo in a code comment and a whitespace issue in the template.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21289: Fix "isa" bug during partner request
Andrew Isherwood [Thu, 30 Aug 2018 09:52:43 +0000 (10:52 +0100)]
Bug 21289: Fix "isa" bug during partner request

We cannot call 'handle_commit_maybe' inside a 'try' block.
handle_commit_maybe redirects the client then calls 'exit', this is
interpreted as an error and the 'catch' block is erroneously called.

This patch moves the calling of 'handle_commit_maybe' outside the try
block, it will only be reached if everything inside the try block
suceeds.

To test:
1) Enable ILL and have the FreeForm backend available
2) Create a patron category to hold ILL "partners" to whom requests can
be sent. The category can be called anything, you should note the code
you assign
3) Create a patron that belongs to your new category, the patron must
have a primary email defined.
4) In your <interlibrary_loans> block in koha-conf.xml, ensure you have
a <partner_code> element, it should contain the code you assigned in
step 2
5) Create an ILL request using the FreeForm backend
6) Once the request is created, select the "Place request with partners"
button
7) Select your "partner" from the "Select partner libraries" box
8) Click "Send email"
9) TEST: Observe no errors are displayed in the UI

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16690: Simplify SHOW GRANTS to work when connected
Mark Tompsett [Wed, 8 Jun 2016 02:48:57 +0000 (22:48 -0400)]
Bug 16690: Simplify SHOW GRANTS to work when connected

If the DB is on a remote machine, the web server and the
db server are different, but the SHOW GRANTS code in
installer/install.pl is trying to use the SAME machine.
And even if the permissions were allowed accessing from
both the web and db servers, MySQL won't return the
SHOW GRANTS without access to the mysql.user table. To
install *.* permissions became easiest to get working.
Unless the DB is set up with 'user'@'%', which is also a
potential security issue.

MySQL / MariaDB allow the current connected user to
check their own grants with CURRENT_USER.
There is no need for the installer to know the
IP address of the webserver.

This also removes the need to have permissions for
'koha_kohadev'@'%', because the only process to be
accessing the koha DB is from a known host/ip.
This tightens security too.

TEST PLAN
---------
Install 2 fresh VMs from a Debian ISO.
Make sure they are on the same network (192.168.50.x) as
the kohadevbox. You will need to remember one as DB_IPADDRESS.

On the DB VM & Third VM:
sudo apt-get install mariadb-server mariadb-client net-tools
-- the third vm just needs to be able to run mysql to access
   the DB VM.

On DB VM:
sudo vi /etc/mysql/mariadb.conf.d/50-server.cnf
-- make sure the bind-address line is commented out with a #
sudo service mariadb restart
-- congratulations, your DB server is listening to remote
   calls now.

sudo mysql -u root
CREATE DATABASE koha_kohadev;
GRANT ALL PRIVILEGES ON `koha_kohadev`.* TO 'koha_kohadev'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
-- now you have an empty DB ready to run a web install on.
   However, because only koha_kohadev from localhost is
   allowed, we expect failure when we try to run the web
   installation step when we get there.

Let's confirm that everything is working as expected
before trying.  It will also demonstrate the reason why
this patch is superior to the existing code.

On a kohadevbox:
mysql -u koha_kohadev -h DB_IPADDRESS -p
-- this should be denied

On DB VM:
DROP USER 'koha_kohadev'@'localhost';
GRANT ALL PRIVILEGES ON `koha_kohadev`.* TO 'koha_kohadev'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

On a kohadevbox:
mysql -u koha_kohadev -h DB_IPADDRESS -p
-- this should give you a SQL prompt
SHOW GRANTS FOR CURRENT_USER;
-- this should show two lines based on 'koha_kohadev'@'%';
SHOW GRANTS FOR 'koha_kohadev'@'192.168.50.10';
-- this should give an access denied error.
SHOW GRANTS FOR 'koha_kohadev'@'%';
-- this should show two lines based on 'koha_kohadev'@'%';
QUIT
-- This case requires the unless code currently in place,
   because we aren't checking CURRENT_USER.

On DB VM:
DROP USER 'koha_kohadev'@'%';
GRANT ALL PRIVILEGES ON `koha_kohadev`.* TO 'koha_kohadev'@'192.168.50.10' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

On a kohadevbox:
mysql -u koha_kohadev -h DB_IPADDRESS -p
-- this should give you a SQL prompt
SHOW GRANTS FOR CURRENT_USER;
-- this should show two lines based on 'koha_kohadev'@'%';
SHOW GRANTS FOR 'koha_kohadev'@'192.168.50.10';
-- this should show two lines based on 'koha_kohadev'@'192.168.50.10';
SHOW GRANTS FOR 'koha_kohadev'@'%';
-- this should give an access denied error.
QUIT
-- This case demonstrates that we have two failure points:
       1) The GRANT command by the DB Admin and
       2) The koha-conf.xml setting.
   This is why CURRENT_USER is superior: only (2) is the
   failure point.

On DB VM:
GRANT ALL PRIVILEGES ON `koha_kohadev`.* TO 'koha_kohadev'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
SELECT host,user FROM mysql.user;
-- Should see both koha_kohadev for 192.168.50.10 and %.

On a kohadevbox:
mysql -u koha_kohadev -h DB_IPADDRESS -p
-- this should give you a SQL prompt
SHOW GRANTS FOR CURRENT_USER;
-- this should show two lines based on 'koha_kohadev'@'192.168.50.10';
SHOW GRANTS FOR 'koha_kohadev'@'192.168.50.10';
-- this should show two lines based on 'koha_kohadev'@'192.168.50.10';
SHOW GRANTS FOR 'koha_kohadev'@'%';
-- this should give an access denied error.
QUIT
-- This case doesn't need the unless. CURRENT_USER still
   just works.

On an third VM on the same network:
mysql -u koha_kohadev -h DB_IPADDRESS -p
-- this should give you a SQL prompt
SHOW GRANTS FOR CURRENT_USER;
-- this should show two lines based on 'koha_kohadev'@'%';
SHOW GRANTS FOR 'koha_kohadev'@'192.168.50.10';
-- this should give an access denied error.
SHOW GRANTS FOR 'koha_kohadev'@'%';
-- this should show two lines based on 'koha_kohadev'@'%';
QUIT
-- This case demonstrates that it may be more open than a DB
   administrator would prefer. And notice, CURRENT_USER still
   just works.

On DB VM:
DROP USER 'koha_kohadev'@'192.168.50.10';
DROP USER 'koha_kohadev'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'koha_kohadev'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
-- This basically give koha_kohadev free reign to do pretty
   dangerous stuff.

On an third VM on the same network:
mysql -u koha_kohadev -h DB_IPADDRESS -p
-- this should give you a SQL prompt
SHOW GRANTS FOR CURRENT_USER;
-- this should show a line based on 'koha_kohadev'@'%';
SHOW GRANTS FOR 'koha_kohadev'@'192.168.50.10';
-- this should give a no such grant error.
SHOW GRANTS FOR 'koha_kohadev'@'%';
-- this should show two lines based on 'koha_kohadev'@'%';
QUIT
-- This case demonstrates that it may be more open than a DB
   administrator would prefer. And notice, CURRENT_USER still
   just works.

In the old code, both cases were literally checked.
This tweak is an optimization which doesn't require
setting permissions to the mysql.user table. Without it,
the code says the user doesn't have permissions to check
the show grants.  This issue is not visible to the user,
because both cases are checked.

On DB VM:
SELECT host,user FROM mysql.user;
-- for each one do an appropriate DROP USER 'user'@'host';
GRANT ALL PRIVILEGES ON `koha_kohadev`.* TO 'koha_kohadev'@'192.168.50.10' IDENTIFIED BY 'password';

On kohadevbox:
-- Make sure the /etc/koha/sites/kohadev/koha-conf.xml
   points to the DB VM.
-- Make sure a web install runs correctly

On third VM:
-- Make sure unable to connect as koha_kohadev/password.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I have not followed the whole test plan but trusting author and SO
Changes make sense to me

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: (follow-up) Pass opacuser_js from plugins as raw
Nick Clemens [Wed, 26 Sep 2018 10:17:01 +0000 (10:17 +0000)]
Bug 13618: (follow-up) Pass opacuser_js from plugins as raw

We expect this field to contain script tags, html processing breaks them

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21416: 'gr' option missing from ZEBRA_LANGUAGE options in koha-sites.conf
Andreas Roussos [Thu, 27 Sep 2018 04:54:27 +0000 (07:54 +0300)]
Bug 21416: 'gr' option missing from ZEBRA_LANGUAGE options in koha-sites.conf

'gr' (as in 'Greek') is missing from the ZEBRA_LANGUAGE options
in debian/templates/koha-sites.conf. This patch fixes that.

Test plan:
1) view koha-sites.conf and notice how 'gr' is missing from the
   ZEBRA_LANGUAGE options
2) apply the patch
3) observe that koha-sites.conf now includes 'gr' as an option

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21167: (QA follow-up) Use accounttype.inc for generating account description
Josef Moravec [Wed, 19 Sep 2018 08:07:57 +0000 (08:07 +0000)]
Bug 21167: (QA follow-up) Use accounttype.inc for generating account description

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21167: (QA follow-up) Fix amount formatting on invoice receipt
Josef Moravec [Wed, 19 Sep 2018 07:53:32 +0000 (07:53 +0000)]
Bug 21167: (QA follow-up) Fix amount formatting on invoice receipt

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21167: Fix price formatting on printed fee invoice and receipt
Katrin Fischer [Wed, 8 Aug 2018 19:26:47 +0000 (19:26 +0000)]
Bug 21167: Fix price formatting on printed fee invoice and receipt

The prices were not formatted correctly on the printed receipts
for fines and payments in the patron account.

This patch introduces the use of the Price TT plugin to those
templates.

Also:
- Fixes a few capitalization errors
- Removes spaces in front of :
- Updates accounttype-to-description list to the one used
  in other templats as a lot of values were missing (Credit etc.)

To test:
- Create several fines, use some .00 and some with other values
- Pay some fines
- Create a manual credit
- Use print button for all of those (credit, fee, payment)
- Verify that:
  - prices ending in .00 are displayed without the decimal part
  - instead of Credit only C is shown in the description
- Apply patch
- Print invoices and receipts again
- Verify that:
  - prices are now formatted according to CurrencyFormat system
    preference, decimal part always included
  - verify that correct description for Credit is shown

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20785: Advanced Editor does not honor MarcFieldDocURL
Pasi Kallinen [Fri, 24 Aug 2018 08:05:04 +0000 (11:05 +0300)]
Bug 20785: Advanced Editor does not honor MarcFieldDocURL

The advanced MARC editor, Rancor, doesn't obey MarcFieldDocURL.
Make it do so.

Test plan:

1) Enable EnableAdvancedCatalogingEditor
2) Set MarcFieldDocURL to eg. http://{MARC}.example.com/{LANG}/{FIELD}
3) Go to Cataloging -> Advanced editor
4) Go to any field and press Ctrl-H
5) Marc field documentation on www.loc.gov or ifla.org should open
6) Apply patch
7) Repeat 3 and 4. The Marc field docs should open on the URL you set

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21078: overdrive.js Catch error if window.opener is not accessible
Nick Clemens [Sat, 14 Jul 2018 14:29:53 +0000 (14:29 +0000)]
Bug 21078: overdrive.js Catch error if window.opener is not accessible

To Test:
0 - Enable overdrive search results on your koha
1 - From a source develop a link to your koha instance that opens a new
window:
<a target="_blank"
href="http://localhost:8080/cgi-bin/koha/opac-search.pl?q=love">Test</a>
2 - Click that link
3 - Note Overdrive results do not load
4 - Note error in JS console
5 - Apply patch
6 - Click the link again
7 - Note OD results load
8 - Note no error in console

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20241: Fix display of publication year in subscription record search for MARC21
Katrin Fischer [Sat, 11 Aug 2018 23:55:35 +0000 (23:55 +0000)]
Bug 20241: Fix display of publication year in subscription record search for MARC21

The old problem: UNIMARC uses biblio.publicationyear, MARC21 uses
biblio.copyrightdate. Patch adds a fallback, if there is nothing
in publicationyear, copyrightdate will be displayed.

To test:
  - In a MARC21 database
  - Add a new subscription
  - Search for records
  - Verify the publication year column remains empty
  - Apply patch
  - Repeat search
  - Verify that the year now shows

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

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21362: Advanced editor: Fix tab navigation in fixed fields
Ere Maijala [Fri, 13 Oct 2017 11:07:21 +0000 (14:07 +0300)]
Bug 21362: Advanced editor: Fix tab navigation in fixed fields

Also minor tweaks to how the fields look.

Test plan:

1. Try moving from field to field and inside control fields with tab/shift-tab.
2. Make sure focus doesn't get stuck in any position.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21396: Add 2 missing use statements in Koha::Account
Jonathan Druart [Fri, 21 Sep 2018 20:55:40 +0000 (17:55 -0300)]
Bug 21396: Add 2 missing use statements in Koha::Account

1. require C4::Letters must be use C4::Letters (from bug 19191)

2. There is call to C4::Circulation::ReturnLostItem, but no use of
C4::Circulation (from bug 20631)

Test plan:
finger crossed, I ran the tests from t/db_dependent/Koha and they all
passed

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16739: Show note instead of 500 error for 'Generate EDIFACT' when no EDI account...
Jon Knight [Mon, 14 May 2018 15:30:55 +0000 (15:30 +0000)]
Bug 16739: Show note instead of 500 error for 'Generate EDIFACT' when no EDI account is configured

When a book seller (vendor) does not have EDI account information configured
the basketgroup display still shows a button to generate EDIFACT output which
results in 500 error when clicked.  This patch fixes two aspects of this:

a) it stops the button being displayed in the first place, replacing it with
a message that explains there is not EDIFACT configuration for the vendor.

b) if, somehow, an edifact print operation is passed to the basketgroup
script it detects the lack of an EAN and redirects back to the basket group
display page with a warning message.

To test:
1) Create a vendor with no EDI details.
2) Create a basket with some items in, then close it and add it to a basket
   group for this vendor.
   3) Go to that vendor's basket groups, click on the "Closed" tab and then
      click on the 'generate edifact order' button. You should get a 500 error.
   4) Apply this patch.
   5) Repeat 3, except this time you should find that the 'generate edifact
      order' button has been replaced with a note that there is
      "No EDIFACT configuration for <vendor>".

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21398: Make search field mandatory when adding to a basket from an existing record
Jonathan Druart [Sat, 22 Sep 2018 14:08:16 +0000 (11:08 -0300)]
Bug 21398: Make search field mandatory when adding to a basket from an existing record

Test plan:
- Create a basket
- Click the "Add to basket" button
- Click "Search" on the first line
=> Without this patch you get an ugly screen: https://snag.gy/U8X3ZK.jpg
=> With this patch applied you will not be able to submit without
filling the input in

QA note: Yes, we could handle that controller side as well, but much
more work.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21407: Can't enter new macros in the advanced cataloging editor (rancor)
Owen Leonard [Tue, 25 Sep 2018 13:51:02 +0000 (13:51 +0000)]
Bug 21407: Can't enter new macros in the advanced cataloging editor (rancor)

This patch upgrades Codemirror to the latest version (5.40.2). Doing so
fixes a problem with the advanced cataloging editor's macro editor which
appears in the latest version of Firefox (62): The first line of the
macro editor is not visible.

To test, apply the patch and clear your browser cache if necessary.
EnableAdvancedCatalogingEditor must be set to "Enable."

- Go to Cataloging -> Advanced editor.
- Click the "Macros" toolbar button.
- In the main part of this modal window you should see a blank line
  marked "1."
- Click "New macro..."
- The editor's line 1 should now be editable. Enter text to confirm that
  it works correctly.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21297: Display public lists to existing lists when adding a new item
Jonathan Druart [Fri, 14 Sep 2018 22:56:44 +0000 (15:56 -0700)]
Bug 21297: Display public lists to existing lists when adding a new item

If there are no private lists the public lists are not displayed.

Test plan:
1) Add 10 public lists (This is when the 'More lists' menu item becomes
view-able)
2) Select an item
3) Click Add to list
4) Select 'More Lists' menu item
5) Note that 'Select an existing list' is an available option

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16424: Compiled CSS
Nick Clemens [Fri, 28 Sep 2018 19:17:13 +0000 (19:17 +0000)]
Bug 16424: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16424: (QA follow-up) Use Modern::Perl
Katrin Fischer [Thu, 27 Sep 2018 13:16:09 +0000 (13:16 +0000)]
Bug 16424: (QA follow-up) Use Modern::Perl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16424: Update default values in advanced editor when changing frameworks.
Ere Maijala [Fri, 10 Nov 2017 06:28:01 +0000 (08:28 +0200)]
Bug 16424: Update default values in advanced editor when changing frameworks.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16424: Handle framework code properly also when adding a new record
Ere Maijala [Sun, 16 Sep 2018 22:06:12 +0000 (01:06 +0300)]
Bug 16424: Handle framework code properly also when adding a new record

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16424: Make the svc/bib service keep the existing framework code
Ere Maijala [Sun, 16 Sep 2018 18:39:54 +0000 (21:39 +0300)]
Bug 16424: Make the svc/bib service keep the existing framework code

Previously the framework code would have been reset when the record was saved, but that seems to have been a mistake.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16424: Minor CSS change for the advanced editor Settings menu
Ere Maijala [Sun, 16 Sep 2018 21:41:14 +0000 (00:41 +0300)]
Bug 16424: Minor CSS change for the advanced editor Settings menu

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 16424: Add framework support to advanced MARC editor
Ere Maijala [Sun, 16 Sep 2018 18:37:06 +0000 (21:37 +0300)]
Bug 16424: Add framework support to advanced MARC editor

Keeps the selected framework, allows selecting another and validates the record using the correct framework. Contains additional minor tweaks to display proper error messages.

To test:
1. Add a record with a non-default framework in the basic editor.
2. Switch to advanced editor and make sure the settings menu displays the correct framework.
3. Save the record and confirm that the framework code did not change.
4. Change the framework and save the record again.
5. Verify that the framework code changed.
6. Change one framework to make an extra field mandatory.
7. Make sure that the field is required in the editor when the framework above is selected but not when another framework is selected.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21377: Remove erroneous "html" filter use
Andrew Isherwood [Wed, 19 Sep 2018 08:34:21 +0000 (09:34 +0100)]
Bug 21377: Remove erroneous "html" filter use

The "html" filter that is being applied to these variable declarations
is inappropriate and has been removed.
I've also simplified things by removing two of the extraneous variable
declarations.

To test:

- Before applying the patch, on master, view the "Manage request" page
for an ILL request
- TEST: Observe that, apart from the "Edit request" button, the various
available action buttons do not display correctly
- Apply the patch
- TEST: Refresh the page and observe that the buttons now display
correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20534: Floating toolbar when editing vendors
Owen Leonard [Fri, 6 Apr 2018 12:53:35 +0000 (12:53 +0000)]
Bug 20534: Floating toolbar when editing vendors

This patch moves the Save and Cancel controls on the vendor edit form
into a toolbar which sticks to the top of the screen as you scroll.

To test, apply the patch and Acquisitions -> New vendor.

- Confirm that as you scroll down the page, the toolbar with the Save
  and Cancel buttons sticks to the top of the screen.
- Test that the Save and Cancel buttons both work correctly.
- Perform the same tests when editing an existing vendor.

Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21341: Style button on acquisitions existing record search with Bootstrap
Owen Leonard [Wed, 12 Sep 2018 17:43:15 +0000 (17:43 +0000)]
Bug 21341: Style button on acquisitions existing record search with Bootstrap

This patch adds Bootstrap button styles to two links: View MARC and
Order.

Unrelated: A "modal-wide" class has been added to the View MARC modal to
give more room for the MARC view.

To test, apply the patch and go to Acquisitions -> Vendor -> Basket ->
Add to basket -> From an existing record.

In the record search results, confirm that the View MARC and Order links
are now Bootstrap buttons. Test the View MARC button and confirm that
the modal preview fills most of the screen.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21333: (follow-up) Make link a button
Nick Clemens [Sat, 15 Sep 2018 22:36:40 +0000 (22:36 +0000)]
Bug 21333: (follow-up) Make link a button

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21333: Add ability to add to basket from a new file
Nick Clemens [Tue, 11 Sep 2018 16:26:04 +0000 (16:26 +0000)]
Bug 21333: Add ability to add to basket from a new file

This patch adds a workflow for adding to a basket from a file. It
removes the need to stage the file before going to the basket and allows
you to stage the file and return to the basket

To test:
1 - Have basket in acquissitions
2 - Click add to basket
3 - Note new option to 'Add from new file'
4 - Click it
5 - You will be sent to the record import tool
6 - Stage your file
7 - There is a link after staging 'Add records to basket'
8 - Click it
9 - Your items should be added

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19620: Allow skipping of patrons with valid emails for Talking Tech
Kyle M Hall [Fri, 2 Mar 2018 16:10:12 +0000 (11:10 -0500)]
Bug 19620: Allow skipping of patrons with valid emails for Talking Tech

Some libraries want to be able to skip patrons with valid email addresses when generated outbound files for Talking Tech.

Test Plan:
1) Apply this patch
2) Run TalkingTech_itiva_outbound.pl
   Overdue will be easiest to use for testing
3) Note one or more patrons show up that have email addresses
4) Run again with -s ( or --skip-patrons-with-email )
5) Note the new file no longer has patrons with emails!

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I did not test but changes make sense

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7143: Update about page for new dev - Alberto Martinez
Nick Clemens [Wed, 26 Sep 2018 19:00:16 +0000 (19:00 +0000)]
Bug 7143: Update about page for new dev - Alberto Martinez

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21350: Added icon to Pending on-site checkouts and moved
Alberto [Sun, 16 Sep 2018 22:34:37 +0000 (15:34 -0700)]
Bug 21350: Added icon to Pending on-site checkouts and moved

When pending on-site checkouts is enabled, it will display checkout items that are being used in the library

test plan:
1. Go to Koha administration
2. Search for "onSiteChekouts"
3. Enable "onSitecheckout"
4. Save all Circulation preferences
5. Go back to home page and click "Circulations"
6. Please confirm there is an icon and the link is below Fast cataloging

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: replace tabs with 4 spaces

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20915: Use date --iso-8601 instead of date +%Y-%m-%d
Victor Grousset [Tue, 12 Jun 2018 14:04:37 +0000 (14:04 +0000)]
Bug 20915: Use date --iso-8601 instead of date +%Y-%m-%d

In delete_patrons.pl's POD
To be more readable and crontab friendly

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20669: Add upgrade method to plugins
Kyle M Hall [Thu, 26 Apr 2018 19:07:07 +0000 (15:07 -0400)]
Bug 20669: Add upgrade method to plugins

It would be nice if plugins had an upgrade method to handle altering tables and such when a new version of a plugin is installed. Right now it must be done in a completely bespoke manner.

Test Plan:
1) Apply this patch
2) Download the 2 most recent releases of the Kitchen Sink plugin
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
3) Install the earlier release
4) Look at the configuration page, at the bottom it should say the
   plugin has never been upgraded
5) Install the newer release
6) Reload the configuration page, it should now say that the plugin
   was upgraded and give you the date and time of the upgrade

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21380: (QA follow-up) Use uri filter in link parameters
Josef Moravec [Thu, 20 Sep 2018 11:35:11 +0000 (11:35 +0000)]
Bug 21380: (QA follow-up) Use uri filter in link parameters

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21380: Circulation history UI improvements - make barcode clickable
Owen Leonard [Wed, 19 Sep 2018 14:48:08 +0000 (14:48 +0000)]
Bug 21380: Circulation history UI improvements - make barcode clickable

This patch modifies the patron circulation history template so that the
barcode of each item links to the item details page.

To test, apply the patch and view the circulation history for a patron
with multiple current or past checkouts.

In the table of titles, the barcode for each item should correctly link
to the item details page for that item.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21397: Mark "Routing list" tab as active when selected
Jonathan Druart [Fri, 21 Sep 2018 21:35:06 +0000 (18:35 -0300)]
Bug 21397: Mark "Routing list" tab as active when selected

/members/routing-lists.pl?borrowernumber=5 show the different tab of the
menu but "Routing lists" is not displayed as the selected one (active).

"routinglistview" must be set and passed to the template

Test plan:
Enable the RoutingSerials pref
and hit /members/routing-lists.pl?borrowernumber=42

The "Routing lists" tab must be selected/active

Followed test plan and tab now shows as active.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 5458: DBRev 18.06.00.032
Nick Clemens [Wed, 26 Sep 2018 16:17:06 +0000 (16:17 +0000)]
Bug 5458: DBRev 18.06.00.032

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 5458: increase ccode column to varchar 80
Fridolin Somers [Tue, 4 Sep 2018 08:40:29 +0000 (10:40 +0200)]
Bug 5458: increase ccode column to varchar 80

Koha allows you to define an authorised value having length 80, but then you
can't use it.

Here is why:
The SQL field items.ccode is a varchar(10).
The SQL field authorised_values.authorised_value is a varchar(80).
Therefore the authorised value is truncated to length 10 in items.ccode and the mapping from authorised value to description string fails in Koha.

This patch increases ccode column to varchar 80, like location.

Test plan :
1) Dont apply patches
2) Check there is on item field a subfield with authorised value category CCODE
3) Check this subfield is linked with database column items.ccode
4) Create an authorised values in category CCODE with 'DOCUMENTATION'
5) Edit an item on ccode and choose 'DOCUMENTATION'
6) Save item
7) Look at items.ccode in database or export in MARCXML
8) The value is troncated to 'DOCUMENTAT'
9) Apply patches and update database with installer/data/mysql/atomicupdate/bug_5458.sql
10) Repeate step 5 to 7
11) The value is not truncated 'DOCUMENTATION'

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20023: (QA follow-up) Tiny simplification
Marcel de Rooy [Fri, 21 Sep 2018 09:38:15 +0000 (11:38 +0200)]
Bug 20023: (QA follow-up) Tiny simplification

Remove empty emails from the list rightaway.
Would be tempted to lc the params->{email} at the start btw..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20023: Password recovery using email should be case insensitive
Blou [Mon, 17 Sep 2018 20:34:19 +0000 (16:34 -0400)]
Bug 20023: Password recovery using email should be case insensitive

When entering an email to recover the password, a user should not have to know or remember the casing of the given email.

Test
0) enable OpacResetPassword
1) On the OPAC, click "Forgot your password"
2) Enter your email address as in your user account BUT WITH A DIFFERENT CASING
3) Submit.  This will fail.
4) Apply the patch, redo with success.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21196: Use replacement cost from the item type if not set at item level
Jonathan Druart [Mon, 13 Aug 2018 15:40:22 +0000 (12:40 -0300)]
Bug 21196: Use replacement cost from the item type if not set at item level

When circ rules are set to cap at item replacement cost, calcfine only
checks the price in the item record, not the default replacement cost by
item type.

Note: We do not take '0' into account, what if you do not want to set
a replacement cost for an item? It is how it is done in chargelostitem
so keeping the existing behaviour, but that may be considered as a bug (?)

Test plan:
- Set useDefaultReplacementCost to use
- Set a default replacement cost for a given item type
- Create an item of that type with a replacementcost=0
- Create a circ rule for that item type that accrues fines but caps at
replacement cost
- check the item out, forcing a due date in the past
- check that item in
=> Fines should have been generated

Signed-off-by: Caroline Cyr La rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21196: Add tests
Jonathan Druart [Mon, 13 Aug 2018 15:36:41 +0000 (12:36 -0300)]
Bug 21196: Add tests

Signed-off-by: Caroline Cyr La rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21353: (follow-up) same check for select/clear all links
Jonathan Druart [Sun, 16 Sep 2018 17:41:49 +0000 (10:41 -0700)]
Bug 21353: (follow-up) same check for select/clear all links

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21353: Display checkboxes to merge patron even if cannot manage lists
Jonathan Druart [Sat, 15 Sep 2018 18:02:05 +0000 (11:02 -0700)]
Bug 21353: Display checkboxes to merge patron even if cannot manage lists

When permission 'manage_patron_lists' is off, there is no checkbox on
/cgi-bin/koha/members/member.pl to merge patrons.

Test plan:
Remove permission manage_patron_lists
Add permission edit_borrowers
Search for patrons
=> Without this patch you will not be able to select patrons to merge
(checkboxes are not displayed)

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21323: Handle multi params in redirect after login
Jonathan Druart [Fri, 14 Sep 2018 23:10:56 +0000 (16:10 -0700)]
Bug 21323: Handle multi params in redirect after login

Multi params are not handle correctly after login

Test plan:
[0] Use staff interface
[1] Use advance search and tick itemtype more than one checkbox
[2] Copy result url
[3] Logout
[4] Paste url in browser
[5] Type username and password
[6] In search result page, results limit description under breadcrumbs
will show all limits

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20223: Merge members-menu and circ-menu inc files
Owen Leonard [Fri, 29 Jun 2018 14:26:17 +0000 (14:26 +0000)]
Bug 20223: Merge members-menu and circ-menu inc files

This patch removes members-menu.inc and replaces the last functional use
of it with a call to circ-menu.inc.

An invalid use of members-menu.inc has been removed from member.tt.

To test, apply the patch and open a patron record for editing. The
sidebar menu should look correct and all sidebar links should work
correctly.

View the patrons home page and confirm that nothing has broken.

Search the Koha codebase for references to members-menu.inc. There
should be none.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21281: (QA follow-up) Introduce _add_backtics
Marcel de Rooy [Fri, 21 Sep 2018 07:15:08 +0000 (09:15 +0200)]
Bug 21281: (QA follow-up) Introduce _add_backtics

Added a (initially trivial) test in Creators/Lib.t too.
Sometimes you start something, but you end somewhere else ;)

The test seems a bit slower now (regex, lookahead, etc). But this should
not hurt label creators in daily use.
Advantages: code is even more solid, consolidated in one place and can be
tested on its own.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21281: Correct t/db_dependent/Creators/Lib.t failures
Mark Tompsett [Wed, 5 Sep 2018 18:41:32 +0000 (18:41 +0000)]
Bug 21281: Correct t/db_dependent/Creators/Lib.t failures

TEST PLAN
---------
1) apply first patch
2) kshell kohadev
3) prove -r -v t/db_dependent/Creators/
   -- failures
4) apply this patch
5) repeat 2,3
   -- no failures
6) run koha qa test tools

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21281: Surround creator_templates.rows with backquotes
Jonathan Druart [Wed, 29 Aug 2018 20:05:50 +0000 (17:05 -0300)]
Bug 21281: Surround creator_templates.rows with backquotes

'rows' is a reserved word since MariaDB 10.2.4 and MySQL
https://mariadb.com/kb/en/library/mariadb-1024-release-notes/
https://dev.mysql.com/doc/refman/8.0/en/keywords.html

Test plan:
Do not apply this patch and make sure you recreate the reported issue
Apply this patch and confirm that it is now fixed.

QA will take care for the changes in installer and test files

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20819: (Follow-up) Show more clearly that a user gave no consent
Marcel de Rooy [Fri, 21 Sep 2018 06:00:20 +0000 (08:00 +0200)]
Bug 20819: (Follow-up) Show more clearly that a user gave no consent

See comment60 on Bugzilla.
Although I intentionally did not want to show date and time of refusal,
we can obviously add one line saying that we already have a no.

Test plan:
Login without consent and see no additional line.
Agree and verify that you see the registered on xxx line.
Disagree and verify that you now see "You indicated recently...".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20743: Remove duplicated line 'See your public page'
Nick Clemens [Fri, 21 Sep 2018 11:39:30 +0000 (11:39 +0000)]
Bug 20743: Remove duplicated line 'See your public page'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20656: (RM follow-up) Add missing filter
Nick Clemens [Thu, 20 Sep 2018 13:35:29 +0000 (13:35 +0000)]
Bug 20656: (RM follow-up) Add missing filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20656: (follow-up) Don't display title for F or FU fines (it is in description)
Nick Clemens [Sun, 16 Sep 2018 03:50:13 +0000 (03:50 +0000)]
Bug 20656: (follow-up) Don't display title for F or FU fines (it is in description)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>