Commit graph

39176 commits

Author SHA1 Message Date
bd29f99a86 Bug 25906: Style corrections for OPAC serial pages
This patch makes some CSS changes to the OPAC SCSS and to the OPAC
"full serial issues" page to improve the style.

I've expanded the in-page CSS on the full serial issues page for
readability and added Template Toolkit's "collapse" filter to remove the
whitespace on rendering.

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)

- Locate a serial record in the OPAC.
- Click "More details" to view the issues page.
- Confirm that the "view" tabs look correct, with consistent padding.
- Click the "Full history" tab.
- In the sidebar, the filter should have full-width dropdowns and clear
  button.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 07:55:44 +02:00
db15875207 Bug 26008: Remove the use of jquery.checkboxes plugin from OPAC cart
This patch removes the use of the jquery.checkboxes plugin from the OPAC
cart and replaces its functionality with "plain" jQuery.

To test, apply the patch and add some items to the Cart in the OPAC.

 - Open the Cart window in the OPAC by clicking the "Cart" link in the
   header.
 - Test that the "Select all" and "Clear all" links work correctly to
   check and uncheck all checkboxes.
   - Controls like "Remove" and "Place hold" should be enabled or
     disabled according to whether there are any checked checkboxes.
 - Test that manually checking a checkbox correctly enables or disables
   the link options too.
 - Test that the "Remove" or "Place hold" controls work correctly,
   applying to only the checked checkboxes.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Bug 26008: (follow-up) Removed checkboxed class

This patch removes the "checkboxed" class which was previously
associated with the jquery.checkboxes plugin and is now obsolete.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 07:55:42 +02:00
4cf5ef239f Bug 26010: Remove the use of jquery.checkboxes plugin from staff interface cart
This patch removes the use of the jquery.checkboxes plugin from the
staff interface cart and replaces its functionality with "plain" jQuery.

To test, apply the patch and add some items to the Cart in the staff
interface.

- Open the Cart window in the staff interface by clicking the "Cart"
  link in the header.
- Test that the "Select all" and "Clear all" links work correctly to
  check and uncheck all checkboxes.
- Test that the "Remove" or "Place hold" controls work correctly,
  applying to only the checked checkboxes whether they were checked
  using "Select all" or by manually checking them.

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>
2020-08-13 07:55:42 +02:00
b332e0912d Bug 26087: Add table configuration and export options to orders by fund report
This patch adds column configuration to the orders by funds report
results table. The "Basket" column is excluded from being togglable.

To test, apply the patch and clear your browser cache if necessary.

- Go to Reports -> Orders by fund
- Submit parameters which will return multiple results.
- Test that the "Column visibility" button works to show and hide
  columns. The "Basket" column should be excluded.
- Test the export options (Excel, CSV, etc)
- Go to Administration -> Columns settings and edit the default
  configuration of the orders by fund report. Confirm that these changes
  are reflected in the report results.

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>
2020-08-13 07:55:42 +02:00
4dc25f3192 Bug 26091: Add column configuration and export options to catalog statistics report
This patch makes the catalog statistics report output a DataTable with
on-the-fly column configuration and export options.

Because the report can generate results with an arbitrary set of table
headers, the columns set to be passed to DataTables is built on the fly
along with the table. There is no global table setting.

Since the "grand total" cell might reflect a total which includes hidden
columns, the table footer label now indicates "all results."

To test, apply the patch and go to Reports.

- Submit a query to the "catalog" statistics wizard which will return
  multiple results.
- On the results page, confirm that the DataTable displays correctly and
  that all controls work as expected, including column configuration and
  export options.
- Submit other queries which will return a different set of columns in
  the result. Confirm that everything continues to work as expected.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Bug 26091: (follow-up) Remove unused TablesSettings usage

