]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 30327: DBRev 22.05.03.001
Lucas Gass [Fri, 29 Jul 2022 16:37:03 +0000 (16:37 +0000)]
Bug 30327: DBRev 22.05.03.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults
Nick Clemens [Sat, 25 Jun 2022 11:18:42 +0000 (11:18 +0000)]
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 8757023b2167bfec92a494873232f1aaa76ab6be)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30327: Fix tests
Nick Clemens [Fri, 17 Jun 2022 10:13:41 +0000 (10:13 +0000)]
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 daab31ab38ea1d9c2992af51d38f30f318c3546b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30327: Add options for sorting components
Nick Clemens [Wed, 1 Jun 2022 14:40:49 +0000 (14:40 +0000)]
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 de63c2abb1a64fae45ebbfa98c5001b98f4a69ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30994: Typo: item was on loan. couldn't be returned.
Owen Leonard [Mon, 20 Jun 2022 13:20:58 +0000 (13:20 +0000)]
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 fde9f39ca56bacd8a7f300a105ea6dfde14d0fd9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates
Alex Buckley [Wed, 22 Jun 2022 08:38:58 +0000 (08:38 +0000)]
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 efad62f91d7fa5bf2a85f20b16afa8cfaa52e717)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30936: (follow-up) Add markup comments
Owen Leonard [Thu, 9 Jun 2022 18:30:10 +0000 (18:30 +0000)]
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 04d43d4f213641f6fbdb595b636c94ff313907fd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30936: Reindent authority detail template
Owen Leonard [Fri, 3 Jun 2022 15:22:06 +0000 (15:22 +0000)]
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 1da958f59bdb6fdf6ec1a87969a468f7b6583416)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30609: (follow-up) Add markup comments
Owen Leonard [Mon, 25 Apr 2022 14:15:56 +0000 (14:15 +0000)]
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 9b55a435d9a61819750c322ac284f8c9a2c236c3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30609: Reindent serial claims template
Owen Leonard [Fri, 22 Apr 2022 18:31:35 +0000 (18:31 +0000)]
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 455b3b4a93b491b26af8e4f16642eeab03254ccc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29055: Focus on keyword field when subscription biblio search window opens
Owen Leonard [Thu, 12 May 2022 15:14:32 +0000 (15:14 +0000)]
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 712ced46128470010a043597c2ad7f956bd9b9cd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 22659: (follow-up) Add category to redirect
Lucas Gass [Mon, 28 Mar 2022 20:51:35 +0000 (20:51 +0000)]
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 347d9d733984170a04743510d50c5c8457484b60)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 22659: Add save and continue button to additional-contents.tt
Lucas Gass [Thu, 3 Feb 2022 22:31:19 +0000 (22:31 +0000)]
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 e88ee0fc5efea3f25bdca1f4fe70b71239743d9c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30871: (Rmaint follow-up) fix forbidden pattern: tab char (line 50)
Lucas Gass [Fri, 29 Jul 2022 16:01:53 +0000 (16:01 +0000)]
Bug 30871: (Rmaint follow-up) fix forbidden pattern: tab char (line 50)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30871: Add notes in advanced cataloging editor
Nick Clemens [Tue, 31 May 2022 13:01:59 +0000 (13:01 +0000)]
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 9de92e07e69c8c209b10d70ab4da623572240a95)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30871: Add/expand title text for LDR/06 and 008 Type of material
Nick Clemens [Tue, 31 May 2022 12:54:40 +0000 (12:54 +0000)]
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 9912739231511441d54bec77ff04bbb561fdb93d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29454: (follow-up) Cover more test cases
Nick Clemens [Wed, 15 Jun 2022 12:08:05 +0000 (12:08 +0000)]
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 75fe055dcc76b9aa6dd4f3880dcbb504c1001dcb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29454: Add unit test for Koha::Template::Plugin::ItemTypes
Fridolin Somers [Tue, 14 Jun 2022 21:57:40 +0000 (11:57 -1000)]
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 338ca787be4febc1136e45dac95f9006ccf2a425)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29454: Use Koha Cache Memory Lite to stash itemtype descriptions for template...
Nick Clemens [Mon, 13 Dec 2021 14:44:18 +0000 (14:44 +0000)]
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 3df28469c551d7cc2c2f16925e75e9913db0ee67)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 20395: (follow-up) Change format to use price filter
Mark Tompsett [Thu, 15 Mar 2018 16:08:45 +0000 (16:08 +0000)]
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 df3c578ae18c1732ce09ddab49683d55dbe4d904)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 20395: Change paycollect to use Price formatter
Pasi Kallinen [Wed, 14 Mar 2018 09:04:50 +0000 (11:04 +0200)]
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 c1784437b4962bee46cd801967bbeb75a3f33fec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30950: Remove timepicker.inc
Jonathan Druart [Mon, 13 Jun 2022 08:45:33 +0000 (10:45 +0200)]
Bug 30950: Remove timepicker.inc

No longer used since
  commit de2d8ba3e4f611aadc29165a7748cc1797d87ce3
  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 75bd5cfda14c2ddc7dfdb2939e0f67f3cb302c42)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 25669: (follow-up) Minor fixes
