]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 20334: Option for escaping slashes in search queries
David Gustafsson [Fri, 2 Mar 2018 17:16:39 +0000 (18:16 +0100)]
Bug 20334: Option for escaping slashes in search queries

Add "QueryRegexEscapeOption" system preference to provide option to escape
Elasticsearch regexp delimiters (/) within queries, or alternativly to
unescape escaped slashes (\/) while escaping unescaped slashes, in
effect making "\/" the new regexp delimiter.

How to test:
1) Run tests in ./t/Koha/SearchEngine/ElasticSearch/QueryBuilder.t
2) All tests should succeed

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15422: Consider partial copies needed as whole numbers
Nick Clemens [Tue, 4 Dec 2018 14:58:35 +0000 (14:58 +0000)]
Bug 15422: Consider partial copies needed as whole numbers

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15422: Correct calculation of holds ratio report
Nick Clemens [Thu, 29 Nov 2018 02:07:18 +0000 (02:07 +0000)]
Bug 15422: Correct calculation of holds ratio report

See comment 1 for a detailed explanation of current calculations and
needed calculations

Also removes an unnecessary variable

To test:
 1 - Place 4 holds on a biblio with one item
 2 - go to /cgi-bin/koha/circ/reserveratios.pl (Circulation->Holds
        ratios)
 3 - Run with 'Hold ratio'=3, it says order 1, ok
 4 - Run with HR=4, it says order 1, wrong
 5 - Run with HR=2, it syas order 2, wrong
 6 - Run with HR=.5, it syas order 4, wrong
 7 - Apply patch
 8 - Run with HR=3, order 1, OK
 9 - Run with HR=4, item does not appear (0 to order), OK
10 - Run with HR=2, order 1, OK
11 - Run with HR=.5, order 7, OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14669: Add search option for managing library to orders search
Katrin Fischer [Sat, 11 May 2019 21:08:11 +0000 (21:08 +0000)]
Bug 14669: Add search option for managing library to orders search

Currently the order search can't be limited by managing library.
The patch adds the search option to the order history search form
and a column for the managing library to the search results table.

To test:
- Create some baskets with orders
  - Set managing library for some, but also have some without
- Apply patch
- prove t/db_dependent/Acquisition.t
- Go to Aquisition > Orders search tab on top > Advanced search link
- Search for orders without limiting
  Orders with and without managing library set should show up
- Limit search to a specific managing library
- Verify results match expectations

Signed-off-by: Alex Sassmannshausen <alex@komputilo.eu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22667: Pick default value from framework for cn_source
Jonathan Druart [Tue, 30 Apr 2019 17:54:37 +0000 (13:54 -0400)]
Bug 22667: Pick default value from framework for cn_source

If the cn_source has a default value defined in the framework it will
not be used when ordering or receiving serials.

Test plan:
Set the pref DefaultClassificationSource to Library of congress
Define a default value=ddc (for Dewey) for the ACQ and default framework
Receive an order (AcqCreateItem=on ordering) and confirm that Dewey is
selected by default (the default value from the ACQ framework is used)
Receive a serial and confirm that Dewey is selected by default

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23320: (follow-up) Remove unused budget_name variable
Nick [Thu, 3 Oct 2019 09:46:46 +0000 (09:46 +0000)]
Bug 23320: (follow-up) Remove unused budget_name variable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23320: Removed unused close parameter in neworderempty
Nick Clemens [Mon, 15 Jul 2019 18:01:25 +0000 (18:01 +0000)]
Bug 23320: Removed unused close parameter in neworderempty

To test:
 1 - Add to basket
 2 - Note the options on the page
 3 - Add &close=1 to the url
 4 - Note some inputs are disabled
 5 - Save anyway, note it is a regular order
 6 - Add another order to basket
 7 - Save it
 8 - Modify
 9 - Add close to the url again
10 - Save changes
11 - No functional change
12 - Apply patch
13 - Note close parameter has no effect now
14 - Confirm you can place and confirm orders as before

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23726: Give class to No Items Available text on OPAC results page
Lucas Gass [Wed, 2 Oct 2019 17:34:53 +0000 (17:34 +0000)]
Bug 23726: Give class to No Items Available text on OPAC results page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23729: Compiled CSS
Martin Renvoize [Tue, 8 Oct 2019 12:59:29 +0000 (13:59 +0100)]
Bug 23729: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23729: Move CSS from moremember.tt template to staff global CSS
Lucas Gass [Wed, 2 Oct 2019 19:01:14 +0000 (19:01 +0000)]
Bug 23729: Move CSS from moremember.tt template to staff global CSS

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14862: (follow-up) Add minified version of jQuery 3.4.1
Martin Renvoize [Mon, 7 Oct 2019 15:22:19 +0000 (16:22 +0100)]
Bug 14862: (follow-up) Add minified version of jQuery 3.4.1

This patch updates the file 'jquery-3.4.1.min.js' so that it is indeed
minified.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14862: Upgrade jQuery from 1.7 to 3.4.1 in OPAC
Owen Leonard [Fri, 16 Aug 2019 13:51:25 +0000 (13:51 +0000)]
Bug 14862: Upgrade jQuery from 1.7 to 3.4.1 in OPAC

This patch upgrades jQuery to 3.4.1, jQuery-UI to 1.12.1, and adds the
jQuery-migrate plugin to ensure backwards-compatibility with existing
jQuery plugins and code. An updated of jquery-ui-rtl.css has been
created by converting the new version of jquery-ui.css.

All jQuery assets are now include the version number in the file name
just as we now do in the staff client.

Besides updating file names in the templates, there was only one change
made: opac-results.tt had a typo which has been corrected.

To test, apply the patch and test as many different pages in the OPAC as
possible, including self-checkout and self checkin. Keep the browser
console open and watch for JavaScript errors. All JavaScript-driven
behavior should work correctly. For instance:

 - Tabs
 - Datepickers
 - Select all/none operations
 - Cart and lists popups
 - Search result highlighting

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18421: DBRev 19.06.00.035
Martin Renvoize [Mon, 7 Oct 2019 12:55:38 +0000 (13:55 +0100)]
Bug 18421: DBRev 19.06.00.035

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18421: (follow-up) Center image in results table
Maryse Simard [Fri, 4 Jan 2019 14:18:33 +0000 (09:18 -0500)]
Bug 18421: (follow-up) Center image in results table

