koha.git
3 years agoBug 25236: Fix semantic heading for opac-full-serial-issues.tt
Martin Renvoize [Thu, 11 Jun 2020 10:54:22 +0000 (11:54 +0100)]
Bug 25236: Fix semantic heading for opac-full-serial-issues.tt

Prior to this patch, the opac-full-serial-issues side navigation box contained
semantically incorrect headings.

Test plan
1/ Search for a serial with many linked issues
2/ Navigate to the detailed view of that serial
3/ Click on the 'More details' link after all the listed issues
4/ Inspect the 'Refine your search' elements on the left side of the screen.
   Note that the headings are H1 (Koha page title) > H4 (Refine your search)
3/ Apply this patch
4/ Reload the page
5/ Re-inspect the 'Refine your search' elements and note the heading
   semantics are now H1 (Title of page) > H2 (Refine your search)
6/ Note the appearance of the box is improved and consistent with elsewhere
7/ Signoff

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>
(cherry picked from commit 0550e0b7f788b65b50ed4689d677600be3f9c7c2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25236: Fix semantic heading for opac-topissues.inc
Martin Renvoize [Thu, 11 Jun 2020 10:44:53 +0000 (11:44 +0100)]
Bug 25236: Fix semantic heading for opac-topissues.inc

Prior to this patch, the opac-topissues side navigation box contained
semantically incorrect headings.

Test plan
0/ Enable 'OpacTopIssues'
1/ Navigate to the top issues page via the 'Most popular' link
2/ Inspect the 'Refine your search' elements on the left side of the screen.
   Note that the headings are H1 (Koha page title) > H4 (Refine your search)
3/ Apply this patch
4/ Reload the page
5/ Re-inspect the 'Refine your search' elements and note the heading
   semantics are now H1 (Title of page) > H2 (Refine your search)
6/ Note the appearance of the box is still reasonable
7/ Signoff

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>
(cherry picked from commit 62795521eedc02e11bef520c8b980d480b7e02ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25236: Fix semantic heading for opac-facets.inc
Martin Renvoize [Thu, 11 Jun 2020 10:37:26 +0000 (11:37 +0100)]
Bug 25236: Fix semantic heading for opac-facets.inc

Prior to this patch, the opac-facets side navigation box contained
semantically incorrect headings.

Test plan
1/ Perform a search which yields some results in the OPAC
2/ Inspect the 'Refine your search' elements on the left side of the
screen. Note that the headings are H1 (Koha page title) > H4 (Refine
your search) > H5 (Headings within 'Refine your search' box)
3/ Apply this patch and follow
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client
4/ Reload the page (Flushing the cache to ensure the CSS change load)
5/ Re-inspect the 'Refine your search' elements and note the heading
semantics are now H1 (Title of page) > H2 (Refine your search) > H3
(Headings within 'Refine your search')
6/ Note the appearance of the box is still reasonable
7/ Signoff

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>
(cherry picked from commit f88d56f689e514b47930d617049358fdf9b68608)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25238: Fix semantic heading for opac-details
Martin Renvoize [Thu, 11 Jun 2020 11:15:21 +0000 (12:15 +0100)]
Bug 25238: Fix semantic heading for opac-details

Prior to this patch the opac-details view contained multiple h1 level
headings.

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 two H1 level headings are present
(Page title + Item title)
4/ Apply the patch
5/ Reload the page
6/ Inspect the page and ntoe that the 'Item title' is now a level 2
heading
7/ Note the page still appears nicely
8/ Signoff

Bonus points: Check with XSLT views enabled and disabled, MARC21,
UNIMARC and NORMARC variations.

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>
(cherry picked from commit 3e18402c240814d7f00a62c3f2359bd9b9d0a098)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25239: Fix semantic heading for opac-reserve.tt
Martin Renvoize [Thu, 11 Jun 2020 12:05:31 +0000 (13:05 +0100)]
Bug 25239: Fix semantic heading for opac-reserve.tt

Prior to this patch, the opac-reserve contained semantically incorrect headings.

Test plan
1/ Perform a search which yields some results in the OPAC
2/ Attempt to place a hold on an item.
3/ On the resulting screen, note that the headings are:
   H1 (Koha page title) > H3 (Confirm holds for) > H5 (Hold levels)
4/ Apply this patch and reload the page
5/ Re-inspect the elements in question note the heading semantics are now:
   H1 (Title of page) > H2 (Confirm holds for) > H3 (Hold levels)
6/ Note the appearance of the box is still reasonable
7/ Signoff

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>
(cherry picked from commit 1a96ede5f114bd90fe1735702ca4bab77dfed9d4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25402: (QA follow-up) Remove unused downloadBasket function
Owen Leonard [Thu, 18 Jun 2020 11:31:40 +0000 (11:31 +0000)]
Bug 25402: (QA follow-up) Remove unused downloadBasket function

This patch removes the now-unused downloadBasket function from
basket.js. The patch should have no effect on the functionality of the
download process.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6d73c08e7351a772a388b1e1c6157b307fcbc1a8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25402: Put OPAC cart download options into dropdown menu
Owen Leonard [Wed, 6 May 2020 20:30:32 +0000 (20:30 +0000)]
Bug 25402: Put OPAC cart download options into dropdown menu

This patch modifies the process of downloading a cart so that it doesn't
involve a separate popup window.

To test, apply the patch and add some titles to the cart in the OPAC.

 - Open the cart
 - The "Download" button should now be a dropdown menu.
 - Selecting any of the download options should trigger a download
   prompt.
 - Test with and without some CSV profiles which have been configured
   for use in the OPAC

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>
(cherry picked from commit 174ea44dccd8f0a151a82ba5f8c70e3194065539)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25471: Add DataTables to MARC subfield structure admin page
Owen Leonard [Tue, 12 May 2020 21:27:05 +0000 (21:27 +0000)]
Bug 25471: Add DataTables to MARC subfield structure admin page

This patch adds DataTables sorting and filtering to the table of
subfields shown on the MARC subfield structure administration page.

To test, apply the patch and go to Administration -> MARC bibliographic
framework.

 - From the 'Actions' menu, select 'MARC structure.'
 - From the 'Actions' menu, select the 'View subfields' link for a tag
   with multiple subfields.
 - On the page showing all the subfields for the tag, confirm that the
   table is sorted by default by subfield and that sorting works
   correctly.
 - Confirm that the search form at the top of the table works.

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>
(cherry picked from commit 7ff774509d8c3fc4747857dcfeee7a2cf7557921)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25699: Add edition information to "Holds to pull" report
Petro Vashchuk [Wed, 10 Jun 2020 12:36:01 +0000 (15:36 +0300)]
Bug 25699: Add edition information to "Holds to pull" report

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

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

Those changes don't have performance impact as all tables
including "biblioitem" were already used and joined in this request.

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>
(cherry picked from commit 2e14a0a3fa317191bf0ee735988a83b8f59d4ed5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25747: Don't display a comma when patron has no firstname
Owen Leonard [Mon, 15 Jun 2020 11:14:22 +0000 (11:14 +0000)]
Bug 25747: Don't display a comma when patron has no firstname

This patch adds a check for the existence of "firstname" to
patron-title.inc so that if the patron has no firstname the "invert
name" setting doesn't cause an unnecessary comma to appear.

To test, apply the patch and locate or create a patron with no first
name.

- When checking out to the patron, examine the page title. It should say
  "Checking out to <lastname> (<cardnumber>).
- When checking out to a patron with first and last name it should show
  as before, "Checking out to <lastname>, <firstname> (<cardnumber)

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>
(cherry picked from commit d2f136713e814d4e33e18d1cdad88f3675a9ec3a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25789: Don't allow past date as holds expiration date
Emmi Takkinen [Thu, 18 Jun 2020 06:36:55 +0000 (09:36 +0300)]
Bug 25789: Don't allow past date as holds expiration date

When editing existing holds expiration date it's possible to select
past date from datepicker. This patch changes expiration inputs class
as "datepickerto" to make past dates unselectable.

To test:
1.  Find item with holds
2.  Edit holds expiration date
=> Note that past dates are selectable
3. Apply patch
4. Edit again
=> Past dates are no longer selectable

Sponsored-by: Koha-Suomi Oy
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>
(cherry picked from commit c3365a35963742b294a4c8631b22aa34dac228d9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25756: remove erroneous hyphen
Andreas Roussos [Mon, 15 Jun 2020 14:58:38 +0000 (16:58 +0200)]
Bug 25756: remove erroneous hyphen

In the Staff Client, the OPAC "Appearance" preferences table has an
extra, empty HTML table row at the end.

Test plan:
0) Observe the empty HTML table row at the end of the table that lists
   OPAC "Appearance" system preferences.
1) Apply this patch.
2) Observe that the empty table row is now gone.

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>
(cherry picked from commit 251197ad73ba2be88ac2154db46748b58a0597f8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25611: Use selected vendor when creating a basket
Jonathan Druart [Fri, 5 Jun 2020 09:15:33 +0000 (11:15 +0200)]
Bug 25611: Use selected vendor when creating a basket

We did not take into account the vendor selected.

Test plan:
1. Choose Vendor
2. Create Basket
3. Assign a new vendor
Without the patch this new vendor is not changed
With the patch applied the vendor is changed

4. Edit the basket, change the vendor

Reported-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cd716269a7b2b1b6165154ea7e85844201402a8d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 11994: (follow-up) Make things work when LibraryName is empty
Katrin Fischer [Fri, 1 May 2020 20:11:29 +0000 (20:11 +0000)]
Bug 11994: (follow-up) Make things work when LibraryName is empty

When LibraryName system preference was not set, the installation
of the plugin would fail with:

Firefox could not download the search plugin from: ...

Now if the pref is empty, the description 'Library catalog'
will be used instead.

To test:
- Empty your LibraryName pref
- Verify the search plugin can still be installed
  (see first patch for further instructions)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1e0dd6d0783a66514fc92cc0a34ca0882a5ce62f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 11994: OpenSearch plugins needs to be delivered with Content-Type application...
Katrin Fischer [Fri, 1 May 2020 17:20:43 +0000 (17:20 +0000)]
Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml

https://developer.mozilla.org/en-US/docs/Web/OpenSearch
Your server should serve OpenSearch plugins using
Content-Type: application/opensearchdescription+xml.

To test:
- Verify the Content-Type the file is delivered with
  is correct, for example using wget
  http://127.0.0.1:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f090c1d2cb9253d77c5bac3b8fa03c775af2f0f6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 11994: Fix OpenSearch discovery in the OPAC
Owen Leonard [Tue, 28 Apr 2020 14:41:47 +0000 (14:41 +0000)]
Bug 11994: Fix OpenSearch discovery in the OPAC

This patch corrects the markup for the OpenSearchDescription XML
document and adds (back) the link in the OPAC header which points to it.
This will enable compatible browsers to offer the addition of the OPAC's
keyword search as a search engine option.

I've found documentation suggesting this feature is available (or at
least was at one time) in Chrome and Safari, but in my test it only
works in Firefox.

To test, apply the patch and make sure the OPACBaseURL preference is
set correctly.

 - Open the OPAC in Firefox (these instructions assume the latest
   version, currently v.75).
 - On the right side of the address bar you should see ". . ." Click it
   to trigger the menu.
 - You should see an "Add search engine" entry with your OPAC's icon.
 - Click to add the search engine.

 - Type a keyword to search in the address bar
 - A box should pop up below the address bar showing icons at the bottom
   for performing a search in various search engines. One of these icons
   should be the icon for your Koha OPAC.
 - Click the Koha OPAC icon and confirm that it triggers a keyword
   search in your OPAC.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0ef7b3db4cab73797ba3386b4951c0d86addf871)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 24352: Correct location and collection labels in OPAC search results
Owen Leonard [Tue, 16 Jun 2020 19:48:48 +0000 (19:48 +0000)]
Bug 24352: Correct location and collection labels in OPAC search results

This patch modifies the OPAC's MARC21 search results XSLT so that
OPAC search result information is correctly labeled
based on the OpacItemLocation preference.

Previously, search results showed the label "Location(s)" whether the
setting was "collection code" or "location."

To test, apply the patch and set the OPACXSLTResultsDisplay system
preference to 'default.'

On the OPAC search results page, each result with items should show
information in this format:

   With the OpacItemLocation preference set to 'call number only,'
    - "Availability: Items available for loan: {library} [Call number:
      {call number} ]

   With the OpacItemLocation preference set to 'collection code,'
     - "Availability: Items available for loan: {library}
        Collection(s): {collection description} [{ call number }]"

   With the OpacItemLocation preference set to 'location,'
     - "Availability: Items available for loan: {library}
        Location(s): {shelving location} [{ call number }]"

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>
(cherry picked from commit 897948cff5812a67144355829cf8915af17465d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25189: Don't create authority if results found
Nick Clemens [Tue, 28 Apr 2020 15:34:20 +0000 (15:34 +0000)]
Bug 25189: Don't create authority if results found

Automatic authority creation assumes that if we don't match we need a new authority.

Using the Default linker, however, we don't match if there exists more than one match.
This leads to repeatedly generating authorities once there is a duplicate in the system

We shoudl instead only create a new authority if there are no results

To test:
1 - Set Linker Module to 'Default'
2 - Enable  AutoCreateAuthorities  and  BiblioAddsAuthorities and  CatalogModuleRelink and LinkerRelink
3 - Add two copies of a single authority via Z39
4 - Add a heading for that authority to a bib record
5 - Save the record and note a new authority is generated
6 - Repeat and see another is generated
7 - Apply patch
8 - Restart all the things
9 - Save the record again, no new authority created

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 980419ed15cd4e5ae8be552218f939f5faea18c4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25189: Unit tests
Nick Clemens [Tue, 28 Apr 2020 13:29:52 +0000 (13:29 +0000)]
Bug 25189: Unit tests

Adds new test for not adding authority if some already exist

Also replaces use of 'SearchAuthorities' as it is Zebra specific

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 258d0b0ecd6450fea09677f0607efdedb33cc16c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25509: Remove useless libjs-jquery dependency
David Cook [Fri, 15 May 2020 04:55:49 +0000 (14:55 +1000)]
Bug 25509: Remove useless libjs-jquery dependency

We don't use the libjs-jquery package, so we should remove
the dependency.

To Test:
1) Build package (out of scope of test plan)
2) Install package
3) Note that libjs-jquery is marked by apt as no longer required
4) Remove libjs-jquery package from system and note how it
doesn't take koha-common with it

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9e923e57ed18a104c33cc10a4704450ec4c71c28)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25570: (follow-up) Fix tests
Tomas Cohen Arazi [Thu, 21 May 2020 21:25:46 +0000 (18:25 -0300)]
Bug 25570: (follow-up) Fix tests