Since the table column information is built in the template rather than
in the columns_settings YML file we don't need "USE TablesSettings" in
this template.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 07:55:40 +02:00
1ceb44ba2d Bug 26160: Make POS items table configurable
1)  System preference:  EnablePointOfSale - set to Enable
2)  System preference:  UseCashRegisters - set to Use
3)  Administration > Accounting > Cash registers - create a new cash register for the library you're logged in as
4)  Administration > Accounting > Debit types - create at least one debit type
5)  Home > Point of sale - verify that all four columns exist in the Items for purchase table:  Code, Description, Cost, Action
6)  Administration > Additional parameters > Table settings > Point of sale - change which columns can be hidden and/or toggled
7)  Home > Point of sale - verify that your choices have been implemented (columns are hidden, columns can be toggled, columns can't be toggled)
8) Repeat steps 6 and 7 for different combinations, checking that they all work.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Added Sally's test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-12 12:07:12 +02:00
3138c48f69 Bug 26161: Move actions under rhs fieldsets
This patch moves the action buttons div to within the column div that
contains the 'This sale' and 'Collect payment' fieldsets.

Test plan
1/ Apply patch
2/ Navigate to the 'Point of sale' page (having enabled UseCashRegisters
and EnablePointOfSale)
3/ Confirm the 'Confirm' and 'Cancel' button/link now appear on the
correct side.
4/ 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>
2020-08-12 12:07:12 +02:00
Timothy Alexis Vass
3d2a988809 Bug 26179: Remove redundant import of Google font
Removed redundant @import of google font

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>
2020-08-12 12:07:10 +02:00
ed4fc58894 Bug 26012: Correctly format "paid for" info on the item details view
The string is built controller side, which does not let the template
format the info nicely.
We want to display patron's info using patron-title.inc and the date
with the KohaDates plugin

Test plan:
- Make sure there is a replacement cost in the item
- check it out
- Mark it lost
- Pay the lost item fee
- Go to the detail page and look on the items tab for the item
- It will show an entry with "Paid for?" label
The patron's info and date must be correctly formatted

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-12 11:46:37 +02:00
81f06881a4 Bug 26165: Fix duplication of large saved reports
If the combined character length of a saved report's
title, notes and SQL is too long then pressing the
'duplicate' button will lead to an error:

"Request-URI Too Long
The requested URL's length exceeds the capacity limit
for this server."

Test plan:
1. Create a simple SQL report and add a lot of text
   into the notes field (the combined URL lenth must be
   >8225 characters)
2. Save the report
3. Press the duplicate the report from the saved reports page

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>
2020-08-12 11:46:30 +02:00
19d9ba176d Bug 23542: Fix SRU import encoding
When importing records from a SRU server, the diacritics have bad encoding.
I reproduce with BNF server so it may be a UNIMARC issue.

Tests show that difference between Z39.50 server and SRU is that leader contains 'a' at postion 9.
Looking at MARC::Record->encoding() shows that encoding depends on leader even for UNIMARC.
So this patch adds a call to MARC::Record->encoding('UTF-8') in case of a SRU server in C4::Breeding.

Same use exists in Koha::MetadataRecord::Authority::get_from_breeding().

In case of import via Z3950, MarcToUTF8Record() is called,
 which calls SetMarcUnicodeFlag(),
 which calls MARC::Record->encoding('UTF-8')

Test plan :
1) Use a UNIMARC database
2) Configure a connexion to a UNIMARC SRU, for example BNF,
   see https://doc.biblibre.com/koha/autour_de_koha/serveurs_z3950_sru#serveur_de_la_bnf
3) Go to cataloguing module
4) Click on 'New from Z39.50/SRU'
5) Choose only the SRU target
6) Search for ISBN 2266072889
7) Confirm you see good encoding : diacritic on 'a' of title 'Strate-a-gemmes'
8) Click on 'Marc preview'
9) Confirm you see good encoding
10) Click import
11) Confirm you see good encoding
12) Check also Authorities import via SRU
13) Check also SRU imports on a MARC21 database

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Removed change to new_from_xml call. We should respect syntax.
But the added MARC::Record encoding does the tric! Which is implicit
for Z3950 targets where MarcToUTF8Record does the same.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-12 11:46:25 +02:00
a2b2426de8 Bug 25882: Remove phr indicator from limits when processing
We assume all limits from advanced search to be a phrase and quote them
when doing this we should remove the phrase marker to avoid doulbe quoting