Adds the "thumbnail" class to the image to have it centered.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18421: (follow-up) Adding missing filters
Owen Leonard [Fri, 5 Oct 2018 15:14:57 +0000 (15:14 +0000)]
Bug 18421: (follow-up) Adding missing filters

This patch adds template filters as prompted by the QA tool.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18421: (follow-up) QA fixes
Charles Farmer [Wed, 8 Aug 2018 21:43:27 +0000 (17:43 -0400)]
Bug 18421: (follow-up) QA fixes

Use the community's terminology, change coce.js's path, update <script>
to Asset, remove forbidden patterns

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18421: Add Coce to the staff intranet
Charles Farmer [Fri, 30 Mar 2018 15:58:55 +0000 (11:58 -0400)]
Bug 18421: Add Coce to the staff intranet

TEST PLAN:
    1) Apply the patch with git-bz
    2) Run updatedatabase.pl
        2.1) Console output should confirm database modification
    3) Visit the 'Enhanced Content' tab of admin/syspref
        3.1) ressource is /cgi-bin/koha/admin/preferences.pl?tab=enhanced_content
        3.2) You should see that the previous preference, Coce, is now CoceOPAC,
             and that a new preference was added, CoceIntranet
    4) Activate CoceIntranet
    5) Do a search for a book for which you have a Coce cover
        5.1) The cover image url should now point to a provider you defined in Coce
        5.2) Your Coce log should show a query
    6) Click on the book's name to visit the detail.pl page
        6.1) The book's cover should also be provided by Coce on that page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23611: (follow-up) Exclude "actions" column from export
Owen Leonard [Thu, 3 Oct 2019 13:55:04 +0000 (13:55 +0000)]
Bug 23611: (follow-up) Exclude "actions" column from export

This patch adds a missing "noExport" class to ensure that the "actions"
column isn't included in export and print views.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23611: (follow-up) Correct ID of table
Owen Leonard [Wed, 2 Oct 2019 15:49:55 +0000 (15:49 +0000)]
Bug 23611: (follow-up) Correct ID of table

The DataTable configuration wasn't working on the table showing an
individual category's authorized values because of a mismatch in the
table id. This patch corrects it.

To test, apply the patch and view the "Authorized values" page.

The initial list of categories should be displayed as a DataTable. Click
through to see the values defined for any category. The resulting table
of values should also be a functioning DataTable.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23611: Add export option to authorized values administration
Owen Leonard [Fri, 13 Sep 2019 18:42:41 +0000 (18:42 +0000)]
Bug 23611: Add export option to authorized values administration

This patch changes the authorized values DataTables configuration to add
export options.

To test apply the patch and go to Administration -> Authorized values.

Test the "Export" button and confirm that the data is exported correctly
with each option.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23123: Add missing suggestion status to template for translation
Katrin Fischer [Fri, 12 Jul 2019 13:41:21 +0000 (13:41 +0000)]
Bug 23123: Add missing suggestion status to template for translation

This completes suggestion status options in the templates in 2 places
so all values can be translated and show correctly.

To test:
- Create 2 suggestions
- Accept them
- Create a basket and order those 2 from suggestions
- Close the basket
- Receive shipment and receive one of the 2 suggestions
- Go back to suggestions:
  - Look at the status column in the suggestions table for both
  - Verify that it shows AVAILABLE
  - View both suggestions
  - Verify that the Status: is empty
- Apply patch
- Repeat test from above, it should all show nicely now

Signed-off-by: Claudie Trégouët <claudie.tregouet@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 8778: Add Keyword phrase to OPAC advanced search
Katrin Fischer [Sun, 11 Aug 2019 10:17:24 +0000 (12:17 +0200)]
Bug 8778: Add Keyword phrase to OPAC advanced search

Adds a new search index to the advanced search in OPAC:
Keyword phrase
The new search option displays when the "More options" are
selected.

To test:
- Apply patch
- Go to Advanced search in OPAC
- Look at the search pull downs
- Verify everything looks correct
- Click "More options"
- Verify the Keyword phrase search option shows
- Test if it works correctly

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23680: Incorrect conversion of Perl boolean to js
David Gustafsson [Thu, 26 Sep 2019 09:50:14 +0000 (11:50 +0200)]
Bug 23680: Incorrect conversion of Perl boolean to js

