]> git.koha-community.org Git - koha.git/log
koha.git
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>
4 years agoBug 25718: Correct typo in additem.tt
Caroline Cyr La Rose [Wed, 8 Jul 2020 21:24:46 +0000 (17:24 -0400)]
Bug 25718: Correct typo in additem.tt

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 25717: Improve automatic renewal error messages
David Nind [Sat, 27 Jun 2020 00:38:46 +0000 (00:38 +0000)]
Bug 25717: Improve automatic renewal error messages

Improve wording and grammar for automatic renewal error messages.

Test plan:
1. Review the error message changes and make sure they make sense.

The new message make sense to me.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25511: Add POD for --force
Jonathan Druart [Mon, 20 Jul 2020 14:57:42 +0000 (16:57 +0200)]
Bug 25511: Add POD for --force

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25511: Add --force option to update_dbix_class_files.pl
Martin Renvoize [Fri, 15 May 2020 09:51:46 +0000 (10:51 +0100)]
Bug 25511: Add --force option to update_dbix_class_files.pl

This adds a --force option to the aforementioned script allowing those
in the know to overwrite the schema when changes above the found are
detected.

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25427: Make authority subfield management interface consistent MARC view
Owen Leonard [Fri, 8 May 2020 15:11:19 +0000 (15:11 +0000)]
Bug 25427: Make authority subfield management interface consistent MARC view

This patch makes a couple of minor changes to the authority MARC
subfield structure administration interface to make it more consistent
with the corresponding MARC subfield interface.

To test, apply the patch and go to Administration -> Authority types.

- Pick an authority type to edit, for instance PERSO_NAME, and choose
  'MARC structure' from the Actions menu.
- Pick a tag to edit and select "Subfields" from the Actions menu.
- In the table of subfields for that tag, each subfield in the first
  column should link to the edit interface for that subfield (its tab
  pre-selected).
- The "Edit" button in that table should do the same.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25984: Add minimum height and width to shelf browser covers
Owen Leonard [Mon, 13 Jul 2020 15:18:23 +0000 (15:18 +0000)]
Bug 25984: Add minimum height and width to shelf browser covers

This patch adds a class to the shelf browser cover image links and a
style for these links defining a minimum height and width. This allows
the browser's default tab focus outline to be visible.

This patch also adds a check for an enabled cover image service before
displaying the cover image links.

This patch introduces whitespace changes so diff accordingly.

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

- Enable the OPACShelfBrowser system preference.
- Enable at least one cover image service (Amazon, Google, Coce, etc).
- Locate a title in the OPAC which has items attached.
- On the bibliographic detail page, click the "Browse shelf" link in the
  table of holdings to display the shelf browser.
- Use the tab key to move the focus to cover images in the shelf
  browser.
- Confirm that the focus outline moves through each cover link whether
  or not there is a cover image available.
- Diable all cover image services.
- Test the shelf browser again and confirm that it's not necessary to
  tap through an empty row.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 25244: Add specific aria-label to search results
Martin Renvoize [Mon, 29 Jun 2020 14:55:17 +0000 (15:55 +0100)]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 25244: (follow-up) QA corrections

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25922: Fix typo 'arial-label' -> 'aria-label'
Julian Maurice [Fri, 3 Jul 2020 13:36:04 +0000 (17:36 +0400)]
Bug 25922: Fix typo 'arial-label' -> 'aria-label'

Signed-off-by: Julian Maurice <julian.maurice@biblibre.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 25922: Add aria-label to the allowlist for translation
Martin Renvoize [Fri, 3 Jul 2020 13:07:25 +0000 (14:07 +0100)]
Bug 25922: Add aria-label to the allowlist for translation

This patch adds aria-label to the allowlist for translations.

To test:
- Apply patches from here and bug 25244
- kshell
- cd misc/translator
- perl translate update de-DE
- Check for the aria-label in the diff
- Verify the strings appear in the po files now
- Translate them
- perl translate install de-DE
- Verify the translated strings appear in the template

Signed-off-by: Julian Maurice <julian.maurice@biblibre.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 25237: Fix semantic heading for opac-details
Martin Renvoize [Thu, 11 Jun 2020 11:45:57 +0000 (12:45 +0100)]
Bug 25237: Fix semantic heading for opac-details

Prior to this patch the opac-details view contained semantically incorrect h3
headings for the author information.

Test plan
1/ Perform a search in the OPAC that will yield results
2/ Navigate to any results detailed view
3/ Inspect the page and note that there are semantically incorrect headings
   H1 (Page title) > H2 (Item title) > H5 (Author)
