Commit graph

45553 commits

Author SHA1 Message Date
f334243222 Bug 30889: Set interface to 'intranet'
Is that correct?

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44b74010b1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:04:58 +00:00
cbb3ee6242 Bug 30889: Set userenv for background jobs
We need to set the userenv when we process the jobs. It is useful for
stats (at least)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f2425a243)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:04:40 +00:00
1e8abd7359 Bug 31058: Fix import AutoUnsuspendHolds
This patch corrects missing import

To test:
1 - perl misc/cronjobs/holds/auto_unsuspend_holds.pl
2 - It dies
Undefined subroutine &main::AutoUnsuspendReserves called at misc/cronjobs/holds/auto_unsuspend_holds.pl line 38.
3 - Apply patch
4 - run again
5 - It succeeds!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c315c164d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 17:01:36 +00:00
Katrin Fischer
29a627bdfc Bug 30939: Fix use statement for DelAuthority
Without this patch, the script won't delete any
unused authorities, but gives an error instead
and dies:

Undefined subroutine &main::DelAuthority called at ./misc/migration_tools/remove_unused_authorities.pl line 98.

To test:
- Run from koha-shell:
  ./misc/migration_tools/remove_unused_authorities.pl -t
- Verify several authorities are reported as unused
- ./misc/migration_tools/remove_unused_authorities.pl -c
- Verify the error message is shown when the first unused
  authority is found and the script stops
- Apply patch and rerun:
  ./misc/migration_tools/remove_unused_authorities.pl -t
- Verify the error is gone, the script finishes and auhorities
  are deleted

https://bugs.koha-community.org/show_bug.cgi?id=30936

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df393b38b8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:59:25 +00:00
Petro Vashchuk
588377511b Bug 30775: Make 952w to have datepicker plugin by default
This field (Price effective from) is very similar to 952d,
but it doesn't have dateaccessioned.pl plugin by default,

Apart of worse usability of this it is also allows to enter wrong
date which will be converted in 0000-00-00 in DB and even lead to
crashes by code in other places.

So, adding this plugin not only improves usability (user can have
datepicker) but also adds date field validation.

Test plan:
1. Head over to MARC frameworks from your administration page,
check 952 subfield structure of your default framework structure.
2. dateaccessioned.pl is set as a plugin for 952d by default
but is missing from 952w.
3. Apply the patch and reset your koha, drop db and use reset_all alias.
4. Check frameworks structure again and ensure that datepicker plugin
is set by default for 952w.
5. Edit some item to ensure that datepicker works for that 952w.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b25dfb50a1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:52:58 +00:00
8a855c86f3 Bug 26486: Group edit buttons in reports toolbar
This patch modifies the reports interface to change the reports toolbar
in two ways:

1. The Edit, Duplicate, and Delete buttons are now combined into a
   button menu. My original idea was to have it be a split button, but
   the logic for handling various permissions made the template logic
   too convoluted.
2. The "Show SQL code" button is converted to a "Single toggle" button
   (https://getbootstrap.com/docs/3.3/javascript/#buttons-single-toggle).
   This type of button is specifically designed for this kind of
   interface element.

This patch includes indendation changes, so please diff accordingly.

To test, apply the patch and go to Reports -> Saved reports.

- Logged in as a user with Create and Delete report
  permissions:
  - View an SQL report. In the toolbar you should see an "Edit" button
    menu with three options: Edit, Duplicate, and Delete. Check that all
    work correctly, including a deletion JavaScript confirmation dialog.

- Logged in as a user with Create but not Delete report permissions, you
  should see an "Edit" button menu with two choices: Edit and Duplicate.

- Logged in as a user with Delete but not Create report permission (??)
  you should see only a standalone delete button.

- Logged in as a user with Execute report permission, run an SQL report.
  Test the "Show SQL code" button. The text should change to "Hide SQL
  code" and the button should be styled to look like its "pressed"
  state.

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:50:00 +00:00
7f64635a66 Bug 31053: Add Context module to Koha::Encryption
Test plan:
perl -MKoha::Encryption -e'print Koha::Encryption->new->encrypt_hex("test");'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 147f6e0293)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:42:41 +00:00
7222bd700a Bug 30327: DBRev 22.05.03.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:37:03 +00:00
d65cac0f8a Bug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults
This patch fetches the new sysprefs into variables, providing default title ascending if
they are not set to avoid an undefined concatenation warning

