]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 23443: Add tests
Jonathan Druart [Tue, 14 Jan 2020 11:39:36 +0000 (12:39 +0100)]
Bug 23443: Add tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23407: (QA follow-up) Same change for UNIMARC XSLT
Marcel de Rooy [Fri, 24 Jan 2020 07:22:52 +0000 (07:22 +0000)]
Bug 23407: (QA follow-up) Same change for UNIMARC XSLT

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23407: (QA follow-up) Remove some XSLT item leftovers
Marcel de Rooy [Fri, 24 Jan 2020 07:12:31 +0000 (07:12 +0000)]
Bug 23407: (QA follow-up) Remove some XSLT item leftovers

Test plan:
Check intranet results and detail page.
Check opac detail.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23407: Don't process items for XSLT on details pages
Nick Clemens [Wed, 31 Jul 2019 20:14:34 +0000 (20:14 +0000)]
Bug 23407: Don't process items for XSLT on details pages

To test:
1 - Add 1000 items to a record
    Go to biblio
    Edit items
    Add multiple copies of this item
    Add 1000 and confirm
    Wait..
2 - Load the record in staff client and OPAC, note how long it takes
    Press F12 in browser to open the console
    use the Network tab of the console
    note the load time
    refresh a few times to see average time
3 - Apply patch
4 - Restart all the things
5 - Reload the record in staff and opac
6 - Note decresed time
7 - Verify nothing on the page has changed

QA can grep the standard XSLT files for details pages for 'item' to note occurences do not use items information

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24443: Unit test
Fridolin Somers [Fri, 17 Jan 2020 09:48:50 +0000 (10:48 +0100)]
Bug 24443: Unit test

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24443: Consider NULL as 0 for issues in items search
Fridolin Somers [Fri, 17 Jan 2020 09:25:19 +0000 (10:25 +0100)]
Bug 24443: Consider NULL as 0 for issues in items search

In items search, we can filter by items issues count, data coming from items.issues.
Most of the time, for an item with no issues this column contains NULL.
This enhancement proposes to consider NULL as 0 to allow searching items with no issues.

Test plan:
1) Use SQL to count items with items.issues = NULL :
   select count(*) from items where issues is null;
2) Go to items search
3) Perform search with filter "Checkout count" = 0
4) Check you get the same number of results as SQL query

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22831: (RM follow-up) Add libarray-utils-perl to control
Martin Renvoize [Fri, 24 Jan 2020 09:16:01 +0000 (09:16 +0000)]
Bug 22831: (RM follow-up) Add libarray-utils-perl to control

This patch adds the new Array::Utils perl dependancy to the debian
control files.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17084: Automatic debian/control updates (unstable/master)
Nightly Build Bot [Fri, 10 Jan 2020 23:32:51 +0000 (00:32 +0100)]
Bug 17084: Automatic debian/control updates (unstable/master)

Remove Text::Unaccent dependancy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24149: Skip Koha::Statistics for TestBuilder tests
Jonathan Druart [Fri, 24 Jan 2020 08:44:04 +0000 (09:44 +0100)]
Bug 24149: Skip Koha::Statistics for TestBuilder tests

As statistics does not have a PK we need to adjust the TestBuilder
tests.
Bug 18441 already exists for adding the PK.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24080: (RM follow-up) Add payout to 'accounts.inc'
Martin Renvoize [Thu, 23 Jan 2020 15:48:21 +0000 (15:48 +0000)]
Bug 24080: (RM follow-up) Add payout to 'accounts.inc'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23442: (RM follow-up) Add 'Refund' to accounts.inc
Martin Renvoize [Thu, 23 Jan 2020 15:47:39 +0000 (15:47 +0000)]
Bug 23442: (RM follow-up) Add 'Refund' to accounts.inc

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23442: (RM follow-up) Fix for missing 'uc' in offset_type call
Martin Renvoize [Thu, 23 Jan 2020 15:45:12 +0000 (15:45 +0000)]
Bug 23442: (RM follow-up) Fix for missing 'uc' in offset_type call

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24149: (QA follow-up) Add pod for Koha::Statistics->object_class
Josef Moravec [Thu, 23 Jan 2020 05:50:34 +0000 (05:50 +0000)]
Bug 24149: (QA follow-up) Add pod for Koha::Statistics->object_class

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24149: Add tests
Jonathan Druart [Tue, 3 Dec 2019 16:40:06 +0000 (17:40 +0100)]
Bug 24149: Add tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24149: Add Koha::Statistic->item
Jonathan Druart [Tue, 26 Nov 2019 18:44:47 +0000 (19:44 +0100)]
Bug 24149: Add Koha::Statistic->item

Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24149: Add Koha::Statistic[s] classes
Jonathan Druart [Tue, 26 Nov 2019 16:52:55 +0000 (17:52 +0100)]
Bug 24149: Add Koha::Statistic[s] classes

Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24478: DBRev 19.12.00.013
Martin Renvoize [Thu, 23 Jan 2020 10:39:38 +0000 (10:39 +0000)]
Bug 24478: DBRev 19.12.00.013

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24478: Fix sequence in sysprefs.sql and add missing comma
Katrin Fischer [Thu, 16 Jan 2020 14:11:11 +0000 (14:11 +0000)]
Bug 24478: Fix sequence in sysprefs.sql and add missing comma

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24478: Use `EnablePointOfSale` preference
Martin Renvoize [Wed, 22 Jan 2020 10:51:55 +0000 (10:51 +0000)]
Bug 24478: Use `EnablePointOfSale` preference

