Commit graph

45967 commits

Author SHA1 Message Date
a31de974c7 Bug 31351: (QA follow-up) Extend the encode/decode test
Adding some Unicode stuff.
And missing txn couple.

Test plan:
Run t/db_dependent/Koha/BackgroundJob.t

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 21:36:23 +00:00
1a71acc8ee Bug 31351: (QA follow-up) Adjust tests accordingly
Test plan:
Run t/db_dependent/Koha/BackgroundJob.t
Run t/db_dependent/Koha/BackgroundJobs.t
Prove t/db_dependent/Koha/BackgroundJobs

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 21:36:09 +00:00
70c94b92ca Bug 31351: (QA follow-up) Use $self->json in Background modules
Making the disabling utf8 flag explicit instead of depending on
the default of the CPAN module.

Incorporating the change in background_jobs_worker too.

Test plan:
See next patches when we look at unit tests.
Restart koha-worker.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 21:35:57 +00:00
Joonas Kylmälä
144d6a24f0 Bug 31351: Koha::BackgroundJob: Let database connection object handle utf8 transcoding
Our database connections have been set up so that they will
automatically convert perl encoded strings to utf8 encoded strings
when sending data to database tables and decode the utf8 encoded
strings from the tables back to internal perl strings. As we can see
from a call in Koha/BackgroundJob.pm we are encoding the perl internal
string to utf8 and then decoding it back to perl internal string:

my $data_dump = decode_json encode_utf8 $self->data;

We can skip this unnecessary encode<->decode step (as the database
object has done the decoding for us) by simply calling the
JSON->new->decode() method which doesn't perform any string decoding.

Furthermore, the original code was buggy and didn't always remember to
encode the unencoded strings, in Koha::BackgroundJob::process we can
see

my $context = decode_json($self->context);

is missing the encode step. Now after this change encoding before
decoding is not necessary as we are using the methods from the JSON
module that do not perform any transcoding.

Note to those concerned whether the old data in the database is
compatible with this new code:
 Luckily our database connection object seems to be smart and
 didn't utf8 encode the utf8 returned data from the old encode_json()
 calls (probably checks the utf8 flag for the string (Encode::is_utf8($str))).

To test whether this fixes the original bug reported of not being able
to schedule background jobs with koha user having non-ASCII letters in
their surname:
 1) Change your staff users surname/lastname to "ääää"
 2) Log out and back in.
 3) Go to a biblio record detail page and click "Select all" in the
 items table
 4) Click Delete selected items and proceed with the deletion
 5) Notice the batch item deletion job has failed status
 6) Apply patch and repeat but this time the deletion job should finish.

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 21:35:41 +00:00
2f834a0d78 Bug 31355: Add paging = false to items table on opac-reserve
Moving to an ajax datatable and paging would be a future fix, this restores
lost functionality

To test:
1 - Find or create a title with 20 items
2 - Place a hold in opac
3 - Attempt to select a specific item
4 - Note only 10 show
5 - Apply patch
6 - All items show

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 19:48:31 +00:00
830e854688 Bug 31425: Minor correction to patron categories admin title
This patch corrects the patron categories administration template so
that an extra angle bracket isn't included in the page title on the main
view.

To test, apply the patch and go to Administration -> Patron categories.
The page title should read:

Patron categories › Administration › Koha

...with no extra "›" at the beginning.

Check that other views (new, edit, delete) are unaffected.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 19:45:49 +00:00
6b2566ece3 Bug 31352: Change 'Borrower name' to 'Patron name'
Test plan:
1. Go to Tools > Patron card creator > New > Card batch
2. Enter a borrowernumber and click 'Add patron(s)'
3. Observe a table with the leftmost column name 'Borrower name' loads
4. Apply patch
5. Refresh page
6. Observe the leftmost column name is 'Patron name'

