]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 25961: Add hooks for plugins to inject variables to OPAC XSLT
Tomas Cohen Arazi [Wed, 8 Jul 2020 19:54:51 +0000 (16:54 -0300)]
Bug 25961: Add hooks for plugins to inject variables to OPAC XSLT

This patch adds the following plugin hooks:
- opac_results_xslt_variables
- opac_detail_xslt_variables

This hooks will inject variables returned by the plugin in the form of a
hashref, into the ones that are passed to the XSLT processing code.

To test:
1. Apply the 'DO NOT PUSH' commit
2. Install the Kitchensink plugin
3. Restart all
4. Search biblios in the OPAC
=> SUCCESS: A text is injected in front of the biblio title
5. Enter the detail page of any of the results
=> SUCCESS: A text is injected in front of the biblio title
6. 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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: DBRev 20.06.00.018
Jonathan Druart [Thu, 30 Jul 2020 15:21:50 +0000 (15:21 +0000)]
Bug 24157: DBRev 20.06.00.018

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: Handle the case where logged in user does not have edit_invoices
Jonathan Druart [Fri, 24 Jul 2020 11:03:31 +0000 (13:03 +0200)]
Bug 24157: Handle the case where logged in user does not have edit_invoices

This patch make possible the reopening and merging of invoices even if
the logged in user does not have the edit_invoices permission

I don't think it really makes sense but at least it's now possible.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: (follow-up) New permission - delete_invoices
Jonathan Druart [Tue, 21 Jul 2020 09:09:50 +0000 (11:09 +0200)]
Bug 24157: (follow-up) New permission - delete_invoices

Hide the "Delete" invoice link if necessary on
/cgi-bin/koha/acqui/invoice.pl?invoiceid=X

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: New permission - merge_invoices
Jonathan Druart [Tue, 21 Jul 2020 09:03:07 +0000 (11:03 +0200)]
Bug 24157: New permission - merge_invoices

Add a new permission to merge invoices

Test plan:
- Remove the new permission "merge_invoices" for a given patron,
use it to log in into Koha
- Create 2 invoices, try to merge them
=> There is no way to merge it
- Add the permission
=> Now you can merge the invoices

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: (follow-up) Conditionally show controls to reopen and close invoice
Owen Leonard [Fri, 6 Mar 2020 19:13:35 +0000 (19:13 +0000)]
Bug 24157: (follow-up) Conditionally show controls to reopen and close invoice

This follow-up makes minor changes to the template so that the checkbox
for reopening or closing an invoice are not displayed when the user
doens't have the correct permissions.

To test, apply the patch and try the process of viewing or editing an
invoice as a user with these various permissions:

 - edit_invoices ON
 - edit_invoices OFF
 - reopen_closed_invoices ON
 - reopen_closed_invoices OFF

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: New permission - delete_baskets
Jonathan Druart [Wed, 11 Dec 2019 15:39:36 +0000 (16:39 +0100)]
Bug 24157: New permission - delete_baskets

Add a new permission to delete acquisition baskets

Test plan:
- Remove the new permission "delete_basket" for a given patron,
use it to log in into Koha
- Create basket, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the basket

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: New permission - delete_invoices
Jonathan Druart [Wed, 11 Dec 2019 15:37:46 +0000 (16:37 +0100)]
Bug 24157: New permission - delete_invoices

Add a new permission to delete invoices

Test plan:
- Remove the new permission "delete_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, try to delete it
=> There is no way to delete it
- Add the permission
=> Now you can delete the invoice

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: Add new method Acq::Invoice::Adjustement->fund
Jonathan Druart [Fri, 13 Dec 2019 16:37:36 +0000 (17:37 +0100)]
Bug 24157: Add new method Acq::Invoice::Adjustement->fund

Moving to its own commit in case we want to cherry-pick or move it to
its own bug report.

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: New permission - edit_invoices
Jonathan Druart [Tue, 10 Dec 2019 20:05:40 +0000 (21:05 +0100)]
Bug 24157: New permission - edit_invoices

Add a new permission to edit invoices

Test plan:
- Remove the new permission "edit_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, edit it (click "detail")
=> You can see the detail of the invoice, but cannot edit it. It's a read-only view.
- Add the permission
=> The form is back and you can modify the invoices and save the changes.
Also, you are able to create adjustments.

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24157: New permission - reopen_closed_invoices
Jonathan Druart [Tue, 10 Dec 2019 19:03:28 +0000 (20:03 +0100)]
Bug 24157: New permission - reopen_closed_invoices

New permission to reopen a closed invoice.

Test plan:
- Remove the new permission "reopen_closed_invoices" for a given patron,
use it to log in into Koha
- Create an invoice, close it
=> You are not able to reopen the invoice
- Add the permission
=> You are able to reopen the invoice

Sponsored-by: Galway-Mayo Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25709: DBRev 20.06.00.017
Jonathan Druart [Thu, 30 Jul 2020 15:21:50 +0000 (15:21 +0000)]
Bug 25709: DBRev 20.06.00.017

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25709: Rename systempreference to NotesToHide
Nick Clemens [Mon, 6 Jul 2020 17:56:35 +0000 (17:56 +0000)]
Bug 25709: Rename systempreference to NotesToHide

In an effort to use more inclusive language we have added a new coding guideline:
https://wiki.koha-community.org/wiki/Coding_Guidelines#TERM3:_Inclusive_Language

This patchset renames a syspref to be clearer and follow the guideline