This patch adds the `EnablePointOfSale` preference to the accounting tab
on the preferences editor and ties the display of the Point of Sale
module to it.

Test plan:
1) Enable both `UseCashRegisters` and `EnablePointOfSale` preferences.
2) Ensure you are a superuser or your user has the
   takepayment permission.
3) The Point of Sale module should be present on your staff home page
   with the above configuration, otherwhise it should not.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24478: Add `EnablePointOfSale` system preference
Martin Renvoize [Wed, 22 Jan 2020 10:49:55 +0000 (10:49 +0000)]
Bug 24478: Add `EnablePointOfSale` system preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24025: Make CodeMirror content searchable
Lucas Gass [Wed, 22 Jan 2020 16:31:10 +0000 (16:31 +0000)]
Bug 24025: Make CodeMirror content searchable

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23884: Merge strings.inc and browser-strings.inc
Owen Leonard [Wed, 23 Oct 2019 13:16:45 +0000 (13:16 +0000)]
Bug 23884: Merge strings.inc and browser-strings.inc

This patch take the contents of the JavaScript in browser-strings.inc
and puts it in strings.inc. browser-strings.inc is deleted.

To test, apply the patch and perform a catalog search in the staff
client.

 - View any result. In the left-hand sidebar there should be a search
   results browser box with "previous" and "next" arrows and a link back
   to search results.
 - Click on each different "view" tab and confirm that the search
   results navigation box persists: Normal, MARC, Labeled MARC, ISBD,
   Items.
 - From any of these views select Edit -> Edit items. The same
   navigation box should appear.

Note: addbiblio.tt and stockrotation.tt are modified but feature doesn't
currently work on those pages.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 19809: Remove some new occurrences
Jonathan Druart [Wed, 22 Jan 2020 10:50:19 +0000 (11:50 +0100)]
Bug 19809: Remove some new occurrences

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 19809: Re-allow to call Koha::Objects::find in list context
Julian Maurice [Thu, 14 Dec 2017 08:19:22 +0000 (09:19 +0100)]
Bug 19809: Re-allow to call Koha::Objects::find in list context

and remove 'scalar' keyword in calls where it's not needed.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24105: Fix error when running longoverdue.pl with --itemtypes
Liz Rea [Mon, 25 Nov 2019 17:20:51 +0000 (11:20 -0600)]
Bug 24105: Fix error when running longoverdue.pl with --itemtypes

To test:

Run Longoverdue.pl as koha-shell with both 1 and several --itemtypes specified
notice that it has an error
apply this patch
run longoverdue.pl as koha-shell with both 1 and several --itemtypes specified
notice there isn't an error anymore!

Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24452: Advanced editor - show multiple spaces visually
Owen Leonard [Fri, 17 Jan 2020 15:00:31 +0000 (15:00 +0000)]
Bug 24452: Advanced editor - show multiple spaces visually

This patch updates the JavaScript and CSS for the advanced MARC editor
so that multiple consecutive spaces within a line will be detected and
highlighted.

To test the EnableAdvancedCatalogingEditor system preference should be
enabled. Apply the patch and clear your browser cache if necessary.

 - Go to Cataloging -> Advanced editor.
 - On any text entry line (e.g. 245), enter some words with one, two,
   and more spaces in between them. When there are two or more spaces
   between words the spaces between the words should have a dotted red
   underline.
 - Remove the extra spaces and confirm that the dotted line disappears.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22831: (RM follow-up) Code golf
Martin Renvoize [Thu, 23 Jan 2020 10:20:31 +0000 (10:20 +0000)]
Bug 22831: (RM follow-up) Code golf

Rather than performing a symmetric diff and then splitting the results
in a further loop this patch changes to logic to use two asymetric diffs
to get the results more directly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22831: (follow-up) Sort results, group by db
Nick Clemens [Thu, 7 Nov 2019 18:49:12 +0000 (18:49 +0000)]
Bug 22831: (follow-up) Sort results, group by db

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22831: (follow-up) Determine where the record is missing and provide link, show...
Nick Clemens [Wed, 6 Nov 2019 14:37:01 +0000 (14:37 +0000)]
Bug 22831: (follow-up) Determine where the record is missing and provide link, show counter

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22831: Elasticsearch - add a maintenance script for checking DB vs index counts
Nick Clemens [Thu, 2 May 2019 12:24:08 +0000 (12:24 +0000)]
Bug 22831: Elasticsearch - add a maintenance script for checking DB vs index counts

This script uses Array::Utils and adds a dependency

