]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 30784: Rephrasing OPACMandatoryHoldDates pref slightly
Danyon Sewell [Thu, 7 Jul 2022 23:26:19 +0000 (23:26 +0000)]
Bug 30784: Rephrasing OPACMandatoryHoldDates pref slightly

TEST PLAN:

1. On the Admin page, navigate to Koha Administration > Global System
Preferences

2. Search for OPACMandatoryHoldDates

3. In the Value field, check that it now says On the "Placing a hold"
form, instead of opac-reserve form.

Sponsored by Catalyst IT

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff4f9a9e74e911c0f4bf9a1b41f58bb92b803810)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30770: (QA follow-up) Fixing the last occurrence of reserve in returns.tt
Katrin Fischer [Fri, 8 Jul 2022 08:31:42 +0000 (08:31 +0000)]
Bug 30770: (QA follow-up) Fixing the last occurrence of reserve in returns.tt

Reserve -> Hold

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30770: Fixed terminology 'reserve' -> 'hold'
Tosca Waerea [Thu, 7 Jul 2022 23:07:21 +0000 (23:07 +0000)]
Bug 30770: Fixed terminology 'reserve' -> 'hold'

Test plan:
1. Look at koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
2. Note that it says 'Lost reserve'
3. Apply patch
4. Note that it says 'Lost hold'

Note:
I was not able to trigger the behaviour to see the text in question

Sponsored-by: Catalyst IT
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 42a1aba19d178825aa63290198695bd7f5a7ea0b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30764: replace "Cancelled reserve" with "Cancelled hold"
Filip Vujičić [Thu, 7 Jul 2022 22:48:42 +0000 (22:48 +0000)]
Bug 30764: replace "Cancelled reserve" with "Cancelled hold"

Test plan:
1. Inspect `koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt`, notice that on line 136 it says "Cancelled reserve"
2. Apply patch
3. Inspect the same line again and notice it now correctly says "Cancelled hold"
4. ???
5. Profit!

Sponsored-by: Catalyst IT
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b688fd97499682a77ca899011f0667c148515a04)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30773: (follow-up) Remove spaces between brackets
David Nind [Fri, 8 Jul 2022 06:18:26 +0000 (06:18 +0000)]
Bug 30773: (follow-up) Remove spaces between brackets

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30773: Standardize spelling i-tive / Itiva
krisw [Thu, 7 Jul 2022 23:53:15 +0000 (23:53 +0000)]
Bug 30773: Standardize spelling i-tive / Itiva

In the Koha staff interface go to administration.
Go to TalkingTechItivaPhoneNotification. Enable this preference. Save.
Go to Tools > Overdue notice/status triggers
Check that ‘Phone (i-tiva)’ is an option for notice types.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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 0a40c7f58e0045c04672a85347bc90359cf48f53)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31038: Fix price formating in cashup summary
Martin Renvoize [Fri, 24 Jun 2022 10:36:32 +0000 (11:36 +0100)]
Bug 31038: Fix price formating in cashup summary

This patch uses the existing format_price JS include to format prices in
the cashup summary modal

Test plan
1) Create some transactions and a cashup
2) View the cashup summary modal and confirm amounts are not nicely
   formatted
3) Apply patch
4) Confirm amounts in cashup summary modals are now nicely formatted

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29050: (follow-up) Replace & with and
David Nind [Fri, 8 Jul 2022 11:10:34 +0000 (11:10 +0000)]
Bug 29050: (follow-up) Replace & with and

See the terminology list https://wiki.koha-community.org/wiki/Terminology

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29050: Added a punctuation between renewal messages
Nisha Dahya [Thu, 7 Jul 2022 23:31:38 +0000 (23:31 +0000)]
Bug 29050: Added a punctuation between renewal messages

Test plan:

1. First step is to go to administration > then system preferences
2. Set unseenrenewal to "allow"
3. Go to administatrion > circulation and fines rule
4. Set unseenrenewals count to any number
5. Check out an item to a patron and go to the checkouts tab
6. Renew the item
7. Notice that the renewal messages have no seperation
8. Apply the patch
9. Notice there is now a "&" in the spacing between renewal messages

Sponsored-by: Catalyst IT
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 36357ad045116f4be63ea50eff9807f1c262aaef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31122: Terminology - Replace occurences of 'Notices & slips' with 'Notices and...
David Nind [Fri, 8 Jul 2022 12:25:01 +0000 (12:25 +0000)]
Bug 31122: Terminology - Replace occurences of 'Notices & slips' with 'Notices and slips'

Replace occurences of 'Notices & slips' with 'Notices and slips'
(replacing '&' and '&amp' with 'and'), as per the terminology
guidelines.

See the terminology list:
https://wiki.koha-community.org/wiki/Terminology

Test plan:
1. Find occurrences of 'Notices & slips':
   - git grep 'Notices &amp; slips' -- :^misc/translator/po
   - git grep 'Notices & slips'
2. Review places in the staff interface where 'Messages & slips' is
   displayed:
   - Tools home page
   - Tools > Notices & slips: page title and breadcrumb
   - Other breadcrumbs:
     . Tools > Notices & slips > New notice > [select any module]
     . Tools > Notices & slips > [select Edit for any notice]
     . Tools > Notices & slips > [select Delete for any notice]
3. Review other occurences:
   . The cron job description for misc/cronjobs/holds/holds_reminder.pl:
     misc/cronjobs/holds/holds_reminder.pl -man (scroll down to the
     description)
   . The TalkingTech README file:
     vi misc/cronjobs/thirdparty/TalkingTech.README
4. Apply the patch.
5. Re-run the grep queries from step 1 - no occurences are now found.
6. Review places where 'Notices & slips' was found in steps 2 and 3 -
   these should all be replaced with 'Notices and slips' and should
   read correctly.
7. Sign off!

Alernative: review the diff for the patch and check that occurences of
'&amp' and '&' are replaced with 'and' and the updated text reads
correctly.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31067: Fixing missing permission check
Florian Bontemps [Wed, 29 Jun 2022 15:18:17 +0000 (15:18 +0000)]
Bug 31067: Fixing missing permission check

This patch just fixes a missing permission on the intranet main page. Currently, the Additional Content modules allows people to edit, modify or create new additional content just by checking if they have any tool permission at all, and not the right one.

