koha.git
23 months agoBug 30733: Simplify translatable strings
Victor Grousset/tuxayo [Wed, 11 May 2022 15:08:32 +0000 (17:08 +0200)]
Bug 30733: Simplify translatable strings

And a few minor fixes when they where causing issues for
translatability.
And rephrased a string about password reset to have it identical to
other strings with the same meaning.

Simplified via wrapping strings with <span> to split to huge
concatenated strings with a lot of %s everywhere.

== Test plan ==
This patch needs mainly proof reading. Still it's possible to do some
basic testing to demonstrate that adding a <span> in an IF doesn't
break anything.
Pick in one of the 110 modified templates a string that you know how to
display. Otherwise:
1. acquisitions => vendor => basket => add to basket =>
   search "from existing record" => add order
2. Cancel the order
3. You see without issue "Bibliographic record will not be deleted"
4. administration => Patron categories
5. Try to delete a used and unused category
6. You see as expected
   Category XXXX is in use. Deletion not possible!
   and
   Confirm deletion of category XXXX

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30924: DBRev 22.06.00.003
Tomas Cohen Arazi [Thu, 16 Jun 2022 14:36:43 +0000 (11:36 -0300)]
Bug 30924: DBRev 22.06.00.003

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
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>
23 months 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>
23 months 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>
23 months 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>
23 months agoBug 30420: Rename Koha::Patron->get_overdues with ->overdues
Jonathan Druart [Wed, 27 Apr 2022 11:33:09 +0000 (13:33 +0200)]
Bug 30420: Rename Koha::Patron->get_overdues with ->overdues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 29623: (QA follow-up) Add POD to Koha::CirculationRules
Martin Renvoize [Fri, 10 Jun 2022 07:18:37 +0000 (08:18 +0100)]
Bug 29623: (QA follow-up) Add POD to Koha::CirculationRules

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 29623: (QA follow-up) Add POD to Koha::Cache::Lite
Martin Renvoize [Fri, 10 Jun 2022 07:11:28 +0000 (08:11 +0100)]
Bug 29623: (QA follow-up) Add POD to Koha::Cache::Lite

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 29623: Don't flush the whole L1 cache
Jonathan Druart [Tue, 31 May 2022 05:36:57 +0000 (07:36 +0200)]
Bug 29623: Don't flush the whole L1 cache

We shouldn't flush L1 cache completely, only the values related to the
circulation rules.
It is not correct to update the value of the value we are currently
setting (because of the inheritance concept of the circ rules).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 29623: Cache circulation rules
Jonathan Druart [Thu, 2 Dec 2021 16:27:43 +0000 (17:27 +0100)]
Bug 29623: Cache circulation rules

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>
23 months agoBug 30917: Improve course reserves breadcrumbs
Owen Leonard [Tue, 7 Jun 2022 11:33:48 +0000 (11:33 +0000)]
Bug 30917: Improve course reserves breadcrumbs

This patch adds course name to the breadcrumbs and page title on the
pages for adding items to a course.

To test, apply the patch and go to course reserves.

- Click a course to view it.
- Click the "Add reserves" button.
- In the breadcrumbs you should see:

  Home > Course reserves > [Course name] > Add reserves

- [Course name] should link correctly to the course detail view. In the
  page title you should see:

  Add reserves > [Course name] > Course reserves > Home

- Enter a barcode or biblionumber and proceed to the next step. Confirm
  that the same changes are in effect on the second page.
- Perform the same tests in the "Batch add reserves" process.

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>
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>
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>
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>
23 months agoBug 30824: (follow-up) POD
Martin Renvoize [Tue, 24 May 2022 14:29:04 +0000 (15:29 +0100)]
Bug 30824: (follow-up) POD

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30824: Improve performance of BatchCommitItems
Nick Clemens [Fri, 20 May 2022 14:29:58 +0000 (14:29 +0000)]
Bug 30824: Improve performance of BatchCommitItems

