Commit Graph

37762 Commits

Author SHA1 Message Date
Alex Buckley 4e55967da5 Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled
Test plan:
1. Check the OAI-PMH:AutoUpdateSets syspref is disabled
2. Run t/db_dependent/OAI/Sets.t tests and confirm tests pass
successfully
3. Enabled the OAI-PMH:AutoUpdateSets syspref
4. Repeat step 2 and confirm the tests fail

5. Apply this patch and restart plack: sudo koha-plack --restart
<instance>
6. Repeat step 2 and confirm the tests now pass
7. Disable the OAI-PMH:AutoUpdateSets syspref and repeat step 2 and
confirm tests still pass

Sponsored-By: Catalyst IT

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 913897f3a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d3254f7e57)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 16:48:39 +13:00
Kyle M Hall 35cafa56f4 Bug 26604: "Generate next" button gives error on serials-collection.pl
In serials-collection.pl, the line

$frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});

causes the error

Can't use string ("13") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/C4/Serials.pm line 2198.

This function call makes no sense, that subroutine always returns a list and doesn't take any parameters. I think it was meant to be GetSubscriptionFrequency which is in fact already called a few lines down.

Signed-off-by: kelly mcelligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

JD

Test plan:
1. Create a new subscription
  * When there is an irregular issue: Skip issue number
  * Select a frequency (not irregular)
  * Test prediction pattern and mark some "not published" (to fill the subscription.irregular DB field
2. Receive a first serial (mark it arrived, an "expected" one is created)
3. Claim the expected one
=> You have 1 arrived and 1 claimed.
It's the only way to not have an expected one and hit the else block in serials/serials-collection.pl
4. Generate next => boom

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8c527522ec)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 16:45:07 +13:00
Marcel de Rooy 3d1d81014d Bug 26191: Relocate track_login call in Auth.pm
This is a leftover from bug 22543.
Trivial move.

Test plan:
Do not apply this patch.
Pick a user that has not yet logged in today.
Only login via the opac and immediately check if borrowers.datelastseen did not change.
Apply this patch, restart, flush etc.
Only login via the opac and verify again rightaway (no further opac actions).
Now datelastseen should have been changed already.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 b827acf53f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f095fc1aef)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-17 16:23:13 +13:00
Aleisha Amohia 5add311155 Bug 25242: Compile CSS
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-05 13:29:15 +13:00
Martin Renvoize 241c22d337 Bug 25242: Improve column wrapping for holdingst
This patch attempts to improve the column wrapping for the holdingst
datatable and sets the tabel to fixed width to prevent overlapping
with other content on high zoom levels/low width screen sizes.

Test plan
1/ Build the OPAC CSS from the updated SCSS
2/ Navigate to an item with holdings visible in the OPAC
3/ 'Play' with various window sizes and zoom levels.
4/ The table should not overlap with right navigation content
5/ Signoff

NOTE: This is an alternative patch to those pushed and reverted that
attempted to provide a global fix to overlap issues. This patch
specifically targets just the holdings table in the opac detail view.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.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 6e5142e61b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c6c443d79)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-05 13:25:52 +13:00
Owen Leonard 868319a463 Bug 26497: "Hide all columns" throws Javascript error on aqplan.pl
This patch updates the JavaScript for checking and unchecking checkboxes
on the Acquisitions planning page so that it doesn't require the
checkboxes plugin.

To test, apply the patch and go to Administration -> Budgets -> Budget
details -> Planning.

On the planning page, test the "Show all columns" and "Hide all columns"
checkboxes. They should work correctly to show and hide the correct
columns.

Signed-off-by: Henry Bolshaw <bolshawh@parliament.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 be7c705d3b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 870369ae57)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-11-05 13:22:03 +13:00
Aleisha Amohia 124a104693 Update release notes for 19.11.11 release
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-28 09:15:12 +13:00
Aleisha Amohia 476865d0fe Increment version for 19.11.11 release
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-28 09:15:11 +13:00
Aleisha Amohia 9df0d6fa69 Fixing po files for 19.11.11 2020-10-28 09:15:11 +13:00
Koha translators 899553cf49 Translation updates for Koha 19.11.11
(cherry picked from commit 681d698a6ac8eecde2179dd58c6a60eb036bccf8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-28 09:15:03 +13:00
Aleisha Amohia 607c0fda4f Bug 26592: [19.11] (rmaint follow-up) Fix JS error when using patron autocomplete searchbar 2020-10-28 09:14:49 +13:00
Aleisha Amohia ae0c2352b9 Merge branch 'new/security-release-19.11.11' into 19.11.x 2020-10-27 17:54:20 +13:00
Jonathan Druart e3c0b076d3 Bug 26592: [19.11] Prevent XSS vulnerabilities when circ/ysearch.pl is used
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit ca9c9225987814c1606f5241dfa1da3e267b177e)
2020-10-27 17:50:26 +13:00
Jonathan Druart 8b4c1d28fb Bug 26562: [19.11.x] Removes 'searches' from localStorage on logout
A user recently logged in will inherit the "searches" item stored in localStorage.

