Commit graph

42080 commits

Author SHA1 Message Date
0e5c00da4f Bug 17202: Unit tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:06 +02:00
0633590f55 Bug 28213: Prevent crash if patron or club deleted after search to hold
Deleting a patron or patron club causes server error on searching.

To recreate:
- create a club template
- create a club
- enroll a patron in the club
- from the clubs page, select Search To Hold for your club
- do a search, see that it says "Hold for [club name]" in your search results page
- go back to the clubs page and delete your club
- try to perform a search
=> Without this patch you get "Can't call method "name" on an undefined value at /kohadevbox/koha/catalogue/search.pl line 207"

Same when placing a hold for a patron (check the search result and the
detail pages)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:06 +02:00
f29a41288c Bug 27842: (follow-up) Correct existing serail/subscriptionhistory before deletion
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:06 +02:00
7e6f30e60e Bug 27842: Update serial.biblionumber when a subscription is linked with another record
It seems that a librarian can edit the biblionumber for a given subscription, however, when receiving serials the biblionumber is pulled from the existing serials, so all new received issues are received on the old biblionumber.

This is problematic in light of bug 21901 - you can change the biblionumber, the serials still point to the old biblionumber - and deleting the biblio deletes the serials. Additionally, the update will delete serials where this was the case

Test plan:
1 - Create a new subscription
2 - Receive an issue
3 - Edit the subscription and change the biblionumber
4 - Receive another issue
5 - SELECT biblionumber FROM serial
=> the biblionumber link must have been updated

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:06 +02:00
46b2f5b488 Bug 27842: Add tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:06 +02:00
Joonas Kylmälä
eb1961f682 Bug 28230: Store C4::Message->{metadata} as Perl string always
When loading C4::Message->{metadata} we load it as perl string in all
other cases, see e.g. the subroutine find_last_message(). In this one
case we incorrectly populate the C4::Message->{metadata} as an UTF-8
octet instead of a Perl string. This causes a problem later on because
encode_utf8 later on in the line:

YAML::XS::Load(Encode::encode_utf8($self->{metadata}));

excepts a perl string and not a UTF-8 octet (please refer to the
functions perldoc). This breaks the encoding and causes an internal
server error:

To test the error is gone:
1. Create biblio with "AE" (bugzilla doesn't let me write the real
letter here, see it in the bugzilla comments) in title
2. Enable RenewalSendNotice
3. Enable "Item checkout and renewal" message preference for patron
4. Checkout an item from biblio "AE" to patron
5. Try to renew the patron's loan and notice the renewal fails
6. Apply patch and restart plack
7. Notice renewal works now and message h's the AE letter displayed correctly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:06 +02:00
62444c1b9f Bug 28230: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 28230: Add execute bit to test

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 11:07:05 +02:00
8fce3401e7 Bug 28234: TestBuilder->build_sample_biblio should set UTF-8 encoding for record
This patch makes the build_sample_biblio method, correctly set the UTF-8
flag for the MARC::Record object.

Tests are added.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/TestBuilder.t
FAIL: Tests fail! An unexpected encoding warning shows
3. Apply this patch
4. Repeat 2
=> SUCCESS: No warning! Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 10:34:36 +02:00
e5f43c6868 Bug 28234: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-28 10:34:36 +02:00
ad2dec0737 Bug 27790: Add the new column to columns_settings.yml
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
a568716e92 Bug 27790: (QA follow-up) Fix offsets due to new columns
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
Petro Vashchuk
9abbdf7065 Bug 27790: separate earliest hold date into two different columns
Currently "Earliest hold date" and "Pickup place" are displayed
in one single column, but to make filtering possible it is necessary
to split those fields into separate ones.
This patch does exactly that and adds sorting list drop down feature to
the "Pickup place" column.

To reproduce:
    1) Make a few holds and head over to "Circulations->Holds to pull".
    2) Ensure that pickup place and earliest hold date are
in the same column "Earliest hold date"
    3) Apply the patch.
    4) Check "Circulations->Holds to pull list" again, this time
booking date and pickup place should have their own columns.
Ensure that filtering by "pickup location" works fine.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
3181539df6 Bug 27636: Update failing test
It would appear that ->pay didn't fully respect AccountAutoReconcile!

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
630aa51502 Bug 27636: Update ->pay to use ->payin_amount internally
This patch is an interim patch to update Koha::Account->pay to use the
new Koha::Account->payin_amount method internally. It simply utilises
that method for the logic and acts as an input/output shim for
compatability and to allow us to use the existing tests.