This makes two simple changes:
- Limit TransformMarcToKoha to the fields we need
- Pass forward the biblioitemnumber when adding items to a new biblionumber

Profiling with NYTProf I saved ~8-9 seconds importing around 400 bibs/1000 items

Reducing calls in item store to use a passed biblionumber was the largest gain.

To test:
1 - Import some records and items
2 - Verify values etc., revert
3 - Apply patch
4 - Import again
5 - Verify values etc. same as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
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>
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>
23 months agoBug 30912: Fix db rev 21.12.00.016
Tomas Cohen Arazi [Mon, 13 Jun 2022 13:17:22 +0000 (10:17 -0300)]
Bug 30912: Fix db rev 21.12.00.016

This is a mix of Nick's patch and Jonathan's comment on it. I tested it
with KTD using MySQL 8 and it works correctly.

To test:
1. Launch KTD with bells and whistles:
   $ docker compose -f docker-compose.yml \
                    -f docker-compose.mysql8.0.yml \
                    up -d
2. Inside of it, do:
   $ koha-mysql kohadev
   > update systempreferences set value="21.1200015" where variable="version";
   > \q
   $ restart_all
   $ updatedatabase
=> SUCCESS: All good :-D
3. Run:
   $ koha-mysql kohadev
   > update systempreferences set value="21.1200015" where variable="version";
   > ALTER TABLE user_permissions DROP PRIMARY KEY;
   > \q
   $ updatedatabase
=> FAIL: You get:
Upgrade to 21.12.00.016  [12:47:09]: Bug 30060 - Update user_permissions to add primary key and remove null option from code column
ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `PRIMARY`' at line 1 at /kohadevbox/koha/C4/Installer.pm line 739
4. Apply this patch
5. Run:
   $ updatedatabase
=> SUCCESS: Update goes well
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30883: Authorities merge is limited to 100 biblio with Elasticsearch
Fridolin Somers [Thu, 2 Jun 2022 07:23:23 +0000 (21:23 -1000)]
Bug 30883: Authorities merge is limited to 100 biblio with Elasticsearch

In C4::AuthoritiesMarc::merge, we search all biblio records using an authority with Koha::Authorities->linked_biblionumbers().
This method uses simple_search_compat() with no results limit, even saying in comment :
https://git.koha-community.org/Koha-community/Koha/src/commit/44d6528b566e5c16eba9b15f8aa24667293766c3/Koha/Authorities.pm#L80

With Zebra searchengin it is correct.

But not with Elasticsearch, there is an hardcoded limit at 100 in case no limit is given :
https://git.koha-community.org/Koha-community/Koha/src/commit/44d6528b566e5c16eba9b15f8aa24667293766c3/Koha/SearchEngine/Elasticsearch/Search.pm#L346

This means authorities links are wrong after a merge or an edit in case the authority is used in more than 100 biblio records.

:(

I propose to fix by using by default the real server max given by Koha::SearchEngine::Elasticsearch::Search::max_result_window().
This will allow a huge limit nearly impossible to reach.
See Bug 30882 to how increase this limit.

Test plan :
1) Use Elasticsearch search engine
2) Use an authority id=111 linked to 200 biblio records
3) Perform a search 'an:111', you get 200 results
4) Create a new authority id=222 linked to 2 biblio records
5) Perform a search 'an:222', you get 2 results
6) Perform a merge of the two authorties, keeping id=222
7) Perform a search 'an:111'
   without patch you get 100 results
   with patch you get no results
8) Perform a search 'an:222'
   without patch you get 102 results
   with patch you get 202 results

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>
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>
23 months agoBug 30924: DBIC update
Tomas Cohen Arazi [Thu, 9 Jun 2022 15:03:48 +0000 (12:03 -0300)]
Bug 30924: DBIC update

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>
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>
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>
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>
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>
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>
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>
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>
23 months agoBug 30907: Fix incorrect uses of Koha::Recall->item_level_recall
Tomas Cohen Arazi [Thu, 9 Jun 2022 13:22:16 +0000 (10:22 -0300)]
Bug 30907: Fix incorrect uses of Koha::Recall->item_level_recall