4/ Apply the patch
5/ Reload the page
6/ Inspect the page and note that the semantically incorrect author block has
   been converted to a span with an 'h3' class for styling
7/ Note the page still appears nicely
8/ Signoff

Bonus points: Check with XSLT views enabled and disabled.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25155: (follow-up) Increase headings levels by 1
Martin Renvoize [Thu, 11 Jun 2020 09:14:03 +0000 (10:14 +0100)]
Bug 25155: (follow-up) Increase headings levels by 1

In the previous patch we reduced the headings levels by 2, but this was
one level too many as we already have an H1 in the navbar and so all
other heading sets should start at level 2 to semantically follow the
title heading.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25155: Fixing semantic headings login modal
Martin Renvoize [Thu, 11 Jun 2020 08:32:45 +0000 (09:32 +0100)]
Bug 25155: Fixing semantic headings login modal

The login modal headings were semantically incorrect prior to this
patch.

Test plan:
1) Click the 'Log in to your account' option to expose the modal
2) Use a headings inspector and note we jump from H1 (Page Title) -> H3
   (Modal Title)
3) Apply the patch and reload the page.
4) Click the 'Log in to your account' option to expose the modal
5) The modal should still appear well formed
6) Use a headings inspector and note we jump from H1 (Page Title) -> H2
   (Modal Title) -> H3 (Shibboleth title if enabled)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25155: Fixing semantic headings in opac-auth.tt
Hayley Mapley [Thu, 11 Jun 2020 01:13:30 +0000 (13:13 +1200)]
Bug 25155: Fixing semantic headings in opac-auth.tt

Test plan:
1) Follow test plan from comment #1
2) Apply the patch
3) Reload the page, and note that is still displays fine
4) Check that the main heading is now an h1, and that the other headings
on the page make sense

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24625: Store showLastPatron information using localStorage
Owen Leonard [Wed, 1 Apr 2020 16:06:33 +0000 (16:06 +0000)]
Bug 24625: Store showLastPatron information using localStorage

This patch removes the use of jquery.cookie to store "last patron"
information, using localStorage instead. jquery.cookie.js is obsolete.
See Bug 24624.

localStorage has been chosen as an alternative in this situation because
it does not require transmission between the client and the server. See
Bug 12410.

Because there is no "session only" option with localStorage, additional
handling of the showLastPatron data is added to the login page. That
takes care of "stale" last patron information if user didn't log out but
the session expired for some reason.

To test apply the patch and enable the showLastPatron system preference.

 1. Load a patron's account for checkout
 2. Navigate away from patron-related pages: Perform a catalog search
    from the search header form and open the detail page from the search
    results. Confirm that the correct last patron information still
    shows.
 3. Load another patron's account for checkout
    - There should now be a "Last patron" link in the breadcrumbs bar
      which links to the patron in step 1. Hovering your mouse over the
      link should display a tooltip containing the patron's name and
      card number.
    - Click the "X" to clear the last patron information. The last
      patron link should go away.
 4. Log out and log back in. The last patron information should be gone.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24165: Add ability to send any item field in a library chosen SIP field
Kyle M Hall [Tue, 3 Dec 2019 20:16:57 +0000 (15:16 -0500)]
Bug 24165: Add ability to send any item field in a library chosen SIP field

Some SIP devices need access to item fields that are not sent as item information in the checkin, checkout and item information responses.
It makes sense to allow these fields to be sent in an arbitrary and configurable way, rather than hard code in each special case.

Test Plan:
1) Apply this patch
2) Edit your SIP2 config file, add the following within the login stanza:
   <item_field field="XX" code="<item field 1>" />
   <item_field field="XZ" code="<item fied 2>" />
   where <item field 1> and <item field 2> are item table columns of your choosing
3) Using the sip cli emulator, run checkout, checkin and item information
   messages using that item.
4) Note the values you set for the item columns are sent in the
   corrosponding fields!

Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Fixed merge conflict with number of tests (was 5, changed to 7 which is correct)
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23820: (QA follow-up) Make label clickable for checkbox
Katrin Fischer [Wed, 1 Jul 2020 11:30:18 +0000 (11:30 +0000)]
Bug 23820: (QA follow-up) Make label clickable for checkbox

By adding an id the checkbox is selected when the label is clicked
enhancing usability.

Also adds a colon : to the label.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23820: Add test for new behaviour
Agustin Moyano [Fri, 29 May 2020 16:16:29 +0000 (13:16 -0300)]
Bug 23820: Add test for new behaviour