To test:
 1 - Have koha using ES
 2 - Go to advanced search
 3 - Limit by a single itemtype that exists
 4 - Get some results
 5 - Limit by a different itemtype that exists
 6 - Get some results
 7 - Limit by both itemtypes
 8 - Get only the results for the second itemtype
 9 - Enable DumpTemplateVarsIntranet and DumpSearchQueryTemplate
10 - Repeat search
11 - View page source and find 'search_query'
12 - See limit looks like itype:("("BK")" OR "("CR")")
13 - Apply patches
14 - Restart all the things
15 - Repeat search for both itemtypes
16 - Note results now include both types

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-12 11:46:19 +02:00
1a2d7f1eac Bug 25882: Unit test
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-12 11:46:19 +02:00
70ff3bafa0 Bug 26162: Wait for the table to be refreshed
The previous patch did not work as expected. We still got a
StaleElementReference exception.
But this time on
10:43:47 selenium_1   | Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//*[@id=\"branchname\"]"}
Because we found the one that existed on the page, not the one sent back
in AJAX.

The idea of this patch is to search for the "Showing 1 to X of Y entries" info and wait for X == Y

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-10 12:31:44 +02:00
7b8664b559 Bug 25826: fix failing test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-10 10:00:34 +02:00
233e3efba3 Bug 24201: fix failing tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-10 09:58:32 +02:00
6921916924 Bug 24201: (QA follow-up) Replace library select
Removing the library select entirely results in a JS failure for desk
selection when independant branches is enabled and the user does not
have permission to select a library.

This patch adds a hidden select element so we can still grab the current
branch from the selection.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
0e440c07bd Bug 24201: (QA follow-up) Make logic consistent
The display logic for the desk details in the header bar was
inconsistent between the narrow display view and the full width display
view.  This patch updates the former to match the latter.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
9d2b53c1b8 Bug 24201: (QA follow-up) IndependentBranches
This patch updates the IndependentBranches template display logic such
that the 'Select desk' and 'Select library and desk' options appear
correctly when IndependentBranches is enabled.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
6a525c1cf7 Bug 24201: (QA follow-up) Add 'and desk' to menus and title
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
82817e808f Bug 24201: (QA follow-up) Another capitalization fix
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
e9b051baf7 Bug 24201: (QA follow-up) Correct call to set_userenv
One call to set_userenv had been implimented incorrectly with the
parameters out of order.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
16979c2afc Bug 24201: (QA follow-up) Capitalisation fix
'Set desk' vs 'Set Desk'.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
f2572c0e02 Bug 24201: (QA follow-up) Only display desks picker if enabled
I missed a case on the authentication page with the prior patch of the
same name.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
8f726d3340 Bug 24201: (QA follow-up) Make desk and branch selects on login page consistant
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
9d1ba3487d Bug 24201: (QA follow-up) Remove setdesk variable and add desk selection script only on pages in need
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
d79a19d3a0 Bug 24201: (QA follow-up) Fix desks select box selected attribute
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
45e1f325d5 Bug 24201: (QA follow-up) Remove unneeded use
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
ad9fdd792a Bug 24201: (QA follow-up) Do not unbless a list from search in Desks template plugin
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
1f96bea8ba Bug 24201: (QA follow-up) Re-indent helpers
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
50e1f1abc1 Bug 24201: (QA follow-up) Hide header if desks disabled
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
a02e9e3d91 Bug 24201: (QA follow-up) Remove deprecated template file
The controller associated to this template was deprecated earlier in
this patchset, but the template was left behind.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
Nicolas Legrand
4163f24014 Bug 24201: (follow-up) add desk choice with library choice
You should be able to add desk choice when you are logging in or
changing library.

Test plan:

1. apply patch
2. have at least three libraries, one without desk, one with one and
one with a few.
3. At login, when choosing a library, it should enable all desks it
has. Pick one.
4. the desk id and name should be set in your session and appear in
the top right, next to the library name.
5. change library and desks from intranet (at the set-library.pl page)
6. you should have the same behaviours
7. if you have a library without a desk, it should prompt you a '---'
option and no desks will be attached to the session.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
2d7fd8c092 Bug 24201: (follow-up) Rework Desks Plugin
This patch removes unused plugin methods (they can be re-introduced in
subsequent bugs where they are used) and merges the 'all' and 'defined'
methods into a ListForBranch method that returns a list of desks
associated with the logged in branch.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
876d95285e Bug 24201: (follow-up) Use GetLoggedInDeskName
This patch updates the templates to use the new TT plugin instead of
adding additional variables to the already crouded get_template_and_user.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
1cee6b7025 Bug 24201: (follow-up) Show desk information at lower screen widths
The staff client header menu adjusts responsively to narrower viewport
widths, but for the logged-in-user menu this requires showing and hiding
part of the template which duplicates information. This patch adds a
copy of the current desk information to the part of the template shown
at narrower widths.

To test, apply the patch and view any page in the staff client.

 - Narrow your browser so that the viewport is less than 800px wide.
 - The logged-in-user menu should change from text to a single "user"
   icon.
 - Clicking the icon should display a menu which includes labeled
   information about the current desk.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
Nicolas Legrand
3fc961b7c2 Bug 24201: Attach desk to intranet session
When Desks are defined, a librarian can attach a desk to its session.

Test plan:

1. apply 13881 and create some desks
2. you should see “NO DESK SET” in the intranet header
3. go to circulation > Set desk
4. you should see your desk name in the header, whatever the page
5. you can also set desk with the header menu

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
Julian Maurice
df0ef02de5 Bug 24591: Add --help option to misc/devel/get-prepared-letter.pl
Also fix code style with perltidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
Julian Maurice
f74ab4e9de Bug 24591: Add developer script to preview a letter
The script is very simple, it just calls GetPreparedLetter with
arguments given on command line and print the resulting letter content

Usage example:

misc/devel/get-prepared-letter.pl --module circulation \
    --letter_code ODUE --tables '{"borrowers":1,"branches":"CPL"}' \
    --repeat '{"item":[{"biblio":1,"items":1}]}' \
    --loops '{"overdues":[1]}'

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works for the example and other cases.
Correct option is 'letter-code', with dash, not underscore.
An usage message would be nice.
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

JD amended patch: tidy the new file and rename it matching the other
scripts' names in this directory

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
David Roberts
3abc4fb858 Bug 25336: Show checkouts/fines to guarantor is in the wrong section of the patron file
This patch moves the "Show checkouts to guarantor" and "Show fines to
guarantor" data to display under the Contact information block

To test:

1) Enable the AllowStaffToSetCheckoutsVisibilityForGuarantor and AllowStaffToSetFinesVisibilityForGuarantor system preferences to Allow
2) View a patron record.
3) The "Show checkouts to guarantor" and "Show fines to guarantor" field
will be on the right hand side of the screen under the Library use
block.
4) Apply patch
5) Check that this data has now moved to the Contact information block
on the left hand side of the patron record.

Works for me!

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
0a40f71075 Bug 25606: (QA follow-up) Don't show remove all button if no reserves
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
Joseph Sikowitz
5cf05ff53d Bug 25606: Remove all reserve items button
Adds button to course records to remove all attached reserve items. A warning dialog box will appear before executed.

Test plan
1. Install patch
2. Log in as user with permission to delete reserves
3. View a course reserve record with multiple items attached
4. There should now be a button that says "- Batch remove reserves"
5. When you click the button a dialog box should appear with a warning
6. Click "Ok"
7. All course reserves should be removed from the record
8. Add an item to more than course record
9. Redo 3-7
10. Items should have been removed from that course but remain on all other courses
11. Log in as a user without delete reserves permission
12. You should not see the batch remove option

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
Katrin Fischer
27ff36825d Bug 25919: Only show Desks in admin navigation when UseCirculationDesks is used
We were missing a check for the UseCirculationDesks in the
template so the "Desks" link would only appear in the admin navigation
when the pref feature is activated.