To test:
 1 - Have Koha with ES running
 2 - Delete some records from ES
     curl -X DELETE "es:9200/koha_kohadev_biblios/data/5"
     curl -X DELETE "es:9200/koha_kohadev_authorities/data/5"
 3 - perl misc/maintenance/compare_es_to_db.pl
 4 - Note you are notified of problems in both indexes
 5 - perl misc/search_tools/rebuild_elastic_search.pl  -a
 6 - perl misc/maintenance/compare_es_to_db.pl
 7 - Note you are only notified about problems in biblios (assuming you don't have other issues)
 8 - perl misc/search_tools/rebuild_elasticsearch.pl  -b
 9 - perl misc/maintenance/compare_es_to_db.pl
10 - Both counts match, no problems

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23064: Use Koha::Subscription in ModSubscription
Jonathan Druart [Wed, 20 Nov 2019 11:22:58 +0000 (12:22 +0100)]
Bug 23064: Use Koha::Subscription in ModSubscription

We must use Koha::Subscription instead of raw SQL.
It will fix issue with default and integer values.

Test plan:
Edit a subscription and set number of issues = "f"
Save
=> Without this patch there is a SQL error in the log:
  Incorrect integer value: 'f' for column 'numberlength'
=> With this patch the other changes are effective.

Note: We also could change the type attribute of the input to "number",
to have a client-side check

Also, the return value of ModSuggestion is never used, so we are safe
with that.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24345: Fix OPACViewOthersSuggestions
Jonathan Druart [Tue, 21 Jan 2020 09:26:04 +0000 (10:26 +0100)]
Bug 24345: Fix OPACViewOthersSuggestions

Default value for $op needs to be set before the get_template_and_user lines as
it's tested for OPACViewOthersSuggestions.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24345: Fix process of suggesting purchase of existing title for non-logged-in...
Jonathan Druart [Sun, 5 Jan 2020 21:02:18 +0000 (22:02 +0100)]
Bug 24345: Fix process of suggesting purchase of existing title for non-logged-in users

The 'op' parameter is removed from the CGI object ($input) before
get_template_and_user is called. When the user is redirected to the
login form (from checkauth, called from get_template_and_user), the
op is lost.

Moving down the deletion fixes the problem.

Test plan:
Logout at the OPAC
Go the detail page of a bibliographic record
Click the "Suggest for purchase" link
Fill the login form
=> Without this patch you will see your suggestion list
=> With this patch applied the new suggestion form will be displayed,
prefilled with the biblio's info

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24397: Remove out of sync script populate_db.pl
Jonathan Druart [Fri, 10 Jan 2020 13:16:56 +0000 (14:16 +0100)]
Bug 24397: Remove out of sync script populate_db.pl

populate_db.pl from koha-misc4dev must be used instead.
This script existed before the creation of koha-misc4dev, it does no
longer make sense to have it in Koha.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24459: Make ->to_api pass $params through
Tomas Cohen Arazi [Mon, 20 Jan 2020 12:48:03 +0000 (09:48 -0300)]
Bug 24459: Make ->to_api pass $params through

This patch makes the to_api method in Koha::Acquisition::Inovice and
Koha::Patron pass the passed parameters to the base class to_api method.
This is required for things like embedding related objects.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Patron.t \
           t/db_dependent/Koha/Acquisition/Invoice.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24459: Regression tests
Tomas Cohen Arazi [Mon, 20 Jan 2020 12:47:18 +0000 (09:47 -0300)]
Bug 24459: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24457: Make overloaded ->to_api pass the params to parent method
Tomas Cohen Arazi [Sun, 19 Jan 2020 05:06:00 +0000 (02:06 -0300)]
Bug 24457: Make overloaded ->to_api pass the params to parent method

This patch makes the overloaded to_api method for baskets care about the
remaining parameters, and pass them to SUPER::to_api.

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> FAIL: Tests fail! No embedded bookseller!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24457: Regression tests
Tomas Cohen Arazi [Sun, 19 Jan 2020 05:05:40 +0000 (02:05 -0300)]
Bug 24457: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24286: Escape forward slash in GENRE/FORM (and any authtype)
Nick Clemens [Fri, 20 Dec 2019 13:33:28 +0000 (13:33 +0000)]
Bug 24286: Escape forward slash in GENRE/FORM (and any authtype)

Note that bug 24267 will fix the issue during Z39 searching for new auth, but the duplicate check at saving will still fail

To test:
 0 - Set SearchEngine to Elasticsearch,  QueryRegexEscapeOptions  to 'Don't Escape'
 1 - Browse to Authorities
 2 - Select New->New from Z3950
 3 - Search for subject 'Short stories'
 4 - Auth search explodes
 5 - Apply patch
 6 - Repeat and confirm the search results return
 7 - Import and save the GENRE/FORM record for Short stories
 8 - Repeat the search and import the same record
 9 - Confirm that upon save you are notified of duplicate, don't save
10 - set  QueryRegexEscapeOptions to 'Escape' and confirm Z39 searching works and importing/save notifies of duplicate
11 - set SearchEngine to Zebra and confirm Z39 searching works and importing/save notifies of duplicate

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24441: Error when checking in an item with BranchTansferLimitsType set to itemtype
Kyle M Hall [Thu, 16 Jan 2020 19:10:18 +0000 (14:10 -0500)]
Bug 24441: Error when checking in an item with BranchTansferLimitsType set to itemtype

It appears that the transition to using Koha::Item in AddReturn has introduced a bug. Previously $item was a hashref with the key 'itemtype', now that it's an object, it has no itemtype method and so triggers an error with the message "The method Koha::Item->itemtype is not covered by tests!".

Test Plan:
1) Enable Branch Transfer Limits via itemtype
2) Check in an item
3) Note the error
4) Apply this patch
5) Restart all the things!
6) Check in an item
7) No error!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Maribeth (Turner) Shafer <mshafer@ckls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24441: Add tests
Jonathan Druart [Tue, 21 Jan 2020 15:08:12 +0000 (16:08 +0100)]
Bug 24441: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24236: Fix pagination to use query_cgi
Nick Clemens [Fri, 13 Dec 2019 16:08:16 +0000 (16:08 +0000)]
Bug 24236: Fix pagination to use query_cgi

This is still wrong, we should use page-numbers.inc, but that is a larger refactoring
This patch fixes non-QueryParser searches by simple getting an using the escaped query (query_cgi)

