Commit Graph

43235 Commits

Author SHA1 Message Date
Victor Grousset/tuxayo 5265b8a92c Bug 30848: [21.05.x] Export C4::Biblio::GetMarcSubfieldStructure()
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-16 00:51:13 +02:00
Nick Clemens 83f552bdad Bug 30848: Add exec flag to test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c926c976a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4edaa27fc2)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit b10ac8189f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-15 22:31:46 +02:00
Martin Renvoize 82b0ba4139 Bug 30848: Fix issue exposed by unit tests
This patch changes the 'map' to a simple for loop so that we can easily
map multiple subfields to a field without overwriting the first previous
subfields in the structure.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 965e985619)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 4541f43789)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-15 22:31:46 +02:00
Martin Renvoize 09476bed3b Bug 30848: Expand unit tests
Add to the unit tests to test Library and Itemtype expansions as well as
linking multiple subfields of the same marc field to such expansions.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 66999034d4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 8987b89970)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-15 22:31:46 +02:00
Martin Renvoize 26e2f2c11a Bug 30848: Add an ExpandCodedFields RecordProcessor filter
This patch introduces a RecordProcessor filter for MARC::Record objects
that replaces Koha codes with descriptions in the MARC::Record passed to the processor.

Target usage:

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

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

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

  $processor->process( $record );

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a86104294)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 52dd29792e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-15 22:31:46 +02:00
Mason James 1d4dbdab06 Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t
to test...

1/ run prove, test is not run :(
 prove ./t | grep 00-check-atomic-updates.pl | wc -l
 0

2/ apply patch

3/ run prove, test is run :)
 prove ./t | grep 00-check-atomic-updates.t | wc -l
 2

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fea07bfab8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 1df5e78deb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-13 18:01:57 +02:00
Alex Buckley 14df91408d Bug 30958: OPAC overdrive search result page broken for translations
Note: You will need a valid OverDrive subscription to test this.

This patch fixes a JavaScript error thrown on the OPAC overdrive search
results page for libraries using translation templates and who don't
have the OverDrivePasswordRequired system preference = 'Required'.

Test plan:
1. Install the en-NZ translation: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client

2. Enable the en-NZ language:
   - In the OPACLanguages system preference -> tick 'English New Zealand
     (en-NZ)' checkbox and untick 'English (en)'

3. Fill in the OverDrive system preferences:
   - Make sure you set: OverDrivePasswordRequired = "Not required"

4. Perform an OPAC search

5. Click on the Overdrive results link

6. Open the browser console and notice there is a JS error, and the
   OverDrive results do not load

7. Apply patch

8. Update the en_NZ translation:

9. Repeat steps 4, 5 and 6 and notice there is no JavaScript error and
   the OverDrive results do display

Sponsored-by: Melbourne Athenaeum Library, Australia

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f5c43cf26)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 6fb34f0d66)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-13 17:52:52 +02:00
Victor Grousset/tuxayo 60c857d44b Update release notes for 21.05.17 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-26 03:46:17 +02:00
Victor Grousset/tuxayo aa6d0ecce4 Increment version for 21.05.17 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-26 02:24:05 +02:00
Victor Grousset/tuxayo 8600aa556f Fix translations for Koha 21.05.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-26 01:50:36 +02:00
Koha translators be1d070d85 Translation updates for Koha 21.05.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-25 21:12:25 +02:00
Kyle Hall f8aea440fd Bug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorities-home.pl )
There appears to be a cross site scripting attack vulnerability in opac-authorities-home.pl, but may be accessible from any page using C4::Output::pagination_bar.

https://MYKOHA.LOCAL/cgi-bin/koha/opac-authorities-home.pl?and_or=and%27%22()%26%25%3Csad%3E%3CScRiPt%20%3Ealert(document.domain)%3C/ScRiPt%3E&authtypecode=CORPO_NAME&excluding=1&marclist=all&op=do_search&operator=contains&orderby=HeadingAsc&type=opac&value=1

Test Plan:
1) Use the URL above to show the XSS vulnerability exists
2) Apply this patch
3) Restart all the things!
4) Reload the page, no XSS vulnerability!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-25 21:12:24 +02:00
Martin Renvoize dc7a1a7264 Bug 29504: (follow-up) Account for other blockers
Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3eceb3d5fe)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 96a6472747)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-24 05:07:08 +02:00
Martin Renvoize 8c525d75a0 Bug 29504: Allow 'ADDITIONAL_MATERIALS' check to be confirmed
The additional materials check when CircConfirmParts is enabled was
errantly relying upon the 'FORCE_CHECKOUT' permission.  This patch
updates the template to allow confirmation as well as cancellation of
chekout.