To test:
1 - From the staff client, create a news article for the intranet.
2 - Create (or use) an additional staff patron, giving them the necessary permissions to access the intranet, but no tool permission.
3 - Using another browser (or incognito mode), log on the intranet page with your new staff account, you should be able to see the news content, but not edit or delete it. That's the expected behavior.
4 - From your main admin account, give your test account the edit_additional_contents permission.
5 - Your test account should now be able to edit/delete the news content. This is also expected behavior.
6 - Using the main account again, remove this time the edit_additional_contents but add any other subtool permission (edit_calendar is a good one for instance)
7 - Repeat step 5 and confirm that your test account can still edit or delete the news content. This shouldn't happen.
8 - Apply patch
9 - Repeat steps 4-6, and confirm that your test account can now only edit or delete news content if they have the edit_additional_contents permission enabled.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 e3faa4d66ba281125be437a971d1549ba8179ec3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30769: Typo fix in request.tt
Nick Clemens [Tue, 28 Jun 2022 10:06:57 +0000 (10:06 +0000)]
Bug 30769: Typo fix in request.tt

This patch fixes a small typo at
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:574

To test:
1 - Set item-level_itypes in administrative preferences to
    bibliographic record
2 - Navigate to /reserve/request.pl in admin interface
3 - Notice that the typo is there in hold details
4 - Apply Patch
5 - Typo is fixed

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31001: Fix "CGI::param called in list context" warning in basket.pl
Petro Vashchuk [Tue, 21 Jun 2022 13:02:51 +0000 (16:02 +0300)]
Bug 31001: Fix "CGI::param called in list context" warning in basket.pl

CGI param basketno should be explicitly scalar,
or else error log gets flooded with this warning:

AH01215: CGI::param called in list context from
/home/vagrant/kohaclone/acqui/basket.pl line 175, this can lead to
vulnerabilities. See the warning in "Fetching the value or values of a
single named parameter" at /usr/share/perl5/CGI.pm line 412.

This patch fixes it by working with it in a scalar context.
The functionality still remains the same but warning doesn't flood
error log.

To reproduce:
1. Head over to the acquisitions page.
2. Pick existing vendor with email contact info or create a new one.
3. Create a new basket or use existing one, and if it doesn't have
any orders, add a new order to it.
4. Use the "E-mail order" button to send order.
5. Check the error log and find the upper mentioned warning.
(Note: if you're going to test this more than once, you might need
to restart your Plack in order for this warning to get added to your
log file again, reasons of that is that the authors of CGI.pm decided
to "warn only once")
6. Apply the patch.
7. Use the "E-mail order" button again, ensure that the same warning
doesn't get added to the log file again.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30976: Display biblio's cover images first
Jonathan Druart [Thu, 16 Jun 2022 10:33:31 +0000 (12:33 +0200)]
Bug 30976: Display biblio's cover images first

If one add cover images at item's level, then biblio level, the cover images
of the items are displayed first on the main "cover slider" at the top of the page.
We should displayed biblio cover images first, then the ones for the items.

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 6c55159eb6a91891f7c1becd49ec927ee9a3a36a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30903: (follow-up) Fix error message class
Fridolin Somers [Mon, 20 Jun 2022 21:23:32 +0000 (11:23 -1000)]
Bug 30903: (follow-up) Fix error message class

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30903: Fix UI glitch on the quotes upload view
Jonathan Druart [Tue, 7 Jun 2022 13:57:35 +0000 (15:57 +0200)]
Bug 30903: Fix UI glitch on the quotes upload view

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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 f36dbf09f635e42066d43799a79e634c15465a0e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30903: Fix POST /quote
Jonathan Druart [Tue, 7 Jun 2022 13:56:59 +0000 (15:56 +0200)]
Bug 30903: Fix POST /quote

quote_id should not be required

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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 4e75a3a1ee34849384b28c236ca97f7d180591d4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 24010: Schema changes
Lucas Gass [Fri, 12 Aug 2022 15:35:47 +0000 (15:35 +0000)]
Bug 24010: Schema changes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 24010: Number of issues to display to staff accepts non-integer values
Owen Leonard [Fri, 13 May 2022 15:14:26 +0000 (15:14 +0000)]
Bug 24010: Number of issues to display to staff accepts non-integer values

This patch modifies the subscription entry form so that it will perform
a check on the staffdisplaycount and opacdisplaycount fields before
proceding to the second step. It verifies that the values are numeric.

The changes are made in the style of the existing form validation, which
should be rewritten to either use the validation plugin or to peform
checks in a way that all checks are run before warning the user.
However, this smaller change will work in the meantime.

To test, apply the patch and go to Serials -> New subscription.

- Fill out the form with at least the required fields, but put something
  other than a number if the "Number of issues to display to staff" and
  "Number of issues to display to the public" with non-numeric characters.
- When you click the "Next" button you should get an error message,
  "Number of issues to display to staff must be a number."
- Correct the issues to display to staff field and submit again.
- You should get a different error message, "Number of issues to display
  to the public must be a number."
- Correct this field and you should be able to proceed to the next step.

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 57221e083bb329f3c428fd20e7e7f65a6ab10186)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 24010: DBRev 22.05.03.004
Lucas Gass [Fri, 12 Aug 2022 15:17:26 +0000 (15:17 +0000)]
Bug 24010: DBRev 22.05.03.004

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 24010: (QA follow-up) Correct COMMENT syntax
Tomas Cohen Arazi [Tue, 5 Jul 2022 14:08:16 +0000 (11:08 -0300)]
Bug 24010: (QA follow-up) Correct COMMENT syntax

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 24010: DB Changes
Jonathan Druart [Fri, 22 Nov 2019 11:33:41 +0000 (12:33 +0100)]
Bug 24010: DB Changes

Amended-patch: adjusted to new atomic update format

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31106: Fix links generated in XSLTs
Tomas Cohen Arazi [Tue, 5 Jul 2022 00:09:05 +0000 (21:09 -0300)]
Bug 31106: Fix links generated in XSLTs

This patch addresses the case of links that are generated on the XSLT
side, those linking to and from host records using 773$t and 773$a.

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. Go to the child record, and notice the link back to the parent works
   :-D