This patch fixes the libraries tests, that expected the old behaviour

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/libraries.t
=> FAIL: Tests fail
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b115dfeca649f2f35e0290ead85f2626eabd0829)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25570: Paginate results by default in objects->search
Tomas Cohen Arazi [Thu, 21 May 2020 21:23:01 +0000 (18:23 -0300)]
Bug 25570: Paginate results by default in objects->search

This patch makes the helper paginate the resultsif no pagination
parameters are passed.

Page number defaults to 1, and the page size to the RESTdefaultPageSize
syspref value.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Pagination is not enforced by default
3. Apply this patch
4. Repeat 2
=> SUCCESS: Results are paginated
5. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 451ae76431d3d580494f917ed397f259cd96a876)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25570: Regression tests
Tomas Cohen Arazi [Thu, 21 May 2020 20:48:21 +0000 (17:48 -0300)]
Bug 25570: Regression tests

This tests verify that the default behaviour is to paginate the results.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: $c->objects->search doesn't paginate results by default

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2220ce4d50998bef1dcea787d212a287a802b0aa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25804: Remove HTML from title tag of bibliographic detail page
Owen Leonard [Thu, 18 Jun 2020 11:56:38 +0000 (11:56 +0000)]
Bug 25804: Remove HTML from title tag of bibliographic detail page