To test:
1. prove t/db_dependent/api/v1/clubs_holds.t
2. Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23820: Add checkout to default to patron's home branch on club hold
Agustin Moyano [Mon, 30 Mar 2020 18:56:18 +0000 (18:56 +0000)]
Bug 23820: Add checkout to default to patron's home branch on club hold

This patch adds a checkbox to make holds created by club hold to default to patron's home branch if possible.

To test:
1. Apply this patch
2. Create a club, and add two patrons (from now on called patron A and patron B) to it, each one form a different library..
3. Create a hold for the club, and in the details set pickup location different from any of the patrons.
4. Check "Pickup at patron's home library when possible" checkbox
SUCCESS => when submitted, pickup location of holds defaults to patron's home branch
5. Modify patron A's library and set pickup location to no.
6. Repeat steps 3 and 4.
SUCCESS => when submitted, patron A's hold now points to pickup location setted on step 3, and patron B's hold still points to his home branch.
7. Sign off

Sponsored-by: Southeast Kansas Library - SEKLS
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 23391: DBRev 20.06.00.009
Jonathan Druart [Mon, 20 Jul 2020 14:15:20 +0000 (16:15 +0200)]
Bug 23391: DBRev 20.06.00.009

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23391: Remove warnings
Jonathan Druart [Mon, 20 Jul 2020 15:44:40 +0000 (17:44 +0200)]
Bug 23391: Remove warnings

t/db_dependent/api/v1/illrequests.t .. Use of uninitialized value $hidden_statuses_string in split at /kohadevbox/koha/Koha/REST/V1/Illrequests.pm line 61.
Use of uninitialized value $hidden_statuses_string in split at /kohadevbox/koha/Koha/REST/V1/Illrequests.pm line 61.
Use of uninitialized value $hidden_statuses_string in split at /kohadevbox/koha/Koha/REST/V1/Illrequests.pm line 61.
Use of uninitialized value $hidden_statuses_string in split at /kohadevbox/koha/Koha/REST/V1/Illrequests.pm line 61.
Use of uninitialized value $hidden_statuses_string in split at /kohadevbox/koha/Koha/REST/V1/Illrequests.pm line 61.
t/db_dependent/api/v1/illrequests.t .. ok

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23391: Hide finished ILL requests
Magnus Enger [Thu, 12 Dec 2019 14:07:03 +0000 (15:07 +0100)]
Bug 23391: Hide finished ILL requests

Currently, the main table of ILL requests will display all ILL
requests in the database, regardless of their status. For libraries
with active ILL this quickly leads to a lot of requests being displayed,
and the main page of the ILL module taking a long time to load. This
patch proposes to fix this by introducing the ILLHiddenRequestStatuses
syspref, which can take a pipe-separated list of ILL statuses that
will be hidden from view in the ILL module. This means that the
only way to find a hidden request will be through a report.

To test:
- Apply the patch and make sure the atomic database update is run
- Make sure you have a few ILL requests, with at least two different
  statuses
- Check that all requests are still displayed in the main table of
  ILL requests
- Add one of the statuses* you have in your database to the
  ILLHiddenRequestStatuses syspref, reload the ILL module frontpage
  and verify that requests with the given status are not displayed
- Change the syspref to another status and verify requests with
  that status are now hidden
- Change the syspref to hold both statuses, separated by the pipe
  symbol (e.g.: A|B). Verify that no requests with the given
  statuses are now displayed
- Run the ILL REST API tests, e.g.:
  $ sudo koha-shell -c "prove t/db_dependent/api/v1/illrequests.t" kohadev

* = The ILLHiddenRequestStatuses syspref should hold status codes, like
"REQ" and "NEW", not their human readable counterparts.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23148: DBRev 20.06.00.008
Jonathan Druart [Mon, 20 Jul 2020 14:46:19 +0000 (16:46 +0200)]
Bug 23148: DBRev 20.06.00.008

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23148: Fix bridge image paths in de-DE installer files
Julian Maurice [Fri, 3 Jul 2020 06:58:50 +0000 (10:58 +0400)]
Bug 23148: Fix bridge image paths in de-DE installer files

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23148: (follow-up) Correct image paths in sample data and tests
Owen Leonard [Mon, 29 Jun 2020 11:57:52 +0000 (11:57 +0000)]
Bug 23148: (follow-up) Correct image paths in sample data and tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23148: (follow-up) Replace gif files in the OPAC with pngs
Owen Leonard [Fri, 26 Jun 2020 16:37:28 +0000 (16:37 +0000)]
Bug 23148: (follow-up) Replace gif files in the OPAC with pngs