I also make the update idempotent and fix confusion of plural/singular names

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8757023b21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:33:40 +00:00
9a73be67c5 Bug 30327: Fix tests
Corrected variable name on update to match everywhere else

Added a default value for limit in buildQuery and only append limit if it has content

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daab31ab38)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:33:21 +00:00
488c1a71c9 Bug 30327: Add options for sorting components
This patch adds two new sysprefs:
 ComponentSortField
 ComponentSortOrder

These allow the user to choose how components should be sorted when displaying on the details page
of a record, and the corresponding search for all components

This also updates our search from simple_search_compat to search_compat to allow for sorting options

Note:
Some sorting under ES is unclear - this is a separate issue to be invesitgated
Our Zebra index does not offer 'record number' sorting, I will file a bug for that

To test:
 1 - Enable UseControlNumber (or not)
 2 - Add some components to a record by control number or title depending on above
 3 - Enable  ShowComponentRecords  syspref
 4 - View the record that has components
 5 - Note they are not sorted
 6 - Apply patch, updatedatabase
 7 - reload record
 8 - Note components are sorted by title ascending
 9 - Try different values for ComponentSortField and ComponentSortOrder
10 - Confirm sorting changes with system preferences
11 - Repeat test on staff and opac, with ES and Zebra search engines

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de63c2abb1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:33:03 +00:00
84999e1938 Bug 30994: Typo: item was on loan. couldn't be returned.
This patch updates some language in the inventory template to make it
readable and consistent: Punctuation fixed, capitalization made more
consistent, language corrections ("check in" instead of "return").

To test you can try to apply the patch and trigger the various errors in
the inventory interface, but it's probably enough to visually confirm
the changes in the patch.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fde9f39ca5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:26:07 +00:00
629b0f5f64 Bug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates
The construct of [% ELSE %]0[% END %] breaks translations as it is
translated as [% ELSE %][% END %]. Note: No 0 in the ELSE statement.

This patchset either removes occurances of a lone 0 in template ELSE
statements, or splits it over multiple lines so the 0 is not removed in
the translated templates.

Test plan:
1. Install the en-NZ translation
2. Search the translated templates for '[% ELSE %][% END %]' and confirm
there are are instances of that
3. Apply patch
4. Update your en-NZ translation
5. Repeat step 2 and confirm there are no more instances of [% ELSE %][%
END %] in the translated templates

Note: I removed the [% ELSE %] statement from opac-bottom.inc as that
statement was empty in the en translation so it didn't look to be
needed.

Sponsored-by: Catalyst IT, New Zealand

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit efad62f91d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:24:21 +00:00
7cce32a6ae Bug 30936: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 04d43d4f21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:20:26 +00:00
3c8918f8c7 Bug 30936: Reindent authority detail template
This patch updates the authority detail template so that indentation is
consistent.

To test, apply the patch and go to Authorities.

- Locate an authority record and view the detail page.
- Everything should look correct, with working numbered tabs.
- If the AuthDisplayHierarchy preference is enabled, you should see a
  collapsible tree of elements in the authority hierarchy.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1da958f59b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:20:07 +00:00
61051078b8 Bug 30609: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:12:15 +00:00
8480a3624a Bug 30609: Reindent serial claims template
This patch updates the serial claims template so that the indentation
is consistent. Tabs are replaced with spaces.

To test you must have at least one subscription with late issues.

- Apply the patch and go to Serials -> Claims and select the vendor
  responsible for your late issue.