For QueryParser, we do what the QP code does, just uri escape the query - the way that SimpleSearch does the query parsing instead of the usual buildQuery suggest to me that we should probably switch all of this to use the general Zebra search.

The issues with reservoir should be their own bug

To test:
1 - Search for cat in cataloging search
2 - Get results and see you can paginate
3 - Search for "cat"
4 - Get results but subsequent pages empty
5 - Apply patch
6 - Repeat search for "cat"
7 - You can paginate
8 - Enable UseQueryParser syspref (don't worry about installing)
9 - Confirm can still search with quotes and paginate

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24432: Use from_api_mapping to translate column name in _build_order_atom
Agustin Moyano [Wed, 15 Jan 2020 23:12:19 +0000 (20:12 -0300)]
Bug 24432: Use from_api_mapping to translate column name in _build_order_atom

Use the mapping instead of building a fake hash only to get the key name.

To test:
1. apply this patch
2. prove t/Koha/REST/Plugin/Query.t
3. sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24432: add Koha::Objects->from_api_mapping
Agustin Moyano [Wed, 15 Jan 2020 23:10:01 +0000 (20:10 -0300)]
Bug 24432: add Koha::Objects->from_api_mapping

This patch adds from_api_mapping to Koha::Objects, in order to be able to get the mapping from a result set.

To test:
1. apply this patch
2. prove t/db_dependent/Koha/Objects.t
3. sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24432: Regresion test
Agustin Moyano [Wed, 15 Jan 2020 22:52:53 +0000 (19:52 -0300)]
Bug 24432: Regresion test

To test:
1. apply this patch
2. prove t/Koha/REST/Plugin/Query.t

Test should fail at this point.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24477: Require `takepayment` permission in pos/pay.pl
Martin Renvoize [Wed, 22 Jan 2020 10:26:00 +0000 (10:26 +0000)]
Bug 24477: Require `takepayment` permission in pos/pay.pl

When adding the point of sale take payment page in bug 23354 we missed
the permission check script side along with adding the permission at
install time (update was caught).

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24481: DBRev 19.12.00.012
Martin Renvoize [Thu, 23 Jan 2020 08:50:31 +0000 (08:50 +0000)]
Bug 24481: DBRev 19.12.00.012

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24481: Permissions update for POS menu include
Martin Renvoize [Wed, 22 Jan 2020 14:46:20 +0000 (14:46 +0000)]
Bug 24481: Permissions update for POS menu include

This patch updates the point of sale menu include to reflect the updated
permissions name for cash registers

Note: Not required for 19.11

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24481: Permission corrections for admin menu templates
Martin Renvoize [Wed, 22 Jan 2020 14:45:17 +0000 (14:45 +0000)]
Bug 24481: Permission corrections for admin menu templates

This patch updates the admin menu include and admin home page to reflect
the updated permissions name for cash registers

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24481: Correct permission name in admin/cash_registers.pl
Martin Renvoize [Wed, 22 Jan 2020 14:03:13 +0000 (14:03 +0000)]
Bug 24481: Correct permission name in admin/cash_registers.pl

The permission name for changed during the implimentation of bug 23321
but one case was missed. This patch corrects that mistake.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24481: Move manage_cash_registers to parameters permission
Martin Renvoize [Wed, 22 Jan 2020 14:41:21 +0000 (14:41 +0000)]
Bug 24481: Move manage_cash_registers to parameters permission

This patch moves the manage_cash_registers subpermission to the more
appropriate location under 'parameters'.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (RM follow-up) Remove stray 'IGNORE' in updatedatabase
Martin Renvoize [Wed, 22 Jan 2020 15:00:10 +0000 (15:00 +0000)]
Bug 23354: (RM follow-up) Remove stray 'IGNORE' in updatedatabase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (QA follow-up) Add takepayment permission for new installs
Nick Clemens [Wed, 22 Jan 2020 13:44:25 +0000 (13:44 +0000)]
Bug 23354: (QA follow-up) Add takepayment permission for new installs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23354: (RM follow-up) Change $q to $input for consistency
Martin Renvoize [Wed, 22 Jan 2020 12:13:18 +0000 (12:13 +0000)]
Bug 23354: (RM follow-up) Change $q to $input for consistency

As pointed out by Jonathan, this script introduced a third form for the
CGI variable. This patch updates the script to use the more common
$input variable name.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 19793: Change label to match patron record: Primary email
Katrin Fischer [Thu, 16 Jan 2020 01:50:07 +0000 (01:50 +0000)]
Bug 19793: Change label to match patron record: Primary email

As we have multiple email fields in the patron record, we should
be clear which one can be changed from the batch mod now. Easiest
is to use the same label.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 19793: Add a field for email in batch patron modification
David Roberts [Mon, 13 Jan 2020 22:43:46 +0000 (22:43 +0000)]
Bug 19793: Add a field for email in batch patron modification

This adds the email field to the patron batch modification tool.

To test:

1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to edit
3) Add some data (e.g. test@foobar.com) into the Email address field, and click Save
4) The Primary Email address in the user record should now contain your email address
5) Test that running the tool again with the option to delete the data clears the field correctly
6) Repeat steps 1-5 with a file of user borrowernumbers

Sponsored-by: PTFS Europe
Signed-off-by: Sal <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24336: Ask for confirmation before deleting a suggestion in the OPAC
Owen Leonard [Fri, 3 Jan 2020 15:58:53 +0000 (15:58 +0000)]
Bug 24336: Ask for confirmation before deleting a suggestion in the OPAC