This patch removes <span> tags from the bibliographic detail page's
<title> tag.

To test, apply the patch and view the bibliographic detail page for
any title in the staff interface. In the page title shown in the browser
tab you should see no <span> tags.

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>
(cherry picked from commit c0f6f3c635170b6183bfa34244ffebad537e1e0b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 12093: (QA follow-up) Fix typo 'noteforloan'
Katrin Fischer [Sun, 14 Jun 2020 12:02:49 +0000 (14:02 +0200)]
Bug 12093: (QA follow-up) Fix typo 'noteforloan'

Just changes one character in the noteforloan class to notforloan.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9681b8a1ca4cf4a92642ca262778a28af05b93d1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 12093: Add CSS classes to item statuses in detail view
David Roberts [Sat, 9 May 2020 22:14:10 +0000 (22:14 +0000)]
Bug 12093: Add CSS classes to item statuses in detail view

This patch adds classes where necessary to detail.pl

To test:

1) Apply patch
2) View source of /cgi-bin/koha/catalogue/detail.pl to check that there
are no orphaned statuses without classes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ee657b6e5aa0dc9a292260b01dc810fe3d5e2f50)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25769: Patron self modification triggers change request for date of birth to...
Kyle M Hall [Tue, 16 Jun 2020 12:00:45 +0000 (08:00 -0400)]
Bug 25769: Patron self modification triggers change request for date of birth to null

If PatronSelfModificationBorrowerUnwantedField contains dateofbirth, all
patron self modification requests will attempt to set dateofbirth to
null instead of ignoring the field.

Test Plan:
1) Add dateofbirth to PatronSelfModificationBorrowerUnwantedField
2) Run a patron self modification
3) Note the request sets dateofbirth to null on the staff side
4) Apply this patch
5) Restart all the things!
6) Run another self-modification
7) Note of the staff side that dateofbirth is unaffected

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 73c421a5164a3af4b2b8e1001b49f29213a94e3a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25553: Make date columns sortable on the edit items table
Jonathan Druart [Fri, 22 May 2020 09:02:39 +0000 (11:02 +0200)]
Bug 25553: Make date columns sortable on the edit items table

When editing items, the table at the top contain several columns that
have date values, but they cannot be sorted by dates correctly.

Test plan:
Have several items with different dates in columns that contain dates,
like items.dateaccessioned, items.datelastseen)
Sort the column and confirm that with this patch the lines are sorted
correctly

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>
(cherry picked from commit 31800ba46b2ed03cc2e4431c4d3c56fce678a0ec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25447: Terminology: Fix button text "Edit biblio"
Owen Leonard [Mon, 11 May 2020 19:17:57 +0000 (19:17 +0000)]
Bug 25447: Terminology: Fix button text "Edit biblio"

This patch changes the cataloging main page so that in the menu for
reach search result the "Edit biblio" link is now "Edit record."

To test, apply the patch and do a search in cataloging. In the list of
search results verify that the "Actions" menu contains a link labeled
"Edit record."

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>
(cherry picked from commit 679dcd1574de88cb8b7002c5020e0b4488233943)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoRevert "Bug 25828: Update cpanfile for 20.05 release cycle"
Jonathan Druart [Wed, 24 Jun 2020 09:38:24 +0000 (11:38 +0200)]
Revert "Bug 25828: Update cpanfile for 20.05 release cycle"

This reverts commit 876a2316ace9d6409e03e6851d221dc999ca1d6f.

3 years agoUpdate release notes for 20.05.01 release v20.05.01
Jonathan Druart [Tue, 23 Jun 2020 14:37:49 +0000 (16:37 +0200)]
Update release notes for 20.05.01 release

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoIncrement version for 20.05.01 release
Jonathan Druart [Tue, 23 Jun 2020 14:31:32 +0000 (16:31 +0200)]
Increment version for 20.05.01 release

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoFixing po files for 20.05.01
Jonathan Druart [Tue, 23 Jun 2020 14:23:01 +0000 (16:23 +0200)]
Fixing po files for 20.05.01

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoTranslation updates for Koha 20.05.01
Koha translators [Tue, 23 Jun 2020 13:33:05 +0000 (10:33 -0300)]
Translation updates for Koha 20.05.01

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25828: Update cpanfile for 20.05 release cycle
Mason James [Sat, 20 Jun 2020 03:03:25 +0000 (15:03 +1200)]
Bug 25828: Update cpanfile for 20.05 release cycle

to test...
 1/ check about.pl, see old module versions

 2/ apply patch

 3/ check about.pl, see updated module versions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac8249ac67dcac6fd55b0d2bcc13ccd495722ca5)

3 years agoBug 25842: Fix typo streetype in member-main-address-style.inc
Fridolin Somers [Tue, 23 Jun 2020 07:25:33 +0000 (09:25 +0200)]
Bug 25842: Fix typo streetype in member-main-address-style.inc

There are several more instances of the incorrect variable "streetype" in member-main-address-style.inc. Must be corrected with DB column name "streettype" in order to be able to set this field as mandatory.

See also :
Bug 25839 - Typo patron.streetype in member-main-address-style.inc

Test plan :
1) Add "streettype" in system preference "BorrowerMandatoryField"
2) Create a new patron
3) Without patch "Street type" field is not mandatory/required, with
   patch it is
4) Remove "streettype" from system preference "BorrowerMandatoryField"
5) Create a new patron
6) Check "Street type" field is not mandatory/required
7) Select a value and save
8) Edit again patron
9) Check value is selected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3ebfc94a5724a0dd63f565f9744800c98d70f9cf)