- On the "Missing issues" page, confirm that everything looks correct.
- All functionality should be the same: Filters, table sorting, CSV
  export, and claim notification.

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:12:00 +00:00
edee82be94 Bug 29055: Focus on keyword field when subscription biblio search window opens
This patch adds the "autofocus" attribute to the keyword field in the
popup window used to find a bibliographic record to use in a
subscription.

The same is also done for the vendor search popup.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for vendor" link. When the "Serial subscription:
  search for vendor" window opens the cursor should automatically be in
  the vendor search field.
- Click the "Search for record" link. When the "Catalog search" window
  opens the cursor focus should automatically be in the keyword field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 712ced4612)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:09:26 +00:00
17281b62ef Bug 22659: (follow-up) Add category to redirect
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:06:44 +00:00
44d44956e2 Bug 22659: Add save and continue button to additional-contents.tt
To test:
1. Apply patch and restart everything
2. Go to Tools > News and create some new additional content.
3. Notice a Save and continue button
4. Try saving and contining.
5. Make sure if you are using the CodeMirror editor that you are still in the CodeMirror editor
6. Try 2 - 5 again but with the wysiwyg editor, make sure when you save and continue you remain in the wysiwyg editor.
7. If you are saving and contining from News make sure you remain in News, when you are saving and contining from HTML customizations make sure you remain there.
8. Turn on the NewsLog system preference
9. With the NewsLog on make sure your content is being logged correctly when you sabe and continue.

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

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

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:06:29 +00:00
962d372c8b Bug 30871: (Rmaint follow-up) fix forbidden pattern: tab char (line 50)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 16:01:53 +00:00
3c1ebde756 Bug 30871: Add notes in advanced cataloging editor
This is the same as preevious patch, but for advanced cataloging editor

To test:
1 - Enable EnableAdvancedCatalogingEditor
2 - Create a new record in advanced edtior
3 - Hover over leader6 and 008 type
4 - Confirm notes are useful

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9de92e07e6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:59:36 +00:00
b18aeffc74 Bug 30871: Add/expand title text for LDR/06 and 008 Type of material
This patch simply adds title elements or clarifies existing title elements to indicate how default
values are chosen

To test:
1 - Create new record in default editor
2 - Open leader helper, hover over "6-Type of record" and the dropdown
3 - Confirm notes make sense
4 - Open 008 helper
5 - Hover over 'Type of Material' and dropdown
6 - Confirm notes make sense

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9912739231)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:59:22 +00:00
9f3b51216a Bug 29454: (follow-up) Cover more test cases
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75fe055dcc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:54:53 +00:00
c207d740cd Bug 29454: Add unit test for Koha::Template::Plugin::ItemTypes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 338ca787be)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:54:36 +00:00
f4595b7bbd Bug 29454: Use Koha Cache Memory Lite to stash itemtype descriptions for template plugin
Returns empty string if given item type is undefined or unknown

To test:
1 - Add 1000 items to a record, of varying item types
2 - Bring up the details page
3 - Note time to load
4 - Apply patch
5 - Reload page and compare to previous
6 - Confirm information is correct
7 - Confirm some performance benefit

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3df28469c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:54:15 +00:00
Mark Tompsett
01bde643f2 Bug 20395: (follow-up) Change format to use price filter
See comment #1.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df3c578ae1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:50:32 +00:00
Pasi Kallinen
75c74c469d Bug 20395: Change paycollect to use Price formatter
Test plan:
1) Apply patch
2) Go to Home -> Patrons -> Patron details (for any patron)
3) Create manual invoice for the patron
4) Pay fines -> Pay -button
5) Check that the currency values look correct

6) Pay fines -> Pay amount -button
7) Check that the currency values look correct

8) Pay fines -> Pay selected -button
9) Check that the currency values look correct

10) Change the CurrencyFormat setting
11) Repeat 2-9

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c1784437b4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:50:12 +00:00
1ad034be21 Bug 30950: Remove timepicker.inc
No longer used since
  commit de2d8ba3e4
  Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc.

We must remove it from our codebase.