Kevin Carnes [Wed, 25 May 2022 09:19:21 +0000 (09:19 +0000)]
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 e926de5e8f359acf6b8beff541fe13ce2a5ac49e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 25669: Use include_type_name parameter in ES calls
Nick Clemens [Mon, 28 Mar 2022 12:00:25 +0000 (12:00 +0000)]
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 150a4b03f337f6a58869c67d3681caa64441d53a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31013: Quote branchcodes in Elasticsearch limits
Nick Clemens [Wed, 22 Jun 2022 13:19:03 +0000 (13:19 +0000)]
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 a4c5bd58361900983f870f1c0e7f497ae3618c85)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoCorrect version in Koha.pm v22.05.03-1
Lucas Gass [Tue, 26 Jul 2022 16:52:35 +0000 (16:52 +0000)]
Correct version in Koha.pm

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoRemove atomicupdate file
Lucas Gass [Tue, 26 Jul 2022 16:51:12 +0000 (16:51 +0000)]
Remove atomicupdate file

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t
Mason James [Wed, 6 Jul 2022 10:54:55 +0000 (22:54 +1200)]
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 8884068904b77ecb8dff7875a056129443b08e6b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoUpdate release notes for 22.05.03 release v22.05.03
Lucas Gass [Mon, 25 Jul 2022 16:05:56 +0000 (16:05 +0000)]
Update release notes for 22.05.03 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoIncrement version for 22.05.03 release
Lucas Gass [Mon, 25 Jul 2022 14:48:56 +0000 (14:48 +0000)]
Increment version for 22.05.03 release

2 years agoTranslation updates for Koha 22.05.03
Koha translators [Mon, 25 Jul 2022 14:32:22 +0000 (11:32 -0300)]
Translation updates for Koha 22.05.03

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorit...
Kyle Hall [Wed, 15 Jun 2022 16:06:55 +0000 (12:06 -0400)]
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>
2 years agoBug 28355: (QA follow-up) Move Note to new line
Katrin Fischer [Fri, 17 Jun 2022 20:10:55 +0000 (22:10 +0200)]
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 02b029233326742ee11f897ee12a2a431f7ed946)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 28355: Add a note that SMS to email via mobile provider is not recommended
Nick Clemens [Fri, 17 Jun 2022 12:00:34 +0000 (12:00 +0000)]
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 5aa603fa301d3109811ddb3c470a9976566babf2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30958: OPAC overdrive search result page broken for translations
Alex Buckley [Mon, 13 Jun 2022 22:54:54 +0000 (22:54 +0000)]
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 ade61b5e0c185fd7263ab6f101b1a4082d0ea0dd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30997: Fix "CGI::param called in list context" warning in detail.pl
Petro Vashchuk [Mon, 20 Jun 2022 14:08:32 +0000 (17:08 +0300)]
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 407564e3940ad08030383078fd1ce5c530a19f2d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29504: (follow-up) Account for other blockers
Martin Renvoize [Wed, 15 Dec 2021 09:20:52 +0000 (09:20 +0000)]
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 7a7716b6d8039476a6cc2d6403092cc2df42458e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29504: Allow 'ADDITIONAL_MATERIALS' check to be confirmed
Martin Renvoize [Mon, 22 Nov 2021 11:33:25 +0000 (11:33 +0000)]
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 49ef741405d0b81ba0cb37dd81fa9a4b5aba5bbb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 12630: Rebase tests and cover CheckReserves
Nick Clemens [Fri, 10 Jun 2022 14:47:44 +0000 (14:47 +0000)]
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 a1739ea43bfb7110059446989483f3282784527c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 12630: Add regression tests
Jonathan Druart [Wed, 5 Nov 2014 09:32:21 +0000 (10:32 +0100)]
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 2369076f99ce3415bcfe6ced74cc3edb6aef5a09)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 12630: (QA follow-up) - Rename _ShiftPriorityByDateAndPriority to _ShiftPriority
Kyle M Hall [Mon, 25 Aug 2014 14:17:28 +0000 (10:17 -0400)]
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 0ca445fca8262ad3a0e2b44c7516417e81532c43)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 12630: Prioritizing "Hold starts on date" -holds causes all other holds to be...
Olli-Antti Kivilahti [Wed, 23 Jul 2014 05:41:47 +0000 (08:41 +0300)]
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 05ac7e0d4a1d4247df43f4a83ead509cfaffa04c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30989: (QA follow-up) Use uri filter on OPAC tag cloud page
Katrin Fischer [Fri, 17 Jun 2022 22:23:31 +0000 (22:23 +0000)]
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 16ec30258e9ee9bfbd5bbcbf3039c6b1b3cc9082)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30989: (QA follow-up) Use uri filter on staff detail page
Katrin Fischer [Fri, 17 Jun 2022 21:26:55 +0000 (21:26 +0000)]
Bug 30989: (QA follow-up) Use uri filter on staff detail page

This applies the same fix as the first patch but to the staff
interface detail page. With this fix, a tag like +++ can
be clicked and the tagged records will show.

To test:
- Tag some records in the staff interface with something like +++
- Go to the detail page of one of those recods
- Click on the tag
- Verify nothing is found
- Apply patch
- Repeat - all tagged records will show

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30989: Use uri filter where tag links are displayed
Lucas Gass [Fri, 17 Jun 2022 19:45:42 +0000 (19:45 +0000)]
Bug 30989: Use uri filter where tag links are displayed