To recreate:
Log in with user A, do some searches
Note that the "searches" item is filled in with the search queries
Logout and log in with user B
Note that the "searches" item is still there

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 17:43:11 +13:00
Jonathan Druart 938b1c8d7c Bug 25913: Get the correct return of AddBiblio
We need the parenthesis to get the biblionumber and not the
biblioitemnumber, in case there is a discrepancy.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4b2e6d56f2)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 17:35:48 +13:00
Jonathan Druart 4f677624b2 Bug 25913: Prevent get_coins to crash if record does not have title
If a bibliographic record does not have a title, get_coins will crash
with
Can't call method "as_string" on an undefined value at /kohadevbox/koha/Koha/Biblio.pm line 645
Koha::Biblio::get_coins('Koha::Biblio=HASH(0x5558f91bb740)') called at /kohadevbox/koha/catalogue/ISBDdetail.pl line 144

We can handle that situation easily by checking the existence of the
title field.

Test plan:
1. Create a record without 245
2. Enable COinSinOpac
4. Go to the ISBD detail view
=> It must not fail with this patch applied

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d9599a6d33)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 17:35:41 +13:00
Jonathan Druart f832ae20dc Bug 26260: Add missing elastic>cnx_pool to koha-conf-site.xml.in
Added by bug 22705, but only in etc/koha-conf.xml

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 33ab3c6900)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bbfa9c3a9a)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 17:32:07 +13:00
Katrin Fischer 3d6e2c129f Bug 24780: Make items.stocknumber show up in batch item modification
It looks like the field was intentionally removed from the list
of batch editable fields in the past. This makes sense as we
used to have a unique index on it at some point - but we do have
no more.

This removes the exception so that the invendory number behaves
like the other fields on the batch item edit form.

To test:
- Create some items with and without stocknumber
- Go to tools > batch item modification
- Enter the barcodes of your selected items in the list or
  upload a file with them
- Verify that the stocknumber/inventory number is not showing
  in the item edit form below
- Apply patch
- Reload the page - inventory number is there now
- Batch edit the inventory number and verify it works as expected

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 0afcf3936a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1754df0b19)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 17:03:18 +13:00
Nick Clemens 5d5a298054 Bug 26224: Prevent double submit of header check in form
To test:
 1 - Browse to Home
 1 - In the header bar select the 'Check in' tab
 2 - Type a barcode into the box
 3 - Hit Enter as many as times as you can
 4 - Check the statistics table:
    SELECT * FROM statistics WHERE itemnumber={itemnumber} AND DATE(datetime)=CURDATE();
 5 - Note you have multiple lines for the same item at the same time
 6 - Apply patch
 7 - Reload the page
 8 - Type the barcode
 9 - Press Enter even more fast and more furiously
10 - Check the statistics table
11 - Only one entry, huzzah!

Signed-off-by: Andrew Fuerste-Henry <andrew@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 5d5a49a7ef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51d3010b71)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 16:59:40 +13:00
Jonathan Druart c3d0d7050a Bug 26414: Tidy the tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3cd40f7baf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 496cd5d36e)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 16:56:31 +13:00
Alexis Ripetti 028b7e6b8d Bug 26414: Unable to export Withdrawn status using CSV profile
When using CSV profiles to export MARC records, it is impossible to export the withdrawn status. I suspect it is because withdrawn is in 952$0 and 0 is considered null rather than an actual 0.