Test plan:
  git grep timepicker.inc
Should not return occurrences outside of PO's

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75bd5cfda1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:34:09 +00:00
Kevin Carnes
22c9ea9737 Bug 25669: (follow-up) Minor fixes
Bulk doesn't support include_type_name, update requirement to
Search::Elasticseach@6.80, and remove data type name from tests.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e926de5e8f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:28:00 +00:00
99757c2d97 Bug 25669: Use include_type_name parameter in ES calls
This patch includes the parameter:
include_type_name
on our ES calls

It removes the deprecation warning we are seeing, and should allow using ES7 with no other chnages.

For ES8 we will need to remove the hardcoded type,

I would suggest a second patch, with a new syspref "ElasticsearchLegacyType" set to 'True' by default.
Description can explain that this must be set to false, and data reindexed after upgrading to ES7 and before
upgrading to ES8 - then we can drop this pref when we drop ES7 support

When we drop ES6 support the pref can be set default true for upgrades, default 'false' for new installs

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 150a4b03f3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:27:43 +00:00
584c49961c Bug 31013: Quote branchcodes in Elasticsearch limits
This patch adds quoting when handling branchcodes in searching in order
to prevent errors when branchcodes are reserved words in ES

To test:
0 - Be using Elasticsearch with Koha
1 - Add a new branch code:OR name:Orly
2 - Add an item to this branch
3 - Use advanced search to limit search to only Orly
4 - Oh really bad, the search fails!
5 - Apply patch
6 - Repeat search
7 - Oh really good, the search succeeds
8 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a4c5bd5836)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-29 15:11:44 +00:00
4018461d49 Correct version in Koha.pm
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-26 16:52:35 +00:00
e40fa1af65 Remove atomicupdate file
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-26 16:51:12 +00:00
fea07bfab8 Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t
to test...

1/ run prove, test is not run :(
 prove ./t | grep 00-check-atomic-updates.pl | wc -l
 0

2/ apply patch

3/ run prove, test is run :)
 prove ./t | grep 00-check-atomic-updates.t | wc -l
 2

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-26 16:46:00 +00:00
e77e51fc93 Update release notes for 22.05.03 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-25 16:05:56 +00:00
6e64aa877c Increment version for 22.05.03 release 2022-07-25 14:48:56 +00:00
Koha translators
29a9a10555 Translation updates for Koha 22.05.03
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-25 11:32:22 -03:00
e75b17d28d Bug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorities-home.pl )
There appears to be a cross site scripting attack vulnerability in opac-authorities-home.pl, but may be accessible from any page using C4::Output::pagination_bar.

https://MYKOHA.LOCAL/cgi-bin/koha/opac-authorities-home.pl?and_or=and%27%22()%26%25%3Csad%3E%3CScRiPt%20%3Ealert(document.domain)%3C/ScRiPt%3E&authtypecode=CORPO_NAME&excluding=1&marclist=all&op=do_search&operator=contains&orderby=HeadingAsc&type=opac&value=1

Test Plan:
1) Use the URL above to show the XSS vulnerability exists
2) Apply this patch
3) Restart all the things!
4) Reload the page, no XSS vulnerability!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-25 14:21:14 +00:00
Katrin Fischer
9bb5236be7 Bug 28355: (QA follow-up) Move Note to new line
There is an existing pattern for the 'Note:' in pref
descriptions, where it's always added on a new line.
This changes the formatting to match that pattern.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 02b0292333)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:55:00 +00:00
8dbaa6d871 Bug 28355: Add a note that SMS to email via mobile provider is not recommended
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5aa603fa30)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:54:47 +00:00
3f5c43cf26 Bug 30958: OPAC overdrive search result page broken for translations
Note: You will need a valid OverDrive subscription to test this.

This patch fixes a JavaScript error thrown on the OPAC overdrive search
results page for libraries using translation templates and who don't
have the OverDrivePasswordRequired system preference = 'Required'.

Test plan:
1. Install the en-NZ translation: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client