To test:
1 - Apply patch and updatedatabase
2 - git grep NotesBlacklist
3 - Note all remaining occurrences are translations, db updates, and release notes
4 - Add a field (e.g. '520' ) to the NotesToHide systempreference
5 - View a record with a 520 field on the opac
6 - Confirm the field does not show in the 'Title notes' tab

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25811: Debug - Paste the source of the page
Jonathan Druart [Mon, 27 Jul 2020 12:59:59 +0000 (14:59 +0200)]
Bug 25811: Debug - Paste the source of the page

I am really struggling finding the problem here.
Posting the source of the page may help.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23086: Search for collection is broken
Kyle M Hall [Wed, 18 Sep 2019 14:28:33 +0000 (10:28 -0400)]
Bug 23086: Search for collection is broken

It appears that we are quoting the ccode values deep in the search code.
Under ICU chains this breaks searching by limits

To recreate
 1 - Setup Koha using Zebra and icuchains
 2 - Add ccode to AdvancedSearchTypes
 3 - In koha-conf.xml set zebra debug level to include request
  <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 4 - Set some items into different ccodes
 5 - On opac perform a search for:
    ccode:NFIC
 6 - It works
 7 - tail -n 50 /var/log/koha/kohadev/zebra-output.log
 8 - Note search request like:
    Search biblios OK 26 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
 9 - On opac go to advanced search, select Collection, and limit to smae code a s above
10 - No results
11 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 'NFIC'
12 - Apply patch
13 - Restart all
14 - Repeat search by collection limit
15 - Success!
16 - Check the zebra-output.log:
    Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC
17 - Add a new ccode value: N)N
18 - Set some items to that ccode
19 - Confirm searching by that ccode works

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23086: Unit test
Nick Clemens [Wed, 15 Jul 2020 15:33:18 +0000 (15:33 +0000)]
Bug 23086: Unit test

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25940: Check for reserve_id before Dopop
Lucas Gass [Mon, 6 Jul 2020 20:38:42 +0000 (20:38 +0000)]
Bug 25940: Check for reserve_id before Dopop

TEST PLAN:
1. Have an item belonging to a different branch and check it in.
2. When the modal pops up hit 'Yes, print slip' or 'Print slip' if  AutomaticItemReturn is set to 'don't'
3. The first print dialog should appear with a URL like '/cgi-bin/koha/circ/transfer-slip.pl?transferitem=18&&branchcode=CPL&op=slip'
4. Close that print dialog and you will immediately see another one that says 'No slip template found'.
5. Notice the URL of the second pop-up is:  /cgi-bin/koha/circ/hold-transfer-slip.pl?reserve_id=
6. There is no reserve id so the template is not found.
7. Apply patch
8. Repeat 1-6
9. You should no longer have two print dialogs

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25724: Do not call ModReserveStatus when completing transfer
Nick Clemens [Fri, 12 Jun 2020 10:51:36 +0000 (10:51 +0000)]
Bug 25724: Do not call ModReserveStatus when completing transfer

I can not see how this code is useful here. It checks for a reserve with priority 0 and found = NULL
That is not a status that should occur when filling a transfer. Either the found is 'T' if we are transferring due
to the hold, or the hold was placed after the transfer was initiated, and so the priority is not 0

Additional, AddReturn checks for reserves later and asks the staff to confirm waiting status.

ModReserveStatus also calls CartToShelf regardless of what happens here.

To test:
1 - Set  UpdateItemLocationOnCheckin  to:
    _ALL_: CART
2 - SetAutomaticItemReturn = Do
3 - Check an item in at a different branch than it's homebranch to create a transfer
4 - Check the item in at it's homebranch
5 - View the item details page
6 - Item is not in CART location
7 - Apply patch
8 - Repeat
9 - Item is in CART location after completion of transfer

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25724: Unit tests
Nick Clemens [Fri, 12 Jun 2020 11:11:26 +0000 (11:11 +0000)]
Bug 25724: Unit tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24279: Disable editing lost status in items editor if item is a return claim
Kyle M Hall [Fri, 24 Jul 2020 11:26:14 +0000 (07:26 -0400)]
Bug 24279: Disable editing lost status in items editor if item is a return claim

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24279: Disable lost status select if item has a return claim
Kyle M Hall [Tue, 26 May 2020 11:27:28 +0000 (07:27 -0400)]
Bug 24279: Disable lost status select if item has a return claim

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24279: Display the tip in the title of the option
Jonathan Druart [Thu, 7 May 2020 10:33:17 +0000 (12:33 +0200)]
Bug 24279: Display the tip in the title of the option

This patch tells select2 to retrieve the title attribute from the
original option node.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24279: (QA follow-up) Show values disabled with tooltips
Kyle M Hall [Thu, 23 Apr 2020 13:04:25 +0000 (09:04 -0400)]
Bug 24279: (QA follow-up) Show values disabled with tooltips

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24279: Claims Returned does not work when set from additem.pl
Kyle M Hall [Mon, 30 Dec 2019 13:04:29 +0000 (08:04 -0500)]
Bug 24279: Claims Returned does not work when set from additem.pl

Test Plan:
1) Configure Claimes Returned
2) Apply this patch
3) Go to additem.pl for that item
4) Note the claims returned lost status does not show in the lost status pulldown

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24279: Claims Returned does not work when set from moredetail.pl
Kyle M Hall [Mon, 30 Dec 2019 12:51:23 +0000 (07:51 -0500)]
Bug 24279: Claims Returned does not work when set from moredetail.pl