Test Plan :
1) Go to Tools > CSV profiles
2) Click on New CSV profile
3) Enter a profile name (ex. Simple record)
4) In the Profile MARC fields field enter the following (for MARC21)
245a|100a|952o|9520
5) Save your profile
6) Go to Search and search for something
7) Add a couple of things in your cart
8) Go to your cart
9) Click on Download and choose your CSV profile
10) Open the file and notice the 9520 column contains the whole of the 952 field and not just the withdrawn status
11) Apply patch
12) Redo steps 9) and 10)

Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 937e831ea3)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-27 16:56:23 +13:00
Aleisha Amohia 7499703bf0 Bug 18958: DBIC
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:37:38 +13:00
Aleisha Amohia 17c44ac5ca Bug 18958: DBRev 19.11.10.001
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:36:25 +13:00
Lucas Gass 56baaffb55 Bug 18958: (Rmaint follow-up) Adjust number of tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2e5961b2c3)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:32:34 +13:00
Nick Clemens 8383009cc6 Bug 18958: (follow-up) Ensure hold fill target reserve_id is set for all hold types
MapItemsToHoldRequests has three sections: Local holds, item level holds, bib level holds

Only one of them was setting the reserve_id. This patch makes al three set it and adds tests

To test:
1 - Repeat test plan on bug
2 - sudo koha-mysql kohadev
    SELECT * FROM hold_fill_targets
3 - Ensure reserve_id is set at appropriate times
4 - prove -v  t/db_dependent/HoldsQueue.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 18958: (QA follow-up) Fix number of tests

In HoldsQueue.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bac2e6892a)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:32:24 +13:00
Katrin Fischer c93f56c5ba Bug 18958: (QA follow-up) Add missing comma to kohastructure.sql
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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 5cfbe318d8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dbb9e36c68)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:32:18 +13:00
Nick Clemens f679369773 Bug 18958: Make hold_fill_targets specific to reserves
After looking at Marcel's comments, the problem is in our matching
to hold_fill_targets - rather than adjusting to find filled/waiting holds we
could ensure that hold_fill_targets only refers to the specific hold it
is intended to

This patch is clearer, if slightly less performant than last (we now return all
the reserves and have to find the 'highest')

Test Plan:
 1 - Create and use a patron that can place multiple record level holds per record
 2 - Create a record with X items, each at a different library
 3 - Place X 'Next available' holds on the record for the patron using the 'Holds to place' box
 4 - perl misc/cronjobs/holds/build_holdsqueue.pl
 5 - Check in LibraryA's copy as LibraryA and confirm the hold
 6 - Revisit request.pl for the record, notice the next hold in line is now item-specific
 7 - Checkout the item to the patron, notice the remaining hold is marked waiting
 8 - Attempt to place another hold for your patron, notice that it requires an item-specific hold
 8 - Apply this patch
 9 - Repeat steps 1-5
10 - Revisit request.pl for the record, notice the next hold in line has *not* become item-specific
11 - Checkout the item to the patron, ensure the first hold is filled and the second remains record level
12 - Repeat whole test plan without building holds queue to confirm holds are still treated correctly

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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 0bfe336c7b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a120656eca)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:32:05 +13:00
Nick Clemens 39dd8a565d Bug 18958: Unit tests
Signed-off-by: Bonnie Gardner <bgardner@cityoflewiston.org>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

JD amended patch: perltidy and simplify item/biblio creation

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e4b60c4156)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:30:22 +13:00
Kyle M Hall af55420957 Bug 26510: Transport Cost Matrix editor doesn't show all data when HoldsQueueSkipClosed is enabled
If HoldsQueueSkipClosed is enabled, and a library happens to be closed
on the day you edit the transport cost matrix, all the values for that
library will not show. Instead they will appear disabled, and if you
were to edit the cell and save a new value in it, it will also
'disappear' when the page is reloaded.

Test Plan:
1) Set today as a holiday for a library
2) Set HoldsQueueSkipClosed to 'open'
3) Go to the transport cost matrix editor
4) Edit a cell where the 'from' is for the closed library
5) Note the value doesn't 'save', it is still in the database though
6) Apply this patch
7) Restart all the things!
8) Reload the transport cost matrix editor
9) The value now appears correctly!

Signed-off-by: Lisette Scheer <lisetteslatah@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 26ab04a3b3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eab46b1758)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:12:38 +13:00
Fridolin Somers 97a15fe186 Bug 26434: Fix plugin dirs addition to @INC
Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code.
Looks like with plack those dirs are added several times.
This may lead to an error "INCLUDE_PATH exceeds 64 directories".

This bug was identified with Carrousel plugin : https://inlibro.com/instructions-carrousel/

Test plan :
1) Enable plack and plugins
2) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'
3) Install plugin KitchenSink : https://github.com/bywatersolutions/koha-plugin-kitchen-sink
4) Dont apply patch
5) Use configure on KitchenSink
6) Look at page about.pl : @INC contains server plugin dir 'var/lib/plugins'
7) Apply patch and restart plack
8) Use configure on KitchenSink
9) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aaef045006)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:08:32 +13:00
David Cook be9eeef3c9 Bug 26231: Remove incorrect use of AddAuthority() when 001 present
This patch removes the use of AddAuthority with a non-empty
authid argument, since that triggers an update rather than an insert.