Sponsored-by: Catalyst IT, New Zealand

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 19:41:16 +00:00
a72ecc3b27 Bug 31076: Handle year limits with equal sign or colon
To test:
1 - Enable ES and index
2 - Set expandedSearchOption to 'show'
3 - Advanced search on staff and opac using Year field on staff and Publication date range on OPAC for:
    2005
    2005-
    -2005
    <2005
    >2005
    2005-2010
4 - Confirm ranges don't work on staff side, but do on opac
5 - Apply patch
6 - Repeat searches - they work on both staff and opac
7 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 19:36:22 +00:00
4cf509b248 Bug 28327: (follow-up) Comma as default CSV delimiter
Looks like most of existing code wants comma as default value.

Also impact installer/data/mysql/mandatory/sysprefs.sql.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 19:30:08 +00:00
9d8ddcc1b7 Bug 28327: Unify CSV delimiter special behavior for tabulation
System preference 'CSVdelimiter' has a special case for tabulation.
Preference value contains string 'tabulation' but string '\t' must be used in CSV file.

This is OK in many places, for exemple Bug 17590.

This patch adds C4::Context->csv_delimiter to add a uniq metod dealing
with this behavior.
Also create Koha::Template::Plugin::Koha->CSVDelimiter for calls from
Toolkit Templates.

Test plan :
1) Set system preference 'CSVdelimiter' = 'tabs'.
2) Create CSV export in impacted pages
3) Check columns are separated by tabulation character and not string 'tabulation'
4) Check with another delimiter

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 381b79593e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 19:29:41 +00:00
41b645bad4 Bug 28327: Add unit tests
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 a2e9b44074)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-14 19:29:15 +00:00
418da38327 Bug 31282: Fix broken characters in patron_emailer.pl verbose mode
To test:
1. Have a report containing:
   SELECT tomascohen@theke.io;
2. Have a members notice containing ¡ and other non-ASCII characters.
3. Run (changing the report number and notice code accordingly):
   $ kshell
  k$ perl misc/cronjobs/patron_emailer.pl --report 4 \
           --notice BIRTHDAY --from tomascohen@theke.io --module members
=> FAIL: non-ASCII characters are broken
4. Apply this patch
5. Repeat 3
=> SUCCESS: Things print correctly!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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 9afbe872b7)
2022-10-14 19:17:11 +00:00
c0063bbda2 Revert "Bug 29012: Add default values for blank circulation rules that weren't saved to the database"
This reverts commit 387900a65c.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-13 17:31:41 +00:00
cd01c1f87e Revert "Bug 29012: (QA follow-up) Use q{} instead of '' in smart-rules.pl"
This reverts commit 294ed32d06.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-13 17:31:03 +00:00
a1393658d0 Revert "Bug 29012: DBRev 22.05.05.001"
This reverts commit 2256a16b9b.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-13 17:29:54 +00:00
aebaf2495b Bug 31473: Fix fragile test about bad OpacHiddenItems conf
There's been a behavior change in recent MariaDB that made some cases
deal with truncated data in DOUBLE context instead of DECIMAL.

Probably this:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27380

This made the affected test fail consistently on those versions.

This trick for checking OpacHiddenItems is correct (as introduced on bug
28125 doesn't really make use of the warning, just prints it in
about.pl) so one option was to just check for a warning.

I decided to keep the test, but add the optional DECIMAL|DOUBLE check on
the qr. This way other eventual changes will make it fail and serve as a
warning in case something more relevant changes.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-04 16:28:40 +00:00
54ddc31c71 Bug 30779: Remove _update_import_record_marc and update tests
This patch removes the now unused: _update_import_record_marc

Additionally, as items are already present in import biblio we no longer need to embed
them, so that parameter is removed and the option removed from the sub and pod and everywhere
it was used

In all cases, we were embedding, so we don't need a way to get without

Tests updated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b02b66acf5)
2022-10-03 22:48:43 +00:00
c2169d1dfe Bug 30779: Do not update import marc after importing items
We are stripping the marc item tags at import - we save them when not importing items, but
strip when importing items