TO test:
1. Turn on:  TagsEnabled.
2. Log in to the OPAC and create a tag like "LGBTQ+"
3. Add that record to a list
3. Now try  clicking on that tag from detail, results, and lists page.
4. If you click on the link for the "LGBTQ+" you will get a 'no results found page'.
5. Apply patch
6. Try clicking on each of the tags in detail, results, and lists. They should work now.

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 997262f6fe7f47b5b6f0fd5cc1032538b3a79b26)

2 years agoBug 30925: Fix category parameter for addbybiblionumber
Marcel de Rooy [Mon, 20 Jun 2022 07:03:17 +0000 (07:03 +0000)]
Bug 30925: Fix category parameter for addbybiblionumber

In bug 28959 category was replaced in favor of public. But
unfortunately a few places were missed.
This fixes the addbybiblionumber templates.

Test plan:
Add a biblio to a list from the search results using the Add to
or Add to list button on OPAC/intranet.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29963: Do not prefill empty date fields with today's date
Petro Vashchuk [Fri, 3 Jun 2022 16:10:03 +0000 (19:10 +0300)]
Bug 29963: Do not prefill empty date fields with today's date

Revert "Bug 29815: Pre-populate 'Date acquired' field when adding/editing items"
commit bd197c64567fba6899f12e4897d786adf52384d8

Items date fields in MARC framework with dateaccessioned.pl assigned as
plugin automatically prefilled by it with today's date if empty on page
load.

This becomes big problem because it silently changes empty date fields
in single item edit form with today's date. This drastically degrades
UX because user won't noitce that fields were filled.

Also, even when user aware about this problem, user is forced to clean
the field manually each time they edit items with empty fields.

Also in item batch edit tool the probability heavily increases to make
mistake and leave those fields prefilled on mass.

To reproduce problem with single item edit:
1. Edit single item that doesn't have a date set in any of the date
fields where dateaccessioned.pl in MARC framework assigned as plugin,
see that the field got prefilled with today's date.
2. Save the item. See that it overwrote the previously empty date.
3. Apply the patch.
4. Edit single item again, and ensure that the empty date fields don't
get overwriten like it happened previously.

To reproduce problem with bath edit:
1. Edit items in batch for any biblio, see that the date fields where
dateaccessioned.pl in MARC framework assigned as plugin is automatically
 set to current day's date.
2. Apply the patch.
3. Check the fields again, they should be empty after that.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 926def44c0e25c0ff6cb634a24dce3014075a3a3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30938: Convert ColumnSettings to TableSettings
Lucas Gass [Fri, 10 Jun 2022 17:27:16 +0000 (17:27 +0000)]
Bug 30938: Convert ColumnSettings to TableSettings

To test:
1. Apply this patch
2. Go to /cgi-bin/koha/acqui/acqui-home.pl
3. The columns button should be restored, make sure you can hide/show columns correctly.
4. Go to Table settings and make sure you can hide columns properly by default.

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 9b3e31222355d2353164ce18e48e31beefa50df0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoModify DBRev permission
Lucas Gass [Wed, 13 Jul 2022 20:23:34 +0000 (20:23 +0000)]
Modify DBRev permission

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30924: DBRev 22.05.02.001
Lucas Gass [Wed, 13 Jul 2022 20:16:58 +0000 (20:16 +0000)]
Bug 30924: DBRev 22.05.02.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30954: (bug 27344 follow-up) Remove background_jobs_update_elastic_index.inc
Jonathan Druart [Mon, 13 Jun 2022 12:47:12 +0000 (14:47 +0200)]
Bug 30954: (bug 27344 follow-up) Remove background_jobs_update_elastic_index.inc

includes/background_jobs_update_elastic_index.inc
vs
includes/background_jobs/update_elastic_index.inc

Both exist and have been added by bug 27344.
The first one is not used.

Test plan:
  git grep background_jobs_update_elastic_index.inc
must not return any occurrences (outside of POs)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30973: Serials search fix body id
Fridolin Somers [Thu, 16 Jun 2022 07:55:51 +0000 (21:55 -1000)]
Bug 30973: Serials search fix body id

The serials search page serials/serials-search.pl has HTML body id :
  <body id="ser_serials-home" class="ser">
It is the same as serials home page.

This patch replaces with id="ser_serials-search"

Test plan :
1) Go to Serials > Advanced search
2) Look at HTML code
3) Check you see <body id="ser_serials-search" class="ser">

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30974: Set size for indexing jobs to 1
Jonathan Druart [Thu, 16 Jun 2022 08:22:02 +0000 (10:22 +0200)]
Bug 30974: Set size for indexing jobs to 1

job's size is the number of records to index, but when finished the progress is always set to 1.

Wich leads to: finished 1/42