A Perl boolean value is on the server side converted
to a JS string (resulting in the values '0' or '1).
Since the string '0' is a truthy value in JS this
incorrectly triggers window.close() on the client
in many instances, for example when adding a new item.

To test:

1. Go to a bibliographic record in the staff client.
2. Expand the "New" menu and open "New item" in new tab.
3. The new tab will immediately close.
4. Apply the patch.
5. Perform steps 1-2 again.
6. The tab should now remain open.

Sponsored-by: Gothenburg University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22884: Show separator between 440 and 490 fields
Katrin Fischer [Sun, 11 Aug 2019 10:52:18 +0000 (12:52 +0200)]
Bug 22884: Show separator between 440 and 490 fields

This adds a ; as separator between 440 and 490 fields used in the
same record. Currently we loop first 440 and then 490. 490 is displayed
depending on the indicator.

So after we finish the first loop, we check for existence of 490 on the
same record now to decide if a separator is needed.

To test:
- Look at various records using one or multiple 440 and 490 fields
- Verify the display is correct, especially when both appar on the
  same record in both OPAC and staff

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22884: (follow-up) Remove ending . from 440 in OPAC detail
Katrin Fischer [Mon, 17 Jun 2019 20:54:51 +0000 (20:54 +0000)]
Bug 22884: (follow-up) Remove ending . from 440 in OPAC detail

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: frederik <frederik@inlibro.com>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22884: Remove field ending . from XSLT templates
Katrin Fischer [Sat, 11 May 2019 22:58:45 +0000 (22:58 +0000)]
Bug 22884: Remove field ending . from XSLT templates

Currently Koha very inconsistently adds a . at the end when
outputting MARC fields on the detail views.

This patch removes the few cases where we add in .
Keeping the end user in mind, I believe it's not needed and
the added consistency will be nice. ISBD should be added on
cataloguing or by templates, but we should not mix when possible.

To test:
Catalog the following fields, if repeatable, add more than one:
- 020
- 022
- 111
- 242
- 245
- 246
- 250
- 300
- 440
- 490
- 700/710/711 with $i
- 700/710/711 ind.2 = 2
Verify both on staff and OPAC detail pages that there is no
additional . at the end of the line.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: frederik <frederik@inlibro.com>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23389: Add 'All' option to report dropdowns
Nick Clemens [Tue, 30 Jul 2019 15:20:27 +0000 (15:20 +0000)]
Bug 23389: Add 'All' option to report dropdowns

This patch optionally adds an 'all' option to report dropdowns

Note you will need to use 'LIKE' instead of '=' to allow 'All' to work

To test:
 1 - Write a report:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches>>
 2 - Run it
 3 - Select a branch
 4 - You get one branch info
 5 - Note you cannot select all
 6 - Apply patch
 7 - Run report
 8 - No change
 9 - Update report like:
     SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches:all>>
10 - Run report
11 - Select 'All'
12 - You get all branches
13 - Select one branch
14 - You get one branch
15 - Test with other authorised categories (itemtypes, YES_NO, etc.)
16 - Confirm it works as expected
17 - Prove -v t/db_dependent/Reports/Guided.t

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17851: Add Elasticsearch config to koha-conf.xml - Add missing entries to koha...
Olli-Antti Kivilahti [Fri, 13 Jan 2017 15:00:21 +0000 (15:00 +0000)]
Bug 17851: Add Elasticsearch config to koha-conf.xml - Add missing entries to koha-install-log

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17851: Add elasticsearch config to koha-conf.xml
Olli-Antti Kivilahti [Thu, 5 Jan 2017 12:13:48 +0000 (14:13 +0200)]
Bug 17851: Add elasticsearch config to koha-conf.xml

Missing installer for debian packages.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23606: Add columns configuration and export options to item types administration
Owen Leonard [Fri, 13 Sep 2019 12:57:24 +0000 (12:57 +0000)]
Bug 23606: Add columns configuration and export options to item types administration

This patch adds column configuration to the table of item types
in administration. No new defaults for the table are defined.

To test, apply the patch and clear your browser cache if necessary.

 - Go to Administration -> Item types.
   - Test that the "Column visibility" button works to show and hide
     columns. The "actions" column should be excluded.
   - Test that export options (Excel, CSV, etc) exclude the "actions"
     column.
 - Go to Administration -> Columns settings and edit the default
   configuration of the item types table. Confirm that these
   changes are reflected in item tyeps administration.

Test with noItemTypeImages on and off.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23039: (RM follow-up) Fix basic_workflow test
Martin Renvoize [Mon, 7 Oct 2019 13:05:17 +0000 (14:05 +0100)]
Bug 23039: (RM follow-up) Fix basic_workflow test

This bug altered the markup of the returns page subtly, introducing a
new div level and as such changing the required xpath expression for the
checkin submission button in the basic_workflow tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23730: Fix export of reports
Nick [Thu, 3 Oct 2019 13:21:35 +0000 (13:21 +0000)]
Bug 23730: Fix export of reports

To test:
1 - Run a saved report
2 - Attempt to export results
3 - It fails
4 - Apply patch
5 - It succeeds

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23710: (follow-up) Add tests for new features in Koha::REST::V!::Holds::add and...
Agustin Moyano [Thu, 3 Oct 2019 17:14:47 +0000 (14:14 -0300)]
Bug 23710: (follow-up) Add tests for new features in Koha::REST::V!::Holds::add and return error when hold date in future is not allowed and it is passed as parameter

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23710: (follow-up) Human readable error messages in request.tt, check AllowHoldPo...
Agustin Moyano [Wed, 2 Oct 2019 14:26:57 +0000 (11:26 -0300)]
Bug 23710: (follow-up) Human readable error messages in request.tt, check AllowHoldPolicyOverride and AllowHoldDateInFuture in Koha::REST::V1::Holds.pm

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23710: Use API to place holds for patrons
Agustin Moyano [Tue, 1 Oct 2019 18:26:55 +0000 (15:26 -0300)]
Bug 23710: Use API to place holds for patrons

This patch effectively uses API to place holds for patrons. It adds a listener on submit event of the form in javascript, where it calls holds API.

To test:

1. Place a hold on any biblio for a patron
SUCCESS => hold is placed or rejected, but no blank page with JSON error is shown.
2. Place a multi hold for any patron
SUCCESS => holds are placed or rejected, but no blank page with JSON error is shown.
3. Sign off

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23671: Elasticsearch shouldn't throw exception on an uppercase subfield identifier
Nicolas Legrand [Mon, 23 Sep 2019 16:55:56 +0000 (18:55 +0200)]
Bug 23671: Elasticsearch shouldn't throw exception on an uppercase subfield identifier

Prevent Elasticsearch from throwing an exception when the mappings
include uppercase subfield identifier.

Though forbidden in MARC21, It doesn't seem to be the case for Unimarc
or ISO 2709 as a whole. It is also possible to define such a subfield
identifier in the Koha MARC Framework and in the Elasticsearch
mappings.

Test plan:

1. add a 995Z subfield identifier in Elasticsearch mappings
(Administration -> Search engine configuration)
2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
3. see it throw: “Invalid MARC field expression: 995Z”
4. apply patch
5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
6. sababa

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23670: Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elastic...
Nicolas Legrand [Mon, 23 Sep 2019 16:27:32 +0000 (18:27 +0200)]
Bug 23670: Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch

Prevent Koha::SearchEngine::Elasticsearch from dying when trying to run
Koha::Exceptions::Elasticsearch::MARCFieldExprParseError->throw()

Plan test:

1. Go to Administration -> Searchengine configuration, and add a mapping
   for 995Z, whatever the search field (I did it with local-classification),
   save
2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
3. see it die asking for Koha::Exceptions::Elasticsearch
4. apply patch
5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
6. see it throw: Invalid MARC field expression: 995Z

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23007: DBRev 19.06.00.034
Martin Renvoize [Mon, 7 Oct 2019 11:45:23 +0000 (12:45 +0100)]
Bug 23007: DBRev 19.06.00.034

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23007: Retain focus on 'barcode' input if transfers don't block circ
Nick Clemens [Wed, 12 Jun 2019 19:54:42 +0000 (19:54 +0000)]
Bug 23007: Retain focus on 'barcode' input if transfers don't block circ

To test:
 1 - Apply patches
 2 - Update database
 3 - Confirm TransfersBlockCirc defaults to 'Block'
 4 - Check in an item that needs transfer
 5 - Confirm you must deal with the modal to proceed
 6 - Repeat checking to get 'wrong-transfer-modal'
 7 - Confirm you must deal with it to proceed
 8 - Switch the pref to 'Don't block'
 9 - Find a new item or cancel/fulfill the preceeding transfer
10 - Check in the item to generate transfer
11 - Note focus remains on the barcode field and you can continue scanning (or typing if you don't have a scanner)
12 - Note typing and pressing enter continues without requiring you to deal with modal
13 - Repeat for wrong transfer modal
14 - Verify hold and other modals still block continuing circulation

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23007: Add TransfersBlockCirc system preference
Nick Clemens [Thu, 27 Jun 2019 10:54:26 +0000 (10:54 +0000)]
Bug 23007: Add TransfersBlockCirc system preference

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23039: Compiled CSS
Martin Renvoize [Mon, 7 Oct 2019 11:25:24 +0000 (12:25 +0100)]
Bug 23039: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23039: Don't hide the checkin dialogs
Nick Clemens [Fri, 30 Aug 2019 19:56:28 +0000 (19:56 +0000)]
Bug 23039: Don't hide the checkin dialogs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23039: Hold found modal on checkin screen ( circulation.pl ) obscures Check in...
Owen Leonard [Tue, 30 Jul 2019 15:16:26 +0000 (15:16 +0000)]
Bug 23039: Hold found modal on checkin screen ( circulation.pl ) obscures Check in message info

This patch modifies the checkin process so that any errors or messages
related to the current checkin are displayed in any hold/transit modal
which is displayed. This prevents any information from being hidden by
the modal.

This patch also adds an "information" button to the checkout form which
the user can click to redisplay the last modal which was dismissed
(unless confirming the modal reloads the page).

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Test the checkin process with various types of items:
   - Item not checked out
   - Item not checked out, on hold
   - Item not checked out, needs to be transferred
   - Item is marked lost, needs to be transferred
   - Item checked out, patron has waiting holds (with
     WaitingNotifyAtCheckin enabled)
   - Item checked out, patron has outstanding fines (with
     FineNotifyAtCheckin enabled)

 - Test that the modal redisplay button works in cases where the modal
   is dismissed without triggering a page reload:
   - Hold confirmation -> Ignore
   - Transfer confirmation -> OK

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23589: Discharge notice does not show non-latin characters
Dobrica Pavlinusic [Wed, 2 Oct 2019 09:32:17 +0000 (11:32 +0200)]
Bug 23589: Discharge notice does not show non-latin characters

It seems that discarge notices never got support for truetype
fonts, so notices are missing non-latin characters.

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23723: using exit inside eval to stop sending output to browser doesn't work...
Dobrica Pavlinusic [Thu, 3 Oct 2019 07:34:17 +0000 (09:34 +0200)]
Bug 23723: using exit inside eval to stop sending output to browser doesn't work under plack

When fixing Bug 23589 Theodoros Theodoropoulos noticed that we are sending
headers and html after pdf output to browser.

Using exit inside eval block doesn't stop plack from generating
headers and html page after exit since CGI::Compile will catch
exit but doesn't stop emiting output. Example is:

eval {
warn "in eval";
exit;
};
warn "after eval";

Under CGI, this would print just "in eval", but under plack we get both lines
and thus generate additional header and html after we already sent pdf data.

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21343: Respect patron language preference in automtic renewals
Björn Nylén [Fri, 14 Sep 2018 06:19:46 +0000 (08:19 +0200)]
Bug 21343: Respect patron language preference in automtic renewals

To test:
1) Set up different automatic renewal notices for Default and one other language
2) Make sure you have checkouts due for auto-renewal to patrons with non-Default language pref
3) Run automatic_renewals.pl . All patrons will get the default-language notice
4) Apply patch.
5) Repeat 2)
6) Run automatic_renewals.pl . Patrons will receive notices according to their language preference.