This attribute name was changed to *item_level* but this two remaining
places kept calling it with the old name.

To test, verify things don't explode when looking at checkouts with
recalls and also in the log viewer.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
23 months agoBug 30844: Ensure that allow_nonref is enabled when using older versions of JSON
Kevin Carnes [Thu, 9 Jun 2022 06:12:56 +0000 (08:12 +0200)]
Bug 30844: Ensure that allow_nonref is enabled when using older versions of JSON

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30813: (follow-up) Fix tests import
Tomas Cohen Arazi [Wed, 8 Jun 2022 16:41:14 +0000 (13:41 -0300)]
Bug 30813: (follow-up) Fix tests import

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30508: Do not display OPAC message about block from holds when OPACHoldRequests...
Owen Leonard [Thu, 14 Apr 2022 12:39:05 +0000 (12:39 +0000)]
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled

This patch adds a check for the OPACHoldRequests to determine whether a
message should be shown to patrons whose account is over the
maxoutstanding limit.

To test, apply the patch and set the "maxoutstanding" system preference
to a low value. Set OPACHoldRequests to "Allow."

- Log in to the OPAC as a patron who has outstanding fines or charges
  which exceed the maxoutstanding value you set.
- You should see a message on the "Your summary" page, "Holds are
  blocked because your fine balance is over the limit."
- Set OPACHoldRequests to "Don't allow" and refresh the "Your summary"
  page in the OPAC. The message should disappear.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
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>
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>
23 months agoBug 30813: (QA follow-up) Adjust three use statements
Marcel de Rooy [Tue, 7 Jun 2022 12:44:03 +0000 (12:44 +0000)]
Bug 30813: (QA follow-up) Adjust three use statements

Altough we used the namespace when calling, the intention of
bug 17600 was that we do import the routines that we are
calling here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30813: (follow-up) Correct C4::Breeding call
Nick Clemens [Thu, 26 May 2022 11:54:44 +0000 (11:54 +0000)]
Bug 30813: (follow-up) Correct C4::Breeding call

This patch changes the call to use the fully qualified name and
adds import to C4::Breeding, Koha::MetaSearcher, and removes import
from Koha::MetadataRecord

Additionally it replaces missing fields from the update to using TransformMarcToKoha

Lastly, it reduces the fields used when saving the bredding record to the reservoir

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30813: (follow-up) ImportBatch updates
Nick Clemens [Fri, 20 May 2022 11:26:29 +0000 (11:26 +0000)]
Bug 30813: (follow-up) ImportBatch updates

Missed these in the original commits

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30813: Remove Koha::MetadataRecord::getKohaField
Nick Clemens [Fri, 20 May 2022 10:08:11 +0000 (10:08 +0000)]
Bug 30813: Remove Koha::MetadataRecord::getKohaField

This was essentially a wrapper around TransformKohaToMarcOneField

After changing and updating, it seems easier not to create the intermediary
object and to just transform the data

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30813: Remove TransformMarcToKohaOneField
Nick Clemens [Thu, 19 May 2022 21:39:49 +0000 (21:39 +0000)]
Bug 30813: Remove TransformMarcToKohaOneField

To test:
1 - prove -v t/db_dependent/Biblio/TransformMarcToKoha.t t/db_dependent/Breeding.t
2 - Test Z3950 search in advanced catalog editor

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30813: Adjust TransformMarcToKoha to take kohafields parameter
Nick Clemens [Thu, 19 May 2022 20:10:35 +0000 (20:10 +0000)]
Bug 30813: Adjust TransformMarcToKoha to take kohafields parameter

This adjusts the routine to accept an arrayref of koha fields to process

To test:
prove -v t/db_dependent/Biblio/TransformMarcToKoha.t t/Biblio.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30813: Update TransformMarcToKoha to accept a hashref
Nick Clemens [Thu, 19 May 2022 19:53:16 +0000 (19:53 +0000)]
Bug 30813: Update TransformMarcToKoha to accept a hashref