I think we can save on writes by leaving them in the record. This also allows comparison to what was staged
versus items created

To test:
 1 - Stage a marc record with items, but do not look for items
 2 - Confirm the item tags remain in staged marc
 3 - Import the record
 4 - Confirm items are nto in imported marc record
 5 - Stage the record again, but look for items
 6 - Confirm the item tags are stipped from imported record
 7 - Import and confirm imported record has no item tags
 8 - Apply patch and repeat 1-5
 9 - Confirm item tags remain in record
10 - Import and confirm item tags not in imported marc

Signed-off-by: Andrew <andrewfh@dubcolib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b1ec071866)
2022-10-03 22:48:29 +00:00
b80ec4fde3 Bug 31217: OPAC coce.js is not hiding the coce-coverimg div for single-pixel images
This is because opac-detail.tt has coce-coverimg as an ID, but OPAC
coce.js targets coce-coverimg as a class.

opac-detail.tt should be changed to have coce-coverimg as a class.

Test plan:
1. Set your system preferences:
- CoceHost = https://coce.mykoha.co.nz
- CoceProviders = Select all
- OpacCoce = Enable

2. Add the ISBN of '9780262336499' to a biblio

3. Open a "Incognito" window in your browser (recommended to use Google
Chrome to test this)

4. View the biblio detail page in the OPAC. Observe a 'Coce image from
Amazon' box loads with a spinner

5. Apply patch and restart services

6. Clear your browser cache

7. Reload the same biblio detail page in the OPAC. Observe no image is
displayed.

8. View another OPAC biblio detail page that does have a successfully
loading coce image and confirm the source of that image is listed: For
example 'Coce image from Amazon.com' is displayed

Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cbe50d798a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:44:25 +00:00
1f9c734de4 Bug 31382: Pass password_has_expired param to templte
This patch restores the param, while still leaving the check against invalid
login credentials to ensure we don't leak information.

To test:
 1 - enable  EnableExpiredPasswordReset
 2 - Edit a patron to set password to expire in the past
 3 - Attempt opac login as patron
 4 - It fails, but you are redirected to login screen with no info
 5 - Apply patch
 6 - Attempt login
 7 - You are notified password expired and given reset link
 8 - Go back to login screen
 9 - Login with correct username,, wrong password