This patch modifies the OPAC suggestions interface so that patrons will
be asked for confirmation before deleting suggestions.

The patch also makes some minor markup changes to improve consistency
between this interface and others in the OPAC.

To test, apply the patch and log in to the OPAC as a user who has
submitted multiple suggestions.

 - From the list of your suggestions, confirm that the "New purchase
   suggestion" and "Delete" links have Font Awesome icons.
 - Check the checkbox corresponding to one of your suggestions. You can
   also now click the title of the suggestions to control the checkbox.
 - When you check a box the "Delete" link at the top of the page should
   activate.
 - Clicking the delete link should trigger a confirmation modal showing
   the title(s) you selected.
   - The message and button labels should reflect whether one or
     multiple titles are being deleted.
   - Test that the confirm and cancel controls work correctly.
 - Also test this process via the delete button at the bottom of the
   table of suggestions.

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>
4 years agoBug 7468: Use Modern::Perl
Katrin Fischer [Thu, 16 Jan 2020 01:34:35 +0000 (01:34 +0000)]
Bug 7468: Use Modern::Perl

Just a tiny coding guidelines fix.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 7468: fix the export labels popup header
Maryse Simard [Thu, 16 Jan 2020 14:19:39 +0000 (09:19 -0500)]
Bug 7468: fix the export labels popup header

When exporting a barcode range, the export popup should display "1 batch
to export" instead of "0 batches to export". In this context, it can be
considered a label batch and should be counted as such.

To test:
When clicking the "Print range" button, the popup should show "1 batch
to export".

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>
4 years agoBug 7468: (follow-up) Add missing filters
Maryse Simard [Wed, 17 Jul 2019 15:51:26 +0000 (11:51 -0400)]
Bug 7468: (follow-up) Add missing filters

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>
4 years agoBug 7468: (follow-up) fix label-edit-range template
Maryse Simard [Wed, 17 Jul 2019 13:41:09 +0000 (09:41 -0400)]
Bug 7468: (follow-up) fix label-edit-range template

Edit the labels/label-edit-range.tt template to follow current
standards :
    - Use footer javascript
    - Use bootstrap grid
    - Use jQuery Validation plugin for validation

Also fixes breadcrumbs to be more specific.

To test:
Make sure the page looks correct and still works as expected.

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>
4 years agoBug 7468: (follow-up) Make sure only integers are accepted as from/to values
Charles Farmer [Wed, 8 Aug 2018 20:20:40 +0000 (16:20 -0400)]
Bug 7468: (follow-up) Make sure only integers are accepted as from/to values

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>
4 years agoBug 7468: Showing the error message according to the community interface patterns...
Charles Farmer [Fri, 26 Jan 2018 20:49:48 +0000 (15:49 -0500)]
Bug 7468: Showing the error message according to the community interface patterns, fixing a javascript condition

TEST PLAN++

1) Apply all the patches
2) Connect to the intranet with an account with permissions to visit the "Tools" page
3) Go to /cgi-bin/koha/labels/label-home.pl
    . Either by entering the URL directly
    . OR, from the front page, by clicking "Tools", followed by the hyperlink "Label creator" under the "Catalog" section
4) Under the "+ New" button, a new option should be available: "Barcode range"
5) Fill the "From:" and the "To:" fields of the "Print barcode range" form
    . Keeping both fields at "0" should trigger a warning beside the first field: "*Cannot be smaller than 1"
    . If the value "From:" is greater the "To:" value, a warning should appear beside the second field: "*Cannot be smaller than the starting value"
    . Make sure the form doesn't let you enter non-numerical values
    . For a casual test, use "From: 1000" and "To: 1100"
6) After pressing the "Print Range" button, choose a template, a layout, and a starting position
    . The "DEFAULT TEMPLATE 01" has a page height of 5pt and a page width of 0pt, don't use it
    . All the default layouts should look alike, since we're only printing a barcode over a number, and not bibliographic information
    . Using a layout not defined as 'Barcode' will show a warning message
7) Clicking the "Export" button should lead to a second dialog window with a "Download as PDF" hyperlink. Clicking the link should prop up a download dialog box
8) Save the PDF locally, or simply open it, and make sure the options you used were taken into account

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>
4 years agoBug 7468: Add warning when range has non-existent barcodes
David Bourgault [Thu, 5 Oct 2017 13:40:19 +0000 (09:40 -0400)]
Bug 7468: Add warning when range has non-existent barcodes

+ Added a warning when the user selects a range with some non-existent barcodes, and a layout without barcodes.
This allows the user to print barcodes of items not in the database if he so desires, but will warn him if he tries to print only biblios (which results in missing entries or a blank page).

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>
4 years agoBug 7468: Fix 'false' message on Firefox
David Bourgault [Wed, 4 Oct 2017 13:12:11 +0000 (09:12 -0400)]
Bug 7468: Fix 'false' message on Firefox

It seems I was using an href to a javascript function in the 'Print Range' button, which Chrome didn't mind, but Firefox did understand.

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>
4 years agoBug 7468: Print barcodes by range
David Bourgault [Mon, 18 Sep 2017 14:55:05 +0000 (10:55 -0400)]
Bug 7468: Print barcodes by range

Adds an option to the label creator to print a range of barcodes.
Only allows printing to PDF.