10. Sign off :-D

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31106: Make clean_search_term escape double quotes
Tomas Cohen Arazi [Mon, 4 Jul 2022 18:19:27 +0000 (15:19 -0300)]
Bug 31106: 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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 24bb15785dd7f176c1ffe2bf8ae5e8a05cc0707a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31106: Unit tests
Tomas Cohen Arazi [Mon, 4 Jul 2022 18:18:44 +0000 (15:18 -0300)]
Bug 31106: 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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 73ca6e2f57d9c2271878e74e46548cb7eadea2a3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31179: (QA follow-up) Set field as hidden for tests
Nick Clemens [Tue, 19 Jul 2022 15:26:51 +0000 (15:26 +0000)]
Bug 31179: (QA follow-up) Set field as hidden for tests

We want the tests to pass in the case where field is set to visibile in Koha

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31179: (QA follow-up) POD fix
Nick Clemens [Tue, 19 Jul 2022 15:17:56 +0000 (15:17 +0000)]
Bug 31179: (QA follow-up) POD fix

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31179: Don't copy invisible subfields when duplicating items
Jonathan Druart [Tue, 19 Jul 2022 14:09:46 +0000 (16:09 +0200)]
Bug 31179: Don't copy invisible subfields when duplicating items

Duplicate item is intended to duplicate the visible cataloging fields of an item, however,
currently it is duplicating the complete internal record of the item

To recreate:
1 - find an item in Koha staff client, copy the barcode
2 - Issue this item to a patron
3 - Return to the record
4 - Edit items
5 - Click 'Actions->Duplicate' for the item in question
6 - Save the item
7 - Note in the items table above for that 'Total checkouts' 'Due date'
 etc. have not been copied to new item

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30837: Fix table width on 'Print summary'
Magnus Enger [Tue, 24 May 2022 12:12:35 +0000 (12:12 +0000)]
Bug 30837: Fix table width on 'Print summary'

To reproduce:
- Make sure you have a patron with at least one checkout,
  one hold and one fine
- On the detail page for that patron, go to Print > Print
  summary
- Observe the tables are too wide to fit on a printed page

To test:
- Apply this patch
- Repeat the steps above
- Observe the table now fits on the page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30716: Add collection to cn_browser results
Lucas Gass [Fri, 6 May 2022 21:50:05 +0000 (21:50 +0000)]
Bug 30716: Add collection to cn_browser results

To test:
1. Go to MARC bibliographic framework, pick a framework and go to 952, subfield "o". Turn the cn_browser plugin on.
2. Pick or create an item in that framework, edit that item.
3. TO the right of the 952$o notice the "...". Click that start the call number browser.
4. Notice there is no column for collection.
5. Apply patch, restart_all
6. Notice there is now a column for with the items collection.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR
Katrin Fischer [Mon, 6 Jun 2022 21:34:26 +0000 (21:34 +0000)]
Bug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR

In input fields we always use the decimal . while the display format
uses the decimal separtor definded by CurrencyFormat. When adding a
manual invoice without this patch, the amount is shown with comma, but
it should be . in the input field.

To test:
1- Go in Administration->Debit types
2- Click on New debit type
3- Fill the form:
   Code: USEDBOOK
   Default amount: 0.50
   Description: Used book
   Can be manually invoiced: Yes
4- Save
5- Go to any patron account
6- Go to the "Accounting" tab
7- Click on "Create manual invoice"
8- Fill the form
9- Choose the created debit (Used book)
10- Verify that the format is incorrect (0,50 instead of 0.50)
11- Apply the patch
12- Verify the amount is now using the correct format

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30566: Incorporate link handling in OPAC's biblio-title include
Owen Leonard [Tue, 19 Apr 2022 15:31:41 +0000 (15:31 +0000)]
Bug 30566: Incorporate link handling in OPAC's biblio-title include

This patch modifies the biblio-title include so that it can be used to
link to the bibliographic record using the default biblio view.

On pages where the biblio-title include was wrapped in an anchor tag, a
link parameter is added: [% INCLUDE 'biblio-title.inc' link=> 1 %]

To test, apply the patch and view the following pages in the OPAC to
confirm that titles are displayed correctly and that the link to the
bibliographic record is correct:

- Log in to the OPAC: On the "your summary" page, check checkouts,
  overdues, holds, and article requests.
- Check the "your holds history" page.
- Locate a bibliographic record and click "Save to your lists."
  In the popup, the title should be displayed correctly without a link.
- Place a hold, and check the hold confirmation page.
- Check the "Recent comments" page.
- Locate a record which has a local cover image attached, and view the
  image.

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 3bd3ec4805047412f25a93712dd06ea2de70608b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30990: Fix DefaultHoldPickupLocation system preference description
Katrin Fischer [Fri, 17 Jun 2022 20:20:08 +0000 (22:20 +0200)]
Bug 30990: Fix DefaultHoldPickupLocation system preference description

Changes:
* branch to library
* staff client to staff interface
* adds an ending .

To test:
- Compare system preference descrpition before and after the
  patch was applied.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 21a37a19e0d5bff051d529272c64673b759a43b4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31040: jsTree image being used outside of jsTree plugin
Owen Leonard [Fri, 24 Jun 2022 11:44:09 +0000 (11:44 +0000)]
Bug 31040: jsTree image being used outside of jsTree plugin

This patch corrects OPAC templates which tried to use a jsTree image
asset which is missing following the jsTree upgrade (see Bug 11873).
Templates should use /images/spinner-small.gif instead.

To test, apply the patch and enable OpenLibrarySearch and populate
OverDrive and RecordedBooks preferences with credentials (they don't
have to be valid).

Perform a catalog search in the OPAC. When the search results page first
loads you should see messages about the services being queried:

Searching OpenLibrary...
Searching RecordedBoks...
Searching OverDrive...

Each should show a working "spinner" image while the queries are being
performed. If you have valid OverDrive credentials you can try clicking
through to the OverDrive search results page to confirm that the image
is working on that page too.

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 8f1f1cfd5054211df2aebf3073333133b410d929)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31066: Update javascript to use 'text_plugin' type for regex option
Nick Clemens [Wed, 29 Jun 2022 11:23:22 +0000 (11:23 +0000)]
Bug 31066: Update javascript to use 'text_plugin' type for regex option