3 years agoBug 25839: Fix typo patron.streetype in member-main-address-style.inc
Fridolin Somers [Mon, 22 Jun 2020 09:58:56 +0000 (11:58 +0200)]
Bug 25839: Fix typo patron.streetype in member-main-address-style.inc

Typo in member-main-address-style.inc : patron.streetype > patron.streettype

Generates error :
Template process failed: undef error - The method Koha::Patron->streetype is not covered by tests!

Test plan : try create a new patron

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>
(cherry picked from commit 0de7b6093e86410c022e252b554a5e6305c86480)

3 years agoBug 25774: Handle utf8 chars in REST API queries
Jonathan Druart [Wed, 17 Jun 2020 07:43:40 +0000 (09:43 +0200)]
Bug 25774: Handle utf8 chars in REST API queries

We must utf8 encode the string before json decoding it.

Test plan:
Use "❤" and play with the library search (bug 25288) and Postman to
generate queries using it.

This patch prevents 500:
[2020/06/16 14:11:37] [ERROR] GET /api/v1/libraries: unhandled exception (Mojo::Exception)<<Wide character in subroutine entry at /kohadevbox/koha/Koha/REST/Plugin/Objects.pm line 107.>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbox/koha/Koha/REST/Plugin/Exceptions.pm (73)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b1af5a62cb74aa7dd000ae41c4be07dd6d3aa330)

3 years agoBug 25702: Actions button on Search results from Z39.50 is displayed incorrectly
Owen Leonard [Fri, 12 Jun 2020 19:46:00 +0000 (19:46 +0000)]
Bug 25702: Actions button on Search results from Z39.50 is displayed incorrectly

This patch modifies, again, the way the actions popup is implemented in
Z39.50 search results, whether it be in cataloging, authorities, or
acquisitions. The solution for Bug 25282 changed some markup which was
being referred to in JavaScript. This patch makes the markup more
consistent and unifies handling of the menu in one JavaScript file.

The solution changes the way a menu is generated when the user clicks
within the row of Z39.50 search results (not on the "Actions" button).
The script now creates a clone of the actions menu in that row and
appends it to the <td> the user clicked on.

To test, apply the patch and clear your browser cache if necessary. Test
these three areas in the same way:

1. Cataloging -> New from Z39.50 -> Search
2. Authorities -> New from Z39.50 -> Search
3. Acquisitions -> Vendor -> Add to Basket -> From an external source ->
Search.

In each case, test the functionality of the "Actions" menu button in the
last column ("Preview" in Acquisitions search results). The menu
should be positioned correctly and menu choice works correctly

Click anywhere else in the search results table. The same actions menu
should be triggered in that table cell. Confirm that these menu items
work correctly according to the row which was clicked.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 84230fcd798805c38c9ff16312121011cd0dc782)

3 years agoBug 25786: AddReserve now takes a hashref
Jonathan Druart [Thu, 18 Jun 2020 13:13:25 +0000 (15:13 +0200)]
Bug 25786: AddReserve now takes a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7b54b529078756556252530bb72903caa88e94e7)

3 years agoBug 25786: Holds Queue building may target the wrong item for item level requests...
Kyle M Hall [Wed, 17 Jun 2020 16:53:36 +0000 (12:53 -0400)]
Bug 25786: Holds Queue building may target the wrong item for item level requests that match holds queue priority

Bug 23934 removed the limitation that prevented item level holds from
getting local holds priority. The problem is the code has never checked
if the item level hold matches the given item! This means the wrong item
may be requested to fill an item level hold.

Test Plan:
1) Create 3 items on a record
2) Place a hold for the 2nd item you created
4) Ensure that hold would be picked up by local holds priority
5) Build the holds queue
6) Note the holds queue is asking for the wrong item!
7) Apply this patch
8) Rebuild the holds queue
9) Holds queue should now be asking for the correct item!

Signed-off-by: Kim Peine <kim@williston.lib.vt.us>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b17a04dd077bb118086ad9e4bb58eee81ade2cdd)

3 years agoBug 25783: Holds Queue treating item-level holds as bib-level
Kyle M Hall [Wed, 17 Jun 2020 15:41:21 +0000 (11:41 -0400)]
Bug 25783: Holds Queue treating item-level holds as bib-level

The holds queue builder does not honor
the new item_level_hold flag. Instead, it only item_level_request if
in the loop dealing with item level holds. This is incorrect. Item level
holds may be trapped in the local holds priority loop as well. It's
trivial to just pass though the correct item/biblio level hold flag.

I do not know how to write a reproducable test plan for these issues.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kim Peine <kim@williston.lib.vt.us>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db235d33a4caf64387b86ebab7b658bd7759ff21)

3 years agoBug 25783: Regression tests
Tomas Cohen Arazi [Wed, 17 Jun 2020 20:18:12 +0000 (17:18 -0300)]
Bug 25783: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kim Peine <kim@williston.lib.vt.us>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dd4970860d4299c89ce4a698644c08f990bc1468)

3 years agoRevert "Bug 12093: Add CSS classes to item statuses in detail view"
Lucas Gass [Thu, 18 Jun 2020 13:03:10 +0000 (13:03 +0000)]
Revert "Bug 12093: Add CSS classes to item statuses in detail view"

This reverts commit 4d50a8d1214ec9dfb1fbd1fcdeed5adee14e8d15.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoRevert "Bug 12093: (QA follow-up) Fix typo 'noteforloan'"
Lucas Gass [Thu, 18 Jun 2020 13:02:53 +0000 (13:02 +0000)]
Revert "Bug 12093: (QA follow-up) Fix typo 'noteforloan'"

This reverts commit 47a28d356a0aff374ba01256093d1da6dad4419e.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 17084: Automatic debian/control updates
Mason James [Mon, 1 Jun 2020 05:20:17 +0000 (17:20 +1200)]
Bug 17084: Automatic debian/control updates

update for 20.05 release cycle

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10910: (follow-up) Move the suggestions note with the other non-blocking notes
Katrin Fischer [Fri, 1 May 2020 16:28:25 +0000 (16:28 +0000)]
Bug 10910: (follow-up) Move the suggestions note with the other non-blocking notes

To test:
- Add a credit to the patron's account
- Make sure they got a pending suggestion
- Try to delete
- Verify you notes for both as list items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>
(cherry picked from commit 21cde7bd2f6380129c4a7fb7e4d3aecf4dcb6de0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 10910: Add a warning when deleting a patron with pending suggestions
Jonathan Druart [Sun, 5 May 2019 14:42:45 +0000 (09:42 -0500)]
Bug 10910: Add a warning when deleting a patron with pending suggestions

Test plan:
From the OPAC, add a suggestion
From the staff interface, try to delete the patron who created the
suggestion
=> You get a warning message

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 85c1537bd7e4002a59c3c3eba6d2180911d8b7c3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 12093: (QA follow-up) Fix typo 'noteforloan'
Katrin Fischer [Sun, 14 Jun 2020 12:02:49 +0000 (14:02 +0200)]
Bug 12093: (QA follow-up) Fix typo 'noteforloan'

Just changes one character in the noteforloan class to notforloan.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9681b8a1ca4cf4a92642ca262778a28af05b93d1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 12093: Add CSS classes to item statuses in detail view
David Roberts [Sat, 9 May 2020 22:14:10 +0000 (22:14 +0000)]
Bug 12093: Add CSS classes to item statuses in detail view

This patch adds classes where necessary to detail.pl

To test:

1) Apply patch
2) View source of /cgi-bin/koha/catalogue/detail.pl to check that there
are no orphaned statuses without classes.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ee657b6e5aa0dc9a292260b01dc810fe3d5e2f50)