C4/Label.pm had to get minor changes to override database-based barcode
generation. Same with labels/label-create-pdf.pl. By default, the
barcode is fetched from the database using the itemnumber, but when
printing ranges, you might not have a corresponding  database entry.

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>
4 years agoBug 3426: Keep note about sequence of subfields
Katrin Fischer [Thu, 16 Jan 2020 01:00:28 +0000 (01:00 +0000)]
Bug 3426: Keep note about sequence of subfields

Bug 9156 changed the wording of the pref slightly to make it
clear that the subfield sequence of the record will be used,
not the sequence of the subfields defined in the pref.

This just reinstates the note:
The order of the subfields in the record will be preserved.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 3426: Allow for multiple fields in itemcallnumber syspref
Nick Clemens [Thu, 19 Dec 2019 05:29:47 +0000 (05:29 +0000)]
Bug 3426: Allow for multiple fields in itemcallnumber syspref

Note that we change both cataloguing/additem.pl and C4/Items->PrepareItemrecordfordisplay

I can find no code that uses callnumber from the C4/Items sub, except for the itemrecorddisplay script
which is not called with an itemnumber from Koha and should be deprecated for REST or ILSDI or OAI (imho)

To test:
 1 - Define itemcallnumber syspref as "082ab,092ab,9520,245a"
 2 - Find a record with no items
 3 - Ensure it has no 082 field, but an 092 field
 4 - Go to add an item - itemcallnumber is empty
 5 - Apply patch
 6 - Go to add item, itemcallnumber should be the 092ab fields
 7 - Delete the 092 field
 8 - Go to add item, itemcallnumber should be the 245a
 9 - Edit the callnumber to be "testing" and save item
10 - For should now show itemcallnumber="testing" as default
11 - Browse to http://localhost:8081/cgi-bin/koha/services/itemrecorddisplay.pl?itemnumber=## subbing the correct itemnumber
12 - Ensure the callnumber is defaulting to testing
13 - delete the item you created
14 - browse to URL above - callnumber should now be 245 again
15 - Add an 092 field to record and ensure it is now default callnumber
16 - Add an 082 field, it should now be default

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24435: Add Koha::Biblio->items_count
Tomas Cohen Arazi [Thu, 16 Jan 2020 16:32:25 +0000 (13:32 -0300)]
Bug 24435: Add Koha::Biblio->items_count

This patch introduces a handy shortcut to get the items count for a
biblio. So instead of calling:

  $count = $biblio->items->count;
you can call:
  $count = $biblio->items_count;

The use case for this, is when we want to embed information on objects
to be sent as API responses. In that case, calling ->items->count needs
to be done manually on the controller script, with interesting added
complexity. With this kind of method, we can just require it to be
embedded automagically by calling the following on the API:

   $biblio->to_api({ embed => { items_count => {} } });

If there are several nested layers of objects, doing manually can get
really tricky and error prone.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24435: Unit tests
Tomas Cohen Arazi [Thu, 16 Jan 2020 16:32:04 +0000 (13:32 -0300)]
Bug 24435: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24430: Remove CountBiblioInOrders and its traces
Tomas Cohen Arazi [Wed, 15 Jan 2020 19:28:00 +0000 (16:28 -0300)]
Bug 24430: Remove CountBiblioInOrders and its traces

This patch replaces the only uses of CountBiblioInOrders and makes that
code use $biblio->orders->count instead.

Test nothing breaks in basket.pl and parcel.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24430: Add ->orders and ->active_orders_count to Koha::Biblio
Tomas Cohen Arazi [Wed, 15 Jan 2020 19:25:52 +0000 (16:25 -0300)]
Bug 24430: Add ->orders and ->active_orders_count to Koha::Biblio

This patch introduces an accessor to the related orders, and a method
that returns the active orders count. The target usage for the count is the
API. In the rest of the codebase, we would just call:

    $biblio->orders->count

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24430: Unit tests
Tomas Cohen Arazi [Wed, 15 Jan 2020 19:25:19 +0000 (16:25 -0300)]
Bug 24430: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24419: Add Koha::Suggestion->suggester accessor
Tomas Cohen Arazi [Tue, 14 Jan 2020 15:47:19 +0000 (12:47 -0300)]
Bug 24419: Add Koha::Suggestion->suggester accessor

This patch adds a ->suggester accessor to the Koha::Suggestion class. It
will return undef if no suggester, and a Koha::Patron object otherwise.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Suggestion.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24418: Unit tests
Tomas Cohen Arazi [Tue, 14 Jan 2020 13:09:12 +0000 (10:09 -0300)]
Bug 24418: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24418: Add koha_object(s)_class methods to Suggestion
Tomas Cohen Arazi [Tue, 14 Jan 2020 13:11:00 +0000 (10:11 -0300)]
Bug 24418: Add koha_object(s)_class methods to Suggestion

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24418: Add Koha::Biblio->suggestions
Tomas Cohen Arazi [Tue, 14 Jan 2020 13:09:40 +0000 (10:09 -0300)]
Bug 24418: Add Koha::Biblio->suggestions

This patch adds the mentioned accessor. To test:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 12502: (follow-up) Adds formatting for datatables export
Maryse Simard [Thu, 14 Nov 2019 13:50:30 +0000 (08:50 -0500)]
Bug 12502: (follow-up) Adds formatting for datatables export

Add a format option to the datatables export that remove .noExport
elements present in a data cell, just as .noExport columns are
not exported.

To test:
1. For late orders (which uses .noExport elements in data cells) :
    Export data in any format using the export button at the top
    of the datatable.
        => data should exclude "Add/Edit note" label, but
        otherwise look the same as before the patch.