10 - You are notified of incorrect credentials, not password expiration

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 218419ce2c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:40:46 +00:00
c03539d898 Bug 31382: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 217e953ffb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:40:31 +00:00
dd5fcd9de3 Bug 31222: Reduce query size for batchMod
The object search is currently:
Koha::Items->search({ barcode => \@contentlist }

Which generate code like:
barcode = 1 OR barcode = 2 OR barcode = 3 ....

This can get quite large

We can reduce the query size by using -in:
Koha::Items->search({ barcode => { -in => \@contentlist } }

Which generates code like:
barcode in ( 1, 2, 3 )

To test:
1 - Apply patch
2 - Perform batch modifications
3 - Confirm nothing has changed

Signed-off-by: Rachael Laritz <rachael.laritz@inlibro.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 7343e404b7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:35:50 +00:00
b9e26b55a1 Bug 29782: Fix handling records without title or content
Test plan:
Save a new record with only a title in the non-default tab (english).
Check if you see it on the list. Edit.
Save a new record without title but only content in non-default lang.
Check if you see it.
Do the same 2 edits on the default tab only. Verify too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:31:39 +00:00
1b1bfdc2a8 Bug 31228: Intranet coce.js is not hiding the coce-coverimg div for single-pixel image
This is because the intranet detail.tt has coce-coverimg as an ID.
Intranet results.tt has coce-coverimg as a class. Intranet coce.js
targets coce-coverimg as a class.

Intranet detail.tt should be changed to have coce-coverimg as a class.
This is inline with the change made to the OPAC in bug 31217

Test plan:
1. Set your system preferences:
- CoceHost = https://coce.mykoha.co.nz
- CoceProviders = Select all
- IntranetCoce = Enable

2. Add the ISBN of '9780262336499' to a biblio

3. Open a "Incognito" window in your browser (recommended to use Google
Chrome to test this)

4. View the biblio detail page in the intranet. Observe a 'Coce image
from Amazon' box loads with a spinner

5. Apply patch and restart services

6. Clear your browser cache

7. Reload the same biblio detail page in the intranet. Observe no image
is displayed.

8. Do an intranet search to get the biblio returned in search results
page. Confirm no cover image box is displayed

9. View the intranet search result and detail pages for a different
biblio that you know Coce should be displaying the cover image of and
confirm that it is correctly displayed with the source of that image
listed: For example 'Coce image from Amazon.com' is displayed

Sponsored-by: Catalyst IT, New Zealand

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daef044b6f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:28:29 +00:00
e1caed6c63 Bug 19540: Tell the patron why a hold cannot be placed on items
This patch adds an explanation when a hold cannot be placed, in some situation:
tooManyReserves
tooManyHoldsForThisRecord
tooManyReservesToday
itemAlreadyOnHold

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0198560543)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:25:24 +00:00
396fc44e2c Bug 26632: Remove two more occurrences
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:23:03 +00:00
3a8709f0bd Bug 26632: (Bug 22532 follow-up) Remove random variables
AddBiblioToBatch and AddAuthToBatch were btoh passing a random number for the
parameter $update_counts

This simply removes that value as should have been done on 22532

To test:
1 - Stage a marc file
2 - Confirm it works befor and after patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:22:45 +00:00
369087c7de Bug 31294: Show "Required" label on mandatory fields
This patch adds "Required" label on mandatory fields for Article Requests

0. Apply the patch
1. koha-plack --restart kohadev
2. Change syspref 'ArticleRequests' to 'Enable'
3. Change syspref 'ArticleRequestsMandatoryFields' to '[Select all]'
4. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
5. Click "Request article" for "Gairm"
6. Note that "Title", "Author", "Volume", "Issue", "Date", "Pages", and
   "Chapters" all say required
7. Change syspref 'ArticleRequestsMandatoryFields' to 'Title' and
   'Author'
8. Go to http://localhost:8080/cgi-bin/koha/opac-request-article.pl?biblionumber=29
9. Note that only "Title" and "Author" say required

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-10-03 22:16:05 +00:00
528bb4af53 Bug 31302: Fix spelling in sample_notices.yml
Test plan:
1. Apply patch
2. Confirm 'URL(s)', rather than urls(s), is in the line:
You can download the scanned materials via the following URL(s)

Sponsored-by: Catalyst IT, New Zealand

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 23:08:32 +00:00
ae71ac66f8 Bug 31276: Report results are limited to 999,999 no matter the actual number of results
In Koha, any report that uses C4::Reports::Guided will be limited to 999,999 rows. This is causing problems for larger libraries where some reports may have over a million results.

Test Plan:
1) Create a report "SELECT * FROM borrowers" and run it, note the number
   of results
2) Apply this patch
3) Add the line `<report_results_limit>3</report_results_limit>`
   within the <config> block of your koha-conf.xml
4) Restart all the things!
5) Run the report, download the results as a CSV
6) Note your CSV only has 4 lines, the header and 3 patrons

Signed-off-by: Rachael Laritz <rachael.laritz@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 5e29433bdc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 23:02:24 +00:00
Magnus Enger
92d541ddc4 Bug 31325: Fix koha-preferences get
To reproduce:
$ perl koha/misc/admin/koha-preferences get MarcFlavour
This will output something like "HASH(0x55dd4d432840)".

To test:
Apply this patch and run the command again:
$ perl koha/misc/admin/koha-preferences get MarcFlavour
This should output something like "MARC21".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3f1fe4f178)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 22:59:29 +00:00
Katrin Fischer
bc724da289 Bug 31281: Use correct reply-to email when sending overdue mails
Overdue emails are either sent from the issuing or the home
library of an item. We never use the patron's home library,
so the reply-to address must explicitly be set in EnqueueLetter.