Test plan:
Don't apply this patch
Use the batch item modification tool to update more than 1 item
Notice that the new indexing job has a size of the number of items you
modified
When finished, the job detail shows "Finished. 1/X"
Apply this patch, repeat
Notice that now the progress shows 0/1 before the job is done, then 1/1
when finished

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30409: (QA follow-up) Avoid uninitialized variable warnings
Tomas Cohen Arazi [Tue, 14 Jun 2022 11:21:42 +0000 (08:21 -0300)]
Bug 30409: (QA follow-up) Avoid uninitialized variable warnings

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30409: (QA follow-up) Fix grammar in syspref help text
Joonas Kylmälä [Sun, 12 Jun 2022 08:12:23 +0000 (08:12 +0000)]
Bug 30409: (QA follow-up) Fix grammar in syspref help text

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2538c846f48a86e0d557ec3238b93a850b5a0c58)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30409: barcodedecode() should always trim barcode
Petro Vashchuk [Sat, 2 Apr 2022 21:02:40 +0000 (00:02 +0300)]
Bug 30409: barcodedecode() should always trim barcode

Barcode is trimmed of leading/trailing whitespaces in many instances
before the barcodedecode sub was called. This patch instead makes that
barcodedecode sub is going to trim it itself and removes unnecessary,
and repetitive code that was used before barcodedecode was called.

Steps to test:
1. Edit item with any barcode, add a bunch of whitespaces at the start
and at the bottom of it. Save the item. Ensure that this action ruins
the barcode and ensure that the spaces are still there by editing the
same item again.
2. Apply the patch.
3. Edit the same item again in the same fashion. Ensure that now all
whitespaces are getting trimmed and it doesn't affect the barcode in
any negative way.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2611c919dd5287402b89f219d75d3a013407123)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30780: Librarians with only "place_holds" permissions can not update holds data...
Johanna Raisa [Tue, 17 May 2022 05:58:15 +0000 (08:58 +0300)]
Bug 30780: Librarians with only "place_holds" permissions can not update holds data via REST API

This patch enables librarians with only "place_holds" permissions to cancel, suspend and resume holds via REST API.

Test plan:
1) Try to cancel or suspend a hold with only "place_holds" permissions
2) See that it is forbidden.
3) Apply the patch
4) Cancel a hold again
5) The cancellation succeeds
6) prove t/db_dependent/api/v1/holds.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 71a95d35574db31e21a6815fc696ee2b446c617e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30780: Regression tests
Tomas Cohen Arazi [Mon, 13 Jun 2022 14:46:20 +0000 (11:46 -0300)]
Bug 30780: Regression tests

This patch lowers the used permissions on the suspend/resume tests, and
adds tests for fine-grained permissions on cancelling a hold.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30904: (bug 24387 follow-up) Fix library modification of additional contents
Jonathan Druart [Wed, 8 Jun 2022 09:56:30 +0000 (11:56 +0200)]
Bug 30904: (bug 24387 follow-up) Fix library modification of additional contents

Modifying an existing element of additional content (News) by changing
the library causes a duplication of the entry on the Additional contents
(News) list.  A subsequent attempt of deleting one of the entries results
in deleting both of them.  This is due to the fact that after
the unwanted duplication all the  entries share the same
additional_contents.code.

Test plan
=========

1. Create a piece of news under Tools > News.
2. After having saved it make a modification by changing the library.
   It should result in two rows in the table.
3. Delete one of the lines with Delete button.  Both lines will
   disappear.
4. Apply the patch.
5. Repeat the steps 1 and 2.  Only the one (the modified) entry should be
   present in the table.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30798: Change column order on account-fines table column settings
Emmi Takkinen [Wed, 18 May 2022 09:16:42 +0000 (12:16 +0300)]
Bug 30798: Change column order on account-fines table column settings

Columns Home library and Checked out from are in wrong order
on table settings. Because of this hiding Home library actually
hides Checkout out from column and vice versa. This patch changes
order of these columns on columns_settings.yml

To test:
1) Navigate to columns settings page and modify
account-fines tables column.
=> Note that if you hide  column checked_out_from, column
home_library is hidden on patrons account page.
2) Apply patch and restart plack etc.
=> Column checked_out_from should now be hidden.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c16e366af58bd41783a478bf9d7d8fc3257bc874)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves
Jonathan Druart [Tue, 7 Jun 2022 12:11:06 +0000 (14:11 +0200)]
Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves

Silly mistake, 'delete if verbose' must be 'delete if confirm'

Test plan:
Try the cleanup_database.pl script to delete transfers and old issues.
Using --transfers --old-reserves and the --confirm flag the entries must be
removed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6166405c7d7886466a8d1264c98970b4973f77f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30924: DBIC Update
Lucas Gass [Wed, 13 Jul 2022 19:19:46 +0000 (19:19 +0000)]
Bug 30924: DBIC Update

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30924: Add missing branchtransfers.reason value for recall cancellation
Tomas Cohen Arazi [Thu, 9 Jun 2022 14:58:44 +0000 (11:58 -0300)]
Bug 30924: Add missing branchtransfers.reason value for recall cancellation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 54372681bec7e81e044e32644330e38093408f8f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30924: Fix transferstoreceive.pl explosion on recalls
Tomas Cohen Arazi [Thu, 9 Jun 2022 14:09:18 +0000 (11:09 -0300)]
Bug 30924: Fix transferstoreceive.pl explosion on recalls

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 46387c3845b7a22a661e79910eb4787795f3c594)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30399: Make Patron.t pass even if mandatory attributes exist
Jonathan Druart [Wed, 8 Jun 2022 09:39:43 +0000 (11:39 +0200)]
Bug 30399: Make Patron.t pass even if mandatory attributes exist