2. Try exporting data in other datatables in Koha and make sure
exported data is the same before and after applying the patch.

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>
4 years agoBug 12502: (QA follow-up) Remove the Save button
Maryse Simard [Thu, 14 Nov 2019 13:48:13 +0000 (08:48 -0500)]
Bug 12502: (QA follow-up) Remove the Save button

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>
4 years agoBug 12502: (follow-up) Use modal to add/edit order notes
Maryse Simard [Tue, 16 Jul 2019 19:24:51 +0000 (15:24 -0400)]
Bug 12502: (follow-up) Use modal to add/edit order notes

Replace inputs to edit notes by a link opening a modal, similar
to the basket summary page. This makes it possible for the notes
to appear in the datatable exports.

Also fix exporting with the export as csv button at the bottom
of the page to export notes.

Test plan :
1) In the late orders table (acqui/lateorders.pl), a link should
appear in both the internal and vendor note column, following the
current value if it exist.
    -> This link should read "Add ..." if there is no existing note
    or "Edit ..." if there is.
2) Click on the link. A modal should appear. Confirm that saving a
note works as expected.
3) Try exporting to any format using either the button at the top
of the table or the one at the bottom of the page.
    -> The three new columns and their values should appear in the
    export.

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>
4 years agoBug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page
David Bourgault [Mon, 25 Sep 2017 19:18:38 +0000 (15:18 -0400)]
Bug 12502: Add vendor note, internal note, ordernumber and isbn to late orders page

Test plan:

0) Make sure you have a late order
    a) Create a test vendor unless you have one
    b) Create a test basket unless you have one
    c) Close the basket to mark the order as late
1) Go to the late orders table
Before patch : Orderno, ISBN, vendor notes, internal notes are absent
After patch: fields are present

2) Edit the vendor note and/or the internal note
3) Press the save notes button
4) Refresh page and cache (CTRL+F5), if notes have been correctly saved, your modifications should be displayed.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
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>
4 years agoBug 16784: (follow-up) Add missing filter
Owen Leonard [Wed, 15 Jan 2020 18:00:18 +0000 (18:00 +0000)]
Bug 16784: (follow-up) Add missing filter

This follow-up adds a missing template filter quiet qa tool warning.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 16784: Add table configuration on suggestions table
Owen Leonard [Sun, 12 Jan 2020 20:28:16 +0000 (20:28 +0000)]
Bug 16784: Add table configuration on suggestions table

This patch adds DataTables column configuration and export options to
the suggestions management tables in the staff interface.

The columns settings made via the administrative interface will affect
tables under each tab in the interface whether it be organized by
status, library, etc. However because of the way the KohaTable function
is currently written, changes made via the "Columns" button will only
affect the visible table.

To test, apply the patch and go to Acquisitions -> Suggestions.

 - Under each tab, the table of suggestions should have a DataTables
   toolbar with export and columns buttons. These controls should work
   correctly:
   - Showing and hiding columns should work as expected
   - Exports should work, excluding the first and last columns
 - Test the tables when using the various "Organize by" settings.
 - Test changing the settings in Administration -> Columns settings.
   - Verify that the changes you make to that configuration are
     reflected in the suggestions tables.

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>
4 years agoBug 15686: Rename "item level holds" circ rule column to "OPAC item level holds"
Lisette Scheer [Fri, 10 Jan 2020 21:26:16 +0000 (21:26 +0000)]
Bug 15686: Rename "item level holds" circ rule column to "OPAC item level holds"

This patch changes the column heading on smart-rules.pl to indicate that it only effects item level holds on the OPAC side, rather than the intranet.
To test:
1. Go to Administration, circulation and fine rules.
2. Observe incorrect heading on both the top and bottom of the table.
3. Apply the patch.
4. Repeat step 1.
5. Observe new headings.

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>
4 years agoBug 24343: Show subtitle, number and parts in course reserves list of titles in staff...
Owen Leonard [Sat, 4 Jan 2020 21:53:45 +0000 (21:53 +0000)]
Bug 24343: Show subtitle, number and parts in course reserves list of titles in staff client

Adapted from Bug 23784: At the moment only the title will display in the
course reserves details, but not the information from other title
fields. For series with multiple volumes that can lead to confusing
display. The patch makes use of the new include to display 245$abnp.

To test:
- Add mulitple records to a course reserve course
  Make sure you have titles with different combinations of 245$b$n$p
  - Look at the course details in the staff client
  - Verify only $a displays
  - Apply patch
  - Reload
  - Verify now the full information displays

  Depending on your installation, you might want ot check that the 245
  are correctly mapped and save the record once so the database
  fields are correctly filled.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24344: Modify OPAC link to suggest existing record for purchase
Owen Leonard [Sat, 4 Jan 2020 23:12:25 +0000 (23:12 +0000)]
Bug 24344: Modify OPAC link to suggest existing record for purchase

This patch modifies the link to suggest purchase of an existing record
from the OPAC. The icon is changed to "gift" and the text shortened to
"Suggest for purchase."

To test, apply the patch and view the detail page of any record in the
OPAC. Confirm that the modifications look good.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: (RM follow-up) Correction to DB update version
Martin Renvoize [Mon, 20 Jan 2020 14:39:06 +0000 (14:39 +0000)]
Bug 24289: (RM follow-up) Correction to DB update version

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24008: Remove minus sign when displaying credit value
Jonathan Druart [Mon, 23 Dec 2019 14:35:25 +0000 (15:35 +0100)]
Bug 24008: Remove minus sign when displaying credit value

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>
4 years agoBug 24008: Display warnings in a list
Jonathan Druart [Tue, 10 Dec 2019 11:27:08 +0000 (12:27 +0100)]
Bug 24008: Display warnings in a list

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>
4 years agoBug 24008: Display a warning message when deleting a patron with outstanding credits
Jonathan Druart [Mon, 2 Dec 2019 13:24:04 +0000 (14:24 +0100)]
Bug 24008: Display a warning message when deleting a patron with outstanding credits