To test:
 1 - Confirm 952$o is not linked to a plugin in the default marc framework
 2 - Send some tiems to batch modification
 3 - Confirm you can select RegEx as an option for callnumber during modification
 4 - Link 952$o to the cn_browser.pl plugin
 5 - Repeat batch modification
 6 - Note there is no regex option
 7 - Apply patch
 8 - Confirm there is a regex option
 9 - Unlink 952$o from plugin
10 - Confirm you still have a regex option in batch modification

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29958: Do not set dateaccessioned on updates
Martin Renvoize [Fri, 24 Jun 2022 14:39:07 +0000 (15:39 +0100)]
Bug 29958: Do not set dateaccessioned on updates

This patch reomves the second occurence of setting daeaccessioned today,
outside of the 'add/update' handling in Koha::Item->store.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f5fbcf73626139bcc01aca73b912fa29ff51f7d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29958: Regression tests
Tomas Cohen Arazi [Tue, 5 Jul 2022 12:14:16 +0000 (09:14 -0300)]
Bug 29958: Regression tests

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 25622: Use special chars in DB password (koha-create)
Jonathan Druart [Fri, 29 May 2020 14:10:58 +0000 (16:10 +0200)]
Bug 25622: Use special chars in DB password (koha-create)

On bug 23250 we decided to generate a password without special chars
then add a '@' at the end to comply with MySQL policy.
That is wrong, we should handle correctly the special chars we don't
want to be part of the password.

Test plan:
1.
mysqlpwd=$(pwgen -s -y -r ":'&\\<>/" 16 1)
echo $mysqlpwd

Confirm that you don't see one of the following chars : ' & \ < > /

2.
Copy from src and edit /usr/sbin/koha-create to add an echo $mysqlpwd
Create several instances, like:
koha-create --create-db x
koha-create --create-db xx
koha-create --create-db xxx
...

When you see a password with a special chars, do:
koha-shell xxx
grep '<pass>' $KOHA_CONF
And make sure the password does not contain "__DB_PASS__"

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ffd3b4b7e391d40c476772bd16530572431d2896)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30152: Elasticsearch - queries with OR don't work with limits
Kevin Carnes [Tue, 22 Feb 2022 13:29:15 +0000 (14:29 +0100)]
Bug 30152: Elasticsearch - queries with OR don't work with limits

When a query with "OR" is combined with a limit in Elasticsearch, the precedence is not preserved and the results are not correct.

To test:
1) Set SearchEngine to Elasticsearch
2) Index records in Elasticsearch
3) Do an advanced search
4) Select More options
5) Enter a value for the first Keyword (e.g. Novels)
6) Change "and" before the second Keyword to "or"
7) Enter another value for the second Keyword (e.g. Prose)
8) Limit the search (e.g. Item type Books)
9) Do the search
10) Observe that records with the first keyword are not in the results
11) Apply the patch
12) Repeat the search
13) Observe that results with both keywords are in the results
14) Sign off

Sponsored-by: Lund University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3ed649a0e09d4ab96ed117ec2dc2446c9da71d34)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31062: Change description of QOTD tool in tools-home
Caroline Cyr La Rose [Wed, 29 Jun 2022 15:12:57 +0000 (11:12 -0400)]
Bug 31062: Change description of QOTD tool in tools-home

This patch changes the name and description of the QOTD tool in order
to make them more consistent with the other tool names and descriptions.

To test:
1) Go to Tools
2) Read the QOTD tool name and description, make sure they make
   sense and that there are no typos
3) Test the link to make sure it goes to the tool

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30cc6f422f1e7f2cd130d8327317f2805d510e9a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31064: Wrap local login with stylable element
David Cook [Wed, 29 Jun 2022 08:46:21 +0000 (08:46 +0000)]
Bug 31064: Wrap local login with stylable element

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACUserCSS
2. Set syspref to the following:
.local-login {
      display: none;
}
3. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
3b. Note that the local login boxes are hidden
    ("Log in to your account:" remains so that other login options can
    be supplied by OpacUserJS)

4. Click on "Log in to your account" on the top toolbar
4b. Note that the local login boxes are hidden
    ("Log in to your account:" remains so that other login options can
    be supplied by OpacUserJS)

5. Go to http://localhost:8080/cgi-bin/koha/opac-user.pl
5b. Note that the local login boxes are hidden
    ("Log in to your account" remains so that other login options can be
    supplied by OpacUserJS)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30823: DBRev 22.05.03.003
Lucas Gass [Tue, 9 Aug 2022 21:23:32 +0000 (21:23 +0000)]
Bug 30823: DBRev 22.05.03.003

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30823: Filling recalls uses 'FILL' action in action logs
Aleisha Amohia [Mon, 6 Jun 2022 23:52:59 +0000 (23:52 +0000)]
Bug 30823: Filling recalls uses 'FILL' action in action logs

This enhancement changes recall fulfillment actions to log with the
FILL action. It will also update existing recalls FULFILL actions in
the database to use the FILL action.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules. Confirm RecallsLog is enabled.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place a recall on that item.
5) Go back to the staff client and check the item in. Confirm the recall
as waiting for Patron A.
6) Check out the item for Patron A to fill the recall.
7) Go to Tools -> Log Viewer. Confirm there is a FULFILL action. Choose
the following search params to browse system logs:
- modules: recalls
- actions: fill
8) Submit the search and confirm the recall DOES NOT show.
9) Apply the patch, update database, restart services.
10) Refresh the log viewer and repeat step 7. Submit the search and
confirm the recall DOES show. Confirm there is no longer a FULFILL
action as both holds and recalls will use FILL.
11) Check in the item.
12) Repeat steps 2-6. We are ensuring that future recalls are logged
using the FILL action.
13) Repeat step 7. Confirm all test recalls are now showing in search
results.

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b8939b2ec823afb4b008dbba81276e259037ce5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31085: Reload return claims table on resolve
Martin Renvoize [Mon, 27 Jun 2022 16:53:15 +0000 (17:53 +0100)]
Bug 31085: Reload return claims table on resolve

This is another fix for a bug in return claims. We now test for the
initialised datatable and call an ajax reload directly on it if we find
one instead of calling a undefined function (the function is out of
scope here).

NOTE: Taken as a whole commit follow-up on bug 28854 where the issue was
initially identified

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31087: Prevent stringification of null in return claims
Martin Renvoize [Mon, 27 Jun 2022 16:20:55 +0000 (17:20 +0100)]
Bug 31087: Prevent stringification of null in return claims