Test Plan:
1) Configure Claimes Returned
2) Apply this patch
3) Go to moredetail.pl for that item
4) Note the claims returned lost status does not show in the lost status pulldown

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25729: Prevent Charges/Fees.t to fail on slow server
Jonathan Druart [Mon, 27 Jul 2020 13:15:44 +0000 (15:15 +0200)]
Bug 25729: Prevent Charges/Fees.t to fail on slow server

We must use t::lib::Dates::compare to compare dates

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoCompiled CSS (OPAC)
Jonathan Druart [Mon, 27 Jul 2020 08:12:35 +0000 (10:12 +0200)]
Compiled CSS (OPAC)

This RM task has not been done when it was needed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25889: Increase performance of debian/list-deps script
Mason James [Mon, 29 Jun 2020 01:40:36 +0000 (13:40 +1200)]
Bug 25889: Increase performance of debian/list-deps script

to test... (on a i7-2600 vm with 8 cores)

1/ run script, note execution time
    $ time ./debian/update-control
    real    8m5.000s

2/ copy old file
    $ cp ./debian/control control.old

3/ apply patch

4/ run updated script, note execution time is smaller
    $ time ./debian/update-control
    real    2m14.000s

5/ copy new file
    $ cp ./debian/control control.new

6/ confirm old and new control files are identical
    $ diff control.old control.new | wc -l
    0

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26033: Use pic.infini.fr instead of framapic
Jonathan Druart [Tue, 21 Jul 2020 10:36:17 +0000 (12:36 +0200)]
Bug 26033: Use pic.infini.fr instead of framapic

https://framapic.org/ is closing
"""
Framapic will be closing its doors on Tuesday, January 12, 2021. You will find a similar service on this page.
Uploading images is now disabled, but you can still retrieve your images on the My images page.
"""

https://framablog.org/2019/09/26/lets-de-frama-tify-the-internet/
https://framablog.org/2020/03/03/10-bonnes-raisons-de-fermer-certains-services-framasoft-la-5e-est-un-peu-bizarre/
(French)

We can still use another service. However we may think about hosting the
service ourself!

Test plan:
Modify a selenium script to make it fail (for instance modify the path
for a find_element call)
Run it
Confirm that the screenshot has been uploaded correctly and that the
link works

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26016: Fix capitalization for "MARC Preview"
Katrin Fischer [Fri, 17 Jul 2020 23:36:24 +0000 (23:36 +0000)]
Bug 26016: Fix capitalization for "MARC Preview"

To test:
- Go to any record in the staff catalog
- Check the display for the 'MARC Preview' link
- Apply patch
- It should have changed to 'MARC preview'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20799: (QA follow-up) Move syspref check
Martin Renvoize [Wed, 22 Jul 2020 09:09:29 +0000 (10:09 +0100)]
Bug 20799: (QA follow-up) Move syspref check

This patch moves the syspref check into the controller to save a DB
query if the module is not enabled.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD - amended patch: removing trailing parenthesis in the IF statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20799: (follow-up) Add ILLModule system preference check and fix display for...
Katrin Fischer [Mon, 29 Jun 2020 15:56:31 +0000 (17:56 +0200)]
Bug 20799: (follow-up) Add ILLModule system preference check and fix display for no requests

When there were no requests the label would still display, using .count fixes this.
Also adds a check on the ILLModule system preference to prevent the information from
showing when the ILL module is deactivated.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20799: Add link from biblio to ILL detail view
Magnus Enger [Mon, 9 Dec 2019 16:48:35 +0000 (17:48 +0100)]
Bug 20799: Add link from biblio to ILL detail view

Some ILL systems (e.g. Libris in Sweden) require a link between
a biblio and an ILL request. When such a link exists it is nice
to display an actual link from the biblio detail view to the
ILL request detail view. This patch adds such a link. For users
without ILL privileges, the requests should still show, but not
be clickable links.

To test:
- Make sure you have a couple of ILL requests created with the
  FreeForm backend. (FreeForm does not let you tie a request to
  a biblio through the UI, but we will add connections directly
  in the database.) Lets assume these have illrequest_id's a and b.
- Make sure you have a record, let's call the biblionumber x.
- Apply the patch and make sure there are no changes in the biblio
  detail view of biblionumber x.
- Log into the database and connect the biblio to the first request:
  UPDATE illrequests SET biblio_id = x where illrequest_id = a;
- Check that the biblio detail view now says this:
  "ILL requests: Request a"
- Verify that the "Request a" part is a working link to the detail
  view of ILL request a.
- Do this in the database:
  UPDATE illrequests SET biblio_id = x where illrequest_id = b;
- Check that the biblio detail view now says this:
  "ILL requests: Request a, Request b"
- Verify the links work as expected.
- Log in as a staff user and check that the requests are still
  listed, but not displayed as clickable links.
- Sign off

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23092: DBRev 20.06.00.016
Jonathan Druart [Fri, 24 Jul 2020 12:10:52 +0000 (14:10 +0200)]
Bug 23092: DBRev 20.06.00.016

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23092: Add unit tests
Martin Renvoize [Tue, 16 Jun 2020 12:51:00 +0000 (13:51 +0100)]
Bug 23092: Add unit tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23092: Add 'daterequested' to branchtransfers table
Martin Renvoize [Fri, 17 Jan 2020 12:04:07 +0000 (12:04 +0000)]
Bug 23092: Add 'daterequested' to branchtransfers table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23696: take deleted biblios into account when building oai sets
Josef Moravec [Mon, 30 Sep 2019 09:28:40 +0000 (09:28 +0000)]
Bug 23696: take deleted biblios into account when building oai sets