t/db_dependent/Koha/Patron.t is failing if mandatory attributes already
exist in the DB. We can make it pass easily by deleting all the
attributes before we run the tests.

Test plan:
  prove t/db_dependent/Koha/Patron.t
must return green even if one mandatory patron attribute exists.

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 523a2f297d09015818eec2785de5cc538ff65852)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30585: Fix library options on table settings for course_reserves_table
Katrin Fischer [Mon, 6 Jun 2022 21:02:25 +0000 (21:02 +0000)]
Bug 30585: Fix library options on table settings for course_reserves_table

The table on  course-details.pl has columns for both home library and jolding library,
but course_reserves_table in the Table configuration admin area only has a
single toggle for 'library'.

Hiding 'library' hides the home library column. Anything after that is off by one.
Hiding 'staff_note' actually hides the holding library column, 'link' hides
Public note, etc.

To test:
- Add a course and some course reserves
- Go to table configuration and hide 'staff note'
- Look at the list of course reserves for your course
- Verify the wrong column was hidden
- Apply patch
- The configuration area now shows holding_library and home_library
  as separate options.
- Change the settings and verify everything now hides/displays correctly.

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 972330bc9e13e40564885bcf0ef1723abcc51772)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30768: Capitalizing "pin" in 2FA setup
Michal Urban [Wed, 8 Jun 2022 15:40:42 +0000 (11:40 -0400)]
Bug 30768: Capitalizing "pin" in 2FA setup

Change of text from "pin" to "PIN" in the 2FA setup interface.
This slight changes clarifies that "PIN" is an acronym,
 and increases user comprehension

To test:
1) Log in as an Administrator
2) Enable TwoFactorAuthentication
3) Log in to a user with superlibrarian permissions.
4) On the user profile page, click the "More" dropdown button,
click "Manage Two-Factor
5) Check that "pin" is displayed in lowercase, in both instances.
6) Apply patch.
7) Refresh the page and observe that "pin" has changed to "PIN"
8) Sign off.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29312: Remove unnecessary dot
Séverine QUEUNE [Tue, 5 Apr 2022 13:09:08 +0000 (13:09 +0000)]
Bug 29312: Remove unnecessary dot

This patch removes an extra point after the number of shown results.

Test plan :
 - don't apply patch
 - run a report that brings you more than 20 results, e.g. SELECT * FROM biblio LIMIT 50
 - see extra ' .' after the number of shown results
 - apply patch
 - run the report again and see the point isn't displayed anymore
 - check the behaviour is still correct when you change the number of rows displayed
 - sign off !

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 27519: Normalize Show/Don't show in system preferences
Shi Yao Wang [Wed, 18 May 2022 14:59:39 +0000 (10:59 -0400)]
Bug 27519: Normalize Show/Don't show in system preferences

Replace Display/Don't display (and some other pairs) by Show/Don't show in system preferences.

Test plan:
1- Go to administration > system preferences
2- View any system preference with Display/Don't display pair of options
(e.g. OPACAcquisitionDetails)
3- Apply the patch
4- Refresh the page and notice it is now a Show/Don't show pair instead
5- Loop the steps with other system preferences until satisfied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 ed81d6bac6db499412a22f20ac45003da1aab0b1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30807: Migrate to patron-title in pay and paycollect
Martin Renvoize [Thu, 19 May 2022 11:53:18 +0000 (12:53 +0100)]
Bug 30807: Migrate to patron-title in pay and paycollect

This patch updates the member-flags template to use the patron-title.inc
include wherever patron names are referenced.

Test plan
1) Navigate to a patron and click through to their accounts tab
2) Note how the patron name displays in the title, breadcrumb and
   headings
3) Click through to make a payment
4) Note how the patron name displays in the title, breadcrumb and
   headings
5) Apply the patch and reload the page
6) Confirm the patron name still appears in each location and is
   consistently formatted and linked as you would expect

Note: This patch also removes a superflous hidden title form element
that was simply passed to and from the controller but not actually used
in any way.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30806: Migrate to patron-title in member-flags
Martin Renvoize [Thu, 19 May 2022 11:34:01 +0000 (12:34 +0100)]
Bug 30806: Migrate to patron-title in member-flags

This patch updates the member-flags template to use the patron-title.inc
include wherever patron names are referenced.

Test plan
1) Navigate to a patron and click through to edit their permissions
2) Note how the patron name displays in the title, breadcrump and
   headings
3) Apply the patch and reload the page
4) Confirm the patron name still appears in each location and is
   consistently formatted and linked as you would expect

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 8b460db131f83e361788d53b3a101565eab302db)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30789: Improve performance of AddBiblio
Nick Clemens [Thu, 19 May 2022 19:21:27 +0000 (19:21 +0000)]
Bug 30789: Improve performance of AddBiblio

AddBiblio calls TransformMarcRecordToKoha. We are only interested in getting biblio and biblioitems info, so we can pass 'no_items' to save some field lookups

Benchmarking saw a ~75% increase in the performance of this call

To test:
1 - Stage and import some records
2 - Confirm it works the same before and after patch
3 - Add a biblio via cataloguing, confirm it works

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30677: Cleanup
Martin Renvoize [Tue, 28 Jun 2022 11:29:05 +0000 (12:29 +0100)]
Bug 30677: Cleanup

