Commit graph

2673 commits

Author SHA1 Message Date
5cfbd0d600 Update release notes for 22.05.01 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-06-27 15:35:45 +00:00
Koha translators
db2eef25ea Translation updates for Koha 22.05.01
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-06-27 11:40:28 -03:00
6619a752d9 Bug 29325: [22.05.X] Fix commit_file.pl
This patch fixes the broken commit_file.pl script.

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

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

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

Bug 29325: (QA follow-up) Remove unexisting parameters of BatchRevertRecords

There is no interval and callback as in BatchCommitRecords.

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

Bug 29325: Call progress callback one last time to confirm comppletion

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

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

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

Bug 29325: Fix import from staff client

same test as before, but via the staff client

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

Bug 29325: Handle the transaction in BatchCommitRecords

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

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

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 29325: (QA follow-up) Tidy up

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-06-24 16:39:04 +00:00
5cf20b6ad1 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>
(cherry picked from commit f279cdd30f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2022-06-15 16:26:59 +00:00
54f34ae74f 22.05.00: Fix translations (bis)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-25 23:56:14 -10:00
4ff7a3d29f 22.05.00: Fix translations
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-25 23:56:14 -10:00
Koha translators
b490eb129f Translation updates for Koha 22.05.00
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-25 23:56:13 -10:00
3a2587bebd Add release notes for Koha 22.05.00
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-25 23:56:12 -10:00
Joonas Kylmälä
be9aead2b1 Bug 30776: import missing subroutine to fix import_webservice_batch.pl
Test plan:
 1) Apply patch and notice the following error is gone:
    $ perl misc/cronjobs/import_webservice_batch.pl
    Undefined subroutine &main::GetStagedWebserviceBatches called at misc/cronjobs/import_webservice_batch.pl line 46.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-18 17:22:08 -10:00
84f7b7a7a3 Bug 30666: Holds reminder cronjob (holds_reminder.pl) uses DataTime::subtract wrong
In holds_reminder.pl, the script loops over all available branchcodes. For each iteration of the loop, if not using the calendar, the script subtracts the days parameter from the current date to get the waiting date threshold. The problem is that this method alters the DateTime object in $date_to_run, so for each iteration of the loop, the waiting date becomes farther and farther in the past, when it should always be the same!

The solution is to either clone the "date to run" for each call to subtract, or to move it out of the loop since it doesn't need to be recalculated each time.

Test Plan:
1) Become the koha user using koha-shell
2) Run DBIC_TRACE=1 misc/cronjobs/holds/holds_reminder.pl --days 7
3) Note in the queries that for each loop, the waiting date is different
4) Apply this patch
5) Run the command in step 2 again
6) Note the queries all now have the same waiting date threshold!

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-13 15:41:55 -10:00
a7e7939748 Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template
Bug 28514 changed the way holds_reminder.pl searches for templates, using a direct search for letters,
but should be using find_effective_template instead. Now, if a branch specific template does not exist,
it will skip that branch.

Test Plan:
1) Ensure you only have the default HOLD_REMINDER template
2) Become the koha user using koha-shell
3) Run misc/cronjobs/holds/holds_reminder.pl --days 7 -v
4) Note that the script skips every branch
5) Apply this patch
6) Run the command in step 3 again
7) Note the script doesn't skip over any branches

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-13 15:41:55 -10:00
c3116b2729 Bug 30354: Don't assign warn as letter
TO test:
1 - Check out an item marked for autop renewal to a patron and make it overdue
2 - Set system preference AutoRenewalNotices to follow messaging prefs
3 - set that borrower to receive both email and SMS AUTO_RENEWALS_DGST
4 - confirm your AUTO_RENEWALS_DGST does not have SMS content but does have email
5 - run the auto_renew cron
6 - item is renewed, but error from cron, and cron dies:

No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583.
no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/automatic_renewals.pl line 305.
Can't use string ("1") as a HASH ref while "strict refs" in use at /kohadevbox/koha/C4/Letters.pm line 898.

7 - Apply patch
8 - Make item eligible for auto renewal agian (or checkin/checkout)
9 - Run the cron
10 - There is still 2 warn, but cron does not die:

No circulation AUTO_RENEWALS_DGST letter transported by sms at /kohadevbox/koha/C4/Letters.pm line 583.
no letter of type 'AUTO_RENEWALS_DGST' found for borrowernumber 5. Please see sample_notices.sql at misc/cronjobs/    automatic_renewals.pl line 305.

11 - Patron receives email and item is renewed

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

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-05 11:17:37 -10:00
Aleisha Amohia
674e385bf1 Bug 30291: Changes to staff client files
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-05 11:17:36 -10:00
f19201a12c Bug 29698: Make items available for PREDUEDGST
With this patch you can access items using:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

== test plan ==
1. Add the following to PREDUEDGST and DUEDST:
Number of items [% items.count %]
[% FOR i IN items %]
    [% SET checkout = i.checkout %]
    Item [% i.itemnumber %] is due on [% checkout.date_due | $KohaDates %]
[% END %]

2. Find a patron and set there messaging prefs 'Item due' and 'Advanced
  notices' so they get an email and 'digest only'.
  On 'Advanced notices' set Days in advance to 1.
3. Check some things out to a patron and make them due tomorrow.
4. perl /kohadevbox/koha/misc/cronjobs/advance_notices.pl -v -c
5. Check the patrons notices and make sure the PREDUEDGST looks right.
6. Check some things out to a patron and make them due today.
7. Repeat 4.
8. Check the patrons notices and make sure the DUEDGST looks right.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-04 14:29:24 -10:00
Bernardo Gonzalez Kriegel
bf27a9f428 Bug 30477: Add new UNIMARC installer translation files
Depends on Bug 30373

This patch adds *-installer-UNIMARC.po translation files.

For fr, it, uk and ru languages matching strings have been
extracted from master (fr-FR) or 21.05 (it,ru,uk) UNIMARC SQL
files. The mentioned languages shows some level of completion:

    fr-FR 76%
    ru-RU 61%
    it-IT 55%
    uk-UA 54%