Test plan:
0) do not apply the patch
1) set up OAI and create at least one set
2) run build_oai_sets.pl
3) remember/write down number of records added
4) delete a biblio, the is included in set
5) run buid_oai_sets.pl again
6) the set is 1 record smaller
7) apply the patch
8) run build_oai_sets.pl
9) the number of record should be the same as in 3)

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25031: Compiled CSS
Jonathan Druart [Fri, 24 Jul 2020 12:09:03 +0000 (14:09 +0200)]
Bug 25031: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25031: (follow-up) Fix markup error and restore cover class
Owen Leonard [Fri, 24 Jul 2020 11:19:24 +0000 (11:19 +0000)]
Bug 25031: (follow-up) Fix markup error and restore cover class

This patch corrects a markup error that appears when no cover image
services are enabled. An unclosed <div> caused links on the page to
break.

This patch also restores a part of the cover-handling script which adds
a bordered style to the cover image "tiles"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25031: (QA follow-up) Avoid displaying extra navigation
Owen Leonard [Thu, 23 Jul 2020 19:49:33 +0000 (19:49 +0000)]
Bug 25031: (QA follow-up) Avoid displaying extra navigation

This patch reworks the construction of the navigation links in such a
way that they are built during a loop over an updated jQuery object.
Previously the stored variable might not reflect that some elements
had been removed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25031: (QA follow-up) Improve handling of one or fewer images
Owen Leonard [Wed, 17 Jun 2020 21:45:00 +0000 (21:45 +0000)]
Bug 25031: (QA follow-up) Improve handling of one or fewer images

This patch addresses a few issues raised during QA:

1. If there are no images, avoid the momentary appearance of an empty
   borered box. The class controlling the appearance of the box is now
   added after initialization.
2. If there is only one image, remove the control for switching
   between covers.
3. Add "preventDefault" to cover naviation click handler.
4. Correct translation function in localcovers.js.

This patch modifies SCSS, so rebuilding the staff client CSS is
necessary for testing.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25031: Improve handling of multiple covers on the biblio detail page in the staff...
Owen Leonard [Tue, 31 Mar 2020 21:37:18 +0000 (21:37 +0000)]
Bug 25031: Improve handling of multiple covers on the biblio detail page in the staff client

This patch modifies the template, JS, and CSS for the bibliographic
detail page in order to gracefully handle multiple cover images.

The changed version loops through any cover images which might be
embedded and checks that they are successfully loaded. Only
successfully-loaded images are shown. Only the first image is shown, and
the others can be "paged through" using generated navigation controls.

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

Enable multiple cover image services. The patch was developed with these
services available:

 - Amazon
 - Local cover images (including multiple local cover images)
 - Coce (serving up Amazon, Google, and OpenLibrary images)
 - Images from the CustomCoverImages preference

View a variety of titles and confirm that the cover images are
displaying correctly, whether there be 0, 1, 2, or more covers
available.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24151: (follow-up) Rename the config key with 'bcrypt_settings'
Jonathan Druart [Thu, 23 Jul 2020 10:14:56 +0000 (12:14 +0200)]
Bug 24151: (follow-up) Rename the config key with 'bcrypt_settings'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23797: DBIC schema changes
Jonathan Druart [Thu, 23 Jul 2020 08:51:32 +0000 (10:51 +0200)]
Bug 23797: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23797: Apply DB changes to kohastructure.sql
Jonathan Druart [Thu, 23 Jul 2020 08:50:27 +0000 (10:50 +0200)]
Bug 23797: Apply DB changes to kohastructure.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23797: DBRev 20.06.00.015
Jonathan Druart [Thu, 23 Jul 2020 08:41:23 +0000 (10:41 +0200)]
Bug 23797: DBRev 20.06.00.015

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23797: DBRev 20.06.00.014
Jonathan Druart [Thu, 23 Jul 2020 08:40:18 +0000 (10:40 +0200)]
Bug 23797: DBRev 20.06.00.014

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23797: (follow-up) Enable OpacLoginInstructions in header
Owen Leonard [Tue, 7 Jul 2020 18:36:32 +0000 (18:36 +0000)]
Bug 23797: (follow-up) Enable OpacLoginInstructions in header

The OpacLoginInstructions information should be available in the login
modal which is displayed when the login link in the header menu is
clicked.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23797: (follow-up) Increase the size of opac_news.lang
Owen Leonard [Mon, 29 Jun 2020 13:07:42 +0000 (13:07 +0000)]
Bug 23797: (follow-up) Increase the size of opac_news.lang

This patch adds a database update to increase the size of the
opac_news.lang column in order to accommodate longer values.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23797: Convert OpacLoginInstructions system preference to news block
Owen Leonard [Tue, 24 Mar 2020 15:06:30 +0000 (15:06 +0000)]
Bug 23797: Convert OpacLoginInstructions system preference to news block

This patch builds on Bug 22318 to move the OpacLoginInstructions system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the OpacLoginInstructions system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and click the login link.
 - In the login modal, confirm that the content which was previously in
   the OpacLoginInstructions system preference displays correctly
   below the login form.
 - While not logged in to the OPAC, navigate directly to
   /cgi-bin/koha/opac-user.pl. The OpacLoginInstructions content should
   display correctly here as well.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacLoginInstructions is now stored in news items. There
   should be one entry for each of the enabled translations in your
   system, for instance 'OpacLoginInstructions_en',
   'OpacLoginInstructions_fr-FR', 'OpacLoginInstructions_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacLoginInstructions preference has been removed.
 - To test the correct selection of language-specific content you must
   run the translation update/install process for the languages you're
   updating.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23796: DBRev 20.06.00.013