3 years agoBug 21591: Check for record level item type issues too
Nick Clemens [Wed, 17 Oct 2018 19:56:12 +0000 (19:56 +0000)]
Bug 21591: Check for record level item type issues too

To test:
1 - sudo koha-mysql kohadev
2 - UPDATE biblioitems SET itemtype = NULL where biblionumber = 1
3 - UPDATE items SET itype = NULL where biblionumber = 1
4 - perl misc/maintenance/search_for_data_inconsistencies.pl
5 - Notice warnings
6 - Apply patch
7 - Undefined itemtype on bibliolevel is now warned
7 - Test also with itype=""

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6beda5cf1d1bb76ac692f5443e4b75f727c9c4ba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 24405: Compile CSS
Lucas Gass [Wed, 17 Jun 2020 23:39:42 +0000 (23:39 +0000)]
Bug 24405: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 24405: Make OPAC link underlining consistent
Owen Leonard [Fri, 8 May 2020 13:42:55 +0000 (13:42 +0000)]
Bug 24405: Make OPAC link underlining consistent

This patch makes a minor modification to the OPAC CSS so that links are
consistently displayed without underlines in their inactive state. This
corrects two cases: Links in the facets sidebar and "Check all/none"
links shown on search results.

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).

- In the OPAC, perform a search.
- In the search results facets sidebar, confirm that links are not underlined.
- At the top of the search results table, confirm that the "Select all"
  and "Clear all" links are not underlined.

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>
(cherry picked from commit 941989827b12fb54ceefc72dbc26f2727acf2a44)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25070: (QA follow-up) Fix capitalization: Street Number
Katrin Fischer [Thu, 4 Jun 2020 01:07:24 +0000 (01:07 +0000)]
Bug 25070: (QA follow-up) Fix capitalization: Street Number

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 758b60f711ff97629d5f9cebabd64cec4edb1aca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25070: Centralize member-main-address-style
Jonathan Druart [Mon, 6 Apr 2020 12:42:40 +0000 (14:42 +0200)]
Bug 25070: Centralize member-main-address-style

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>
(cherry picked from commit 4a4d3ef0d8a759a485cc5f16e363bfb1f1177ab3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25070: Centralize member-display-alt-address-style
Jonathan Druart [Mon, 6 Apr 2020 12:25:48 +0000 (14:25 +0200)]
Bug 25070: Centralize member-display-alt-address-style

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>
(cherry picked from commit ac973d2d440f90ec2d9f55dd4e2c6c13a45faaec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25070: Centralize member-display-address-style
Jonathan Druart [Mon, 6 Apr 2020 12:20:34 +0000 (14:20 +0200)]
Bug 25070: Centralize member-display-address-style

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>
(cherry picked from commit c32d71978c47cc810d5de8c20df89866b2ce417b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25070: Centralize member-alt-contact-style
Jonathan Druart [Mon, 6 Apr 2020 12:09:06 +0000 (14:09 +0200)]
Bug 25070: Centralize member-alt-contact-style

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>
(cherry picked from commit cfd97049a335d50d633d4c47164d223fcc03cad2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25070: Centralize member-alt-address-style
Jonathan Druart [Mon, 6 Apr 2020 11:53:17 +0000 (13:53 +0200)]
Bug 25070: Centralize member-alt-address-style

There are 5 includes files per value of AddressFormat (us, de, fr).
The code is duplicated for each language, the only thing that changes is the order.

Wwith this patchset we are going to refactore them to avoid further regressions.

The idea is to remove all code that is duplicated and remove the need of
having 5*3 files. We are going to limit them to 5 files, 1 per use.

Note that we could go even further, for instance
member-display-alt-address-style and member-display-address-style are
quite identical.

Test plan (for the whole patchset):
- Create a patron with all the address, contact and alternate info filled
- Edit them and save
- Look at the patron's info (top left) in the patron module, and the
patron detail view.
- Play with the different values of AddressFormat
The order and the info must be displayed identically before and after
this patchset. No change is expected.

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>
(cherry picked from commit fdca61a7455bb5bdca32a718a43a7e2688bcea46)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25363: Merge common.js with staff-global.js
Owen Leonard [Mon, 4 May 2020 12:36:57 +0000 (12:36 +0000)]
Bug 25363: Merge common.js with staff-global.js

This patch merges the contents of common.js with staff-global.js. Both
are included globally in the staff interface, and there doesn't seem to
be any reason to require that the user downloads two different
JavaScript files.

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

View the detail page for a title in the search results. On the detail
page you should see navigation controls in the sidebar for browsing
through search results. Confirm they work correctly.

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>
(cherry picked from commit 814a7ecf47b087a60b35bca6a4d23deeb596a0e8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25593: Terminology: Fix "There is no order for this biblio." on catalog detail...
Owen Leonard [Thu, 4 Jun 2020 12:33:47 +0000 (12:33 +0000)]
Bug 25593: Terminology: Fix "There is no order for this biblio." on catalog detail page

This patch changes the phrase "There is no order for this biblio" to
"There is no order for this bibliographic record." on the catalog
detail page.

To test, apply the patch and view the bibliographic detail page for a
record which has no order associated with it. The text in the
"Acquisitions details" tab should be correct.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 953a53d9d6bffbad9303532c113f50864a03a0ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25627: Fix class and id in body tag
Katrin Fischer [Thu, 4 Jun 2020 00:09:48 +0000 (00:09 +0000)]
Bug 25627: Fix class and id in body tag

This will also help if you want to use different colors
for different modules.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e1d0068e8d3a8f94cc5153c3cff9781ed9e142d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25627: Move OPAC problem reports from administration to tools
Owen Leonard [Thu, 4 Jun 2020 11:51:38 +0000 (11:51 +0000)]
Bug 25627: Move OPAC problem reports from administration to tools

This patch moves the OPAC problem report management page from the
Administration section to the Tools section.

I think this makes sense because management of reports is an ongoing
task, not a configuration.

To test, apply the patch and enable the OPACReportProblem system
preference.

 - Go to Administration. There should be no link to OPAC problem
   reports.
   - Open an administration page which shows the Administration menu in
     the left-hand sidebar, e.g. Libraries. There should be no link to
     OPAC problem reports in the menu.
 - Go to Tools. There should be a link to OPAC problem reports in the
   "Addional tools" section.
   - Open the OPAC problem reports page and confirm that it works
     correctly.
   - The breadcrumbs menu should show "Tools > OPAC problem reports."
   - Confirm that the link in the sidebar menu works correctly.
 - If necessary, submit an OPAC problem report via the OPAC so that
   there is a pending report. Go to the staff interface home page and
   check that the "OPAC problem reports pending" link works correctly.

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>
(cherry picked from commit c2127901da52e0c35124b97ff4626d3ea943e655)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25687: Switch Y/N in EDI accounts table for Yes and No for better translatability
Owen Leonard [Tue, 9 Jun 2020 20:05:48 +0000 (20:05 +0000)]
Bug 25687: Switch Y/N in EDI accounts table for Yes and No for better translatability

This patch changes the list of EDI accounts shown in EDI administration
so that columns which previously used "Y" or "N" now show "Yes" or "No."

To test, apply the patch and go to Administration -> EDI accounts.

If necessary, add an EDI account. In the table of information about the
EDI account, the columns with information about quotes, orders,
invoices, responses, and auto-ordering should show "Yes" or "No" based
on the account's settings.

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>
(cherry picked from commit 40aaf25409921b1414396bb1aa2146b63d432339)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25346: Supress warning message when install dir exists
Bernardo Gonzalez Kriegel [Tue, 19 May 2020 16:21:44 +0000 (13:21 -0300)]
Bug 25346: Supress warning message when install dir exists

To see it enable verbose mode

To test:
1) Install lang with install dir
   (cd misc/translator; ./tranlste install de-DE)
   check message: "de-DE installer dir /...mysql/de-DE already exists."
2) Apply patch
3) Repeat 1, now message is gone
4) Repeat 1 in verbose mode (./translate install de-DE -v)
   check the message now appears at the bottom.

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>
(cherry picked from commit 7eb471fcdb113e158d819932116c546a53ee5845)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25582: Don't show OPAC problems entry on dashboard when there are no reports
Owen Leonard [Tue, 2 Jun 2020 11:08:23 +0000 (11:08 +0000)]
Bug 25582: Don't show OPAC problems entry on dashboard when there are no reports

This patch makes a minor correction to the template to correct the check
on outstanding OPAC problem reports. An error was preventing the check
from working correctly.

To test, apply the patch and enable the OPACReportProblem system
preference.

 - On the staff interface home page, check the area showing pending
   operations (suggestions, tags, etc.).
 - If you have no pending OPAC problem reports there should be no line
   for OPAC problem reports.
   - If necessary, mark all pending OPAC problem reports closed and
     confirm that when there are no outstanding reports the link is
     hidden.
   - Also test when there are no other outstanding reports in that
     section (suggestions, tags, patron modifications), nothing appears
     at all, not even the surrounding border.
  - If necessary, test that the link appears when you have one or more
    OPAC problem reports.
    - Go to the OPAC and use the "Report a problem" to submit a test
      report.
    - Check that the staff interface home page reflects that there is
      now a pending report.

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>
(cherry picked from commit a17c0475d8fff517eaf3a0da6dfaa65d43bde9f3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl
David Roberts [Sat, 9 May 2020 16:07:03 +0000 (16:07 +0000)]
Bug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl

This patch adds the table name to the SQL update statements.

To test:

1) Apply the patch
2) Run the script. Check that there are no errors, and that the script
behaves as expected.

Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Created a test record with values in field 440. Applied the patch, ran the
script with the -c -f flags and observed that the values were moved to field
490. Also, the relevant Koha to MARC mappings were changed accordingly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 051b0b8d2fb3dc3593147e5ac80bc394dcf48e58)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25394: Cronjob path in the AuthorityMergeLimit syspref description is wrong
Caroline Cyr La Rose [Wed, 6 May 2020 20:22:57 +0000 (16:22 -0400)]
Bug 25394: Cronjob path in the AuthorityMergeLimit syspref description is wrong