This patch cleans up the regular expression to remove the superflous
double check and use standard delimiters

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30677: Use lookahead in regex for biblioitem replacement
Martin Renvoize [Wed, 11 May 2022 15:47:59 +0000 (16:47 +0100)]
Bug 30677: Use lookahead in regex for biblioitem replacement

This patch takes Andrew's suggested fix using a lookahead regex to
correct our biblio vs biblioitem table name replacements.

Please use the preceeding unit test patch proposed by Jonathan to test.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be3bd8af8b1f2dbff33d2228eb64fa77fe9362f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30677: Add tests
Jonathan Druart [Fri, 6 May 2022 11:53:01 +0000 (13:53 +0200)]
Bug 30677: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de4fcc91f02e7d8da645388c7287ed942fa4bae8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30738: Log warnings for background MARC import
David Cook [Thu, 12 May 2022 04:09:58 +0000 (04:09 +0000)]
Bug 30738: Log warnings for background MARC import

This change logs warnings from the CGI background MARC import.

Test plan:
0) Apply patch
1) Export a record with an item
2) Update the 952$f subfield to "Circulation" (any value over 10 chars)
3) Import the record and try to add the item
4) The import will stay stuck with "Importing" status and 0% job
progress
5) Check the /var/log/koha/kohadev/intranet-error.log file
and notice there's an error with the following text:
"Data too long for column 'coded_location_qualifier' at row 1"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d8d9321e800e0ccfda895a9060b2800947982e8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30923: Remove EXPERIMENTAL mark on RESTOAuth2ClientCredentials
Tomas Cohen Arazi [Tue, 7 Jun 2022 19:56:34 +0000 (16:56 -0300)]
Bug 30923: Remove EXPERIMENTAL mark on RESTOAuth2ClientCredentials

The feature is not experimental at all.

To test:
1. Search for the RESTOAuth2ClientCredentials syspref
=> FAIL: It says it is an experimental feature
2. Apply this patch and reload
3. Repeat 1
=> SUCCESS: No longer marked as experimental
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 556a910021883e4d27d499747559dc2ee102ce05)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30877: use List::MoreUtils::uniq from recalls_to_pull.pl
Jonathan Druart [Wed, 1 Jun 2022 12:04:47 +0000 (14:04 +0200)]
Bug 30877: use List::MoreUtils::uniq from recalls_to_pull.pl

Test plan:
Confirm that "Recalls to pull" is still working correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a1807e56d29f1a13d9ba11aec7950f955fa7ebe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30539: (bug 24161 follow-up) Fix typo in DBrev
Jonathan Druart [Tue, 31 May 2022 05:58:59 +0000 (07:58 +0200)]
Bug 30539: (bug 24161 follow-up) Fix typo in DBrev

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30057: Move virtualshelf-related exceptions to a separate library
Tomas Cohen Arazi [Wed, 9 Feb 2022 13:05:12 +0000 (10:05 -0300)]
Bug 30057: Move virtualshelf-related exceptions to a separate library

This patch moves the not-generic virtualshelf-related exceptions to
their own file. Callers are adjusted as required.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Virtualshelves.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Check virtualshelves work as expected
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7704f51d5131d3f1104244a705294db614eae76e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30891: (QA follow-up) Add check to patron details page
Katrin Fischer [Mon, 6 Jun 2022 11:16:33 +0000 (13:16 +0200)]
Bug 30891: (QA follow-up) Add check to patron details page

Adds a similar check to the patron details shown when selecting
the details tab in the patron account in the staff interface.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30891: SMS provider shows on staff side even if SMS::Send driver is not set to...
Kyle M Hall [Thu, 2 Jun 2022 14:23:08 +0000 (10:23 -0400)]
Bug 30891: SMS provider shows on staff side even if SMS::Send driver is not set to "Email"

It appears that in my original submission ( Bug 9021 ),
I hid the SMS provider selector unless the SMS::Send
driver was set to "Email", but only on the OPAC,
not on the staff interface!

Test Plan:
1) Set SMSSendDriver to anything except "Email"
2) Note the SMS Provider pulldown shows in the patron editor
3) Apply this patch
4) Reload the page, SMS Provider id should now be gone
5) Set SMSSendDriver to "Email"
6) Reload the page, SMS Provider should now be shown

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29607: Store the discount amount correctly when importing and order from a file
Christophe TORIN [Wed, 1 Jun 2022 12:14:38 +0000 (14:14 +0200)]
Bug 29607: Store the discount amount correctly when importing and order from a file

This bug fixes how the discount amount for an order is stored, when an order is added to a basket using "From staged MARC records".

Test plan:
1. Export a record (without the items) (Tools > Catalog > Export data).
2. Delete the record from the catalog (including any items).
3. Stage the record for import (Tools > Catalog > Stage MARC records for import).
4. Create a new vendor with a discount of 25%. (Or select and existing vendor that has a discount). (Acquisitions > New vendor)
5. Create a new basket for the vendor. (Acquisitions > Manage orders > search for vendors > New > Basket).
6. Add to the basket using "From a staged file":
   . select "Add orders" next to the staged file
   . select the record to add to the order
   . enter a price
   . leave the discount field blank
   . select a fund
   . select "Save"
   ==> The order is created!