Jonathan Druart [Thu, 23 Jul 2020 08:36:54 +0000 (10:36 +0200)]
Bug 23796: DBRev 20.06.00.013

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23796: Convert OpacCustomSearch system preference to news block
Owen Leonard [Wed, 11 Dec 2019 18:20:46 +0000 (18:20 +0000)]
Bug 23796: Convert OpacCustomSearch system preference to news block

This patch moves the OpacCustomSearch system preference into the Koha
news system, making it possible to have language- and library-specific
content.

To test you should have some content in the OpacCustomSearch system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the OpacCustomSearch system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacCustomSearch is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'OpacCustomSearch_en', 'OpacCustomSearch_fr-FR',
   'OpacCustomSearch_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacCustomSearch preference has been removed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23795: DBRev 20.06.00.012
Jonathan Druart [Thu, 23 Jul 2020 08:35:13 +0000 (10:35 +0200)]
Bug 23795: DBRev 20.06.00.012

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23795: Convert opaccredits system preference to news block
Owen Leonard [Wed, 11 Dec 2019 17:03:01 +0000 (17:03 +0000)]
Bug 23795: Convert opaccredits system preference to news block

This patch builds on Bug 22318 to move the opaccredits system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the opaccredits system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the opaccredits system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from opaccredits is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opaccredits_en', 'opaccredits_fr-FR',
   'opaccredits_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   opaccredits preference has been removed.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25765: (QA follow-up) Use method directly in cleanborrowers
Martin Renvoize [Tue, 21 Jul 2020 15:03:54 +0000 (16:03 +0100)]
Bug 25765: (QA follow-up) Use method directly in cleanborrowers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25765: (QA follow-up) Save a DB hit
Martin Renvoize [Tue, 21 Jul 2020 14:58:02 +0000 (15:58 +0100)]
Bug 25765: (QA follow-up) Save a DB hit

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25765: Replace LoginBranchname and LoginBranchcode with use of Branches template...
Fridolin Somers [Tue, 16 Jun 2020 12:01:39 +0000 (14:01 +0200)]
Bug 25765: Replace LoginBranchname and LoginBranchcode with use of Branches template plugin

The template plugin Branches contains a method GetLoggedInBranchcode that returns current branch code.
This patch adds GetLoggedInBranchname to get current branch name.
It is used to replace vars LoginBranchname and LoginBranchcode sent to all templates in C4/Auth.pm.

In labels and patrons cards modules, I choose to remove a unseless display of
current branch in a hint.

In acqui/acqui-home.tt, I choose to remove a useless display of current
branch and also because table of founds contains a filter on library.

Test plan:
Check pages source code to see branch code or name is correct.
list of the pages:
/cgi-bin/koha/acqui/acqui-home.pl
/cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX
/cgi-bin/koha/circ/branchoverdues.pl
/cgi-bin/koha/circ/set-library.pl
/cgi-bin/koha/circ/offline.pl
/cgi-bin/koha/labels/label-edit-batch.pl?op=new
/cgi-bin/koha/labels/label-manage.pl
/cgi-bin/koha/patroncards/edit-batch.pl
/cgi-bin/koha/patroncards/manage.pl
OPAC:
/cgi-bin/koha/opac-detail.pl?biblionumber=XXX

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25765: Add GetLoggedInBranchname method
Fridolin Somers [Tue, 16 Jun 2020 11:59:29 +0000 (13:59 +0200)]
Bug 25765: Add GetLoggedInBranchname method

Add GetLoggedInBranchname method to Branches templates plugin.

Also changes GetName method to use Koha::Library instead of direct SQL.

Test plan :
Run prove t/db_dependent/Template/Plugin/Branches.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5087: DBRev 20.06.00.011
Jonathan Druart [Thu, 23 Jul 2020 08:32:09 +0000 (10:32 +0200)]
Bug 5087: DBRev 20.06.00.011

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5087: Add server-side check
Jonathan Druart [Thu, 23 Jul 2020 09:15:24 +0000 (11:15 +0200)]
Bug 5087: Add server-side check

If a user to access a CSV profile that is not available at the OPAC we
should redirect to 404.

It will also handle undefined csv_profiles

For instance:
kohadev.mydnsname.org:8080/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=1&format=3
kohadev.mydnsname.org:8080/cgi-bin/koha/opac-downloadcart.pl?bib_list=1/2/&format=3

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5087: (QA follow-up) Fix leakage in opac-downloadshelf.pl
Tomas Cohen Arazi [Mon, 20 Jul 2020 15:02:14 +0000 (12:02 -0300)]
Bug 5087: (QA follow-up) Fix leakage in opac-downloadshelf.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5087: (QA follow-up) used_for deserves an index
Tomas Cohen Arazi [Mon, 20 Jul 2020 14:27:27 +0000 (11:27 -0300)]
Bug 5087: (QA follow-up) used_for deserves an index

This patch introduces an index for the used_for column

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5087: (QA follow-up) Rename the attribute to fit later API usage
Tomas Cohen Arazi [Mon, 20 Jul 2020 14:09:01 +0000 (11:09 -0300)]
Bug 5087: (QA follow-up) Rename the attribute to fit later API usage

This patch renames the introduced attribute for later usage on the API,
and changes the logic to use it the other way around.

It also adds a KEY for the flag, as it will be used in WHERE statements.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5087: Ability to define whether CSV profile shows in OPAC
Aleisha Amohia [Thu, 20 Dec 2018 22:52:59 +0000 (22:52 +0000)]
Bug 5087: Ability to define whether CSV profile shows in OPAC