To test:
1) Apply the patch
2) Verify new files are present
   misc/translator/po/*-installer-UNIMARC.po
3) Verify fr-FR, it-IT, ru-RU and uk-UA files
   have translated strings (inspect the files or use poedit)
4) Install any of those languages, ej.

     misc/translator/translate install fr-FR

   then do a clean UNIMARC install and verify that
   authority and bibliographic frameworks shows translated
   strings.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
Bernardo Gonzalez Kriegel
a5c422daa6 Bug 30373: Enable translation of UNIMARC frameworks
This patch adds a new translation file, *-installer-UNIMARC.po

To test:
1. On top of all previous patches
2. Apply this patch
3. Create (or update) some language
Ej.
    misc/translation/translate create xx-YY

    verify new file misc/translation/po/xx-YY-installer-UNIMARC.po
4. Install new language
    misc/translation/translate install xx-YY

    verify new dirs:
        installer/data/mysql/xx-YY/marcflavour/unimarc/{mandatory,optional}

5. Repeat install procedure selecting xx-YY language and UNIMARC
   verify all frameworks are present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
a4da023bae Bug 30237: Reference new WELCOME notice
This patch updates all references to the former ACCTDETAILS notice to
use the new WELCOME email notice instead.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
1bf5adf837 Bug 29005: Add support for the command line script
This patch adds welcome email for new users support to the command line
patron import tool.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
631d350086 Bug 27783: (follow-up) Rename options
Why require `job_`.. it's easiery to just use 'queue' and we have 'job'
from the context of the script we're calling.  This also inproves
consistency between the debian commands and the script params.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
9c4a89a7c8 Bug 27783: Rename queues and adjust currently defined jobs
This patch renames the queues so the default is the **real-time** one, and
the other (*long_tasks*) is kept for **long running** tasks.

All current *batch* tasks are explicitly assigned to the **long_tasks**
queue as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
Julian Maurice
9acb599d16 Bug 27783: Replace --job-type by --queue
This patch adds a new column background_jobs.queue, which default to
'default'
By default, new jobs are enqueued into this default queue, and the
background job worker will subscribe to the default queue unless told
otherwise by the --job-queue option

The new job UpdateElasticIndex is automatically enqueued in another
queue named 'index'
So you can have 'default' worker with
    misc/background_jobs_worker.pl
and a dedicated indexing worker with
    misc/background_jobs_worker.pl --queue index

This is to address bug 27344 comment #15

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
a42717ad15 Bug 27783: Add --job-type to background_jobs_worker.pl
This will let sysop adjust the number of workers and how they want to
manage them.
For instance one could want to have one worker for ES indexation and
another worker for other jobs, to prevent ES index to be stuck behind
bigger batch process.

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
Bernardo Gonzalez Kriegel
c76fe72647 Bug 30476: Remove NORMARC translation files
This patch just deletes translation files left behind when removing
support for NORMARC.

To test:
1) Apply the patch
2) Verify there are no more *-marc-NORMARC.po files
   on misc/translator/po/ dir

No consequences are expected.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
2049b7f952 Bug 16258: (QA follow-up) Capitalise EDIFACT
EDIFACT is an abreviation, so it should be ALLCAPS.

* Electronic Data Interchange for Administration, Commerce and Transport

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
21223c7c5e Bug 16258: (QA follow-up) Add a guard to the cron script
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
affd0caea5 Bug 26669: Last Run if report not always updated
The last run of a report is updated only if method execute_query() is
called with report_id.
This whas missing for :
- when report is run publicly
- when report is sent by email
- when report is exported

Patch changes the method signature to use a hash of params, in order to
easily avoid some params.

Test plan :

1) Create a report.
2) Run report.
3) Check the report listing.  Confirm that the last run info on the report is updated.
4) Make report public.
5) Run report via public url.
6) Check the report listing.  Confirm that the last run info on the report IS NOT updated.
7) Schedule the report to run at a given time and e-mailed to an address.
8) After the report runs at the scheduled time, check the report listing.  Confirm that the last run info on the report IS NOT updated.
9) Run report.
10) Export results.
11) Check the report listing.  Confirm that the last run info on the report IS NOT updated AT THE TIME OF THE EXPORT.

Questionable (I don't know if this is addressed):
12) Run report on backend through a cron job and send results via e-mail.
13) Check the report listing.  Confirm that the last run info on the report IS NOT updated.

14) Apply patch.
15) Rerun steps 2-13.  Confirm that steps 3, 6, 8, 11, and 13 DO UPDATE the last run info.

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:23:46 +02:00
d5c73038e4 Bug 30222: Remove warning
Use of uninitialized value in string ne at misc/cronjobs/automatic_renewals.pl line 193.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:23:45 +02:00
bb5827ba79 Bug 30222: Further simplify logic
For any borrower, we are either:
1 - following their preference, and that should set 'wants_email'
OR
2 - Never sending / following the cron, and can determine 'wants_email'
    from the 'send_notices' variable

This patch adds an 'else' if not using preferences to accomplish this

Follow test plan on previous patches

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:23:45 +02:00
3e4f9cd578 Bug 30222: Simplify logic for reporting
This patch adds two new variables:
$wants_email and $wants digest

These are used to simplify checks on whether notices should be sent

To test:
1 - Apply patch
2 - Confirm notices are not sent of pref is 'cron' and send_notcies flag not set
3 - Confirm notices are sent if pref is cron and send_notices flag is set and borrower
    does not have preference set for auto renewals
4 - Confirm notices not sent if pref is set to follow messaging preference and borrower
    does not have preferences set for auto_renewals
5 - Confirm regular notices sent if pref is set to follow messaging preferences and borrower
    does have the preference set but not digest
6 - Confirm digest notices sent if pref is set to follow messaging preferences and borrower
    does have the preference set and wants digest

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:23:45 +02:00
641011806d Bug 30222: Only send auto renewal digest wehn there is an update
Currently, the code sends an email to the patron when there is any error that is not
'too_soon' - we also don't include issues that are 'too_soon', so emials may be missing information

This patch changes the code to:
1 - push all issues that were checked to the report when a borrower wants a digest
2 - adds a variable to track when any of the issues has been updated, and checkes this when
    sending digests
3 - if nothing has been updated, no report is sent to the patron

To test:
 1 - Checkout an item, marked for autorenewal, backdated to be overdue to a patron
 2 - Set preferences
    AutoRenewalNotices = 'according to patron messaging preferences'
    EnhancedMessagingPreferences = 'Allow'
 3 - Set the patrons preference for auto renewal to email+digest
 4 - Ensure the patron has an email
 5 - Place an item level hold for another patron on the issued item
 6 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
 7 - Check patron record/notices tab
 8 - Note item not renewed, patron notified
 9 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
10 - Note item not renewed, status not changed, patron notified again
11 - Apply patch
12 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
13 - Item not renewed, patron no notified
14 - Checkout another item marked for auto renewal to the patron, but due in the future
     ensure it is outside of 'no renewal before'
15 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
16 - Patron not notified, items not renewd
     Change to status of 'auto_too_soon' is not notified
17 - Checkout a third item, marked for auto renew, overdue
18 - place an item level hold for another patorn on third item
19 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
20 - patron is notified, nothing renewed, all statuses reported
21 - cancel the item level hold on third item
22 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
23 - item renewed, patron notified, all statuses reported
24 - perl misc/cronjobs/automatic_renewals.pl -v --confirm
25 - nothing renewed, patron not notified, only change is one issue 'auto_too_soon'

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:23:45 +02:00
2e6af702f5 Bug 29501: Use the default transport
This patch makes the script pass the default SMTP transport to the
->send_or_die call.

The default is picked as this is the current behavior. New enhancements
could add the *library_id* to the message_queue table, and allow using
different transports depending on that. But it is out of the scope of
this bug.

To test:
1. Verify messages are being sent.
2. Sign off :-D

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

JD amended patch: revert
-        unless $format =~ m[^html$|^csv$|^ods$];
+        unless $format =~ m/^html$|^csv$|^ods$/;
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:23:45 +02:00
241cd7ff37 Bug 29501: Make gather_print_notices.pl use Koha::Email
This patch makes the cronjob script use Koha::Email and thus relying on
configured SMTP settings instead of just trying localhost.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:23:44 +02:00
d8a20d5edf Bug 29486: Add check in search_for_data_inconsistencies.pl
If the MARC record does not contain the correct biblionumber of
biblioitemnumber, the script will display the following warning:

== Bibliographic records have MARCXML without biblionumber or biblioitemnumber ==
        * Biblionumber 4242 has '1' in 999$c
        * Biblionumber 4242 has biblioitemnumber '4242' but should be '1' in 999$d
=> The bibliographic records must have the biblionumber and biblioitemnumber in MARCXML

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-22 10:17:34 -10:00
975f52a4cf Bug 19532: (RM follow-up) Fix recalls.old is default 0
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-15 00:31:32 -10:00
e550f657f1 Bug 19532: (QA follow-up) Add the cron jobs to the cron files
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:52 -10:00
3e2b55f64c Bug 19532: (QA follow-up) Move as_list to iterator based loop
Adjusting both new cron jobs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:52 -10:00
Aleisha Amohia
1ddde85181 Bug 19532: (follow-up) Fixes along recall workflow
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:51 -10:00
Aleisha Amohia
a8929cbcdb Bug 19532: (follow-up) Fix calls, tests, syspref settings, checks
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:51 -10:00
Aleisha Amohia
01cc7621d5 Bug 19532: Expiry and overdue cronjobs, and overdue fine calculation
- misc/cronjobs/recalls/expire_recalls.pl
- misc/cronjobs/recalls/overdue_recalls.pl
- tests for overdue fines in t/db_dependent/Circulation/CalcFine.t

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:51 -10:00
David Schmidt
17ed92b6dd Bug 30132: Fix POD, show correct usage of Getopt::Long
the USAGE of overdue_notices.pl shows options such as -date OR
-csv that should be written with double dashes like --date or --csv

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-01 22:47:46 -10:00
David Gustafsson
7da4912f8e Bug 25616: Uppercase hard coded lower case boolean operators for Elasticsearch
Uppercase occurances of all (hopefully) lowercase "and"
used in ElasticSearch Query String Query contexts

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-24 14:35:36 -10:00
d976d65f62 Bug 29843: Use in batch_anonymise.pl
This patch makes the batch_anonymise.pl cronjob script use the newly
introduced methods instead of the old ones.

To test:
1. Try the tool
=> SUCCESS: No behavior change
2. Sign off :-D

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-10 14:44:23 -10:00
2952550c87 Bug 29525: Make batch_anonymise.pl deal with holds
This patch makes the batch_anonymise.pl script handle holds too. It does
so by leveraging on the newly introduced method 'filter_by_anonymizable'
and also 'anonymize'.

To test:
1. Have a patron with two past holds.
2. Make sure they are a few days back:
   $ koha-mysql kohadev
   > UPDATE old_reserves SET timestamp=ADDDATE(NOW(), INTERVAL -4 DAY);
3. Run:
   $ kshell
  k$ perl misc/cronjobs/batch_anonymise.pl --days 2 -v
=> SUCCESS: You see something like:
Checkouts and holds before 2022-01-01 will be anonymised.
0 checkouts anonymised.
2 holds anonymised.
4. Repeat 3
=> SUCCESS: They are already anonymized. You see
Checkouts and holds before 2022-01-01 will be anonymised.
0 checkouts anonymised.
0 holds anonymised.
5. Sign off :-D

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-10 14:44:22 -10:00
d02e91f269 Bug 29859: Use iterator instead of as_list
On bug 29844 we decided to remove wantarray from Koha::Objects->search.
Reviewing the difference occurrences I found some unnecessary uses of ->as_list,
where iterators should be used instead.

This patch only removes the obvious places, not the tricky ones.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-09 15:36:23 -10:00
e53667105d Bug 29844: Fix ->search occurrences
and some more...

There are lot of inconsistencies in our ->search calls. We could
simplify some of them, but not in this patch. Here we want to prevent
regressions as much as possible and so don't add unecessary changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-09 15:36:23 -10:00
c200bf6bc9 Bug 28962: Add del-unv-selfreg to crontab
We also add a test by inserting a simulated borrower modification
record in the same table which should not be deleted.

NOTE: This patch fixes the del-unv-selfreg parameter in the
cleanup db script. It did not even do what it promised :)

Test plan:
Verify if the crontab change is correct.
Run t/db_dependent/Members.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: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-21 21:34:51 -10:00
Hayley Pelham
50d2f00d45 Bug 29054: Add verbose check for warn in advance_notices.pl
To test:
1) Set EnhancedMessagingPreferences to Don't allow
2) In the koha-shell, run misc/cronjobs/advance_notices.pl -c
3) Note that you see the warning "The "EnhancedMessagingPreferences"
syspref is off... etc."
4) Apply the patch and restart services
5) In the koha-shell, run misc/cronjobs/advance_notices.pl -c and note
the warning no longer shows
6) Still in the shell, run misc/cronjobs/advance_notices.pl -c -v and
note the warning does show

Sponsored-by: Catalyst IT
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-21 21:34:51 -10:00
9b9417ca13 Bug 29704: (RM follow-up) Fix typo sned send
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-18 21:15:04 -10:00
d1a701573e Bug 29704: Add a triggered option to holds_reminder.pl
This patch adds an option to only trigger notices matching the number of
days waiting specified

You will need to define HOLD_REMINDER notices for the specific branch of the
patron and ensure the patron has hold reminder notices in their messaging preferences

TO test:
1 - Place a hold for a patron and check in to confirm
2 - Set the waiting date back a few days:
    update reserves set waitingdate = DATE_SUB(CURDATE(), INTERVAL 5 DAY);
3 - Run the cron and see that patron would be notified if running for 4 days weaiting
    perl misc/cronjobs/holds/holds_reminder.pl -v --days 4
4 - Apply patch
5 - perl misc/cronjobs/holds/holds_reminder.pl -v --days 4 --triggered
6 - Note patron would not be notified
7 - perl misc/cronjobs/holds/holds_reminder.pl -v --days 5 --triggered
8 - Note patron is notified when days waiting matches exactly

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-18 21:15:04 -10:00
8a8e105695 Bug 20076: (RM follow-up) Fix system preference boolean logic
A Yes/No system preference must use 1 for Yes and 0 for No.
So "Send" for 1/Yes and "Don't send" for 0/No.
We add too much problems with double-negation boolean system preferences (such as dontmerge).

Previous patch changed default value to 1 in atomicupdate, do the same
in installer/data/mysql/mandatory/sysprefs.sql

Also to be consistant, sets options = NULL instead of '' in atomicupdate

Also removed useless added empty line in /misc/cronjobs/overdue_notices.pl

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-13 16:37:33 -10:00