koha.git
23 months agoBug 30848: Add exec flag to test
Nick Clemens [Fri, 17 Jun 2022 13:09:02 +0000 (13:09 +0000)]
Bug 30848: Add exec flag to test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c926c976a7a5057c578d8f5d41f4cdaa1d8ab5e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30848: Fix issue exposed by unit tests
Martin Renvoize [Mon, 13 Jun 2022 13:26:33 +0000 (14:26 +0100)]
Bug 30848: Fix issue exposed by unit tests

This patch changes the 'map' to a simple for loop so that we can easily
map multiple subfields to a field without overwriting the first previous
subfields in the structure.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c381c4b22d30388f8e24966a6c6e7c78201dba3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30848: Expand unit tests
Martin Renvoize [Mon, 13 Jun 2022 13:25:30 +0000 (14:25 +0100)]
Bug 30848: Expand unit tests

Add to the unit tests to test Library and Itemtype expansions as well as
linking multiple subfields of the same marc field to such expansions.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6b04e3e18f1c534e3d7d91dde458d30e02e13f33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30848: Add an ExpandCodedFields RecordProcessor filter
Martin Renvoize [Thu, 26 May 2022 09:24:50 +0000 (10:24 +0100)]
Bug 30848: Add an ExpandCodedFields RecordProcessor filter

This patch introduces a RecordProcessor filter for MARC::Record objects
that replaces Koha codes with descriptions in the MARC::Record passed to the processor.

Target usage:

  my $biblio = Koha::Biblios->find(
      $biblio_id,
      { prefetch => [ metadata ] }
  );

  my $record = $biblio->metadata->record;

  my $processor = Koha::RecordProcessor->new(
    {
        filters => ('ExpandCodedFields'),
        options => {
            interface     => 'opac',
            frameworkcode => $biblio->frameworkcode
        }
    }
  );

  $processor->process( $record );

Test plan
* Read the included unit test and confirm it makes sense and passes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62bba6d9e12bdf9e3dbf231beae68afe43618f4b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: DBRev 22.05.03.002
Lucas Gass [Fri, 29 Jul 2022 17:10:58 +0000 (17:10 +0000)]
Bug 30889: DBRev 22.05.03.002

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: Update Scheme(DBIC)
Lucas Gass [Fri, 29 Jul 2022 17:08:00 +0000 (17:08 +0000)]
Bug 30889: Update Scheme(DBIC)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: Add comment for the new DB field
Tomas Cohen Arazi [Thu, 30 Jun 2022 14:52:52 +0000 (11:52 -0300)]
Bug 30889: Add comment for the new DB field

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: Unit tests - process
Martin Renvoize [Mon, 20 Jun 2022 15:27:51 +0000 (16:27 +0100)]
Bug 30889: Unit tests - process

This patch adds corresponding unit tests for the 'process' side of this
patchset. We check that the Context for the job to run in as set from
the Job context recorded at enqueue time.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: Unit tests
Martin Renvoize [Mon, 20 Jun 2022 15:01:28 +0000 (16:01 +0100)]
Bug 30889: Unit tests

This patch adds a unit test for the 'enqueue' part of the bug. We check
that the mocked context (and interface) are recorded with the job
enqueue in the new 'context' field.

We do not yet test the 'process' end, where we then read the context out
and set the job Context from it.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: Fix atomic update permissions
Kyle M Hall [Fri, 17 Jun 2022 18:00:36 +0000 (18:00 +0000)]
Bug 30889: Fix atomic update permissions

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: (follow-up) Record and use context in background_jobs
Martin Renvoize [Fri, 10 Jun 2022 13:09:21 +0000 (14:09 +0100)]
Bug 30889: (follow-up) Record and use context in background_jobs

This patch records the current context to the background_jobs table at
enqueue time and then uses that record to set the context at process
time.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: (follow-up) Add context field to background_jobs
Martin Renvoize [Fri, 10 Jun 2022 13:06:22 +0000 (14:06 +0100)]
Bug 30889: (follow-up) Add context field to background_jobs

This patch adds a new 'context' field to the background_jobs table to
record the context in which the job was queued.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: Set interface to 'intranet'
Jonathan Druart [Tue, 7 Jun 2022 12:41:14 +0000 (14:41 +0200)]
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 44b74010b1d45bda2ce2f8c58f282570566238fc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30889: Set userenv for background jobs
Jonathan Druart [Tue, 7 Jun 2022 12:39:44 +0000 (14:39 +0200)]
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 0f2425a2433adc380b9bd06c7fdd20d5d7a268a6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 31058: Fix import AutoUnsuspendHolds
Nick Clemens [Tue, 28 Jun 2022 10:06:57 +0000 (10:06 +0000)]
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 6c315c164dbcf3e05fcfe4a3110b824ab3ac162c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30939: Fix use statement for DelAuthority
Katrin Fischer [Fri, 17 Jun 2022 22:34:45 +0000 (22:34 +0000)]
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 df393b38b8102b4d304b79cb2ba2e73caf8187bd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 30775: Make 952w to have datepicker plugin by default
Petro Vashchuk [Mon, 16 May 2022 14:04:18 +0000 (17:04 +0300)]
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 b25dfb50a10390e1fa4f66c40ecc6da7aeb3af79)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 26486: Group edit buttons in reports toolbar
Owen Leonard [Wed, 23 Mar 2022 14:11:47 +0000 (14:11 +0000)]
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 22afd8b4e7be875f737a4dd86d9f69e4ca117ce1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
23 months agoBug 31053: Add Context module to Koha::Encryption
Marcel de Rooy [Mon, 27 Jun 2022 08:59:30 +0000 (08:59 +0000)]
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 147f6e0293ce5817bca450a54c83213c7f0f1585)

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

23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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)

23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>