Test plan:
1- Apply patch
2- Go to Administration > Global system preferences > Authorities
3- The path to merge_authorities.pl in the AuthorityMergeLimit
description should now read misc/cronjobs/merge_authorities.pl

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>
(cherry picked from commit 772205bab5c7d6720ca6d25244c04cdf7649a96f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25537: Page reload at branchtransfers.pl loses destination branch
Kyle M Hall [Thu, 21 May 2020 17:52:32 +0000 (13:52 -0400)]
Bug 25537: Page reload at branchtransfers.pl loses destination branch

At branchtransfers.pl, one selects a destination branch and scans in any
number of items to generate transfers to that branch. However, anything
that makes the page reload causes your branch selection to be lost,
reverting you back to whichever branch comes first alphabetically.

This is an invitation to error when one has a stack of books to
send all to the same branch. Could that error handling get moved
into a modal or something that won't reload the page?

Test Plan:
1) Place a hold on an item and set it to waiting
2) Initiate a branch transfer from branchtransfers.pl for any branch but
   the first in the pulldown branch selector
3) Choose to cancel the hold and transfer
4) Note the pulldown reverts to the first option
5) Apply this patch
6) Repeat steps 1-3
7) Note the pulldown retains your preveiously selected branch!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8ab8df3866352568509ed34f02a5566e750dee21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25576: Add link to the manual for the ILL module
Jonathan Druart [Fri, 22 May 2020 08:23:55 +0000 (10:23 +0200)]
Bug 25576: Add link to the manual for the ILL module

Test plan:
Enable ILLModule system preference.
Go to ILL requests
Click Help

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 50b6e447735ee31a2fbba5b116959cdb6d451c19)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25587: fix for "clear" button to reset all selects
Petro Vashchuk [Fri, 22 May 2020 15:11:28 +0000 (18:11 +0300)]
Bug 25587: fix for "clear" button to reset all selects

Button "clear" on cgi-bin/koha/admin/smart-rules.pl did not reset fields
with a dropdown selector except the first one.

This happens because jQuery selector .find("select option:first")
in koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
selects only single first element in the whole group, as from jquery
doc:
> The :first pseudo-class is equivalent to :eq( 0 ). It could also be
> written as :lt( 1 ). While this matches only a single element,
> :first-child can match more than one: One for each parent.
> (https://api.jquery.com/first-selector/)

And it works if replaced by: .find("select option:first-child")

To reproduce:
    1) Go to /cgi-bin/koha/admin/smart-rules.pl
    2) Start editing one of existing rules or filling a new one, change
       all selects to have non-first option selected. Fill text input
       fields with sample data.
    3) Reset all fields with the "clear" button.
    4) Observe that only the first dropdown field was reset to the first
       option while all others still contain previously given values,
       meanwhile all text input fields are cleared as expected.
    5) Apply the patch.
    6) Repeat steps 1, 2 and 3.
    7) Check that all dropdown fields were reset to first option, as
       expected.

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 58c389bf279ca6ffdea199ada8d65ce92baaf952)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25615: Remove empty entries in the filter dropdowns of "holds to pull"
Jonathan Druart [Thu, 28 May 2020 10:11:37 +0000 (12:11 +0200)]
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"

On the "Holds to pull" view there are filters that are built on the
value of the cells.
Bug 22536 improved the ergonomic by adding a ul list, but the filters
are now broken, the ul and li tags are retrieved and put in the filter
list.

The idea of this patch is to remove the HTML tags and skip if the value
is then empty.

Test plan:
Place a hold on an item
Go to Home › Circulation › Holds to pull
Open the "libraries" filter
=> Without this patch you see empty entries
=> With this patch the filter contain only the libraries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4f70682c56dddd42f24c62d7634f5cd3b7119702)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25623: Make sure oauth.t rolls back the db
Tomas Cohen Arazi [Fri, 29 May 2020 17:41:25 +0000 (14:41 -0300)]
Bug 25623: Make sure oauth.t rolls back the db

This patch adds a missing transaction wrapping one of the subtests. This
is probably an oversight when refactoring this file.