This patch updates all the calls to pass a hasref rather than an array

It also removes the no longer used framework parameter

To test:
prove -v t/Biblio.t t/db_dependent/Biblio/TransformMarcToKoha.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
23 months agoBug 30850: DBRev 22.06.00.002
Tomas Cohen Arazi [Wed, 8 Jun 2022 14:25:26 +0000 (11:25 -0300)]
Bug 30850: DBRev 22.06.00.002

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30850: (QA follow-up) Cosmetic changes to atomic update
Marcel de Rooy [Fri, 3 Jun 2022 06:23:38 +0000 (06:23 +0000)]
Bug 30850: (QA follow-up) Cosmetic changes to atomic update

No need to encode, etc.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30850: dbrev to inform existing users of the mapping change
Caroline Cyr La Rose [Thu, 2 Jun 2022 14:21:09 +0000 (10:21 -0400)]
Bug 30850: dbrev to inform existing users of the mapping change

This patch adds a message in a dbrev to inform users of existing
installations that they might want to add a mapping from 110$a to
biblio.author

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>
23 months agoBug 30850: Add default mapping for biblio.author to 110$a (MARC21)
Caroline Cyr La Rose [Wed, 25 May 2022 22:43:33 +0000 (18:43 -0400)]
Bug 30850: Add default mapping for biblio.author to 110$a (MARC21)

This patch adds a mapping to biblio.author in 110$a in the default framework

Note: I added lots of tests for different scenarios, I'm not sure it's necessary to test everything. I don't want this to be a deterrent! The first one is necessary, the rest are use cases.

Note 2: I don't work with ktd so maybe the steps for loading new frameworks are different, sorry about that, I honestly don't know another way to do it.

Test 1 - basic test
Before applying patch,
1- Create a new record with a corporate author (110$a)
2- Query the database, author should be null
select author from biblio where biblionumber = XXXX;

(do other control tests if you want/need before applying the patch)

3- Apply patch
4- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
5- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
6- Edit the record, don't change anything and save it
7- Query the database, author should be filled
8- Go to Administration > MARC Bibliographic framework test, everything should be OK

Test 2 - checkouts table
Before applying patch,
1- Create a new record and item with a corporate author (110$a)
2- Checkout the item for that record to a patron
Note that the author is not listed in the checkouts table
3- Apply patch
4- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
5- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
6- Edit the record, don't change anything and save it
7- Refresh the checkouts table, the author should be listed

Test 3 - notices and slips
Before applying patch,
1- Go to Tools > Notices & slips
2- Edit ISSUESLIP and add <<biblio.author>> after <<biblio.title>>
3- Save the notice
4- Create a new record and item with a corporate author (110$a)
5- Checkout the item for that record to a patron
6- Print the checkout slip
Note that the author is not listed on the slip
7- Apply patch
8- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
9- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
10- Edit the record, don't change anything and save it
11- Print the checkout slip, the author should be listed

Test 4 - labels
Before applying the patch,
1- Create a new record and item with a corporate author (110$a)
2- Go to Tools > Label Creator
3- Create a label batch with that item
4- Export the batch in PDF using the Avery 5160 template and 'Label test' layout
Note that the author is not listed
5- Apply patch
6- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
7- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
8- Edit the record, don't change anything and save it
9- Export the label batch again, the author should be listed

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>
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>
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>
23 months agoBug 30899: Correct dbrev 211200041
Marcel de Rooy [Tue, 7 Jun 2022 14:11:23 +0000 (14:11 +0000)]
Bug 30899: Correct dbrev 211200041

Replace DROP CONSTRAINT by DROP FOREIGN KEY.

Note: It seems that we do not need a new dbrev for master. A developer
could follow test plan below to correct if really needed.

Test plan:

NOTE: When you check show create table, verify that you see an index for category_code and a foreign key called borrower_attribute_types_ibfk_1.