Test plan
1. Set a staff member with circ permissions, but not FORCE_CHECKOUT
2. Turn on CircConfirmItemParts
3. Log in as staff member in step 1
4. Attempt to checkout an item with a 952$3
5. The only option given is the Continue button (with a red X) and when
   clicked, the item does not get checked out.
6. Apply patch
7. Repeat step 4.
8. You should now have the option to 'Yes, check out (Y)' or
   'No, don't check out (N)'

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 39f89b43fd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit cf1afb5685)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-24 05:07:08 +02:00
Jonathan Druart 71384ce51b Bug 30234: Fix local cover image display for other holdings
Bug 26145 added the ability to add local cover images to items.
If SeparateHoldings is set, items from other libraries are displayed in
a separate tab, and not considered as visible. We have a JS test to
assume that images not shown are not present, this only apply for the
images for the bibliographic record, as they can come from different
sources.

Test plan:
Turn on LocalCoverImages and SeparateHoldings
Create a record with different items coming from different libraries
Attach images to items and to the biblio
Notice that with this patch you can see the images from the "Other
holdings" tab

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 54734f68f2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73604cdbcc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 2ef2b2d3b2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Fridolin Somers bc779c2c87 Bug 30883: Authorities merge is limited to 100 biblio with Elasticsearch
In C4::AuthoritiesMarc::merge, we search all biblio records using an authority with Koha::Authorities->linked_biblionumbers().
This method uses simple_search_compat() with no results limit, even saying in comment :
44d6528b56/Koha/Authorities.pm (L80)

With Zebra searchengin it is correct.

But not with Elasticsearch, there is an hardcoded limit at 100 in case no limit is given :
44d6528b56/Koha/SearchEngine/Elasticsearch/Search.pm (L346)

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

:(

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 48d4b016ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eae8863fcb)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit e82827673a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Nick Clemens 4ef422e598 Bug 31005: Don't inlcude attributes only required for other categories
To test:
 1 - Create a new patron attribute - check boxes to make it mandatory and visible etc.
 2 - Limit it to 'Patron' or other category
 3 - Edit a patron not in that category
 4 - Attempt to save
 5 - 500 Error
 6 - Missing mandatory extended attribute (type=MAND)
 7 - Apply patch
 8 - Attempt aedit again
 9 - It succeeds!
10 - Edit a patron in the category with MAND required
11 - on the edit page, right click teh attribute - click 'delete node'
12 - Submit the form
13 - 500 error, but this time that's good, the attribute check works

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a2d22ee029)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit c914420371)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Nick Clemens ae210290b5 Bug 31005: Unit test
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 39c3943076)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2dbf1bf80f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit e15a421dae)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Shi Yao Wang f617680867 Bug 30551: Make cash register report take branchcode from cash register
This patch makes it so cash register reports puts branchcode from the
cash register where the payment was made into "Transaction library"
column instead of taking the branchcode of the manager.

Test plan:
1- Use cash registers (administration > system preferences > UseCashRegisters)
2- Create another library if you only have one (administration > libraries > new library)
3- Create a cash register in each library if they don't already have one (administration > cash registers > new cash register)
4- Create a fee on your own account and pay it right after in both libraries.
5- Go to reports > cash register and generate the statistics.
6- Notice "transaction library" in both rows are the same even though the fees were paid in two different libraries and two different cash registers.
7- Apply the patch and click submit to re-generate statistics
8- Notice it now shows the correct library where the transactions were done

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43299fe5cc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit bb8602c190)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Tomas Cohen Arazi a8cbd7147c Bug 29418: (follow-up) Fix links generated in XSLTs
This patch addresses the case of links that are generated on the XSLT
side, those linking to host records using 773$t and 773$a.

To test:
1. Repeat the test plan from the other patches
2. When sitting on the detail view of the host record, click on the link
   to open the child.
=> SUCCESS: The link works, because of the previous patches
3. Click on the 'In:' link so the search takes you to the host record
=> FAIL: The link leads no results
4. Apply this patch
5. Restart all
6. Reload the child record page and click on the link
=> SUCCESS: Voila! The host record is retrieved!
7. Bonus points: Retry the full test plan, but add a " or ? to the
   author in both host and child records
=> SUCCESS: Things don't work before this patch, and work afterwards.
8. Sign off :-D

Sponsored-by: Theke Solutions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Tomas Cohen Arazi 73d7d6602a Bug 29418: Make detail rendering use the cleaned-up title for searching
This patch makes both staff and OPAC detail pages generate a valid
search link so you can trace related records in the Show analytics
link.