The return claims table was stringifying 'null'. This patch updates the
code to check for definition so we don't stringify incorrectly

Note: This patch was split out from a follow-up on bug 28854 as we felt
it should be treated separately for backportability.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 41ce80eb12e738a55c697f51ecfb32a932a38959)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: (follow-up) Warn if context is not defined
Tomas Cohen Arazi [Fri, 1 Jul 2022 13:21:58 +0000 (10:21 -0300)]
Bug 30889: (follow-up) Warn if context is not defined

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30865: Double-quote Host-item in Koha::Biblio->get_components_query
David Cook [Mon, 30 May 2022 03:31:44 +0000 (03:31 +0000)]
Bug 30865: Double-quote Host-item in Koha::Biblio->get_components_query

This patch adds double quotes around the term qualified by "Host-item"
in Koha::Biblio->get_components_query().

Without them, reserved charactrs like "=" will cause syntax errors like
"CCL parsing error (10014) Unknown qualifier ZOOM for query:
    Host-item=(MyTitle = Mysubtitle)
    at /usr/share/koha/lib/C4/Search.pm line 245."

Test plan:
0) Don't apply the patch
1) Create biblio with title and subtitle like (MyTitle : MySubtitle)
2) Note the warning "There was an error searching for analytic records,
   please see the logs for details." on the detail page
3) Apply the patch
4) koha-plack --restart kohadev
5) Refresh the detail page
6) Note that the warning message is gone
7) prove t/db_dependent/Koha/Biblio.t

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30744: Use RecordProcessor in get_marc_notes
Martin Renvoize [Wed, 25 May 2022 14:51:41 +0000 (15:51 +0100)]
Bug 30744: Use RecordProcessor in get_marc_notes

This patch utilises RecordProcessor to filter the MARC::Record for the
right interface prior to constructing the marc notes array.  We also
remove the use of C4::XSLT for replacing AV values in the MARC fields in
preference to using the RecordProcessor filter.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 029d7bacf01ac9debe4ca21150d9c9c572f090da)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30918: Allow passing filtered record to get_marc_notes
Martin Renvoize [Tue, 7 Jun 2022 12:45:14 +0000 (13:45 +0100)]
Bug 30918: Allow passing filtered record to get_marc_notes

This patch does the absolute bare minimum to prevent private notes from
appearing on the OPAC.

Test plan
1. Go to Koha Administration -> Koha bibliographic frameworks
2. View the MARC structure for your BKS framework (or something else)
3. Search for tag 583, edit subfields
4. Go to subfield 'x' - nonpublic note. Confirm the OPAC visibility
   checkbox is UNCHECKED.
5. Edit or create a record using the BKS framework. Put a note in the
   583$x.
6. View this record in the OPAC
7. Go to the Title notes tab. Confirm the non-public note is
   showing, even though the framework says it should not be
   visible via the OPAC.
8. Apply patch
9. Confirm the non-public note is no longer visible

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30848: Add exec flag to test
Nick Clemens [Fri, 17 Jun 2022 13:09:02 +0000 (13:09 +0000)]
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 8c926c976a7a5057c578d8f5d41f4cdaa1d8ab5e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30848: Fix issue exposed by unit tests
Martin Renvoize [Mon, 13 Jun 2022 13:26:33 +0000 (14:26 +0100)]
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 6c381c4b22d30388f8e24966a6c6e7c78201dba3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30848: Expand unit tests
Martin Renvoize [Mon, 13 Jun 2022 13:25:30 +0000 (14:25 +0100)]
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 6b04e3e18f1c534e3d7d91dde458d30e02e13f33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30848: Add an ExpandCodedFields RecordProcessor filter
Martin Renvoize [Thu, 26 May 2022 09:24:50 +0000 (10:24 +0100)]
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 62bba6d9e12bdf9e3dbf231beae68afe43618f4b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: DBRev 22.05.03.002
Lucas Gass [Fri, 29 Jul 2022 17:10:58 +0000 (17:10 +0000)]
Bug 30889: DBRev 22.05.03.002

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: Update Scheme(DBIC)
Lucas Gass [Fri, 29 Jul 2022 17:08:00 +0000 (17:08 +0000)]
Bug 30889: Update Scheme(DBIC)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: Add comment for the new DB field
Tomas Cohen Arazi [Thu, 30 Jun 2022 14:52:52 +0000 (11:52 -0300)]
Bug 30889: Add comment for the new DB field

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: Unit tests - process
Martin Renvoize [Mon, 20 Jun 2022 15:27:51 +0000 (16:27 +0100)]
Bug 30889: Unit tests - process

This patch adds corresponding unit tests for the 'process' side of this
patchset. We check that the Context for the job to run in as set from
the Job context recorded at enqueue time.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: Unit tests
Martin Renvoize [Mon, 20 Jun 2022 15:01:28 +0000 (16:01 +0100)]
Bug 30889: Unit tests

This patch adds a unit test for the 'enqueue' part of the bug. We check
that the mocked context (and interface) are recorded with the job
enqueue in the new 'context' field.

We do not yet test the 'process' end, where we then read the context out
and set the job Context from it.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: Fix atomic update permissions
Kyle M Hall [Fri, 17 Jun 2022 18:00:36 +0000 (18:00 +0000)]
Bug 30889: Fix atomic update permissions

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: (follow-up) Record and use context in background_jobs
Martin Renvoize [Fri, 10 Jun 2022 13:09:21 +0000 (14:09 +0100)]
Bug 30889: (follow-up) Record and use context in background_jobs

This patch records the current context to the background_jobs table at
enqueue time and then uses that record to set the context at process
time.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: (follow-up) Add context field to background_jobs
Martin Renvoize [Fri, 10 Jun 2022 13:06:22 +0000 (14:06 +0100)]
Bug 30889: (follow-up) Add context field to background_jobs

This patch adds a new 'context' field to the background_jobs table to
record the context in which the job was queued.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: Set interface to 'intranet'
Jonathan Druart [Tue, 7 Jun 2022 12:41:14 +0000 (14:41 +0200)]
Bug 30889: Set interface to 'intranet'