Test plan
1/ Run t/db_dependent/Koha/Account.t

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
4bb73229b8 Bug 27636: Add payin_amount to Koha::Account
This patch adds a `payin_amount` method to the Koha::Account as a modern
replacement to the `pay` method.

The new method uses the `add_credit` and `Koha::Account::Line->apply`
methods internally for consistency and returns the created credit
Koha::Account::Line result.

Test plan
1/ Run t/db_dependent/Koha/Account.t

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
1c29873160 Bug 27995: (QA follow-up) Update POD
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
fb3a67f21b Bug 27995: Update return for Koha::Account::Line->apply
This patch updates the return value of Koha::Account::Line->apply to return the
updated Koha::Account::Line object with Koha::Object::Messages embedded
for the results of any triggered renewals.

Available credit, the former return value, is still availabe via the
object directly as `amountoutstanding`.

Koha::REST::V1::Patrons::Account->add_credit has been updated to reflect
the change. No other area's of Koha relied upon the return value.

This patch also fixes a bug whereby if you passed a list of debits with
an outstanding debit larger than the outstanding credit then you could
end up with superflous offest lines with zero amounts that was
highlighted by the improved unit tests in
t/db_dependent/Koha/Account/Line.t

Test plan
1/ Run t/db_dependent/Koha/Account/Line.t
2/ Run t/db_dependent/api/v1/patrons_accounts.t
3/ If both tests pass then signoff

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
479c8d997e Bug 27995: Unit tests
This patch updates the unit tests for Koha::Account::Line->apply to
reflect the change we wish to make to the return value.

Instead of returning the scalar amount of available credit left on the
credit line after calling apply, we want to return the full, updated,
Koha::Account::Line object including Koha::Object::Messages for the
result of renewals that may have taken place.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
1937f1b1d1 Bug 26734: DBRev 20.12.00.041
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
643aed1af6 Bug 26734: Add notices for translations
This patch updates the translated sample_notices.sql files for each of
the remaining translations.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
f38832d95b Bug 26734: (QA follow-up) Add warning to database update
This patch adds a warning to the database update to highlight to the
user which notices have been updated and that a backup exists.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
a0327fa6bc Bug 26734: (follow-up) Add back 'UPGRADE' type to logviewer
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
5f507d60f4 Bug 26734: (QA follow-up) Add 'tendered' and 'change' to notice
We include 'tendered' and 'change' parameters in the call to
GetPreparedLetter for the fee receipt slip.. we may as well include them
in the sample notice ;)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
d9a508a499 Bug 26734: (QA follow-up) Unit tests for C4::Letters
This patch adds unit tests for the addition of 'include handling' to the
C4::Letters template toolkit functionality.

Test plan
1/ Run t/db_dependant/Letters/TemplateToolkit.t

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
1a74852018 Bug 26734: (QA follow-up) Add missing copyright statement
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
0bdfedc13e Bug 26734: (follow-up) Replace db update with backup and default
The inline update of variable for the notice template was proving
troublesome.. this patch replaces it was a backup of the existing notice
followed by replacing the notice with the default.

Test plan
1/ Run the database update
2/ Check that the templates have been replaced by the defaults (for all
languages enabled)
3/ Check that a backup of the original notices was made by naviagating
to view the action log (/tools/viewlog.pl) and selecting 'all modules' +
'all actions'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
e6ed0c7151 Bug 26734: Update existing notices to new syntax
This patch adds a database update to replace existing notice variable
used in ACCOUNT_CREDIT and ACCOUNT_DEBIT notices with the modern
equivilents.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
3f7b1e4230 Bug 26734: Update sample notices to use standardised syntax
This patch updates the default notices shiped with Koha to use the new
syntax.

Test plan
1/ Install Koha afresh
2/ Check the notices print as expected
3/ Signoff

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
cff7ed4fd3 Bug 26734: Convert printfeercpt/printinvoice to use GetPreparedLetter
This patch updates C4::Letters to allow use of existing koha template
includes from notices, then updates the printfeercpt and printinvoice
slip print option to use GetPreparedLetter rather than calling getletter
directly.

As part of this work, we also add credits and debits handling to the
_parseletter_sth and _get_tt_params routines in C4::Letters to allow for
recognisable variable names in the notice template.