Sponsored-by: Lund University Library
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18084: (RM follow-up) Fix authentication tests
Martin Renvoize [Mon, 7 Oct 2019 11:08:36 +0000 (12:08 +0100)]
Bug 18084: (RM follow-up) Fix authentication tests

A change to the way we hide/expose the user menu in the opac resulted in
the authentication selenium tests failing. This was due to the logout
button being identified as hidden under the new code and as such the
logout action not being triggered correctly between each login test. The
was was simply to add an additonal 'click' event called on the menu
button to put the logout link into the visible viewport.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23612: (RM follow-up) Fix failing tests
Martin Renvoize [Fri, 4 Oct 2019 12:19:18 +0000 (13:19 +0100)]
Bug 23612: (RM follow-up) Fix failing tests

Trailing comma's were causing hidden javascript errors during selenium
tests.

Error was identified by adding a $s->capture($driver) line to the
relevant selenium test and using the following JS snippet to dump errors
to the screen.

   (function () {
       var ul = null;
       function createErrorList() {
           ul = document.createElement('ul');
           ul.setAttribute('id', 'js_error_list');
           //ul.style.display = 'none';
           document.body.appendChild(ul);
       }
       window.onerror = function(msg){
           if (ul === null)
               createErrorList();
           var li = document.createElement("li");
           li.appendChild(document.createTextNode(msg));
           ul.appendChild(li);
       };
   })();