Is that correct?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44b74010b1d45bda2ce2f8c58f282570566238fc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30889: Set userenv for background jobs
Jonathan Druart [Tue, 7 Jun 2022 12:39:44 +0000 (14:39 +0200)]
Bug 30889: Set userenv for background jobs

We need to set the userenv when we process the jobs. It is useful for
stats (at least)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f2425a2433adc380b9bd06c7fdd20d5d7a268a6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31058: Fix import AutoUnsuspendHolds
Nick Clemens [Tue, 28 Jun 2022 10:06:57 +0000 (10:06 +0000)]
Bug 31058: Fix import AutoUnsuspendHolds

This patch corrects missing import

To test:
1 - perl misc/cronjobs/holds/auto_unsuspend_holds.pl
2 - It dies
Undefined subroutine &main::AutoUnsuspendReserves called at misc/cronjobs/holds/auto_unsuspend_holds.pl line 38.
3 - Apply patch
4 - run again
5 - It succeeds!

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30939: Fix use statement for DelAuthority
Katrin Fischer [Fri, 17 Jun 2022 22:34:45 +0000 (22:34 +0000)]
Bug 30939: Fix use statement for DelAuthority

Without this patch, the script won't delete any
unused authorities, but gives an error instead
and dies:

Undefined subroutine &main::DelAuthority called at ./misc/migration_tools/remove_unused_authorities.pl line 98.

To test:
- Run from koha-shell:
  ./misc/migration_tools/remove_unused_authorities.pl -t
- Verify several authorities are reported as unused
- ./misc/migration_tools/remove_unused_authorities.pl -c
- Verify the error message is shown when the first unused
  authority is found and the script stops
- Apply patch and rerun:
  ./misc/migration_tools/remove_unused_authorities.pl -t
- Verify the error is gone, the script finishes and auhorities
  are deleted

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df393b38b8102b4d304b79cb2ba2e73caf8187bd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30775: Make 952w to have datepicker plugin by default
Petro Vashchuk [Mon, 16 May 2022 14:04:18 +0000 (17:04 +0300)]
Bug 30775: Make 952w to have datepicker plugin by default

This field (Price effective from) is very similar to 952d,
but it doesn't have dateaccessioned.pl plugin by default,

Apart of worse usability of this it is also allows to enter wrong
date which will be converted in 0000-00-00 in DB and even lead to
crashes by code in other places.

So, adding this plugin not only improves usability (user can have
datepicker) but also adds date field validation.

Test plan:
1. Head over to MARC frameworks from your administration page,
check 952 subfield structure of your default framework structure.
2. dateaccessioned.pl is set as a plugin for 952d by default
but is missing from 952w.
3. Apply the patch and reset your koha, drop db and use reset_all alias.
4. Check frameworks structure again and ensure that datepicker plugin
is set by default for 952w.
5. Edit some item to ensure that datepicker works for that 952w.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 26486: Group edit buttons in reports toolbar
Owen Leonard [Wed, 23 Mar 2022 14:11:47 +0000 (14:11 +0000)]
Bug 26486: Group edit buttons in reports toolbar

This patch modifies the reports interface to change the reports toolbar
in two ways:

1. The Edit, Duplicate, and Delete buttons are now combined into a
   button menu. My original idea was to have it be a split button, but
   the logic for handling various permissions made the template logic
   too convoluted.
2. The "Show SQL code" button is converted to a "Single toggle" button
   (https://getbootstrap.com/docs/3.3/javascript/#buttons-single-toggle).
   This type of button is specifically designed for this kind of
   interface element.

This patch includes indendation changes, so please diff accordingly.

To test, apply the patch and go to Reports -> Saved reports.

- Logged in as a user with Create and Delete report
  permissions:
  - View an SQL report. In the toolbar you should see an "Edit" button
    menu with three options: Edit, Duplicate, and Delete. Check that all
    work correctly, including a deletion JavaScript confirmation dialog.

- Logged in as a user with Create but not Delete report permissions, you
  should see an "Edit" button menu with two choices: Edit and Duplicate.

- Logged in as a user with Delete but not Create report permission (??)
  you should see only a standalone delete button.

- Logged in as a user with Execute report permission, run an SQL report.
  Test the "Show SQL code" button. The text should change to "Hide SQL
  code" and the button should be styled to look like its "pressed"
  state.

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 22afd8b4e7be875f737a4dd86d9f69e4ca117ce1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31053: Add Context module to Koha::Encryption
Marcel de Rooy [Mon, 27 Jun 2022 08:59:30 +0000 (08:59 +0000)]
Bug 31053: Add Context module to Koha::Encryption

Test plan:
perl -MKoha::Encryption -e'print Koha::Encryption->new->encrypt_hex("test");'

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30327: DBRev 22.05.03.001
Lucas Gass [Fri, 29 Jul 2022 16:37:03 +0000 (16:37 +0000)]
Bug 30327: DBRev 22.05.03.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults
Nick Clemens [Sat, 25 Jun 2022 11:18:42 +0000 (11:18 +0000)]
Bug 30327: (follow-up) Fix inconsistencies in syspref names and supply defaults

This patch fetches the new sysprefs into variables, providing default title ascending if
they are not set to avoid an undefined concatenation warning

I also make the update idempotent and fix confusion of plural/singular names

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30327: Fix tests
Nick Clemens [Fri, 17 Jun 2022 10:13:41 +0000 (10:13 +0000)]
Bug 30327: Fix tests

Corrected variable name on update to match everywhere else

Added a default value for limit in buildQuery and only append limit if it has content

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30327: Add options for sorting components
Nick Clemens [Wed, 1 Jun 2022 14:40:49 +0000 (14:40 +0000)]
Bug 30327: Add options for sorting components

This patch adds two new sysprefs:
 ComponentSortField
 ComponentSortOrder

These allow the user to choose how components should be sorted when displaying on the details page
of a record, and the corresponding search for all components

This also updates our search from simple_search_compat to search_compat to allow for sorting options

Note:
Some sorting under ES is unclear - this is a separate issue to be invesitgated
Our Zebra index does not offer 'record number' sorting, I will file a bug for that

To test:
 1 - Enable UseControlNumber (or not)
 2 - Add some components to a record by control number or title depending on above
 3 - Enable  ShowComponentRecords  syspref
 4 - View the record that has components
 5 - Note they are not sorted
 6 - Apply patch, updatedatabase
 7 - reload record
 8 - Note components are sorted by title ascending
 9 - Try different values for ComponentSortField and ComponentSortOrder
10 - Confirm sorting changes with system preferences
11 - Repeat test on staff and opac, with ES and Zebra search engines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de63c2abb1a64fae45ebbfa98c5001b98f4a69ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30994: Typo: item was on loan. couldn't be returned.
Owen Leonard [Mon, 20 Jun 2022 13:20:58 +0000 (13:20 +0000)]
Bug 30994: Typo: item was on loan. couldn't be returned.

This patch updates some language in the inventory template to make it
readable and consistent: Punctuation fixed, capitalization made more
consistent, language corrections ("check in" instead of "return").

To test you can try to apply the patch and trigger the various errors in
the inventory interface, but it's probably enough to visually confirm
the changes in the patch.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates
Alex Buckley [Wed, 22 Jun 2022 08:38:58 +0000 (08:38 +0000)]
Bug 30991: Fix remaining instances of [% ELSE %]0[% END %] in templates

The construct of [% ELSE %]0[% END %] breaks translations as it is
translated as [% ELSE %][% END %]. Note: No 0 in the ELSE statement.

This patchset either removes occurances of a lone 0 in template ELSE
statements, or splits it over multiple lines so the 0 is not removed in
the translated templates.

Test plan:
1. Install the en-NZ translation
2. Search the translated templates for '[% ELSE %][% END %]' and confirm
there are are instances of that
3. Apply patch
4. Update your en-NZ translation
5. Repeat step 2 and confirm there are no more instances of [% ELSE %][%
END %] in the translated templates

Note: I removed the [% ELSE %] statement from opac-bottom.inc as that
statement was empty in the en translation so it didn't look to be
needed.

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit efad62f91d7fa5bf2a85f20b16afa8cfaa52e717)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30936: (follow-up) Add markup comments
Owen Leonard [Thu, 9 Jun 2022 18:30:10 +0000 (18:30 +0000)]
Bug 30936: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: 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 04d43d4f213641f6fbdb595b636c94ff313907fd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30936: Reindent authority detail template
Owen Leonard [Fri, 3 Jun 2022 15:22:06 +0000 (15:22 +0000)]
Bug 30936: Reindent authority detail template