To test:
1) Update database
2) Update schema
3) In staff side, go to Tools -> CSV profiles
4) Make a CSV profile with profile type = MARC and usage = Export
records
5) Leave 'Show option in OPAC' unchecked and save
6) Go to OPAC and add an item to your cart
7) Click Cart, click Download, confirm that your newly created CSV
profile does not show as an option
8) Go back and edit CSV profile on staff side
9) Check the 'Show option in OPAC' checkbox and save
10) Go back to download cart in OPAC
11) Confirm the CSV profile now shows in the dropdown

Sponsored-by: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20815: DBRev 20.06.00.010
Jonathan Druart [Thu, 23 Jul 2020 08:30:31 +0000 (10:30 +0200)]
Bug 20815: DBRev 20.06.00.010

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20815: Add unit tests for changes to AddIssue
Kyle M Hall [Wed, 22 Jul 2020 12:54:26 +0000 (08:54 -0400)]
Bug 20815: Add unit tests for changes to AddIssue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20815: Tests refactoring
Jonathan Druart [Tue, 21 Jul 2020 16:45:37 +0000 (18:45 +0200)]
Bug 20815: Tests refactoring

Some code were duplicated.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20815: (QA follow-up) Add message to database update / rephrase pref
Katrin Fischer [Mon, 6 Jul 2020 20:53:55 +0000 (20:53 +0000)]
Bug 20815: (QA follow-up) Add message to database update / rephrase pref

- Make pref use "checked in" instead of "returned".
- Add message to database update

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20815: Do not use compare float with precision
Kyle M Hall [Mon, 6 Jul 2020 11:03:21 +0000 (07:03 -0400)]
Bug 20815: Do not use compare float with precision

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20815: Add ability to choose if lost fee is refunded based on length of time...
Kyle M Hall [Wed, 12 Feb 2020 17:55:51 +0000 (12:55 -0500)]
Bug 20815: Add ability to choose if lost fee is refunded based on length of time item has been lost

This adds the ability to not refund lost item fees on return if the item
has been lost for more than a given number of days.

Test Plan:
1) Set the new system preference NoRefundOnLostReturnedItemsAge to a number of days
2) Find a lost item that has been lost longer than that NoRefundOnLostReturnedItemsAge days which would have otherwise been refunded
3) Return the item
4) Note no refund on the lost item fee was processed, the fee remains unchanged
5) prove t/db_dependent/Circulation.t

Signed-off-by: Deb Stephenson <DStephen@dubuque.lib.ia.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25955: Fix getting index_name
Nick Clemens [Wed, 8 Jul 2020 14:24:37 +0000 (14:24 +0000)]
Bug 25955: Fix getting index_name

To test:
1 - Have a site running ES
2 - perl misc/maintenance/compare_es_to_db.pl
3 - Lots of output, all bad
4 - Apply patch
5 - Repeate
6 - Whew, looks correct

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25845: (QA follow-up) Call it REST API instead of just API
Tomas Cohen Arazi [Mon, 20 Jul 2020 12:50:58 +0000 (09:50 -0300)]
Bug 25845: (QA follow-up) Call it REST API instead of just API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25845: Add 'api' to the log viewer interface options
Tomas Cohen Arazi [Tue, 23 Jun 2020 14:06:55 +0000 (11:06 -0300)]
Bug 25845: Add 'api' to the log viewer interface options

This patch simply adds the API option to the log viewer.

To test:
1. Have BorrowersLog set
2. Update some patron using the API. For example
   curl --location --request PUT 'http://koha:koha@kohadev-intra.mydnsname.org:8081/api/v1/patrons/1' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "Tomasito",
"surname": "None",
"address": "Address",
"category_id": "ST",
"city": "Córdoba",
"library_id": "MPL"
}'
3. Open the log viewer
=> FAIL: There's no way to filter on interface, choosing API
4. Apply this patch
5. Reload the log viewer
=> SUCCESS: There are options to filter by 'API' interface
=> SUCCESS: Filtering by 'API' works
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25907: When cancelling a waiting hold on returns.pl, looks for new hold to fill...
Kyle M Hall [Wed, 1 Jul 2020 10:53:18 +0000 (06:53 -0400)]
Bug 25907: When cancelling a waiting hold on returns.pl, looks for new hold to fill without rescanning barcode

Right now, after canceling a hold on the checkin screen, a librarian
needs to rescan the item barcode to check and trap the next hold. This
is an extra unnecessary step.

Test Plan:
1) Place two or more holds on a record
2) Check in the item
3) Confirm the hold
4) Check in the item again
5) Cancel the hold
6) Koha should now display the modal asking to confirm the next hold
   without the need to rescan the barcode!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25629: Fix capitalization in sample notices
Katrin Fischer [Sat, 30 May 2020 00:46:46 +0000 (00:46 +0000)]
Bug 25629: Fix capitalization in sample notices

This fixes the capitalization in sample notices files to
follow coding-guidelines. Only applies to English, translations
remain unchanged.

Additional fixes:
- Overdues slip added the letter code as subject instead of the description
- Opac changed to OPAC for self-registration verification emails

German (de-DE) file was not changed, as there is a pending translation
bug that will take care of these (bug 25129).

To test:
- Verify changes by running the web installer for the changed
  files and verify sample notices install without error