This patch removes the old gif files from the OPAC bridge set and
replaces them with png files.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23148: Replace Bridge icons with transparent PNG files
Owen Leonard [Fri, 11 Oct 2019 20:14:33 +0000 (16:14 -0400)]
Bug 23148: Replace Bridge icons with transparent PNG files

This patch adds SVG versions of the Bridge item type icon set to
misc/interface_customization/itemtypeimg/bridge. It adds some
new icons, and updates some existing icons. All GIF versions of the
icons are replaced with transparent PNG files.

Icon changes:

- English text has been removed from all icons
- New icon for "Periodical," to differentiate from "Journal"
- New icon, "Controller" for video games
- New icon for "Laserdisk" to differentiate from "DVD"
- New icon for "Kit" to differentiate from "Archive"
- New icon, "Reference books."
- Updated "badges" on "Juvenile book" and "Reserve book" to try to
  express the information without English-specific letters.

Before applying the patch, update some item types or collection codes
with Bridge icons. Apply the patch and run the database update process.

 - Open the advanced search page in the staff client and confirm that
   your item type or collection code icons were updated correctly.
 - Go to Administration -> Item types and edit an item type.
   - Check the "bridge" tab and confirm that the icon options look
     correct.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23070: Pass no_triggers => 1 to Koha::Objects->update
Jonathan Druart [Wed, 29 Apr 2020 10:19:46 +0000 (12:19 +0200)]
Bug 23070: Pass no_triggers => 1 to Koha::Objects->update

To make sure we will update all the objects in one go (and no trigger
the ->set->store from Koha::Object->update)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23070: Increment all priorities in 1 query
Jonathan Druart [Mon, 27 Jan 2020 13:55:54 +0000 (14:55 +0100)]
Bug 23070: Increment all priorities in 1 query

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23070: Add tests
Jonathan Druart [Mon, 27 Jan 2020 13:53:23 +0000 (14:53 +0100)]
Bug 23070: Add tests

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23070: Use Koha::Hold in C4::Reserves::RevertWaitingStatus
Jonathan Druart [Thu, 6 Jun 2019 20:14:28 +0000 (15:14 -0500)]
Bug 23070: Use Koha::Hold in C4::Reserves::RevertWaitingStatus

We are using raw SQL statements, we should use Koha::Hold instead.

This patch does not seem optimal, we would like to increment priority in
only 1 statement and without the need to fetch and loop all holds.

== Test plan ==
- apply patch
- place some holds on the same record
- check that the priorities look good
- mark one hold as waiting by doing a check-in
- revert the waiting status
- confirm that the priorities are recalculated correctly

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22844: DBRev 20.06.00.007
Jonathan Druart [Mon, 20 Jul 2020 14:05:38 +0000 (16:05 +0200)]
Bug 22844: DBRev 20.06.00.007

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22844: DBIC schema changes
Jonathan Druart [Mon, 20 Jul 2020 12:42:46 +0000 (14:42 +0200)]
Bug 22844: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22844: Remove 'separate columns with |' from prefs description
Jonathan Druart [Wed, 29 Apr 2020 08:37:23 +0000 (10:37 +0200)]
Bug 22844: Remove 'separate columns with |' from prefs description

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22844: Make the patron's attribute mandatory at the OPAC
Jonathan Druart [Tue, 28 Apr 2020 11:09:49 +0000 (13:09 +0200)]
Bug 22844: Make the patron's attribute mandatory at the OPAC

Test plan:
- Set 1+ patron's attribute(s) mandatory
- Use the self-registration feature and confirm that you cannot selfreg
if the attribute has no value (or empty string)
- Same with the modification form (logged in)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22844: Add is_boolean flag for new 'mandatory' column
Jonathan Druart [Mon, 3 Feb 2020 13:50:28 +0000 (14:50 +0100)]
Bug 22844: Add is_boolean flag for new 'mandatory' column

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22844: (QA follow-up) Build items.json for UniqueItemFields
Marcel de Rooy [Fri, 10 May 2019 08:49:26 +0000 (08:49 +0000)]
Bug 22844: (QA follow-up) Build items.json for UniqueItemFields

Adding items.json, built from latest kohastructure.sql.
Control UniqueItemFields with this source file.
And add StatisticsFields.

Test plan:
Go to Preferences, play with UniqueItemFields.
Adjust StatisticsFields and look at patron record, statistics tab.

Moved-from: Bug 22867
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>