7. Modify the order - note that the discount is showing on the form as .25% instead of 25%, also note that the discount amount is calculated correctly.
8. Check what is recorded in the database:
   . koha-mysql kohadev
   . select * from aqorders;
   ==> discount field for the basket item shows as 0.2500
9. Change the discount to 25%. Run step 8 again - discount amount will be correctly shown as 25.0000
10. Apply the patch.
11. Repeat steps 1-9 - discount amount is shown and calculated correctly.
12. Test modifying the discount amount - should be calculated and shown correctly.
13. Sign off!

See additional comments in the bug description.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29871: Remove marcflavour param in Koha::Biblio->get_marc_notes
Fridolin Somers [Thu, 13 Jan 2022 07:05:29 +0000 (21:05 -1000)]
Bug 29871: Remove marcflavour param in Koha::Biblio->get_marc_notes

Test plan :
Display a biblio record with some MARC notes in details page and basket,
OPAC and staff
Run prove t/db_dependent/Koha/Biblio.t

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30026: Quick fix for SmsAlert Hint
Florian Bontemps [Fri, 4 Mar 2022 14:49:19 +0000 (14:49 +0000)]
Bug 30026: Quick fix for SmsAlert Hint

Just modifying the hint provided in patrons' messaging preferences to
allow either + or 00 for international formats.
No test plan needed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 26e8642f3fd04f5be850b87f8ad8cad5e60424a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30026: SMSAlert regex fixed for international
Florian Bontemps [Fri, 4 Feb 2022 15:40:33 +0000 (15:40 +0000)]
Bug 30026: SMSAlert regex fixed for international

When registering a phone number for SMS alerts, the number goes through
a regex filter to make sure the number is valid. One of the formats used
in Europe is 00 AAA XXXXXXXXX (A = country indicator) and it is not
supported.

This patch adjusts the regex to either accept 00 AAA XXXXXXXXX or
+AAAXXXXXXXXX in this case. (Note : +AAA and 00AAA are mutually exclusive).

To test:
1) You need to have installed a SMSAlert plugin. Make sure the
   SMSSendDriver syspref is also set up with your SMS plugin of choice.
2) Pick a patron and edit its profile.
3) In the messaging preferences fieldset, under SMS number, enter any
   number with the format 00 AAA XXXXXXXXX (ie : 00111123456789).
   Try to save the modification : you should have an error message.
4) Try instead a number with the format +AAAXXXXXXXXX (ie :
   111123456789), that one should be accepted.
5) Save your modification then check that the number has been changed.
6) Apply patch.
7) Repeat step 3 to 5.
8) Observe the error is gone.
9) Try it once more with the format +00 AAA XXXXXXXXX (+00111123456789),
   that format should not be accepted: this is intentional.
10) Sign off.

Thanks-to: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3dc883a1cc493a1208b16782f9b43a318de43ce8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30713: Patron entry should limit date of birth selection to dates in the past
Owen Leonard [Fri, 6 May 2022 15:21:43 +0000 (15:21 +0000)]
Bug 30713: Patron entry should limit date of birth selection to dates in the past

This patch adds to the configuration of the date of birth field in the
patron entry form so that the calendar widget prohibits the selection of
a date in the future.

To test, apply the patch and open a patron record for editing. Try to
select a birth date in the future using the calendar widget. You should
be limited to a selection of today or before.

Confirm that clicking the "Yesterday" and "Today" shortcuts in the
calendar widget works correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d16ca1069760f32df4c8bb8267fd24e21f812aa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30864: Add validation to password_expiry_days
Jonathan Druart [Wed, 1 Jun 2022 12:29:59 +0000 (14:29 +0200)]
Bug 30864: Add validation to password_expiry_days

When creating a patron category or editing an existing one, there is no validation for the "Password expiration" field.

If letters or other characters are entered, there is no error message and if not a number whatever is entered is not saved.

To test:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Add a new patron category (or edit an existing category).
3. For the "Password expiration" field, enter letters or characters such as L$%.
=> Note that you are prompted to "Please enter only digits"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79396ae625ac772e4a6c01f2649a7147a07cc7b7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29260: 210a is reported to Autor (meeting/conference) when upgrading an authority...
Marion Durand [Fri, 10 Sep 2021 14:25:34 +0000 (16:25 +0200)]
Bug 29260: 210a is reported to Autor (meeting/conference) when upgrading an authority through Z3950

When upgrading an authority with Z39.50, the field 2XX is sent into the
research grid.

The field 210a is sent into the search field "Author
(meeting/conference)". Or a collective authority is more often a
corporation than and meeting so librarian has to copy and paste this
data. (In unimarc field 210a is used both for corporation and meeting.)

This patch makes 210a field be sent into the search field "Author
(corporate)" instead of the "Author (meeting/conference)" one.

1- Find an authority with collectivity type (with a field 210a).
2- Click on "Edit" then on "Edit record"
3- Click on "Replace record via Z39.50/SRU search"
4- See that the field 210 is reported in the search grid in "Author
(meeting/conference)" field
5- Apply the patch
6- Go throug step 1 to 3 again
7- See that the field 210 is now reported in the search grid in "Author
(corporate)" field

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7306f945ce9cba653c298e0c84016b9c8a7bd582)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30778: Remove ModAuthInBatch
Nick Clemens [Mon, 16 May 2022 19:51:41 +0000 (19:51 +0000)]
Bug 30778: Remove ModAuthInBatch