[1] cp installer/data/mysql/db_revs/211200041.pl installer/data/mysql/atomicupdate/
[2] run updatedatabase; check show create table
[3] alter table borrower_attribute_types drop foreign key borrower_attribute_types_ibfk_1; alter table borrower_attribute_types drop index category_code; RUN updatedatabase again; check show create table
[4] alter table borrower_attribute_types drop foreign key borrower_attribute_types_ibfk_1; ALTER TABLE borrower_attribute_types ADD CONSTRAINT category_code_fk FOREIGN KEY (category_code) REFERENCES categories(categorycode); RUN updatedatabase again; check show create table
[5] rm installer/data/atomicupdate/211200041.pl

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 13614: Compiled CSS
Tomas Cohen Arazi [Tue, 7 Jun 2022 12:36:31 +0000 (09:36 -0300)]
Bug 13614: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 13614: Replace usage of YUI on basket groups page
Owen Leonard [Thu, 26 May 2022 16:44:35 +0000 (16:44 +0000)]
Bug 13614: Replace usage of YUI on basket groups page

This patch updates the basket groups interface so that it doesn't rely
on YUI to move baskets in and out of groups. The patch also removes
all YUI assets and many long-obsolete references to YUI-related classes
and IDs.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

- Go to Acquisitions.
- Locate a vendor with multiple closed baskets.
- Click "Basket groups" in the sidebar menu.
- Create or edit a basket group.
- On the basket group page you should see the basket group form in one
  column and ungrouped baskets in another.
- Both grouped and ungrouped baskets should be in a sortable
  DataTable.
- Test that when you click the "Add to group" button on an ungrouped
  basket the row is removed from the table of ungrouped baskets and
  added to the table of grouped baskets.
  - The button text on the row should now read "Remove."
- Test the reverse operation: Clicking "Remove" on a grouped basket
  should move it to the table of ungrouped baskets.
- Test that when all baskets are moved out of either of the tables a row
  is displayed with a message specific to that table, e.g. "There are no
  ungrouped baskets."
- Test that the basket group saves correctly when zero or more baskets
  are added to the group.

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>
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>
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>
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>
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>
23 months 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>
23 months 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>
23 months 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>
23 months agoBug 30388: Fix some errors in the template for ordering from a MARC file
Owen Leonard [Mon, 28 Mar 2022 17:28:50 +0000 (17:28 +0000)]
Bug 30388: Fix some errors in the template for ordering from a MARC file

This patch fixes a few markup errors in the addorder2709 template. The
modal dialog markup is corrected and moved out of the loop of records so
that it doesn't create repeating id attributes. Obsolete CSS is removed,
fixing the width of the MARC preview modal.

The calendar include is added, fixing a Flatpickr error in the console.

Double ID attributes are removed from the Statistics 1 and Statistics 2
fields.

To test, apply the patch and test the process of adding an order to a
basket from a staged MARC file. Test in particular:

 - The MARC and Card previews
 - The "Date acquired" field under the "Item information" tab should
   trigger a Flatpickr widget.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30384: (follow-up) Add markup comments