In practice, the update also fails, but the error isn't raised,
as the database connection doesn't have RaiseError set.

Test plan:
1) Do not apply patch
2) Try to bulkmarcimport an authority file with a 001
3) Observe that the script reports success but no authority is added
4) Apply the path
5) Try to bulkmarcimport an authority file with a 001
6) Observe that the script reports success and the authority is added

Signed-off-by: Kyle M Hall <kyle@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 9622561636)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 276602aadb)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:06:43 +13:00
Jonathan Druart 20150ad3eb Bug 10921: Prevent an order from a closed basket to be edited
We don't allow editing of orders that are part of a closed basket, but
we don't enforce the rule in the controller file.

This patch use output_and_exit to stop the script and display an error
to the end user.

Test plan:
Create a basket, add an order
On the basket view you see the "Modify" link, open it in a separate tab
=> You can edit the basket
Keep this tab open, get back to the other one and close the basket
Reload the tab with the order edition form
=> You cannot longer edit the basket

QA: Do we need a check in addorder.pl as well?

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 0310e973a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit deffb12491)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:04:57 +13:00
Fridolin Somers d99bbe4777 Bug 26049: Replace li with span class results_summary in UNIMARC intranet XSLT
In all XSLT for record display, fields are created with <span class="results_summary> except in UNIMARC intranet where there is just <li>.

This allows a better CSS customisation and closer code in files for OPAC and intranet.

Actually li gets diplayed with a dot at each line, we don't want this.

Test plan :
1) For each modified file run 'xsltproc file.xsl' and see there is no
   error
2) Use default XSLT in all system preferences
3) Perform a search and check display with and without patch
4) Click on a record to see details and check display with and without patch

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>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03e585ad5f)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 14:01:26 +13:00
Jonathan Druart 0dfcff4c8f Bug 26420: Use translated notices for overdue_notices.pl
This script does not pass the patron's preferred lang for notices.

Test plan:
Enable TranslateNotices
Create a patron with a preferred lang for notices != default
Translate ODUE for this language
Setup the overdue notices for this patron's category
Check an item out for this patron (select the correct due date to
trigger the notice)
Run the script overdue_notices.pl
Check the message_queue table and confirm that the notice enqueued is
translated

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>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb88ec34bf)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 13:57:41 +13:00
Nick Clemens de25b00a17 Bug 25273: (follow-up) Don't die on unknown authtype
We are guessing authtype code and inserting the heading built accorindg to C4::Heading

If we can't identify the auth type, we can format the heading. There is a record in the koha test
data that is missing the heading field so type cannot be idenfitied

This prevents us from dying n a record where we cannot identify the type.

Note: This code will also be triggered for custom authority types, higlighting
that they won't link because of hardcoded mappings in C4::Heading. We must tackle this
on a new bug

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 5a87514b2e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 401133b5b1)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 13:54:37 +13:00
Nick Clemens c2be412ade Bug 25273: Make match-heading rely on authority type configuration
The match-heading field is a special field used only by the linker, not accessible
to staff or patrons via the interface. This field is used to store the constructed
'search form' used for matching bib headings to authority fields.

In bug 24269 I attempted to use the mappings defined in the inferface and also inject the search term.
This did not work as too many subfields were indexed on their own and leading to false matches.
In this bug we remove the mappings for this field, and create it ourselves during
the indexing process. The C4::Headings module is still used to generate the correct form,
however, the mappings are set based on the authority types in the system. This gives the user
the ability to add new typoes, but prevents mapping changes from breaking linker functionality

To test:
 1 - Start form a sample database with ElasticSearch working
 2 - Download via Z39.50 2 authorities, one of which is a narrower heading of the other, e.g.:
    Waterworks
    Waterworks - Costs
 3 - Place a heading for the broader term in a record. e.g. Waterworks
       In 650$a, without the cataloguing authority plugin. We don't want
       the link created now.
       You need syspref BiblioAddsAuthorities => allow
 4 - Make sure linker is set to default
 5 - Attempt to link the records
       misc/link_bibs_to_authorities.pl
 6 - Linking fails
 7 - Apply patch
 8 - refresh index settings (if using a custom file, remove 'match-heading')
       You can reset mappings in the UI or run this:
       misc/search_tools/rebuild_elasticsearch.pl -v -d -r
 9 - Reindex ES