To test:
1. Open the patron categories page
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass
3. Reload the patron categories page
=> FAIL: There's random data in there
4. Apply this patch and repeat 2
5. Reload the patron categories page
=> SUCCESS: The random data from the previous tests is still there, but
no new random data
=> SUCCESS: Tests still pass
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f898cef4f4b5a9f424f968a58b96898f26f80035)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25658: Compile CSS
Lucas Gass [Wed, 17 Jun 2020 22:52:17 +0000 (22:52 +0000)]
Bug 25658: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25658: Print icon sometimes obscures patron barcode
Owen Leonard [Thu, 4 Jun 2020 15:22:43 +0000 (15:22 +0000)]
Bug 25658: Print icon sometimes obscures patron barcode

This patch alters the style of the patron name/cardnumber label on the
checkout screen so that it has a maximum width. This will help avoid the
label being obscured by the print/close buttons displayed when
DisplayClearScreenButton is enabled.

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

 - Enable the DisplayClearScreenButton system preference.
 - Check out to a patron. Resize the browser to confirm that at narrower
   browser widths the patron name in the checkout form isn't obscured by
   the print and clear screen buttons.

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>
(cherry picked from commit ada13a39825d666ad75a7510530abe5542803ee6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25675: Reword and reorganize sysprefs related to patron self modification
Andrew Fuerste-Henry [Thu, 4 Jun 2020 16:21:27 +0000 (16:21 +0000)]
Bug 25675: Reword and reorganize sysprefs related to patron self modification

To Test:
1: apply patch
2: restart all
3: go to System Preferences > OPAC
4: confirm "Self registration" section is now labeled "Self registration and modification"
5: confirm OPACPatronDetails is now in the "Self registration and modification" section
6: confirm PatronSelfRegistration now reads "(Allow / Don't allow)  library patrons to register for an account via the OPAC."
7: set OPACPatronDetails to Don't allow
8: set PatronSelfRegistration to Allow
9: log into the opac and verify you're not able to edit your patron details on an existing account

Signed-off-by: DonnaB <donna@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e4b92d84c50bee27b2f331e5fbbc04813e469bb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25696: Correct "Test prediction pattern" HTML button
David Cook [Tue, 9 Jun 2020 05:38:27 +0000 (15:38 +1000)]
Bug 25696: Correct "Test prediction pattern" HTML button

This patch corrects the closing tag for the "Test prediction pattern"
button from "</a>" to "</button>"

Test plan:
1. Apply the patch
2. Create a serial subscription from a new or existing bib record
3. Choose any frequency, numbering pattern, and subscription start
date you choose (ie fill out all mandatory subscription fields)
4. Click "Test prediction pattern"
5. Note that the prediction pattern appears on the right of the screen

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4116ca4097732977d7b954a881f191174c28d651)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 20783: Add missing url filters
Jonathan Druart [Thu, 21 May 2020 13:46:53 +0000 (15:46 +0200)]
Bug 20783: Add missing url filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f1000638f156c27a82ad9d2c2e25714e6f1ec83)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 20783: Similar changes for OPAC
Jonathan Druart [Tue, 12 May 2020 13:13:44 +0000 (15:13 +0200)]
Bug 20783: Similar changes for OPAC

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 953d0d89d0597b23527c9d57d35885a86f93d6b2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 20783: Remove WWW::YouTube::Download dependency
Jonathan Druart [Tue, 12 May 2020 10:57:32 +0000 (12:57 +0200)]
Bug 20783: Remove WWW::YouTube::Download dependency

No longer used.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e9f4d3bd76fc9764d58e4cb3ac8fb3eda6a939ca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 20783: Use iframe to embed Youtube videos
Jonathan Druart [Tue, 12 May 2020 10:54:50 +0000 (12:54 +0200)]
Bug 20783: Use iframe to embed Youtube videos

WWW::YouTube::Download is broken and not reliable.
Other alternative was to use HTML::Video::Embed but not updated since
years.

The best alternative seems to follow youtube advise and use an iframe
https://developers.google.com/youtube/iframe_api_reference

Test plan:
Put youtube video in 856$u (using different url formats, youtu.be,
youtube.com/embed, etc.)
Enable HTML5MediaEnabled and HTML5MediaYouTube and confirm that the
youtube videos are correctly embeded.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2d7e08bc0e8c1ab6f21cce06932bb7dd6660cfcd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 23276: Do not display tag if pref TagsEnabled is off
Jonathan Druart [Wed, 20 Nov 2019 14:40:10 +0000 (15:40 +0100)]
Bug 23276: Do not display tag if pref TagsEnabled is off

If the pref TagsEnabled is off we should not display the tags at the
OPAC.
There is a message to tell that tags system is disabled, but the tags
are displayed.

We should redirect to 404 like we do in opac-topissues.pl and
opac-suggestions.pl.

Test plan:
- Turn TagsEnabled on
- Add some tags
- Turn TagsEnabled off
- Hit /cgi-bin/koha/opac-tags.pl
=> Without this patch you see a warning messaging saying that the tag
system is disabled, but the tags are displayed
=> With this patch you get a 404 redirect

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>
(cherry picked from commit 6fc316d2eef5945b20a14bec81e2daa57696dd81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25266: Remove uneeded var
Jonathan Druart [Fri, 5 Jun 2020 14:59:10 +0000 (16:59 +0200)]
Bug 25266: Remove uneeded var

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 14c5512306c2e0c6fc21bbd378cc5bff0169ec68)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25266: Fix error when no later order
Jonathan Druart [Mon, 25 May 2020 07:33:10 +0000 (09:33 +0200)]
Bug 25266: Fix error when no later order

If no late order we got:
"Argument passed to the 'IN' operator can not be undefined"