Owen Leonard [Mon, 28 Mar 2022 14:38:51 +0000 (14:38 +0000)]
Bug 30384: (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: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30384: Reindent template for ordering from a MARC file
Owen Leonard [Mon, 28 Mar 2022 14:11:19 +0000 (14:11 +0000)]
Bug 30384: Reindent template for ordering from a MARC file

This patch updates the template for ordering from a MARC file so that
the indentation is consistent.

This patch does not fix a couple of bugs which will be fixed in a later
patch: The MARC modal window has the wrong width, and there is a
Flatpickr error in the console.

To test apply the patch and go to Acquisitions -> Vendor -> Basket ->
Add to basket -> From a staged file.

- Click "Add orders" next to the staged file you want to use.
- On the "Add orders" page, test that everything still works correctly:
- Tabs work correctly
- JavaScript controls (select all, show inactive, etc.) work
- MARC and Card previews work
- Adding orders works

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months agoBug 30636: Show notforloan availability correctly in ILS-DI
David Cook [Thu, 28 Apr 2022 05:48:33 +0000 (05:48 +0000)]
Bug 30636: Show notforloan availability correctly in ILS-DI

This patch adds the Koha::Item->is_notforloan() method which checks
the item status of "notforloan" and it checks the effective item type
to see if it's marked as "notforloan". This change brings ILS-DI in line
with the catalogue which displays "Not for loan" for both those scenarios.

0. Don't apply patch yet
1. Enable ILS-DI system preference
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI
2. Change Item types to "Not for Loan" for Books
http://localhost:8081/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=BK
3. Note that book is listed as "Not for loan" in catalogue
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29&searchid=scs_1651115075364
4. Note that book is listed as "available" via ILS-DI
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=29&id_type=bib

5. Apply patch and restart starman (ie koha-plack --restart kohadev)

6. Note that book is listed as "not available" and "Not for loan" via ILS-DI
http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=29&id_type=bib

--

7. prove t/db_dependent/Koha/Item.t

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>
23 months agoBug 30844: The OPAC detail page's browser is limited to the current page of results...
Kevin Carnes [Wed, 25 May 2022 10:54:25 +0000 (10:54 +0000)]
Bug 30844: The OPAC detail page's browser is limited to the current page of results when using Elasticsearch

When viewing the detail page of the first or last record of a result page,
it's not possible to browse to another page when using Elasticsearch.

To test:
1) Search for "*" in the OPAC
2) Click on the last result of the page
3) Observe that you cannot browse to the next page
4) Apply the patch
5) Search for "*" in the OPAC
6) Click on the last result of the page
7) Observe that you can browse to the next page
8) Sign off

Sponsored-by: Lund University Library
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>
23 months agoBug 30726: Fix "yesterday" when limited to past dates
Jonathan Druart [Wed, 1 Jun 2022 12:36:52 +0000 (14:36 +0200)]
Bug 30726: Fix "yesterday" when limited to past dates

Test plan:
Go to "Patrons with no checkouts" report, /cgi-bin/koha/reports/borrowers_out.pl
Select "Yesterday"
=> it automatically selects the previous day's date and populates the form field

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>
23 months agoBug 30746: Fix JS error on opac-memberentry
Jonathan Druart [Wed, 1 Jun 2022 12:54:34 +0000 (14:54 +0200)]
Bug 30746: Fix JS error on opac-memberentry

Empty PatronSelfRegistrationBorrowerMandatoryField and PatronSelfRegistrationBorrowerUnwantedField
Go to opac-memberentry.pl
Notice the JS error
  Uncaught TypeError: j is undefined
Apply this patch
Go to opac-memberentry.pl
=> no JS error
Fill the pref with some values
Go to opac-memberentry.pl
=> Confirm that the fields you marked as mandatory as flagged accordinly
on the UI

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>
23 months agoBug 23659: DBRev 22.06.00.001
Tomas Cohen Arazi [Mon, 6 Jun 2022 14:43:41 +0000 (11:43 -0300)]
Bug 23659: DBRev 22.06.00.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 23659: (follow-up) Correct syspref.sql to match atomicupdate
Nick Clemens [Mon, 23 May 2022 12:59:03 +0000 (12:59 +0000)]
Bug 23659: (follow-up) Correct syspref.sql to match atomicupdate

Missed updating this file when I added another option and renamed another

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 23659: Add DefaultHoldPickupLocation system preference
Nick Clemens [Wed, 18 May 2022 14:21:35 +0000 (14:21 +0000)]
Bug 23659: Add DefaultHoldPickupLocation system preference

On the staff side behaviour differs for default pickup location when placing a hold or
placing an overridden hold. Additionally, the behaviour has changed betwee master and stables

We should provide a consistent default, and allow the library to specify their choice

Note this only affects staff client as there is only a single dropdown on OPAC and it is not
tied to items