To test:
- Set up 2 branches (A and B) with different email addresses.
- Set up an SMTP server for each to use
- Set up an overdue notice trigger for the patron category you'll use
  First letter: 1 day delay, any notice
- Check out an item with home branch B to a patron from A
- Run the the script with:
  overdue_notices.pl -t --frombranch item-homebranch
  overdue_notices.pl -t --frombranch item-issuebranch
- Confirm for each setting that the correct email headers have been
  used. You can see the reply-to address and to-address in the
  message queue:
  SELECT * FROM message_queue;

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 22:57:18 +00:00
5acbdfe054 Bug 31346: Fix broken Syndetics links on OPAC detail page
To test:
-Have some Syndetics credentials
-Turn on SyndeticsCoverImages
-Look at some and you'll notice that Syndetics cover images dont always load
-If you view the page source you'll see why. The links are built like this:
https://secure.syndetics.com/index.aspx?isbn=/LC.GIF&amp;amp;client=bedf&amp;type=xw10&amp;upc=843501038123&amp;oclc=1311289389

-Apply patch
-Cover images should load properly.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10ced3c494)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 22:54:45 +00:00
3d3fc0f85a Bug 31245: Do not try to report results if task not started
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 22:47:51 +00:00
714d73d7e1 Bug 31245: Do not call report for job detail view if job not started
We should not generate the report if the job hasn't started yet

Test plan:
Stop the koha-worker processes, modify a new item using the batch mod
tool, then see the detail page of the job

Without this patch an error is generated:
Can't use an undefined value as an ARRAY reference at /kohadevbox/koha/Koha/BackgroundJob/BatchUpdateItem.pm line 175

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 22:47:38 +00:00
Andreas Roussos
ad213be292 Bug 29434: add UNIMARC relationship codes for authorities
When using the authority finder plugin (authorities/auth_finder.pl),
you can pick an entry from the 'Special relationship:' dropdown menu
in order to set the relationship between authorities.

However, in UNIMARC instances the relationship codes listed are those
for MARC21. The correct codes for UNIMARC are listed in pages 93-94
of the IFLA UNIMARC Manual for Authorities.

Test plan:

1) In a UNIMARC instance, launch authorities/auth_finder.pl in the
   Staff client, by clicking on the 'Tag editor' button. Notice how
   the 'Special relationship:' dropdown menu lists the relationship
   codes for MARC21 instead of UNIMARC.
2) Apply this patch.
3) Launch the authority finder again; this time the correct values
   should be listed in the 'Special relationship:' dropdown menu.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-30 22:35:40 +00:00
Caroline Cyr La Rose
9db4824675 Bug 31155: Document --since option in help of borrowers-force-messaging-defaults.pl
This patch adds a section about the --since option in the help section
of borrowers-force-messaging-defaults.pl

To test:
0) Apply patch
1) run the script with the --help option, e.g.
./misc/maintenance/borrowers-force-messaging-defaults.pl --help
--> There should be an explanation of the --since option with examples
    for specific and relative dates
2) Optionally, run the script with different options
--> The behaviour shouldn't have changed

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 17:18:09 +00:00
Bernardo Gonzalez Kriegel
314595d9ac Bug 31292: Untranslatable string in sample_notices.yaml
This patch removes a regex that discard lines in multiline YAML values
On close inspection, there is no need for it.

To test:
1) go to misc translator, update some language
    ./translate update fr-CA

2) check missing string

    egrep "You may pick up your article" po/fr-CA-installer.po

   from sample_notices.yaml

3) apply the patch, repeat 1)

4) repeat 2), verify the string is present in the translation file

5) translate the new string, install the language,
   verify string is present in the translated file
    ./translate install fr-CA

   check fr-CA/mandatory/sample_notices.yml