10 - Try to link again
11 - It succeeds!
12 - Run the tests
     prove t/db_dependent/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 25273: (follow-up)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5597b666e4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-10-20 13:54:22 +13:00
Jonathan Druart 856cb2d1b7 Bug 20783: Add missing url filters
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
2020-10-12 23:24:16 +00:00
Jonathan Druart cd52f4439b Bug 20783: Similar changes for OPAC
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: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
2020-10-12 23:24:15 +00:00
Jonathan Druart 524fe12e44 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: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
2020-10-12 23:24:14 +00:00
Lucas Gass 7fcd8934c8 Bug 26511: [19.11.x] Remove PatronSelfRegistrationConfirmEmail from opac.pref
Test plan:
1. In 19.11 search for PatronSelfRegistrationConfirmEmail and you'll see the sys pref
2. Apply patch
3. System pref should be gone

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-24 15:46:35 +12:00
Aleisha Amohia 38d3e74bdf Update release notes for 19.11.10 release
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-22 11:11:06 +12:00
Aleisha Amohia c24769ce8b Increment version for 19.11.10 release
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-22 10:54:45 +12:00
Aleisha Amohia 7a93757815 Fixing po files for 19.11.10
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-22 10:51:52 +12:00
Koha translators 900014f150 Translation updates for Koha 19.11.10
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-22 10:46:38 +12:00
Aleisha Amohia 23b83e138c Merge branch 'new/security-release-19.11.10' into 19.11.x 2020-09-22 10:19:14 +12:00
Tomas Cohen Arazi 57bb4ee95e Bug 26322: [19.11.x] Permissions not checked correctly for plugins
This patch fixes the logic in a condition to address the fact that
permissions are not checked for plugins. This was due to bad parenthesis
pairing and the lack of good tests for this.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
=> FAIL: Tests fail because of bad logic
3. Apply this patch
4. Repeat (2)
=> SUCCESS: Tests pass!
5. Verify the tests cover the use cases that are needed:
   - Anonymous access
   - Real user with wrong permissions (parameters => 1)
   - Real user with right permissions (borrowers => 1)
=> SUCCESS: Needed use cases so we catch any regression are found
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-22 10:15:23 +12:00
Tomas Cohen Arazi 4241305b75 Bug 26322: [19.11.x] Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-22 10:15:03 +12:00
Jonathan Druart 1e487927fc Bug 26253: (bug 22857 follow-up) Remove duplicated mana_config in etc/koha-conf.xml
It was there already but not at the same place!

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.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 a4998b7d57)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8305f582aafe348f5f2697fe5432e162989296b5)
(cherry picked from commit 53c99fcb46)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:57:42 +12:00
Nick Clemens a5e1b47998 Bug 26388: Do not show 'Renew all' or 'Renew selected' if no renewable items
Additionally, only include renewable items in 'Renew all'

To test:
1 - Check out some items to a patron, ideally:
    Some not renewable because set for auto renewal
    Some not renewable because of holds
    Some renewable
 2 - Confirm 'Renew selected' and 'Renew all' show on the opac
 3 - Click 'Renew all'
 4 - You get errors about the non-renewable items?
 5 - Check in all renewable items
 6 - Confirm you still see renew buttons
 7 - Apply patch
 8 - Refresh and you shoudl not see renew buttons
 9 - Check out a renewable item
10 - Click 'Renew all'
11 - Renewable item is renewed with no error
12 - Try again with 'Renew selected'
13 - Confirm it works as expected

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
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 763cc4eb2e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6347ad75c8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:53:54 +12:00
Martin Renvoize 42a99cf83d Bug 26041: Enable keyboard navigation without 'ctrl'
This patch enables keyboard navigation using the arrow keys without the
need to hold the control key for the jQuery UI datepicker.

Test plan
1/ Navigate to an item in the opac and attempt to place a hold
2/ On the resultant screen, use keyboard navigation to trigger the 'Show
more options' dropdown.
3/ Focus on one of the date inputs using keyboard navigation.
4/ Use 'ctrl + arrow' keys to navigate the datepicker.
5/ Note that prior to the patch using 'bare' arrow keys does not trigger
anything
6/ Apply the patch and confirm that the datepicker can now be naviated
using the arrow keys without holding the ctrl key.
7/ Confirm that using the ctrl key combinations continue to work as
expected too.
8/ Signoff

Signed-off-by: Brandon J <brandon.jimenez@inLibro.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 09b5ffe121)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
2020-09-15 23:50:21 +12:00