To test:
 1 - Apply patch
 2 - Update database
 3 - Find a record with items from various branches, and at least one with a different home/holding branch
 4 - Ensure there is an item that requires override to hold, and  AllowHoldPolicyOverride  is enabled
 4 - Attempt to place hold
 5 - Confirm all dropdowns default to logged in library
 6 - Set DefaultHoldPickupLocation to item's home branch
 7 - Refresh and confirm all dropdowns match item home library except biblio level hold - still logged in library
 8 - Set DefaultHoldPickupLocation to item's holding branch
 9 - Refresh and confirm defaults
10 - Mark one of the items holding library as 'not a pickup location' in Admin->Libraries
11 - Refresh and confirm dropdown is now empty for that item

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30893: Fix documentation in update_patrons_category.pl
Nick Clemens [Fri, 3 Jun 2022 11:35:34 +0000 (11:35 +0000)]
Bug 30893: Fix documentation in update_patrons_category.pl

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>
23 months agoBug 30868: (bug 29684 follow-up) Fix borrowernumber var in template
Jonathan Druart [Tue, 31 May 2022 06:23:30 +0000 (08:23 +0200)]
Bug 30868: (bug 29684 follow-up) Fix borrowernumber var in template

borrower_data does not contain the borrowernumber, it is sent
separately.

Test plan:
1. Edit a patron record (for example: Henry Acevedo).
2. Note that the URL is http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=19
3. Change date of birth to yesterday.
4. Save.
5. Error message displayed above the Save and Cancel buttons:
   The following fields are wrong. Please fix them.
   - Patron's age is incorrect for their category. Ages allowed are 18-999.
6. Note that the URL is now http://127.0.0.1:8081/cgi-bin/koha/members/memberentry.pl
7. Fix date of birth (for example: change year to 2000).
8. Select Save.
=> Without this patch you get: "Patron not found. Return to search."
=> With this patch applied the patron's data is saved

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>
23 months agoBug 30884: Fix jQuery selector to correctly detect active tab
Slava Shishkin [Fri, 3 Jun 2022 14:47:46 +0000 (17:47 +0300)]
Bug 30884: Fix jQuery selector to correctly detect active tab

To reproduce:
1. Go to /tools/modborrowers.pl and fill form Card number list with data and click Continue.
2. It should give "No patron card numbers or borrowernumbers given." warning.
3. Using the browser inspector tool see that post fields cardnumberlist or borrowernumberlist
   is sent with empty data.

Apply the patch, and then:
1. Fill form Card number or Borrowernumber list and click Continue.
2. Get the result: table with patrons for editing or warning about not found number.
3. Using the inspector tool see that request has data from the active tab in the form.

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>
23 months agoBug 30886: Show pending recall on item on OPAC
Aleisha Amohia [Thu, 2 Jun 2022 22:59:56 +0000 (22:59 +0000)]
Bug 30886: Show pending recall on item on OPAC

The 'completed' flag was causing the wrong status to be shown, but we
can also give a more useful message to the patron.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Go back to the OPAC record page and look at the holdings table.
Notice the status still says the item is Available.
7) Apply patch, restart services, refresh the OPAC.
8) Confirm the holdings table status now says the item has a pending
recall.

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30892: (bug 30742 follow-up) Send single bib as a holdable bib
Nick Clemens [Thu, 2 Jun 2022 17:24:21 +0000 (17:24 +0000)]
Bug 30892: (bug 30742 follow-up) Send single bib as a holdable bib

To test:
1. Try placing hold
2. Everything seems to work but no hold gets placed.
3. Apply patch
4. Verify holds are no placed correctly.

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>
23 months agoBug 30885: Display recall data correctly
Aleisha Amohia [Thu, 2 Jun 2022 21:23:55 +0000 (21:23 +0000)]
Bug 30885: Display recall data correctly