- Verify subjects and notice descriptions are correct
- Run tests in t/db_dependent/Letters*

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25998: (QA follow-up) Add DBIC level relation
Martin Renvoize [Fri, 17 Jul 2020 06:44:45 +0000 (07:44 +0100)]
Bug 25998: (QA follow-up) Add DBIC level relation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25998: Add 'library' relation to Koha::Account::Line
Martin Renvoize [Thu, 16 Jul 2020 08:40:23 +0000 (09:40 +0100)]
Bug 25998: Add 'library' relation to Koha::Account::Line

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25998: Add Unit Tests
Martin Renvoize [Fri, 17 Jul 2020 07:01:06 +0000 (08:01 +0100)]
Bug 25998: Add Unit Tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11
Mason James [Thu, 18 Jun 2020 01:26:20 +0000 (13:26 +1200)]
Bug 25792: Rename 'ttf-dejavu' package to 'fonts-dejavu' for Debian 11

to test...
 1/ attempt to install koha 20.05 package on deb11, fail :'(
 2/ apply patch and build new koha package
 3/ attempt to install new koha package on deb11, succeed!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 8338: (QA follow-up) Fix test for backdated return
Martin Renvoize [Tue, 21 Jul 2020 10:18:16 +0000 (11:18 +0100)]
Bug 8338: (QA follow-up) Fix test for backdated return

A test for CalculateFinesOnBackdate was introduced since this bug was
written and needed updateing.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23820: Fix Koha/Club/Hold.t
Jonathan Druart [Tue, 21 Jul 2020 08:08:02 +0000 (10:08 +0200)]
Bug 23820: Fix Koha/Club/Hold.t

kohadev-koha@kohadevbox:/kohadevbox/koha$ prove t/db_dependent/Koha/Club/Hold.t
t/db_dependent/Koha/Club/Hold.t .. Patron(238) Hold cannot be placed. Reason: libraryNotPickupLocation at /kohadevbox/koha/Koha/Club/Hold.pm line 98.
    # Looks like you planned 5 tests but ran 4.
t/db_dependent/Koha/Club/Hold.t .. 1/1
 #   Failed test 'add'
 #   at t/db_dependent/Koha/Club/Hold.t line 86.
Can't call method "borrowernumber" on an undefined value at t/db_dependent/Koha/Club/Hold.t line 83.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24151: Use fully qualified names for UpdateStats
Jonathan Druart [Tue, 21 Jul 2020 07:57:08 +0000 (09:57 +0200)]
Bug 24151: Use fully qualified names for UpdateStats

t/db_dependent/Koha/Account/Line.t .. 8/12     # Looks like you planned 16 tests but ran 3.
 #   Failed test 'void() tests'
 #   at t/db_dependent/Koha/Account/Line.t line 723.
Undefined subroutine &Koha::Account::UpdateStats called at /kohadevbox/koha/Koha/Account.pm line 289.

It's certainly caused by a circ dep from
  commit 5ce968e0e571f555261c02a9e1d27447611cdb89
  Bug 24151: Copy info to the pseudonymized table when a transaction is done

See also bug 17600 for more context.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22844: Fix yaml_valid.t - don't pick .json files
Jonathan Druart [Tue, 21 Jul 2020 07:47:11 +0000 (09:47 +0200)]
Bug 22844: Fix yaml_valid.t - don't pick .json files

Only .pref are considered yaml files.

kohadev-koha@kohadevbox:/kohadevbox/koha$ time prove xt/yaml_valid.t
xt/yaml_valid.t .. 1/19
 #   Failed test 'borrowers.json is YAML'
 #   at xt/yaml_valid.t line 39.

 #   Failed test 'items.json is YAML'
 #   at xt/yaml_valid.t line 39.
 # Looks like you failed 2 tests of 19.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25827: Add floating toolbar to the holds summary page in staff interface
Owen Leonard [Mon, 29 Jun 2020 15:08:47 +0000 (15:08 +0000)]
Bug 25827: Add floating toolbar to the holds summary page in staff interface

This patch adds a floating toolbar to the holds summary page in the staff
interface.

To test, apply the patch and view the holds page for a title with
multiple holds on it. Test that when you scroll down past the position
of the "Update hold(s)" button, the toolbar "sticks" to the top of the
screen.

Test that holds are updated correctly after clicking the "Update
hold(s)" button.

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25892: Clarify the visual hierarchy of holds by branch and itemtype
Owen Leonard [Mon, 29 Jun 2020 14:31:24 +0000 (14:31 +0000)]
Bug 25892: Clarify the visual hierarchy of holds by branch and itemtype

This patch makes minor changes to the markup of the holds list to make
the page hierarchy clearer when holds are grouped by branch and
itemtype.

Test plan:

 - Enable the  AllowHoldItemTypeSelection system preference.
 - Locate a record in the catalog and place multiple holds:
   - Holds at different branches
   - Holds with different itemtypes selected
 - View the holds page with various values of the HoldsSplitQueue
   preference enabled:
   - nothing
   - pickup library
   - hold itemtype
   - pickup library & itemtype

   In each case verify that the interface works well.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25801: (follow-up) Fix indentation level of else block
Marcel de Rooy [Fri, 26 Jun 2020 08:31:38 +0000 (08:31 +0000)]
Bug 25801: (follow-up) Fix indentation level of else block

Just fixing the indentation here with a substitution cmd.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25801: (follow-up) Add Show all items-link on opac-detail
Marcel de Rooy [Fri, 26 Jun 2020 08:30:44 +0000 (08:30 +0000)]
Bug 25801: (follow-up) Add Show all items-link on opac-detail

As requested by Katrin in QA, it might be helpful to provide a
link to return to the regular view with all items.