To test:
1. Pick a bibliographic record (I chose 'Unconditional' from the sample
   data
2. Add " and ? to the title statement. I changed it to
   'Uncond"itional?¿'
3. Add a child record to it
4. Open the detail page for the host record
=> FAIL: It doesn't show the 'Show analytics' link
5. Repeat 4 for the same record, in the OPAC
=> FAIL: It doesn't show the 'Show analytics' link
6. Apply this patch
7. Repeat 4 and 5.
=> SUCCESS: Links are shown!
8. Follow the links
=> SUCCESS: The links take you to the right resultset!
9. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Tomas Cohen Arazi cc418a482a Bug 29418: Make clean_search_term escape double quotes
We noticed that several characters will break Zebra queries. So search
terms need to be quoted for things to work. In this context, double
quotes inside search terms are problematic because double quotes are
what we use for quoting strings.

This patch makes the clean_search_term method escape double quotes.

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/Koha/SearchEngine/Zebra/QueryBuilder.t
=> FAIL: It doesn't work as it should!
3. Apply this patch
4. Repeat 2
=> SUCCESS: It does the job!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Tomas Cohen Arazi 22b15df7ff Bug 29418: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:22 +02:00
Victor Grousset/tuxayo dfb8f224fa Revert "Bug 30035: Fix month name in prediction pattern"
This reverts commit c9253082bb.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:19 +02:00
Victor Grousset/tuxayo 41e9352f35 Revert "Bug 30035: Fix failing test"
This reverts commit 5b38309599.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-14 21:40:09 +02:00
Victor Grousset/tuxayo 50a5d4af76 Update release notes for 21.05.16 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-28 01:36:40 +02:00
Victor Grousset/tuxayo 3314a98ec5 Increment version for 21.05.16 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-27 16:50:33 +02:00
Martin Renvoize c9aa17301d Bug 30808: Add the 22.05 release team.
Test plan
1/ Check against
   https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0f14c6ab6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 9e0685881c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-27 16:46:36 +02:00
Victor Grousset/tuxayo 339e310a27 Fix translations for Koha 21.05.16
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-27 16:45:26 +02:00
Koha translators b831476463 Translation updates for Koha 21.05.16
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-27 14:34:46 +02:00
Fridolin Somers 60d2619df7 Bug 30781: Fix warning in GetPreparedLetter
Test by running :
  prove t/db_dependent/Letters.t
Check you dont see warning :
  Use of uninitialized value $val in substitution iterator

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0783b96359)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 994868be66)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-26 20:08:01 +02:00
Fridolin Somers 7d30d06249 Bug 30781: Add unit test for substitute with undefined value
Add unit test that generates warn.
This may be usefull as no regression test.

Run prove t/db_dependent/Letters.t
You see warn :
t/db_dependent/Letters.t .. 1/84 Use of uninitialized value $val in substitution iterator at /kohadevbox/koha/C4/Letters.pm line 607.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e0243c378)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3b3b7f0ad9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 9068cc1c42)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-26 20:07:28 +02:00
Nick Clemens 6cf15316e6 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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b4685ca205)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-25 23:11:03 +02:00
Tomas Cohen Arazi b7db304033 Bug 30663: Implement overrides handling in POST /suggestions
This patch implements the override checks in the controller as expected
by the previous patch.

To test:
1. Apply this bug patches up to 'Add x-koha-override options...'
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/suggestions.t
=> FAIL: Tests fail! The controller doesn't care about overrides or
         sysprefs about suggestions limits.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Things work!
5. Sign off :-D

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ce9664e1b0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-25 04:50:55 +02:00
Tomas Cohen Arazi b1404ce298 Bug 30663: Add x-koha-override options to /suggestions
This patch adds the x-koha-override header parameter to the route that
is used to create suggestions, POST /suggestions.

The idea is that adding suggestions will be rejected under certain
conditions unless x-koha-override is passed with appropriate values. The
added overrides are:

* any
* max_total
* max_pending

Tests are added for the expected behavior.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 25317416e6)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-25 04:48:54 +02:00
Tomas Cohen Arazi 9794624aa4 Bug 30663: Add Koha::Suggestions helper methods
This patch adds the following helper methods:

* filter_by_pending
* filter_by_suggested_days_range

This methods follow basically what's done in opac-suggestions.pl
I chose 'pending' as opposed to 'open' to follow what we use in the UI
which might be the case because of being more accurate for end users.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 54dbb85248)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-25 04:45:09 +02:00
Jonathan Druart 0d9bdc015d Bug 30628: Fix patron selection in batch patron modification tool
bug 28014 added Datatables to this view, but the form is submitted with
only the checkboxes from the first page.