So far nothing is displayed if a librarian removes patron with
outstanding credits.
Note that outstanding debits blocks the deletion.

Test plan:
- Create a patron with outstanding credit
- Create a patron with outstanding debits
- Delete the 2 patrons
=> With credit - You get a warning but do not block the deletion
=> With debits - You get a warning message that blocks the deletion

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>
4 years agoBug 24214: Fix due date formatting when sticky
Jonathan Druart [Wed, 11 Dec 2019 11:20:54 +0000 (12:20 +0100)]
Bug 24214: Fix due date formatting when sticky

When checking out and sticky due date is selected, on the next screen
the due date is displayed iso-formatted, instead of following the
dateformat syspref

Test plan:
0/ Do not apply the patch
1/ Check an item out, with a selected due date. Tick "Remember for
session"
2/ Next screen you see the date like YYYY-MM-DD HH:MM
regarless the value of the dateformat syspref
3/ Apply this patch
4/ Reload the page
=> The date is correctly formatted
5/ Check an item out
=> Due date is correctly set

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: DBRev 19.12.00.011
Martin Renvoize [Mon, 20 Jan 2020 13:56:04 +0000 (13:56 +0000)]
Bug 24289: DBRev 19.12.00.011

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: Make sure sample_holidays will load after sample_libraries
Jonathan Druart [Thu, 26 Dec 2019 11:06:10 +0000 (12:06 +0100)]
Bug 24289: Make sure sample_holidays will load after sample_libraries

They are inserted depending on their alpha order, and sample_holidays
will fail because of missing branchcode.
This patch suggests a simple fix: rename sample_holidays to
sample_libraries_holidays, to make sure it will be loaded after
sample_libraries

Test plan:
Start a fresh installation and select all sample data

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: DBIC changes
Jonathan Druart [Thu, 26 Dec 2019 10:53:57 +0000 (11:53 +0100)]
Bug 24289: DBIC changes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24289: Add foreign keys on *_holidays.branchcode tables
Jonathan Druart [Thu, 26 Dec 2019 10:42:43 +0000 (11:42 +0100)]
Bug 24289: Add foreign keys on *_holidays.branchcode tables

Those are missing foreign keys, it will also clean the holidays tables
and automatically remove the holidays when a library is removed.

Test plan:
0. Do not apply this patch
1. Create a new library
2. Create special and repeatable holiday for this library
3. Remove the library
=> Notice that the holidays still exist in DB
4. Apply this patch
5. Execute the update database entry
=> Notice that the holidays for this library have been removed from the DB
6. Repeat 1-3
=> Notice that the holidays have been removed along with the library

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24393: Remove event attributes from patron clubs list template
Owen Leonard [Thu, 9 Jan 2020 19:09:31 +0000 (19:09 +0000)]
Bug 24393: Remove event attributes from patron clubs list template

This patch removes some instances of the "onclick" attributes from the
template that lists patron clubs and templates.

To test, apply the patch and go to Tools -> Patron clubs.

 - Test the process of deleting a club template. Clicking the "Delete"
   button should trigger a confirmation. Confirming should delete the
   template.

 - Test the process of deleting a club. In the "Clubs" section of the
   page, click the "Actions" menu next to any club. Clicking the
   "Delete" link should trigger a confirmation. Confirming should delete
   the club.

 - Also in the "Clubs" section of the page, find a club which has
   enrollments. Select "Search to hold" from the "Actions" menu. It
   should take you to the advanced search. On the search results page
   you should have the option to place a hold for the club you selected.

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>
4 years agoBug 24061: Close after timeout if onafterprint no supported
Jonathan Druart [Fri, 22 Nov 2019 09:16:15 +0000 (10:16 +0100)]
Bug 24061: Close after timeout if onafterprint no supported

Not supported on Chrome < 63
https://www.w3schools.com/tags/ev_onafterprint.asp

Signed-off-by: Gabriel DeCarufel <gabriel@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24061: Close the window after the page has been printed
Jonathan Druart [Wed, 20 Nov 2019 08:19:51 +0000 (09:19 +0100)]
Bug 24061: Close the window after the page has been printed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 16683: Help links to fields 59X in cataloguing form are broken
Owen Leonard [Thu, 21 Nov 2019 16:26:53 +0000 (16:26 +0000)]
Bug 16683: Help links to fields 59X in cataloguing form are broken

This patch adds more specificity to handling of MARC21 documentation
links in the basic MARC editor.

To test, apply the patch and make sure the "advancedMARCeditor" system
preference is set to "Display."

You may need to edit a bibliographic framework so that 09x, 59x, and 69x
tags will display in the editor.

Edit or create a bibliographic record using that framework. Next to each
tag label in the editor should be a "?" link. Clicking this link should
open a new window with the correct Library of Congress documentation
page.

Check the links for 09x, 59x, and 69x tags as well as others to confirm
they open the correct pages.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17667: Add tests
Jonathan Druart [Wed, 18 Dec 2019 17:10:07 +0000 (18:10 +0100)]
Bug 17667: Add tests

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>