The information about acquisition and holds refers to all items,
so I moved it inside the else branch of this block.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25801: Add itemnumber parameter to opac-detail
Marcel de Rooy [Thu, 18 Jun 2020 11:34:27 +0000 (11:34 +0000)]
Bug 25801: Add itemnumber parameter to opac-detail

Note: The GetItemsInfo call is now suboptimal. Leaving it as-is
for now in the hope that item refactoring picks it up ;)

Test plan:
Test opac-detail via biblionumber (regular use).
Test opac-detail by passing an itemnumber in the URL:
    /cgi-bin/koha/opac-detail?itemnumber=999

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25799: Add edition information to "Holds queue" report
Petro Vashchuk [Mon, 29 Jun 2020 19:04:56 +0000 (22:04 +0300)]
Bug 25799: Add edition information to "Holds queue" report

Added a feature that displays edition information of the book
together with title in "Holds queue" report.

Edition information is fetched from "biblioitem" table
as "editionstatement" and transferred to template.

1. Place a hold on a book with edition information.
2. Run build_holds_queue.pl cron job.
3. Go to /cgi-bin/koha/circ/view_holdsqueue.pl and check the "title"
table of that book that you placed hold on.
4. Observe that there's no information about edition of that book.
5. Apply patch.
6. Repeat step 3.
7. Observe that cinformation about edition of that book appeared
in the title table after book's title and author.

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25798: Add copyright year to "Holds to pull" report
Petro Vashchuk [Fri, 26 Jun 2020 21:06:47 +0000 (00:06 +0300)]
Bug 25798: Add copyright year to "Holds to pull" report

Display copyright year (publication year) of book
together with title in "Holds to pull" report.

Copyright year is fetched from biblio -table as "copyrightyear"
and displayed when the preferred marc is set to MARC21.
Publication year is fetched from biblioitems -table as "publicationyear"
and displayed when the preferred marc is set to UNIMARC.

1. Place a hold on book with known copyright year.
2. Go to /cgi-bin/koha/circ/pendingreserves.pl and check the "title"
table of that book that you placed hold on.
3. Observe that there's no information about publication year in that
field.
4. Apply patch.
5. Repeat step 2.
6. Observe that copyright year (publication year) of book appeared
in the title table after book's title and author.

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: (QA follow-up) Remove unused module import
Joonas Kylmälä [Fri, 17 Jul 2020 14:26:15 +0000 (14:26 +0000)]
Bug 25723: (QA follow-up) Remove unused module import

The last usage of this module was removed in the commit
"Bug 25723: Update cache flushing calls" but the import was
not removed along with it.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: (QA follow-up) Handle holiday and exception on same day
Nick Clemens [Fri, 17 Jul 2020 12:34:18 +0000 (12:34 +0000)]
Bug 25723: (QA follow-up) Handle holiday and exception on same day

When a holiday is entered, then exceptions generated on a range, there exists both a holiday and exception in
the special holidays table. We should cache the exception over the holiday instead of both

Also, !1 in perl returns '' rather than 0, so we should explicitly set the value

Add blank line to clear pod error from qa tools

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Re-introduce the blank line mentioned in the commit message, it was accidentally removed by automatic formatting
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: (QA follow-up) Silent POD warning
Martin Renvoize [Wed, 17 Jun 2020 13:04:14 +0000 (14:04 +0100)]
Bug 25723: (QA follow-up) Silent POD warning

I didn't introduce the method that is warned about, but adding POD for
it seemed reasonable and will silence the QA Script warning.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: Remove tests for removed method
Martin Renvoize [Wed, 17 Jun 2020 12:46:34 +0000 (13:46 +0100)]
Bug 25723: Remove tests for removed method

We removed the exception_holidays (and single_holidays) methods as part
of this patchset. As such, we should no longer test them ;)

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: Update cache flushing calls
Martin Renvoize [Wed, 17 Jun 2020 12:18:24 +0000 (13:18 +0100)]
Bug 25723: Update cache flushing calls

This patch updates the previous single_holidays and exeption_holidays
cache flushing calls to match the new cache key structure of the updated
routines.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: Use the same code for single and exception holidays
Martin Renvoize [Wed, 17 Jun 2020 10:14:30 +0000 (11:14 +0100)]
Bug 25723: Use the same code for single and exception holidays

This patch refactors is_exception_holiday and is_single_holiday to
utilise a single _holidays method which combines the logic of the
previous single_holidays and exception_holidays methods.

As Koha::Calendar is instantiated at a branch level, we also move split
the cache into branches too.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: Use a hasref for lookup
Martin Renvoize [Fri, 12 Jun 2020 15:30:28 +0000 (16:30 +0100)]
Bug 25723: Use a hasref for lookup

Rather than using an array of dates and iterating them, use a hashref
and do a direct lookup

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: Drop DateTime::Set from cpanfile
Martin Renvoize [Fri, 12 Jun 2020 15:02:26 +0000 (16:02 +0100)]
Bug 25723: Drop DateTime::Set from cpanfile

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: (follow-up) Fix Unit Test
Martin Renvoize [Fri, 12 Jun 2020 14:11:52 +0000 (15:11 +0100)]
Bug 25723: (follow-up) Fix Unit Test

The unit test previously relied on the internals of exception_holidays.

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25723: Drop DateTime::Set dependancy
Martin Renvoize [Fri, 12 Jun 2020 10:53:49 +0000 (11:53 +0100)]
Bug 25723: Drop DateTime::Set dependancy

This patch removes our use of DateTime::Set and replaces it with a quick
hashref implimentation

Signed-off-by: Emma Perks <Emma.Perks2@uhb.nhs.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>