1 - git grep ModAuthInBatch
2 - Confirm none of these occurences are calls
3 - Apply patch
4 - git grep ModAuthInBatch
5 - No occurences

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30778: Remove ModBiblioInBatch
Nick Clemens [Mon, 16 May 2022 19:50:20 +0000 (19:50 +0000)]
Bug 30778: Remove ModBiblioInBatch

To test:
1 - git grep ModBiblioInBatch
2 - Confirm these occurences are not calls
3 - Apply patch
4 - git grep ModBiblioInBatch
5 - No occurences

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 46fabf9bb52375db38268031ca9409a734fe7ce0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoUpdate release notes for 22.05.02 release v22.05.02
Lucas Gass [Wed, 29 Jun 2022 20:47:56 +0000 (20:47 +0000)]
Update release notes for 22.05.02 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoIncrement version for the 22.05.02 release
Lucas Gass [Wed, 29 Jun 2022 20:29:48 +0000 (20:29 +0000)]
Increment version for the 22.05.02 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoUpdate release notes for 22.05.01 release v22.05.01
Lucas Gass [Mon, 27 Jun 2022 15:35:45 +0000 (15:35 +0000)]
Update release notes for 22.05.01 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoIncrement version for the 22.05.01 release
Lucas Gass [Mon, 27 Jun 2022 14:50:03 +0000 (14:50 +0000)]
Increment version for the 22.05.01 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoTranslation updates for Koha 22.05.01
Koha translators [Mon, 27 Jun 2022 14:40:28 +0000 (11:40 -0300)]
Translation updates for Koha 22.05.01

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30971: (follow-up) Fix recall.branchcode occurences
Tomas Cohen Arazi [Wed, 15 Jun 2022 19:26:51 +0000 (16:26 -0300)]
Bug 30971: (follow-up) Fix recall.branchcode occurences

This fixes a couple cases actually.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 d0c4303c5a2a6b9548d140909114879505e9d943)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30971: (follow-up) Fix one more occurence
Tomas Cohen Arazi [Wed, 15 Jun 2022 19:18:08 +0000 (16:18 -0300)]
Bug 30971: (follow-up) Fix one more occurence

To test:
1. Run:
   $ git grep 'recall.itemnumber'
=> SUCCESS: No more occurences
2. Run:
   $ git grep 'recall.biblionumber'
=> SUCCESS: No more occurences
3. Run:
   $ git grep 'recall\->biblionumber'
=> SUCCESS: No more occurences
4. Run:
   $ git grep 'recall\->itemnumber'
=> FAIL: One standing occurence
5. Apply this patch
6. Repeat 4
=> SUCCESS: No more occurences
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 9991dc8811ab2235117e79aabcc746dd9e56085a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30971: Recalls log viewer error
Tomas Cohen Arazi [Wed, 15 Jun 2022 19:14:22 +0000 (16:14 -0300)]
Bug 30971: Recalls log viewer error

This patch addresses the itemnumber and biblionumber attributes for
recalls having been renamed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 b73ab06b48a38afbdddd3f6a190b2c63566db0a3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29325: [22.05.X] Fix commit_file.pl
Tomas Cohen Arazi [Tue, 26 Oct 2021 16:54:15 +0000 (13:54 -0300)]
Bug 29325: [22.05.X] Fix commit_file.pl

This patch fixes the broken commit_file.pl script.

It doesn't deal with commiting the import from the UI.

To test:
1. Pick a file for staging:
   $ kshell
  k$ misc/stage_file.pl --file TestDataImportKoha.mrc
=> SUCCESS: All good
2. Commit!
  k$ misc/commit_file.pl --batch-number 1
=> FAIL: You see
DBIx::Class::Storage::DBI::_exec_txn_begin(): DBI Exception: DBD::mysql::db begin_work failed: Already in a transaction at /kohadevbox/koha/C4/Biblio.pm line 303
3. Apply this patch
4. Repeat 2
=> SUCCESS: Commit succeeds
5. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29325: (QA follow-up) Remove unexisting parameters of BatchRevertRecords

There is no interval and callback as in BatchCommitRecords.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29325: Call progress callback one last time to confirm comppletion

Previously after finishing the loop we were still in a transaction that never completed - we should report progress when done
one final time to commit the last records

To test:
1 - Stage a file with > 100 records
2 - Commit file
3 - Confirm batch is imported and no records left as staged

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29325: Fix import from staff client

same test as before, but via the staff client

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29325: Handle the transaction in BatchCommitRecords

Requiring the callback to commit was breaking reversion, and likely elsewhere

Let's simplify and say that the routine iteself will handle the txn and commit

TO test:
1 - Stage a file
2 - Import a file
3 - Revert a file
4 - Test staff client and command line

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 29325: (QA follow-up) Tidy up

tools/manage-marc-import.pl: sub commit_batch does no longer need $schema
tools/manage-marc-import.pl: sub revert_batch: calling BatchRevertRecords which has no interval and callback
misc/commit_file.pl: sub print_progress_and_commit does no longer commit, renamed
misc/commit_file.pl: sub print_progress does no longer have a schema parameter
misc/commit_file.pl: sub revert_batch reported deleted items as added

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>