Solution adapted from https://stackoverflow.com/questions/33240409/how-to-submit-checkboxes-from-all-pages-with-jquery-datatables

Test plan:
Have more than 20 cardnumbers, use the batch patron modification tool
Select (not all) patrons from the first page and second page
Submit the form
Notice that the patrons you have selected appear on the confirmation
page.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7e053bf546)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-23 03:51:17 +02:00
Martin Renvoize 8308f924aa Bug 30610: Update on click binding for print receipt
This patch updates the binding for the on click even of the print
receipt button so that subsequent pages in the datatable work with the
reciept printing button.

Test plan
1) Enable cash management and process enough transactions to display
   more than one page of transactions in the register details page.
2) Confirm the 'Print receipt' button works on the first page of
   transactions
3) Confirm the 'Print receipt' button works on subsequent transactions
   pages in the datatable.
4) Confirm the same for the past transactions table.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 126c70c982)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-23 03:39:03 +02:00
Jonathan Druart eeefd05eaa Bug 30630: Prevent crash on check-in if HoldsAutoFill is ON
RevertWaitingStatus has already removed the itemnumber from the hold, passing $itemnumber (from scanned item) should work, as it will reattach the hold to the item

Test plan:
1 - Enable HoldsAutoFill
2 - Place a title level hold
3 - Check in an item and confirm hold
4 - Switch to another branch
5 - Checkin the item
Without this patch you got
Can't call method "biblionumber" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 1577.
 at /kohadevbox/koha/C4/Reserves.pm line 1576
With this patch applied the operation succeeds

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 73a2e35589)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-23 01:31:59 +02:00
Victor Grousset/tuxayo 7b554a0854 Bug ?????: Compiled SCSS due to compiler change or previous oversight
Either it has been forgotten in a previous release or it's the compiler
version difference between me and the previous RMaint

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-17 05:30:23 +02:00
Fridolin Somers e9aea72558 Bug 24001: (follow-up) Fix t_Profile.t
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 333b698d62)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-17 05:25:04 +02:00
Nick Clemens db7f8ecf78 Bug 24001: Fix Card template/rpinter profile creation and edit
This patch adjusts the template/profiles to use the default of '0'
This should probably be NULL, and the columns foreign keys, this code
could use a further rewrite, but this should fix a long standing bug

To test:
 1 - Using the fresh install, with all the sample data.
 2 - Go to Home › Tools › Patron card creator › Templates
 3 - New > Card template
 4 - Save
 5 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'profile_id' at row 1
 6 - Edit an existing template
 7 - Save
 8 - Error: Can't bless non-reference value at /kohadevbox/koha/C4/Creators/Profile.pm line 89
 9 - Create a new 'Printer profile'
10 - Save
11 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'template_id' at row 1
12 - Apply the attached patch.
13 - Verify you can create a new 'Card template' and 'Printer profile' with no errors
14 - Verify you can edit and save both of the newly created objects above

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 65c784d3fd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-17 05:25:04 +02:00
Blou cff9585e04 Bug 24001: Fix patron card template edition
Error when saving Patron card Template:
Can't bless non-reference value at
/home/vagrant/kohaclone/C4/Creators/Profile.pm line 89

This is caused by the profile dropdown offering invalid choices and is
fixed by adding a filter to limit options to creator = 'Patroncards'.
The UI already handles the case where no valid profile is avaiable.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8be82f8616)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-17 05:25:04 +02:00
Andrew Fuerste-Henry c1d9370c40 Update release notes for 21.05.15 release
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-29 16:27:06 +00:00
Andrew Fuerste-Henry 18c6fb666a Increment version number for 21.05.15 release
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-29 16:20:30 +00:00
Andrew Fuerste-Henry b3d2f6fb0b Fix translations for Koha 21.05.15
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-29 16:18:02 +00:00
Andrew Fuerste-Henry 9e9be0aeb5 Translation fixes for 21.05.15 2022-05-29 16:16:59 +00:00
Koha translators 22bff19194 Translation updates for Koha 21.05.15
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-29 13:02:08 -03:00
Jonathan Druart 191569ebaa Bug 29374: Don't crash if search engine returns a deleted record
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 20991feb62)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-29 15:45:27 +00:00
Tomas Cohen Arazi 710344a560 Bug 30212: Make Select2 available for ILL backends
This patch makes select2 available for ILL backend developers to use on
their templates.

To test:
1. Have a configured backed and an ILL request
2. Open the inspector and load any action on the backend (intranet)
=> FAIL: no select2 asset is transfered from Koha to the browser
3. Apply this patch
4. Reload
=> SUCCESS: There's select2
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: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c864cc73e5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-10 12:19:09 +00:00