Which clearly showed the following error.

    ReferenceError: KohaTable is not defined

Removing the trailing comma's introduced in this bug resolved the issue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: (follow-up) Fix tests
Nick [Thu, 3 Oct 2019 14:42:25 +0000 (14:42 +0000)]
Bug 20589: (follow-up) Fix tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: (RM follow-up) Fix Koha::SearchField.t
Martin Renvoize [Thu, 3 Oct 2019 13:02:27 +0000 (14:02 +0100)]
Bug 20589: (RM follow-up) Fix Koha::SearchField.t

This patch removes the unit test for the weighted_fields method which
this bug removed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23711: Fix bad path
Lucas Gass [Wed, 2 Oct 2019 14:05:25 +0000 (14:05 +0000)]
Bug 23711: Fix bad path

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23711: Change icons and remove unused SVG
Lucas Gass [Mon, 30 Sep 2019 23:23:31 +0000 (23:23 +0000)]
Bug 23711: Change icons and remove unused SVG

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23711: Icons on staff main page should be font icons
Lucas Gass [Mon, 30 Sep 2019 20:39:54 +0000 (20:39 +0000)]
Bug 23711: Icons on staff main page should be font icons

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23543: Adding Withdrawn to the Item Search
Owen Leonard [Fri, 6 Sep 2019 15:37:43 +0000 (15:37 +0000)]
Bug 23543: Adding Withdrawn to the Item Search

This patch adds "Withdrawn" status to the item search form and item
search results.

To test you should have one or more items in your catalog which have a
'Withdrawn' status.

Perform an item search and limit to a widthdrawn status. Verify that the
search returns the correct results and that the withdrawn column in
search results shows the correct information.

Test the "Export results to CSV" button. The resulting file should
contain the correct data, including withdrawn status.

Signed-off-by: Joe Sikowitz <joe@flo.org>
Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18084: Compiled CSS
Martin Renvoize [Thu, 3 Oct 2019 09:51:53 +0000 (10:51 +0100)]
Bug 18084: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18084: Language selector hidden in user menu on mobile interfaces
Owen Leonard [Tue, 11 Jun 2019 18:29:32 +0000 (18:29 +0000)]
Bug 18084: Language selector hidden in user menu on mobile interfaces

This patch updates templates and CSS so that the language-selection menu
in the header will not be hidden if the browser width is too narrow.

This patch also makes some more general improvements to the responsive
adaptability of the header elements.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test the changes by viewing pages in the OPAC and adjusting your browser
width, paying attention to how elements in the top menu adapt to
different sizes. Test under varying conditions:

 - Logged in/not loggeed user
 - Search history enabled and disabled
 - OpacLangSelectorMode showing menu in header or not
 - opacuserlogin enabled or disabled

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23686: DBRev 19.06.00.032
Martin Renvoize [Thu, 3 Oct 2019 09:49:31 +0000 (10:49 +0100)]
Bug 23686: DBRev 19.06.00.032

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23686: (QA follow-up) Fix updatedatabase and make descriptions consistent
Katrin Fischer [Wed, 2 Oct 2019 13:51:26 +0000 (13:51 +0000)]
Bug 23686: (QA follow-up) Fix updatedatabase and make descriptions consistent

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23686: Check onsite checkout when the last checkout was an onsite one
Nicolas Legrand [Fri, 27 Sep 2019 08:14:35 +0000 (10:14 +0200)]
Bug 23686: Check onsite checkout when the last checkout was an onsite one

Prevent from checking again and again the onsite checkout box when
doing onsite checkouts in batches. If preceding checkout was an onsite
one, the box will be checked.

Test plan:

1. enable  OnSiteCheckouts
2. make your circulation rules able to checkout onsite
3. onsite checkout a document
4. you should return to the checkout page, the box isn't checked
5. apply patch
6. updatedatabase.pl
7. redo steps 3, it should again print a checkout page with an
   unchecked onsite checkout box
8. enable  OnSiteCheckoutAutoCheck system preference
9. redo step 3
10. when returning to the checkout page, the onsite checkout box
    should be already checked

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23612: If no columns in a table can be toggled, don't show columns button
Owen Leonard [Fri, 13 Sep 2019 18:10:25 +0000 (18:10 +0000)]
Bug 23612: If no columns in a table can be toggled, don't show columns button

This patch makes a change to the JavaScript setup for DataTables button
controls so that if there are no toggle-able buttons (or there is no
columns configuration at all) the column selection menu button will not
appear.

To test, apply the patch and go to Administration -> Columns settings.

 - In the Administration section, find the section for the "libraries"
   table.
 - In the "Cannot be toggled" column, check all the checkboxes.
 - Save.
 - Go to Administration -> Libraries.
 - At the top of the table there should be no "Columns" button, only
   "Clear filter" and "Export" buttons.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23713: (follow-up) Add missing semicolon
Katrin Fischer [Wed, 2 Oct 2019 07:41:45 +0000 (07:41 +0000)]
Bug 23713: (follow-up) Add missing semicolon

Adds a missing semicolon to one of the lines with translated
messages.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23713: Subscription add form broken for translations
Owen Leonard [Tue, 1 Oct 2019 15:55:19 +0000 (15:55 +0000)]
Bug 23713: Subscription add form broken for translations

This patch makes a change to the subscription entry template as a
workaround to a translation bug which is causing JavaScript errors when
using translated templates.

To test, apply the patch and update and install the de-DE template:

> cd misc/translator
> perl translate update de-DE
> perl translate install de-DE

 - Go to Administration -> System preferences and enable the "Deutsch
   (de-DE)" language under I18N/L10N preferences -> language.
 - Switch to the "Deutsch" translation.
 - Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription)
   and open the browser console. There should be no errors.
 - Links which trigger JavaScript events should work correctly:
   "Lieferant suchen," "Nach Datensatz suchen," etc.