It highlights a context error

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>
(cherry picked from commit 7531f66a921089b8b4bae60cf607820b4c483af0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25266: Remove C4::Bookseller
Jonathan Druart [Mon, 4 May 2020 11:17:34 +0000 (13:17 +0200)]
Bug 25266: Remove C4::Bookseller

This was the only occurrence of GetBooksellersWithLateOrders and it was
the only subroutine of C4::Bookseller

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>
(cherry picked from commit 3ce4024fcb9cc581ab0f5f6acb504d8e4bf904e9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25266: Build the vendor list from the order list
Jonathan Druart [Mon, 4 May 2020 11:13:56 +0000 (13:13 +0200)]
Bug 25266: Build the vendor list from the order list

This patch is removing the use of GetBooksellersWithLateOrders and use
the late order list to generate the vendors.

Test plan:
Create several vendors, several orders, close the baskets
Also create vendors that do not have orders (or basket not closed)
Go to the late orders page and confirm that the list of vendors is
correctly filled, select one, you can see the "select all" link in the
header of the table

QA: that would be good to test this with production data and compare
execution time.

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>
(cherry picked from commit 9e1d4c978d5954c27cd016f636a03942ede6c406)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25349: Add checkEnter function and apply it to SCO page
Lucas Gass [Tue, 5 May 2020 18:04:11 +0000 (18:04 +0000)]
Bug 25349: Add checkEnter function and apply it to SCO page

This patch adds the checkEnter function to the OPAC global.js and then applies it to the SCO login page.
TO TEST:
1. Go to SCO login and try entering something in the "Login:" input amd "Password:" input.
2. Pressing enter while in either will automatically submit the form.
3. Apply patch.
4. Type something into the Login: field and press enter, the form should NOT submit.
5. Type something into the Password: field and pess enter, this SHOULD submit the form.
6. Change the syspref SelfCheckoutByLogin to 'Cardnumber'
7. Type something into the Please enter your card number: field, the form should submit.

Signed-off-by: Donnab <donna@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 941b5aaecc0c528a30abf47b433c3805338ff09a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25434: Display selections-toolbar on small screens
Jonathan Druart [Tue, 26 May 2020 10:28:13 +0000 (12:28 +0200)]
Bug 25434: Display selections-toolbar on small screens

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>
(cherry picked from commit 4d9ca6b13d29acc088777e9df414aaa54be4e389)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25507: Fix table in basket group PDF German 2-pages
Katrin Fischer [Fri, 22 May 2020 23:22:53 +0000 (01:22 +0200)]
Bug 25507: Fix table in basket group PDF German 2-pages

A variable was doubled up which made the columns in the
table of orders no longer line up (different number of headers
to columns).

To test:
- Create at least one basket with one or more orders
- Close the basket
- Add the basket to a basket group manually or let Koha do it
  on closing
- Change the OrderPdfFormat system preference to 'German 2-page'
- Go to the basket group page and print the PDF of the basket
- Verify the table of orders doesn't look right and runs outside
  the page
- Apply patch
- Repeat the PDF print - now table should look right

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7de78ab092f7355a15de60e9a2842d9577777581)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25521: Remove cart_to_shelf note from NewItemsDefaultLocation syspref
Andrew Fuerste-Henry [Fri, 15 May 2020 20:20:05 +0000 (20:20 +0000)]
Bug 25521: Remove cart_to_shelf note from NewItemsDefaultLocation syspref

To test:
1- find the NewItemsDefaultLocation syspref
2- confirm it says "NOTE: This system preference requires the misc/cronjobs/cart_to_shelf.pl cronjob. Ask your system administrator to schedule it."
3- apply patch
4- restart all
5- reload syspref, it doesn't say that anymore!

Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d21ad9fe11bdbd8c49eb3d64bb24c414bea8a1f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25545: (follow-up) Fix capitalization
Katrin Fischer [Sat, 30 May 2020 00:56:04 +0000 (00:56 +0000)]
Bug 25545: (follow-up) Fix capitalization

Total + Adjustments + Shipment cost ($)

changed to:
Total + adjustments + shipment cost ($)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f98f2edf0a1515ce727e670ecaecd4f9295f34cb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25545: Add adjustments to total tax included
Nick Clemens [Wed, 27 May 2020 10:38:03 +0000 (10:38 +0000)]
Bug 25545: Add adjustments to total tax included

Adjustments are not affected by tax, they are meant as a way to alter invoice
values after receiving (damaged items, refuneds, extra charges, etc)

When adjustments were added the tax included column was missed

To test:
- Add a basket with at least one order
- Close it
- Receive shipment
- Receive the order
- Finish receiving
- Add an adjustment of any amount
- Verify in the invoice details table:
  - Total tax exc. is showing including the adjustmnt
  - Total tax inc. is missing the adjustment
- Apply patch
- Reload
  - Total tax exc. is showing including the adjustmnt
  - Total tax inc. is showing including the adjustment

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>
(cherry picked from commit 286a739b5cd906a55b2dc97e6ab1ef9ffb00a6f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25555: Invert patron name in holdsqueue.tt
Lucas Gass [Wed, 20 May 2020 17:59:16 +0000 (17:59 +0000)]
Bug 25555: Invert patron name in holdsqueue.tt

TEST PLAN:
1. Have multiple holds from multiple patrons and run the holds queue cron to populate the holds queue list.
2. Try sorting by patron and see that is sorts based on first name.
3. Apply patch
4. Try sorting again and now it should sort by surname.

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>
(cherry picked from commit 73e5032c4bf52ee72972a6fe8182d3fd5737716c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25597: Add missing Javascript libraries to sco printslip
David Cook [Mon, 25 May 2020 06:25:06 +0000 (16:25 +1000)]
Bug 25597: Add missing Javascript libraries to sco printslip

This patch adds missing Javascript libraries to the self-checkout
print slip. These missing libraries were preventing the auto print
prompt and close. There was also a font error.

To Test:
0) Apply patch
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Press F12 on keyboard and choose Console
5) Note no Javascript errors
6) Note that print dialog appears and closes after
a print option is chosen

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>
(cherry picked from commit 8e00a96cf17f9c429050ce2ce5e3095fe566121a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25599: Fix default value placeholders for UseACQFrameworkForBiblioRecords
Jonathan Druart [Tue, 26 May 2020 08:50:31 +0000 (10:50 +0200)]
Bug 25599: Fix default value placeholders for UseACQFrameworkForBiblioRecords

The feature was there but a condition disabled it.

Test plan:
- modify the default value for 008@ or another subfield in the ACQ framework using one or more of the placeholders above
- activate UseACQFrameworkForBiblioRecords
- create a basket
- create an order from a new record
- verify the values have been replaced

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>
(cherry picked from commit b16e463173e8125396eaef3159d08df5d0d2cfb6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25642: Fix description of new feature in update_dbix_class_files.pl
Julian Maurice [Fri, 5 Jun 2020 12:38:52 +0000 (16:38 +0400)]
Bug 25642: Fix description of new feature in update_dbix_class_files.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2b05647b6361b1a805ae856e81a3e7db0cb3394b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25642: Add technical notes
Martin Renvoize [Mon, 1 Jun 2020 12:31:21 +0000 (13:31 +0100)]
Bug 25642: Add technical notes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 77c945d380975bb18b292e5bb28dd6942dc1288f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25701: Remove sort on removed field
Nick Clemens [Wed, 10 Jun 2020 10:58:25 +0000 (10:58 +0000)]
Bug 25701: Remove sort on removed field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 35bb41dfc14603d85a6ddb85fec9b4de8d1a4001)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 25701: (bug 14419 follow-up) Always display facet groups in the same order
Jonathan Druart [Wed, 10 Jun 2020 10:03:20 +0000 (12:03 +0200)]
Bug 25701: (bug 14419 follow-up) Always display facet groups in the same order

It seems that this regression comes from bug 14419, but I have not found
a logic reason behind that.
This patch restores the behaviour we always had: facet groups must be
displayed in a given order: the Zebra index (au, ccode, holdingbranch,
etc.)

Test plan:
Apply this patch, restart all and confirm that the facets are not moving
up and down when you refresh your search result page.

QA note:
I think the following line must be removed
@facets_loop = sort {defined $a->{expand} && defined $b->{expand} && $a->{expand} cmp $b->{expand}} @facets_loop;

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d6696944267ca1afd7682193ddf3680a905a773d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 years agoBug 24003: (follow-up) Add all userenv parameters
Tomas Cohen Arazi [Tue, 9 Jun 2020 15:40:32 +0000 (12:40 -0300)]
Bug 24003: (follow-up) Add all userenv parameters

This patch makes the API set more userenv params than just the
borrowernumber. To test:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_*
=> SUCCESS: All tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ca7eb99eef2d1ae0258318310e402069194e999b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>