To test:
- Turn off UseCirculationDesks
- Go to any administration page that shows the navigation on the left
- Verify Desks shows
- Apply patch
- Reload the admin page - Desks should be gone
- Turn on UseCirculationDesks
- Verify the Desks reappear

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
Katrin Fischer
e7661a37e6 Bug 25853: Fix file permissions for update_patrons_category script
The permissions for this were -rw-r--r-- and need to be -rwxr-xr-x.

To test:
- Verify the file permissions before and after applying the patch.

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
d08ce1d940 Bug 26009: (QA follow-up) It does not harm to test more
Test plan:
prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t
--> should return green

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
4dd1672c1b Bug 26009: Add facet size to home/holdingbranch
To test:
0 - Set DisplayLibraryFacets to 'both' and FacetMaxCount to 20
1 - Have more than 10 branches
2 - Have items in each of those branches
3 - Enable ES, set system preference SearchEngine to Elasticsearch
4 - Search for '*'
5 - Expand homebranch/holdingbranch facets
6 - Note you only get 10
7 - Apply patch
8 - Repeat search
9 - Now you get all your facets

Signed-off-by: Michael Springer <mspringer@mylakelibrary.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
44f54aac60 Bug 26136: Prevent double submit on checkin-form
To test:
 1 - Browse to Circulation->Check-in
 2 - Type a barcode into the Check in 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: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
85005b7198 Bug 26158: Fix Z3950 search button broken for translations
This is similar to bug 23713

var SEARCH_RESULTS = [% IF (SEARCH_RESULTS) %]1[% ELSE %]0[% END %];

become, once translated:

var SEARCH_RESULTS = [% IF (SEARCH_RESULTS) %]1[% ELSE %][% END %];

and a JS error appears in the console
 Uncaught SyntaxError: expected expression, got ';' search.pl:636:29

Caused by
  commit ef4306cc02
  Bug 23885: Move staff client search results JavaScript into separate file

Test plan:
Use the staff interface in a translated language
Search for a term that won't return any results
Click the Z3950 button

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
a96433446e Bug 26162: Make Selenium click action more robust
See
https://stackoverflow.com/questions/12967541/how-to-avoid-staleelementreferenceexception-in-selenium
https://www.selenium.dev/exceptions/
https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/StaleElementReference

This patch will fix the following failure we get under D11:
18:47:07 selenium_1   | 09:47:07.478 WARN - Exception: Element not found in the cache - perhaps the page has changed since it was looked up
18:47:07 selenium_1   | For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
18:47:07 selenium_1   | Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
18:47:07 selenium_1   | System info: host: '78b9a07f51f2', ip: '192.168.16.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-9-amd64', java.version: '1.8.0_91'
18:47:07 selenium_1   | Driver info: driver.version: unknown
18:47:07 koha_1       |
18:47:07 koha_1       | STRACE:	/usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...}
18:47:07 koha_1       | 	/usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:353 in Try::Tiny::try
18:47:07 koha_1       | 	(eval 1571):1 in Selenium::Remote::Driver::__ANON__
18:47:07 koha_1       | 	(eval 1573):2 in Selenium::Remote::Driver::__ANON__
18:47:07 koha_1       | 	(eval 1546):17 in Selenium::Remote::Driver::_execute_command
18:47:07 koha_1       | 	/usr/local/share/perl/5.26.1/Selenium/Remote/WebElement.pm:63 in Selenium::Remote::WebElement::_execute_command
18:47:07 koha_1       | 	/kohadevbox/koha/t/lib/Selenium.pm:184 in Selenium::Remote::WebElement::click
18:47:07 koha_1       | 	/kohadevbox/koha/t/lib/Selenium.pm:172 in t::lib::Selenium::click_when_visible
18:47:07 koha_1       | 	t/db_dependent/selenium/administration_tasks.t:131 in t::lib::Selenium::click

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 16:54:40 +02:00
fd94f11afb Bug 25826: (QA follow-up) Add filters
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-07 09:55:50 +02:00