Reported-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Thanks-to: Michael Hoffert and Alexander Arlt from koha-de for reporting
 it initially and figuring out the root of the issue
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23722: Document allow_empty_passwords in the example SIP config file
Kyle M Hall [Wed, 2 Oct 2019 18:58:55 +0000 (14:58 -0400)]
Bug 23722: Document allow_empty_passwords in the example SIP config file

The example SIP config file in Koha is kind of a kitchen sink document where
all available SIP2 options should be demonstrated.
The allow_empty_passwords flag should be included in it.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21985: Fix further occurences
Nick [Mon, 30 Sep 2019 13:37:19 +0000 (13:37 +0000)]
Bug 21985: Fix further occurences

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21985: Trying to fix the next failure
Jonathan Druart [Thu, 14 Mar 2019 22:19:45 +0000 (19:19 -0300)]
Bug 21985: Trying to fix the next failure

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21985: Fix Circulation tests when ES it set, by using build_sample_item
Jonathan Druart [Sun, 16 Dec 2018 15:28:48 +0000 (12:28 -0300)]
Bug 21985: Fix Circulation tests when ES it set, by using build_sample_item

We should use build_sample item (from bug 21971) to create items,
otherwise we may not have a valid biblioitem and/or MARC record.

Test plan:
Set SearchEngine to ES
prove that the tests in Circulation.t now pass

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23252: Adds noEnterSubmit class in ajax context
Christophe Croullebois [Thu, 29 Aug 2019 13:23:01 +0000 (15:23 +0200)]
Bug 23252: Adds noEnterSubmit class in ajax context

In cataloging.js $(document).ready adds noEnterSubmit class.
This does not work in ajax context, it works with $(document).ajaxSuccess.

Test plan :
1)
1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z
1.2) Verify 952$z exists in ACQ framework
2)
2.1) Verify system preference "AcqCreateItem" is on "placing an order"
2.2) Go to an acquisition basket
2.3) Click "Add to basket" and "From a new (empty) record"
2.4) Go to "Item" block
2.5) Verify that $z has "noEnterSubmit" class
2.6) Verify that typing enter in $z does not submit the form
3)
3.1) Change system preference "AcqCreateItem" to "receiving an order"
3.2) Go to "Receive shipment"
3.3) Receive an order
3.4) Go to "Item" block
3.5) Verify that $z has "noEnterSubmit" class
3.6) Verify that typing enter in $z does not submit the form

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23252: Add missing input_marceditor class in item editor
Fridolin Somers [Tue, 2 Jul 2019 13:57:09 +0000 (15:57 +0200)]
Bug 23252: Add missing input_marceditor class in item editor

In serials receive and acquisition order creation from iso2709, the item edition form shows inputs that are missing "input_marceditor" class.
They are also missing tabindex and id.

The side effect is that those inputs dont get the "noEnterSubmit" class so form is posted if a barcode scanner is used or if enter is used on keyboard.

Test plan :
1)
1.1) Verify you have an item subfield linked to items.itemnotes, ie 952$z
1.2) Verify system preference "AcqCreateItem" is on "placing an order"
2)
2.2) Go to cataloguing module and edit an item
2.3) Verify that $z has an id, tabindex and "input_marceditor" class.
2.4) Verify that typing enter in $z does not submit the form
3)
3.1) Go to a serial with items creation, click on receive
3.2) Change status to "Arrived"
3.3) Verify that $z has an id, tabindex and "input_marceditor" class.
3.4) Verify that typing enter in $z does not submit the form
4)
4.1) Go to an acquisition basket
4.2) Click "Add to basket" and "From a staged file"
4.3) Click "Add orders" on a staged file
4.4) Go in tab "Item information"
4.5) Verify that $z has an id, tabindex and "input_marceditor" class.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23351: Clean up localization template
Owen Leonard [Fri, 19 Jul 2019 14:06:59 +0000 (14:06 +0000)]
Bug 23351: Clean up localization template

This patch modifies the template used for translation of item type
descriptions. It is updated with more consistent Bootstrap grid markup
and improved handling of adding and removing rows from the DataTable.

To test you should have more than one translation installed.

 - Apply the patch and go to Administration -> Item types.
 - Edit an item type.
 - Click the translate link.
 - Add a new translation. The table of translations should be updated
   with your new translation.
 - Test the "Delete" link corresponding to your new entry. It should
   work correctly.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: DBRev 19.06.00.032
David Gustafsson [Mon, 30 Sep 2019 13:15:35 +0000 (15:15 +0200)]
Bug 20589: DBRev 19.06.00.032

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: Remove expanded_facet variable and fix tests
Nick [Tue, 1 Oct 2019 09:02:20 +0000 (09:02 +0000)]
Bug 20589: Remove expanded_facet variable and fix tests

Thi is a rebase from 14419 to remove an unused variable

Also update tests to expect the new expected result

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: Add option for searching entire record if record stored as array
Nick Clemens [Fri, 23 Aug 2019 16:45:05 +0000 (16:45 +0000)]
Bug 20589: Add option for searching entire record if record stored as array

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: Exclude boolean fields from search fields
David Gustafsson [Mon, 14 Jan 2019 14:59:55 +0000 (15:59 +0100)]
Bug 20589: Exclude boolean fields from search fields

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: fix QueryBuilder tests
David Gustafsson [Thu, 4 Apr 2019 13:14:19 +0000 (15:14 +0200)]
Bug 20589: fix QueryBuilder tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20589: Add field boosting and use query_string fields parameter
David Gustafsson [Fri, 13 Apr 2018 13:46:55 +0000 (15:46 +0200)]
Bug 20589: Add field boosting and use query_string fields parameter

Generate a list of fields for the query_string query fields parameter,
with possible boosts, instead of using "_all"-field. Also add "search"
flag in search_marc_to_field table so that certain mappings can be
excluded from searches. Add option to include/exclude fields in
query_string "fields" parameter depending on searching in OPAC or staff
client. Refactor code to remove all other dependencies on "_all"-field.