Test plan
1/ Update the ACCOUNT_CREDIT and ACCOUNT_DEBIT notices to use
'accounts.inc' include for account descriptions
1a/ Add `[% PROCESS 'accounts.inc' %]` to the top of the notice
1b/ Replace manual account descriptions with `[% PROCESS
account_type_description account=credit %]`
2/ Print one of each slip and check that descriptions are properly
substituted
3/ Clone the notice to another language
4/ Print the in the other language and note the translated descriptions
are properly substituted.
5/ Signoff

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
90d8667cf9 Bug 26734: Ratify account slip printing
This patch simplifies the members/print*.pl controller scripts to only
pass around the minimum required data for the templates.

Test plan
Slips should continue to print as they did prior to the patch
1/ Add a manual invoice and manual debit to a patrons account
2/ Print a slip for the manual invoice, compare to a printed slip prior
to the patch.
3/ Print a slip for the manual debit, compare to a printed slip prior to
the patch.
4/ Signoff.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
dd9e576d55 Bug 27455: (follow-up) Add automatic focus to library name when editing
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
Katrin Fischer
91ee3a31cd Bug 27455: (follow-up) Switch form JavaScript to focus class
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
ava li
64b457925c Bug 27455: Add focus to branch code when a new library is added
TEST PLAN:
From the koha home, go to administration, go to Libraries which is under
Basic parameters. Click +New library the focus should go to the first
field of the form (library/branch code) the patch has worked.

https://bugs.koha-community.org/show_bug.cgi?id=27455

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
b7a199ffe7 Bug 15563: (follow-up) Combine methods, add count, obey confirm
This patch moves the SQL to a subroutine and uses the Label delete method to
remove the batches

We now return a count and do not delete if --confirm flag is not passed

Repeate previous test plan, confirm works as expected

JD amended patch: perltidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
daf2669405 Bug 15563: add label and card creator batch deletion to cleanup_database
To test:
For item label batches:
1- Create 3 item label batches of at least 2 items each
2- Perform the following updates via the database
3- In Batch 1, set all items' timestamps to 10+ days prior to today
4- In Batch 2, set 1 item's timestamp to 10+ days prior to today
5- In Batch 3, do not update any timestamps
6- Run cron with --labels 9
7- Confirm batch 1 is deleted, batches 2 and 3 are not

Repeat with card creator batches
8- Create 3 card creator batches of at least 2 items each
9- Perform the following updates via the database
10- In Batch 1, set all cards' timestamps to 10+ days prior to today
11- In Batch 2, set 1 card's timestamp to 10+ days prior to today
12- In Batch 3, do not update any timestamps
13- Run cron with --cards 9
14- Confirm batch 1 is deleted, batches 2 and 3 are noti

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Deb Stephenson <dstephen@dubuque.lib.ia.us>
Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
Emmi Takkinen
95cbefe12d Bug 26405: Prevent Circulation.t failing on 'AddRenewal left both fines'
Bug 23051 added option to skip calculating fines even when
"CalculateFinesOnReturn" is enabled. Due this Circulation.t
fails on  test  "AddRenewal left both fines" if
"CalculateFinesOnReturn"  is disabled on ones system.
Mocking syspref while testing fixes failig tests.

To test:
1. Disable "CalculateFinesOnReturn".
2. Run prove t/db_dependent/Circulation.t
=> Tests fail
3. Apply patch.
4. Run prove t/db_dependent/Circulation.t again
=> Tests are succesful

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
92f69a0193 Bug 28223: Add data elements to negative budgets
To test:
1 - Have a parent fund and a child fund
2 - Order an amount from the child fund that is greater than the amount available
3 - Browse to acquisitions
4 - Confirm the totals look right
5 - Click on the over spent fund to go to 'Funds for main budget'
6 - Note the totals are incorrect
7 - Apply patch
8 - Reload
9 - Totals are now correct

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
0140f1e626 Bug 28144: Add a regression test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
bf13a36c8a Bug 28144: Check if issue_id defined
Historical OVERDUE fines may not have an issue_id - this causes
flooding of the logs when calling update fine

Trivial change, reading the code should be enough, but test plan below

To test:
1 - Create some fines without an issue_id
  - Either checkout an old version of Koha and add manually or
  - Checkout some items (backdated) to a patron, run fines.pl then
    UPDATE accountlines SET issue_id = NULL;
2 - Checkout a backdated item with fines in the circ rule to the same patron
3 - Run fines.pl
4 - Note the errors
5 - Apply patch
6 - Repeat and note no errors

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
808d9a9f81 Bug 28221: Script process_message_queue.pl uses Try::Tiny but doesn't 'use' it
The message queue processor has a try/catch block, but does not have a 'use Try::Tiny' line. Because of this the following error ocurrs if an instance has any plugins installed that use the before_send_messages hook:

Can't locate object method "catch" via package "1" (perhaps you forgot to load "1"?) at /usr/share/koha/bin/cronjobs/process_message_queue.pl line 86.

Test Plan:
1) Install a plugin that uses the before_send_messages hook
2) Run the message queue processor
3) Note the error message
4) Apply this patch
5) Run the message queue processor again
6) No error!

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
3dc9855b46 Bug 28178: Display the correct image in the image viewer
When there are several images attached to a bibliographic record, one can click
an image and see it in the image viewer. But the first image is always displayed.

Test plan:
0. Turn on LocalCoverImages and AllowMultipleCovers
1. Attach at least two images to a bibliographic record
2. Go to the detail page, click the "Images" tab and click the second
image.
=> With this patch applied you should see the image you selected

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
ff849fadba Bug 21818: Replace AutoCommit flag with DBIx transaction in stage-marc-import.pl
Like it was done in Bug 18806.

Test plan :
Use stage-marc-import.pl with and without patch, with a matcher to find
duplicates

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
c45d15e231 Bug 28193: (follow-up) Correct OpacLoginInstructions in login modal
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
ee4755c974 Bug 28193: OpacLoginInstructions news block broken by Bug 20168
This patch fixes a regression which was introduced by Bug 20168, causing
the OpacLoginInstructions template code to revert back to the old system
preference behavior. This patch returns the correct markup.

To test, apply the patch and view the OPAC login page
(/cgi-bin/koha/opac-user.pl)

 - With no news entry for OpacLoginInstructions you should see the
   default: A block of text with two headings, "Don't have a password
   yet?" and "Don't have a library card?"
 - Go to Tools -> News and create an entry for OpacLoginInstructions.
 - Return to the OPAC and confirm that your custom text appears.
 - Try updating/installing another translation and adding a different
   news entry for that language. Confirm that the correct entry appears.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
a0a8f8a5b4 Bug 28198: Correct sample HOLD_REMINDER notice for it,nb,pl,ru
It turns out that ea6467724c also caused the same issue in these locales
Also e0b0e908f7 (a follow up) caused the issue in it-IT

== Test plan ==
Paste all this :D
```
 # doesn't work without this patch applied
echo "DELETE FROM letter;" | sudo koha-mysql kohadev
cat installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql | sudo koha-mysql kohadev
echo "DELETE FROM letter;" | sudo koha-mysql kohadev
cat installer/data/mysql/pl-PL/mandatory/sample_notices.sql | sudo koha-mysql kohadev
echo "DELETE FROM letter;" | sudo koha-mysql kohadev
cat installer/data/mysql/ru-RU/mandatory/sample_notices.sql | sudo koha-mysql kohadev
echo "DELETE FROM letter;" | sudo koha-mysql kohadev
cat installer/data/mysql/it-IT/necessari/notices.sql | sudo koha-mysql kohadev

 # test all the rest
 ## fixed by previous patch, double checking
echo "DELETE FROM letter;" | sudo koha-mysql kohadev
cat installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql | sudo koha-mysql kohadev
 ## was already working, just double checking
echo "DELETE FROM letter;" | sudo koha-mysql kohadev
cat installer/data/mysql/fr-CA/obligatoire/sample_notices.sql | sudo koha-mysql kohadev
echo "DELETE FROM letter;" | sudo koha-mysql kohadev
cat installer/data/mysql/uk-UA/mandatory/sample_notices.sql | sudo koha-mysql kohadev
```

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
bb36774292 Bug 28198: Correct sample HOLD_REMINDER notice for French
To test:
1 - sudo koha-mysql kohadev
2 - DELETE FROM letter
3 - cat installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql | sudo koha-mysql kohadev
4 - Error!
5 - Apply patch
6 - Repeat 1-3
7 - Success!

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
13bcc7e0bb Bug 15986: Remove \r from HOLD_REMINDER in the yml
To prevent the following errors on `gulp po:update`

misc/translator/Koha-installer.pot:952: warning: internationalized messages should not contain the '\r' escape sequence

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 16:23:49 +02:00
00883fc411 Bug 28210: Pass skip_record_index through LostItem
This patch restores the skip_record_index optional parameter for
LostItem and passes it through to MarkIssueReturned as required.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 11:24:02 +02:00
9dbe57b564 Bug 28210: Add issue, replacementprice, and set onloan so check-in tests work
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 11:24:02 +02:00
bc0cf683ee Bug 28210: Unit test
Add a unit test to check that skip_record_index is adhered to when
passed to LostItem with the force_mark_returned option enabled.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-27 11:24:02 +02:00