This patch updates the authority detail template so that indentation is
consistent.

To test, apply the patch and go to Authorities.

- Locate an authority record and view the detail page.
- Everything should look correct, with working numbered tabs.
- If the AuthDisplayHierarchy preference is enabled, you should see a
  collapsible tree of elements in the authority hierarchy.

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 1da958f59bdb6fdf6ec1a87969a468f7b6583416)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30609: (follow-up) Add markup comments
Owen Leonard [Mon, 25 Apr 2022 14:15:56 +0000 (14:15 +0000)]
Bug 30609: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: 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 9b55a435d9a61819750c322ac284f8c9a2c236c3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30609: Reindent serial claims template
Owen Leonard [Fri, 22 Apr 2022 18:31:35 +0000 (18:31 +0000)]
Bug 30609: Reindent serial claims template

This patch updates the serial claims template so that the indentation
is consistent. Tabs are replaced with spaces.

To test you must have at least one subscription with late issues.

- Apply the patch and go to Serials -> Claims and select the vendor
  responsible for your late issue.
- On the "Missing issues" page, confirm that everything looks correct.
- All functionality should be the same: Filters, table sorting, CSV
  export, and claim notification.

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 455b3b4a93b491b26af8e4f16642eeab03254ccc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29055: Focus on keyword field when subscription biblio search window opens
Owen Leonard [Thu, 12 May 2022 15:14:32 +0000 (15:14 +0000)]
Bug 29055: Focus on keyword field when subscription biblio search window opens

This patch adds the "autofocus" attribute to the keyword field in the
popup window used to find a bibliographic record to use in a
subscription.

The same is also done for the vendor search popup.

To test, apply the patch and go to Serials -> New subscription.

- Click the "Search for vendor" link. When the "Serial subscription:
  search for vendor" window opens the cursor should automatically be in
  the vendor search field.
- Click the "Search for record" link. When the "Catalog search" window
  opens the cursor focus should automatically be in the keyword field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 712ced46128470010a043597c2ad7f956bd9b9cd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 22659: (follow-up) Add category to redirect
Lucas Gass [Mon, 28 Mar 2022 20:51:35 +0000 (20:51 +0000)]
Bug 22659: (follow-up) Add category to redirect

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 347d9d733984170a04743510d50c5c8457484b60)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 22659: Add save and continue button to additional-contents.tt
Lucas Gass [Thu, 3 Feb 2022 22:31:19 +0000 (22:31 +0000)]
Bug 22659: Add save and continue button to additional-contents.tt

To test:
1. Apply patch and restart everything
2. Go to Tools > News and create some new additional content.
3. Notice a Save and continue button
4. Try saving and contining.
5. Make sure if you are using the CodeMirror editor that you are still in the CodeMirror editor
6. Try 2 - 5 again but with the wysiwyg editor, make sure when you save and continue you remain in the wysiwyg editor.
7. If you are saving and contining from News make sure you remain in News, when you are saving and contining from HTML customizations make sure you remain there.
8. Turn on the NewsLog system preference
9. With the NewsLog on make sure your content is being logged correctly when you sabe and continue.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e88ee0fc5efea3f25bdca1f4fe70b71239743d9c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30871: (Rmaint follow-up) fix forbidden pattern: tab char (line 50)
Lucas Gass [Fri, 29 Jul 2022 16:01:53 +0000 (16:01 +0000)]
Bug 30871: (Rmaint follow-up) fix forbidden pattern: tab char (line 50)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30871: Add notes in advanced cataloging editor
Nick Clemens [Tue, 31 May 2022 13:01:59 +0000 (13:01 +0000)]
Bug 30871: Add notes in advanced cataloging editor

This is the same as preevious patch, but for advanced cataloging editor

To test:
1 - Enable EnableAdvancedCatalogingEditor
2 - Create a new record in advanced edtior
3 - Hover over leader6 and 008 type
4 - Confirm notes are useful

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30871: Add/expand title text for LDR/06 and 008 Type of material
Nick Clemens [Tue, 31 May 2022 12:54:40 +0000 (12:54 +0000)]
Bug 30871: Add/expand title text for LDR/06 and 008 Type of material