There are three new strings
msgid "%sDear %s %s,%s"
msgid "%s%s%sTitle: %s"
msgid "%sYou may pick up your article at %s.%sYou can download the scanned materials via the following url(s): %s.%s"

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 17:15:06 +00:00
Caroline Cyr La Rose
7d571ca2c0 Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled
This patch hides the Article requests column in the large circulation
rules table when the ArticleRequests system preference is disabled.

To test:
0) Apply patch
1) With ArticleRequests disabled, go to Administration > Circulation and fines
   rules
2) Scroll right in the first table
--> There isn't any mention of article requests in the table
3) Scroll down to see the other tables in the page
--> There are no other article requests tables
4) Enable ArticleRequests in Administration > System preferences
5) Go back to the Circulation and fines rules and refresh the page
6) Scroll right in the first table
--> There should be an article requests yes/no column
7) Scroll down to see the other tables in the page
--> There are other article requests tables, Default open article requests
    limit and Default article request fees

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 17:09:24 +00:00
Katrin Fischer
7459cbd399 Bug 31272: Use TT plugins for pickup library and due date in opac-reserve.pl
Before this patch the date formatting for the due date was done
in the .pl instead of the template and the branchcode would show
instead of the library's name in the list of items when placing
an item level hold in the OPAC.

To test:
* Find or create a record with mulitple items
* Check out one of the items
* Place a record level hold
* Return an item to set to waiting
* Place an item level hold
* Go to the OPAC and start placing an item level hold
* Verify the messages in the item table show the branchcode
* Apply patch
* Only visible change should be the library name replacing the branchcode

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 17:04:16 +00:00
b25b9b75bb Bug 31249: Use cronlogaction on update_patrons_category.pl
This patch does what the title says.

To test:
1. Run the script
2. Check the action logs
=> FAIL: Boo, no record of the running cronjob
3. Apply this patch
4. Repeat 1-2
=> SUCCESS: Yay!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <liz@bywatersolutions.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 17:01:29 +00:00
Katrin Fischer
90623a2715 Bug 30992: (follow-up) Fix semicolon at line ending
$itemLoopIter->{reservedate}     = $first_hold->reservedate,
$itemLoopIter->{ExpectedAtLibrary}         = $first_hold->branchcode;

1st line ends with a comma instead of a semicolon.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:57:45 +00:00
0f234f9209 Bug 30992: Improve translatability for 'for'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 92f5e02a8c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:57:26 +00:00
75f2d9742e Bug 30992: Improve translatability for Waiting at|On hold
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eedec9e929)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:57:12 +00:00
cf6ad04957 Bug 30879: DBRev 22.05.05.004
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:51:19 +00:00
905fef6ca2 Bug 30879: Add option to syspref and update display
To test:
1 - Update ComponentSortField system preference and verify biblionumber is an option
2 - Repeat test plan from 30327 and confirm sorting with biblionumber works

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 505e12970d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:47:39 +00:00
ee855d97a8 Bug 30879: Handle index/sorting for UNIMARC
Same as before, but test with UNIMARC setup

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:47:23 +00:00
8b5dc95fe5 Bug 30879: Allow biblionumber as sort option in Elasticsearch
Repeat previous tests with Elasticsearch engine
You will need to reindex and reset mappings to pickup the changes form the file

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:47:07 +00:00
1639f6bfa4 Bug 30879: Add biblionumber as a sorting option in MARC21
This patch updates the Local-Number indexing by adding a zeropad option
to Zebra indexing and adding this to the mapping files

It also updates C4/Search.pm to allow biblionumber as an option

To test:
1 - Apply patches
2 - copy etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl to /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
3 - Restart all, reindex zebra
4 - Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=kw&q=a&sort_by=biblionumber_dsc&count=20
5 - Confirm records sorted correctly
6 - Browse to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=kw&q=a&sort_by=biblionumber_asc&count=20
7 - Confirm records sorted correctly

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 230bae0b02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:46:53 +00:00
b7cb7120f9 Bug 31274: DBRev 22.05.05.003
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-09-29 16:11:35 +00:00