How to test:
1) Reindex authorities and biblios.
2) Search biblios and try to verify that this works as expected.
3) Search authorities and try to verify that this works as expected.
4) Go to "Search engine configuration"
5) Change some "Boost", "Staff client", and "OPAC" settings and save.
6) Verify that those settings where saved accordingly.
7) Click the "Biblios" or "Authorities" tab and change one or more
   "Searchable" settings
8) Verfiy that those settings where saved accordingly.
9) Try to verify that these settings has taken effect by peforming
   some biblios and/or authorities searches.

Sponsorded-by: Gothenburg Univesity Library
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13193: (RM revert) Make Memcached usage fork safe
Martin Renvoize [Tue, 1 Oct 2019 14:33:42 +0000 (15:33 +0100)]
Bug 13193: (RM revert) Make Memcached usage fork safe

This reverts commit f7a5466c52c4821394c5c44e0fc4e9603ef0e6f6. We need
the new dependancy packaged first.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: (RM follow-up) Remove accidentally committed file
Martin Renvoize [Tue, 1 Oct 2019 14:18:28 +0000 (15:18 +0100)]
Bug 19618: (RM follow-up) Remove accidentally committed file

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13193: Make Memcached usage fork safe
Joonas Kylmälä [Mon, 16 Sep 2019 10:26:01 +0000 (10:26 +0000)]
Bug 13193: Make Memcached usage fork safe

When a high enough number of forks try to access for example system
preferences with Koha::Cache using memcached as backend the results of
different cache requests get mixed up.

The problem is fixed by using Cache::Memcached::Fast::Safe that is a
fork safe version of Cache::Memcached::Fast.

Sponsored-by: The National Library of Finland
Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described, and solves an insidious difficult to debug
problem in Koha.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22280: Add a unit test
Magnus Enger [Tue, 1 Oct 2019 08:54:41 +0000 (10:54 +0200)]
Bug 22280: Add a unit test

This patch adds a unit test to t/db_dependent/Illrequests.t, where
a new node without any next_actions or prev_actions is added to the
core status graph.

Running the tests show a lot of warnings about "no query in
themelanguage", but that should not be related to the current bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22280: (RM follow-up) Correction to POD
Martin Renvoize [Mon, 23 Sep 2019 15:49:35 +0000 (16:49 +0100)]
Bug 22280: (RM follow-up) Correction to POD

Minor correction to mislabled POD section for private method.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22280: Fix typo in _status_graph_union
Tomas Cohen Arazi [Wed, 3 Jul 2019 18:34:48 +0000 (15:34 -0300)]
Bug 22280: Fix typo in _status_graph_union

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23566: Compiled CSS
Martin Renvoize [Tue, 1 Oct 2019 13:42:19 +0000 (14:42 +0100)]
Bug 23566: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23566: DBRev 19.06.00.031
Martin Renvoize [Tue, 1 Oct 2019 13:41:04 +0000 (14:41 +0100)]
Bug 23566: DBRev 19.06.00.031

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23566: Continue on device - with QR codes
Owen Leonard [Wed, 25 Sep 2019 17:10:46 +0000 (17:10 +0000)]
Bug 23566: Continue on device - with QR codes

This patch adds the option to show a QR code on the OPAC bibliographic
detail page. The URL of the page is encoded in the image so that
scanning it will take the user to that page on their device. The feature
is controlled by a new system preference, OPACDetailQRCode, which is
disabled by default.

The QR Code is generated by a JavaScript library, "kjua"
(https://github.com/lrsjng/kjua), which has been added to the "About"
page in the staff client.

To test, apply the patch and run the database update. Rebuild the OPAC
CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - In the staff client, go to Administration -> System preferences.
 - Locate the OPACDetailQRCode system preferences under OPAC ->
   Features. It should be disabled.
   - Enable the preference and switch to the OPAC.
 - Locate a title in the catalog and view the detail page.
   - In the sidebar menu there should be a "Send to device" link.
   - Clicking the link should display a QR Code.
   - Scan the code using a QR Code-capable device.
   - The URL should be correct.
 - Disable the system preference and confirm that the "Send to device"
   link no longer appears on the OPAC detail page.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 7074: (QA follow-up) Deal with multiple fields
Nick [Mon, 30 Sep 2019 14:12:35 +0000 (14:12 +0000)]
Bug 7074: (QA follow-up) Deal with multiple fields

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 7074: Show subtitle, part and number of a record in list of checkins
Katrin Fischer [Fri, 9 Aug 2019 14:42:38 +0000 (14:42 +0000)]
Bug 7074: Show subtitle, part and number of a record in list of checkins

Shows the subtitle, part and number information from the biblio tables
as part of the title in the list of checkins (for MARC21: 245$b$n$p).

To test:
- Apply patch
- Catalog a record with 245$a$b$n$p filled out
- Check the item out to any patron
- Verify that in the list of checkouts the information shows
- Check out any other items with different 245
- Verify information is correct
- In a new tab, return the items
- Verify that in the list of checkins the information now
  matches the checkouts list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: (RM follow-up) Add missing use statements
Martin Renvoize [Tue, 1 Oct 2019 10:45:13 +0000 (11:45 +0100)]
Bug 19618: (RM follow-up) Add missing use statements

The compile test was failing, this patch corrects for some missing use
statements and updates the dbic classes to include the type mappings

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: DBRev 19.06.00.030
Martin Renvoize [Tue, 1 Oct 2019 07:12:28 +0000 (08:12 +0100)]
Bug 19618: DBRev 19.06.00.030

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: (QA follow-up) POD Fix
Martin Renvoize [Thu, 12 Sep 2019 15:55:17 +0000 (16:55 +0100)]
Bug 19618: (QA follow-up) POD Fix

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add tests
Agustin Moyano [Thu, 5 Sep 2019 19:08:14 +0000 (16:08 -0300)]
Bug 19618: Add tests

This patch adds tests for new features

To test:
1) prove t/db_dependent/Koha/Club/Enrollment.t
2) prove t/db_dependent/Koha/Club/Hold.t
3) prove t/db_dependent/api/v1/clubs_holds.t
4) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add api endpoint for club holds
Agustin Moyano [Tue, 10 Sep 2019 06:20:38 +0000 (03:20 -0300)]
Bug 19618: Add api endpoint for club holds