This patch simply adds title elements or clarifies existing title elements to indicate how default
values are chosen

To test:
1 - Create new record in default editor
2 - Open leader helper, hover over "6-Type of record" and the dropdown
3 - Confirm notes make sense
4 - Open 008 helper
5 - Hover over 'Type of Material' and dropdown
6 - Confirm notes make sense

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 9912739231511441d54bec77ff04bbb561fdb93d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29454: (follow-up) Cover more test cases
Nick Clemens [Wed, 15 Jun 2022 12:08:05 +0000 (12:08 +0000)]
Bug 29454: (follow-up) Cover more test cases

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29454: Add unit test for Koha::Template::Plugin::ItemTypes
Fridolin Somers [Tue, 14 Jun 2022 21:57:40 +0000 (11:57 -1000)]
Bug 29454: Add unit test for Koha::Template::Plugin::ItemTypes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 338ca787be4febc1136e45dac95f9006ccf2a425)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 29454: Use Koha Cache Memory Lite to stash itemtype descriptions for template...
Nick Clemens [Mon, 13 Dec 2021 14:44:18 +0000 (14:44 +0000)]
Bug 29454: Use Koha Cache Memory Lite to stash itemtype descriptions for template plugin

Returns empty string if given item type is undefined or unknown

To test:
1 - Add 1000 items to a record, of varying item types
2 - Bring up the details page
3 - Note time to load
4 - Apply patch
5 - Reload page and compare to previous
6 - Confirm information is correct
7 - Confirm some performance benefit

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3df28469c551d7cc2c2f16925e75e9913db0ee67)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 20395: (follow-up) Change format to use price filter
Mark Tompsett [Thu, 15 Mar 2018 16:08:45 +0000 (16:08 +0000)]
Bug 20395: (follow-up) Change format to use price filter

See comment #1.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df3c578ae18c1732ce09ddab49683d55dbe4d904)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 20395: Change paycollect to use Price formatter
Pasi Kallinen [Wed, 14 Mar 2018 09:04:50 +0000 (11:04 +0200)]
Bug 20395: Change paycollect to use Price formatter

Test plan:
1) Apply patch
2) Go to Home -> Patrons -> Patron details (for any patron)
3) Create manual invoice for the patron
4) Pay fines -> Pay -button
5) Check that the currency values look correct

6) Pay fines -> Pay amount -button
7) Check that the currency values look correct

8) Pay fines -> Pay selected -button
9) Check that the currency values look correct

10) Change the CurrencyFormat setting
11) Repeat 2-9

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c1784437b4962bee46cd801967bbeb75a3f33fec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30950: Remove timepicker.inc
Jonathan Druart [Mon, 13 Jun 2022 08:45:33 +0000 (10:45 +0200)]
Bug 30950: Remove timepicker.inc

No longer used since
  commit de2d8ba3e4f611aadc29165a7748cc1797d87ce3
  Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc.

We must remove it from our codebase.

Test plan:
  git grep timepicker.inc
Should not return occurrences outside of PO's

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75bd5cfda14c2ddc7dfdb2939e0f67f3cb302c42)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 25669: (follow-up) Minor fixes
Kevin Carnes [Wed, 25 May 2022 09:19:21 +0000 (09:19 +0000)]
Bug 25669: (follow-up) Minor fixes

Bulk doesn't support include_type_name, update requirement to
Search::Elasticseach@6.80, and remove data type name from tests.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e926de5e8f359acf6b8beff541fe13ce2a5ac49e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 25669: Use include_type_name parameter in ES calls
Nick Clemens [Mon, 28 Mar 2022 12:00:25 +0000 (12:00 +0000)]
Bug 25669: Use include_type_name parameter in ES calls

This patch includes the parameter:
include_type_name
on our ES calls

It removes the deprecation warning we are seeing, and should allow using ES7 with no other chnages.

For ES8 we will need to remove the hardcoded type,

I would suggest a second patch, with a new syspref "ElasticsearchLegacyType" set to 'True' by default.
Description can explain that this must be set to false, and data reindexed after upgrading to ES7 and before
upgrading to ES8 - then we can drop this pref when we drop ES7 support

When we drop ES6 support the pref can be set default true for upgrades, default 'false' for new installs

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 150a4b03f337f6a58869c67d3681caa64441d53a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31013: Quote branchcodes in Elasticsearch limits
Nick Clemens [Wed, 22 Jun 2022 13:19:03 +0000 (13:19 +0000)]
Bug 31013: Quote branchcodes in Elasticsearch limits

This patch adds quoting when handling branchcodes in searching in order
to prevent errors when branchcodes are reserved words in ES

To test:
0 - Be using Elasticsearch with Koha
1 - Add a new branch code:OR name:Orly
2 - Add an item to this branch
3 - Use advanced search to limit search to only Orly
4 - Oh really bad, the search fails!
5 - Apply patch
6 - Repeat search
7 - Oh really good, the search succeeds
8 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoCorrect version in Koha.pm v22.05.03-1
Lucas Gass [Tue, 26 Jul 2022 16:52:35 +0000 (16:52 +0000)]
Correct version in Koha.pm

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoRemove atomicupdate file
Lucas Gass [Tue, 26 Jul 2022 16:51:12 +0000 (16:51 +0000)]
Remove atomicupdate file

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t
Mason James [Wed, 6 Jul 2022 10:54:55 +0000 (22:54 +1200)]
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 8884068904b77ecb8dff7875a056129443b08e6b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoUpdate release notes for 22.05.03 release v22.05.03
Lucas Gass [Mon, 25 Jul 2022 16:05:56 +0000 (16:05 +0000)]
Update release notes for 22.05.03 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoIncrement version for 22.05.03 release
Lucas Gass [Mon, 25 Jul 2022 14:48:56 +0000 (14:48 +0000)]
Increment version for 22.05.03 release

2 years agoTranslation updates for Koha 22.05.03
Koha translators [Mon, 25 Jul 2022 14:32:22 +0000 (11:32 -0300)]
Translation updates for Koha 22.05.03

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2 years agoBug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorit...
Kyle Hall [Wed, 15 Jun 2022 16:06:55 +0000 (12:06 -0400)]
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: Lucas Gass <lucas@bywatersolutions.com>