2. Enable the en-NZ language:
   - In the OPACLanguages system preference -> tick 'English New Zealand
     (en-NZ)' checkbox and untick 'English (en)'

3. Fill in the OverDrive system preferences:
   - Make sure you set: OverDrivePasswordRequired = "Not required"

4. Perform an OPAC search

5. Click on the Overdrive results link

6. Open the browser console and notice there is a JS error, and the
   OverDrive results do not load

7. Apply patch

8. Update the en_NZ translation:

9. Repeat steps 4, 5 and 6 and notice there is no JavaScript error and
   the OverDrive results do display

Sponsored-by: Melbourne Athenaeum Library, Australia

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ade61b5e0c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:52:42 +00:00
Petro Vashchuk
535f555468 Bug 30997: Fix "CGI::param called in list context" warning in detail.pl
CGI param found1 should be explicitly scalar,
or else error log gets flooded with this warning:

CGI::param called in list context from
/usr/share/koha/intranet/cgi-bin/catalogue/detail.pl line 622

This patch fixes it by working with it in a scalar context.
The functionality still remains the same but warning doesn't flood
error log.

To reproduce:
1. Open any biblio (details.pl) page.
2. Check the error log and find the upper mentioned warning,
check the timestamp to ensure that it was added when you loaded the page.
3. Apply the patch.
4. Load the page again, ensure that the same warning doesn't get added
to the log file again.

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 11:49:52 -06:00
3eceb3d5fe Bug 29504: (follow-up) Account for other blockers
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7a7716b6d8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:47:28 +00:00
39f89b43fd Bug 29504: Allow 'ADDITIONAL_MATERIALS' check to be confirmed
The additional materials check when CircConfirmParts is enabled was
errantly relying upon the 'FORCE_CHECKOUT' permission.  This patch
updates the template to allow confirmation as well as cancellation of
chekout.

Test plan
1. Set a staff member with circ permissions, but not FORCE_CHECKOUT
2. Turn on CircConfirmItemParts
3. Log in as staff member in step 1
4. Attempt to checkout an item with a 952$3
5. The only option given is the Continue button (with a red X) and when
   clicked, the item does not get checked out.
6. Apply patch
7. Repeat step 4.
8. You should now have the option to 'Yes, check out (Y)' or
   'No, don't check out (N)'

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 49ef741405)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:47:13 +00:00
12b90bb02f Bug 12630: Rebase tests and cover CheckReserves
It turns out we do honor reservedate in CheckReserves, so a hold with a lower priority will
fill before a hold in the future. I add tests to cover this and fix the old tests to pass again

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a1739ea43b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:37:46 +00:00
Jonathan Druart
475a5b3fb2 Bug 12630: Add regression tests
Verify that the 2 tests failed before applying this patch and return
green after.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2369076f99)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:37:34 +00:00
648c3ad48a Bug 12630: (QA follow-up) - Rename _ShiftPriorityByDateAndPriority to _ShiftPriority
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0ca445fca8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:37:21 +00:00
Olli-Antti Kivilahti
8c509cf330 Bug 12630: Prioritizing "Hold starts on date" -holds causes all other holds to be prioritized as well!
-------------------------
-- REPLICATE LIKE THIS --
-------------------------

0. Enable AllowHoldDateInFuture-system preference!

1. Select a biblio with some holds.
2. Place a hold with the "Hold starts on date"-attribute set to future.
3. More the specific hold up on the priority queue.
4. Add another normal hold, observe how it is prioritized with the "Hold starts on date"-hold, leaving old holds to the prioritization queue tail.

Unfair eh?

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 05ac7e0d4a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-15 17:37:01 +00:00
Katrin Fischer
c3ffcda461 Bug 30989: (QA follow-up) Use uri filter on OPAC tag cloud page
This fixes 2 links on the page:
* The tag within the 'all tags' cloud
* The tag shown in the 'your tags' table

Test plan as before: Test with a tag like +++

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16ec30258e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-07-13 20:41:38 +00:00