This patch adds an endpoint in thi api in /api/v1/clubs/{club_id}/holds whith the verb POST that maps to Koha::REST::V1::Clubs::Holds#add controller.
Classes for club_holds and club_holds_to_patron_holds new tables where also added.

To test:
1) Reach SUCCESS.3 test point of previous patch with club that has no enrollments
2) Click on "Place Hold"
SUCCESS => an alert should appear that you cannot place hold on a club without patrons
3) Reach SUCCESS.3 test point of previous patch with club that has enrollments
4) Click on "Place Hold"
SUCCESS => holds priority list should appear with holds for every patron in club
5) Repeat steps 3 and 4.
SUCCESS => new holds should appear in different order
6) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add ability to place holds for members of a club in intranet
Agustin Moyano [Thu, 5 Sep 2019 17:13:27 +0000 (14:13 -0300)]
Bug 19618: Add ability to place holds for members of a club in intranet

This patch adds the ability to place a hold for each member of a club in random order.

To test:
1) apply this patch
2) create 2 clubs, (club names should have some part in common, and some part different for each other)
3) in one of them add at least 6 members
4) enter patron clubs management and click on "Actions" button
SUCCESS.1 => club with members has a new action called "search to hold"
5) click on search to hold
SUCCESS.2 => in the list of bilios there appears an action called "Place hold for <club name>"
6) click on "Place hold for <club name>"
SUCCESS.3 => a new window appears where you can select pickup location (defaults to club's library, if any), and the list of members.
7) go back to the list of bilios in the catalog and click on "Forget <club name>"
8) click on "Holds" action of any biblio
SUCCESS.4 => a search box appears with two tabs: Patrons and Clubs
9) click on Clubs tab and search by the common part of clubs names
SUCCESS.5 => a list of clubs that matches the search appears. If you click on any of them, the same page as SUCCESS.3 appears.
10) go back to the search box in SUCCESS.4 and search by the different part of the name.
SUCCESS.6 => because there is only one club that matches search criteria, the same page as SUCCESS.3 appears;
11) Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19618: Add club_holds and club_holds_to_patron_holds tables
Agustin Moyano [Thu, 5 Sep 2019 17:13:36 +0000 (14:13 -0300)]
Bug 19618: Add club_holds and club_holds_to_patron_holds tables

This patch adds 2 new tables
1. club_holds
2. club_holds_to_patron_holds

They are ment to keep info about hold requests made in name of a club

To test:
1) apply this patch
2) perl installer/data/mysql/updatedatabase.pl
SUCCESS => 2 new tables were created

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23648: The logged in link (class "loggedinusername") needs data-patroncategory
Owen Leonard [Wed, 25 Sep 2019 11:58:38 +0000 (11:58 +0000)]
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory

This patch adds a "data-categorycode" attribte to the logged in link in
the global header of the OPAC. This will allow access to the patron
category for use in customization and whatnot.

To test, apply the patch and log in to the OPAC. Use the browser's DOM
inspector tool to examine the logged-in user's name in the header. It
should have a "data-categorycode" attribute with the correct value.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23447: Fix capitalization and other minor edits on patron batch edit template
Katrin Fischer [Sat, 10 Aug 2019 19:55:52 +0000 (21:55 +0200)]
Bug 23447: Fix capitalization and other minor edits on patron batch edit template

Just some small fixes:

- Category => Patron category (more specific for translation)
- Attribute => Patron attribute
- Opac Note => OPAC note
- Add missing colons (:) after some of the labels

To test:
- Find an existing cardnumber
- Go to Tools > Patron batch modification
- Use cardnumber in input field and continue
- Verify strings show as noted above
- Apply patch
- Repeat and verify strings have changed, everything still works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23689: (follow-up) Use Library limitations to match other occurrences
Katrin Fischer [Mon, 30 Sep 2019 12:59:20 +0000 (14:59 +0200)]
Bug 23689: (follow-up) Use Library limitations to match other occurrences

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23689: Fix terminology for branches limitations on authorized values
Martin Renvoize [Fri, 27 Sep 2019 13:41:51 +0000 (14:41 +0100)]
Bug 23689: Fix terminology for branches limitations on authorized values

This patch corrects the terminology and also updates the tooltip to use
the current bootstrap tooltip library.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23688: System preference uppercasesurnames broken by typo
Kyle M Hall [Fri, 27 Sep 2019 11:23:28 +0000 (07:23 -0400)]
Bug 23688: System preference uppercasesurnames broken by typo

In the process of moving this feature from memberentry.pl to Patron.pm, the 's' on uppercasesurnames was dropped, breaking the feature.

Test Plan:
1) Test uppercasesurnames, note it does not work
2) Apply this patch
3) Test uppercasesurnames, note it works now!

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t
Fridolin Somers [Thu, 26 Sep 2019 07:08:40 +0000 (09:08 +0200)]
Bug 23679: add Unit Test t/db_dependent/Circulation/transferbook.t

I've choosen to add it to db_dependent because we may add other tests
to cover transferbook() cases that will change DB

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23679: fix software error when trying to transfer an unknown barcode
Fridolin Somers [Thu, 26 Sep 2019 07:09:15 +0000 (09:09 +0200)]
Bug 23679: fix software error when trying to transfer an unknown barcode

When trying to transfer an unknown barcode in
/cgi-bin/koha/circ/branchtransfers.pl you get the error :

Can't call method "itemnumber" on an undefined value at
/home/koha/src/C4/Circulation.pm line 319.

This comes from C4::Circulation::transferbook which should stop when
finding unknown barcode.

Test plan :
1) Go to /cgi-bin/koha/circ/branchtransfers.pl
2) Enter a barcode not existing in database
3) Without patch you get a software error, with patch you get a message
   saying 'No Item with barcode'
4) Enter a barcode existing in database and check transfer is OK

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>