This page does not pull the recall columns correctly.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place an item-level recall on that item.
5) Go back to the staff interface and search for the item. Confirm that when you go
to the record detail page, it explodes and errors are shown.
6) Apply patch and refresh page.
7) Confirm page loads as expected.
8) Check the Status information for the item in the Holdings table.
Confirm it shows the recall information correctly.
9) Check in the item and confirm the recall as waiting for Patron A.
10) Go back to the record detail page and confirm the Status information
for the item shows as Waiting in the Holdings table.

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30876: (follow-up) Use the $biblio object even further
Tomas Cohen Arazi [Wed, 1 Jun 2022 13:12:05 +0000 (10:12 -0300)]
Bug 30876: (follow-up) Use the $biblio object even further

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30876: Use Koha::Biblio
Jonathan Druart [Wed, 1 Jun 2022 11:59:09 +0000 (13:59 +0200)]
Bug 30876: Use Koha::Biblio

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30876: Fix wrong call to ->search in list context
Tomas Cohen Arazi [Wed, 1 Jun 2022 11:16:00 +0000 (08:16 -0300)]
Bug 30876: Fix wrong call to ->search in list context

The code is clearly incorrect as ->search no longer returns a list when
called in list context.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 30756: (follow-up) Restore MARC21 authority file
Tomas Cohen Arazi [Sun, 5 Jun 2022 23:24:03 +0000 (20:24 -0300)]
Bug 30756: (follow-up) Restore MARC21 authority file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30840: Add support for barcode filters to course reserves
Nick Clemens [Tue, 24 May 2022 18:27:30 +0000 (18:27 +0000)]
Bug 30840: Add support for barcode filters to course reserves

This bug adds support for barcode filters on the inputs in the course reserves module.

To test:
1 - Set itemBarcodeInputFilter to 'Remove spaces from'
2 - Find a barcode in your system and add spaces between each characters
    e.g. 3 9 9 9 9 0 0 0 0 0 0 8 1 8
3 - Past that barcode into the checkin box, success
4 - Browse to course reserves, ensure you have a course or create on
5 - Test adding a reserve, batch adding a reserve, and batch removing reserves
6 - The pasted barcode does not in any
7 - Apply patch and restart
8 - Pasted barcode with spaces can now successfuly be added, batch added, and batch removed from courses

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29961: Make horizontal scroll bar always visible on acqui/z3950_search.pl
Lucas Gass [Thu, 27 Jan 2022 16:55:34 +0000 (16:55 +0000)]
Bug 29961: Make horizontal scroll bar always visible on acqui/z3950_search.pl

To test:
1. In Acquisitions make a basket and add something "From an external source"
2. Search for a title and click on the 'MARC' button, make sure the MARC prview is both tall and wide.
3. You will not see the horizontal scroll bar unless you scroll all the way to the bottom of the preview.
4. Apply patch.
5. Try steps 1 & 2 again, this time you should see the horizontal scroll bar as soon as the MARC prveiw loads.

Note: I put the CSS on multiple lines for better readability

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>
2 years agoBug 30756: Rename to Koha_MetadataRecord_Authority
Marcel de Rooy [Sat, 14 May 2022 12:29:25 +0000 (12:29 +0000)]
Bug 30756: Rename to Koha_MetadataRecord_Authority

What we are actually testing here.

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
JD amended patch: remove Dumper

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30756: Further adjustments to Koha_Authority.t
Marcel de Rooy [Sat, 14 May 2022 12:07:17 +0000 (12:07 +0000)]
Bug 30756: Further adjustments to Koha_Authority.t

Remove use of exported_records file in favor of TestBuilder.
Remove conditional tests with SKIP block. Create reservoir record.

Test plan:
Run t/db_dependent/Koha_Authority.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
2 years agoBug 30756: Ground work for improving Koha_Authority.t
Marcel de Rooy [Sat, 14 May 2022 07:42:42 +0000 (07:42 +0000)]
Bug 30756: Ground work for improving Koha_Authority.t

Move stuff into two subtests.

Test plan:
Run t/db_dependent/Koha_Authority.t.
If you have no imported auths, you will still see skips.

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