]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 30911: Datatables error on course-details.pl after adding a bib-level course...
Owen Leonard [Fri, 8 Jul 2022 13:03:01 +0000 (13:03 +0000)]
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve

This patch removes the colspan from biblio-level course reserves rows in
favor of adding a style to the message's container allowing it to
overflow across table cells.

To test, apply the patch and go to course reserves.

1. If necessary, add a new course.
2. View the details of the course and add a reserve using the
   biblionumber option to add the reserve at the bibliographic level.
3. Add a notes if you want, then click "Save."
4. Return to the course detail view.
5. In the table of reserves your biblio-level reserve should have a
   message starting in the "Barcode" column and overflowing across other
   item information columns, "Item information is not available for
   record-level course reserve."
6. Try adding multiple item-level and biblio-level reserves to the same
   course to confirm that the information displays well in those cases.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e879be095ad6ec7ec166413cc2628751208ecac)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29951: Fix EXPORT for C4::ClassS*Routine modules
Jonathan Druart [Wed, 6 Jul 2022 14:23:25 +0000 (16:23 +0200)]
Bug 29951: Fix EXPORT for C4::ClassS*Routine modules

Can't locate object method "subclasses" via package "C4::ClassSplitRoutine" at /kohadevbox/koha/C4/ClassSplitRoutine.pm line 53

Certainly from bug 17600.

Test plan:
Home -> Administration -> Classification sources -> New splitting rule

And create classification sources and filing rules.

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 69513449dbfd08f53d6c1b78792c87478481437c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7f52fa4a7344d88c0d580f282cf7dd062e3c8cc7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 31117: New message for cloning standard rules
Florian Bontemps [Thu, 7 Jul 2022 15:24:10 +0000 (15:24 +0000)]
Bug 31117: New message for cloning standard rules

This commit adds a different message when cloning circulation and fine rules if you use the Standard rules for all libraries option.

Test plan :
1. Go to the Circulation and fine rules page in the Admin tab.
2. Check that the 'Select a library' menu is on 'Standard rules for all libraries'.
3. Check that you also have some random rules to clone, or create some.
4. Clone these rules to the library of your choice.
5. Confirm that the message 'Clone circulation and fine rules from "" to (library of your choice)' appears.
6. Now clone rules from a specific library to another one, and repeat steps 3-4.
7. Confirm that this time, the message will displays both libraries properly.
8. Apply patch.
9. Repeat steps 2 to 4 and 6 to 7. Confirm that this time, the message in the first case will be 'Cloning circulation and fine rules to "(library of your choice)"'.
10. Kindly sign off.

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c483afa2d0ed1b70e31abbec6d57f7b5bae93a58)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 98158c5795e08689d717c59435a9e10d8e29a4fe)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 27996: Updates the Circulation report overdues page to display date in red.
Karen Turner [Thu, 7 Jul 2022 23:37:34 +0000 (23:37 +0000)]
Bug 27996: Updates the Circulation report overdues page to display date in red.

Test:
1. Login to the staff interface
2. First you need to create an overdue item.
  a. Find the barcode for an item
  b. Goto My checkouts from the drop down by your login
  c. Enter the barcode and use checkout settings to select a date in the
  past.
2. Go to Tools
3. Go to Circulation
4. Go to Go to Overdues
5. In the table the due date is in black
6. Apply the patch
7. Refresh the page and the due date should be in red.

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 21cf6228bed1956ea975c9ba7bb984c58607ecc7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8a97c30b83786d80737bd5451310e4126c122f79)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30767: Changes word "issue" to "item"
Logan Symons [Thu, 7 Jul 2022 22:58:40 +0000 (22:58 +0000)]
Bug 30767: Changes word "issue" to "item"

Please test and confirm terminology is now correct.
Was unable to test without steps to reproduce.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 11079acae73fa10c18d93e6f81752d8033567903)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30766: extra space in Cannot cancel receipt string
Danyon Sewell [Thu, 7 Jul 2022 22:45:46 +0000 (22:45 +0000)]
Bug 30766: extra space in Cannot cancel receipt string

TEST PLAN:

1. Trigger the Cannot cancel receipt error in invoices OR look at the
amended string to see the additional space has been removed.

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 2702fc533f3f7ee55be4decbdf5c11beb1a6823a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 472ec420fbb6b19a80909be67ca2cf21a764d638)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30763: fixes spelling of 'proceeds'
Evan Giles [Thu, 7 Jul 2022 22:19:37 +0000 (22:19 +0000)]
Bug 30763: fixes spelling of 'proceeds'

Test plan:
1. Login to the staff interface
2. go to tools
3. go to label creator
4. Click New -> Layout
5. Click the 'Choose layout type' dropdown
6. Notice the 'barcode proceeds biblio data' and 'biblio data proceeds
barcode'.  These are typos
7. Apply the patch and refresh the page
8 repeat step 5. Confirm 'proceeds' now correctly says 'precedes'

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 8855da2265b5674b8e5ab0d42b95db9f343f61e3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 762d5f6454498545db3043d13cf24b95d3541da6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit a7ba89aaf71d820c2a131b5a1c1e2a32354a8fe8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit f67a5f60b9d3a7cbda577a62451d8bbc60993323)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit cd3e1357e892a6ca5c662780eb0aee29a75c2621)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 1a0b489346adf32cfa3b348d6dcaef2ce2ec7634)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 8d359cad37117af26d14d32dcf6972172be24bc2)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 4debd73a216faed8c710c10fea4f2f9b1bf43acc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 37bdef736d00edebf7e7013a8ca500a010a52f46)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit f983ad9b2265826718902ed468c159bc73fd8e36)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit f7d26a8dd89cb06110cd3dfba5ee75d4bd7fcbe6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 692c054a736c8eb6808a1017f0a9f565677a0860)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 718841a758b996b6e5499bd5b473369362d7422b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 9938f61403dc6cd5abfd906eaf013bf7b53d9e5b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit d3ccef678a9cfba795401ec1ef55fa65df0b6404)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit b3a277daec5385d8af56e8c0c75f53cec8e3e85d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit b146b654f5e118bfee1162c3ff740cac0bf835d7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoSchema changes
Arthur Suzuki [Tue, 16 Aug 2022 09:16:54 +0000 (11:16 +0200)]
Schema changes

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoDBRev 21.11.10.001
Arthur Suzuki [Tue, 16 Aug 2022 09:02:36 +0000 (11:02 +0200)]
DBRev 21.11.10.001

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>
(cherry picked from commit fb08b10b75c2b54c3186055a6eef718771214c08)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 9f83bad68cc1f407b864820a023fdecb6fd67043)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 07d00657e0061e20cda82bc89e93a8a58e92e5c6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 854f192db6076a6705bd51721293de9188052fd2)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 2e063b708d29095de6462f063ae4d092f22c386f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit d1770d4c49825191b79889c93b4d74fc5b143936)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit f38f5483472611330559ea7314b4824d3e525b80)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit b76ef704698ea3e1fba501fc71b3744432e15d0b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 210a62cc3d6db48888c8c6e8ea1aaa7f4017202c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit b96e6dd2efd06099c16f11d6057ae98a9c698619)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves
Jonathan Druart [Tue, 7 Jun 2022 12:11:06 +0000 (14:11 +0200)]
Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves

Silly mistake, 'delete if verbose' must be 'delete if confirm'

Test plan:
Try the cleanup_database.pl script to delete transfers and old issues.
Using --transfers --old-reserves and the --confirm flag the entries must be
removed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6166405c7d7886466a8d1264c98970b4973f77f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b503c186e4ca8012b24441e746045c7439c44b97)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit a1efdde99b8e710acb28df212ab7e62a63bca71f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 533a858684d8e5cf69caea560b64aefebc88b626)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 8bb0df3a535569b022c9ec1a88979070a1dfdb33)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 3b6978259f494e23026d986dbb71d146d4b233db)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit e0fcd54a6edd728ab67924d5ab3ef3df8d4e52dd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 91c4d411157a22bbeb58b43b878705f44c71f1f3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 026c7588d93719217cea68a309f481f9c6604c30)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit d6a3a10fc7cd7e15ffcdd03e089d565764f5e1b3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 98883753a063d9ed5f89e492c027d750caa23ef9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit e9b4dd2bd5d4bd6025d6ccb2f6d3dd32bf671249)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 353d00411964faf4924876bb9c96ac9eb596b76c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit f055a4ae654fe3fde66bd0d316fdbe98daba8f36)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 2b4eb64563367d2fb0c51b244d0f9a936c4b49ba)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 248dc2787eaa496dfd1c0984fab49d8d76efc6fd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 2ad8c15dbf41e738f7cc14adcd23befdf053a62a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 4edaa27fc2a7a487a9558dc66acce9b636fa06b3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 965e9856196a30520ffaea7cc99f7724f7b123d3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 66999034d4ce274dec14340c1494dc280292984a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 0a861042947adbc12b4d865c89c6a87effe965b9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 1e8abd735991190d7124a9630b0bda53cec7840a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 29a627bdfc825dfcbbb4a6185f20300da7bf137f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 588377511b082de88347f928b9784c7fb689fddf)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 8a855c86f3537314fec4c07fb9520893b171aa03)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 84999e19380fffea3e0be25493a86fcb03ee7453)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit edee82be94738ca57f5d8a91e3d08373536c4373)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 17281b62ef27742183c0f1c41fa83520cd70cf49)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 44d44956e2fb6848c8e035ad1aedfb7ea73c8ff3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 962d372c8b351806bc736ef34f1e00f385888773)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 3c1ebde756de5be86d030ca0ee6af105468923cd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit b18aeffc748d2532cc4bff3ba491c1a9776ee129)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 9f3b51216ad233e8c0dda59b86eb9cf449c04a19)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit c207d740cdb64adea21c6be857a5ae0855a7b700)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit f4595b7bbdd4fd739084e4df3123821572b1a39c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 01bde643f2fc7b9541f006fdaaa1ec68c262c612)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 75c74c469d72c2b68a33018566a978a62113bd0a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit 584c49961c71d91e2698025d216752a40fe0eb08)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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>
(cherry picked from commit fea07bfab8d4a58bc07929585939a9472c384a59)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30969: Cross site scripting (XSS) attack in OPAC authority search ( opac-authorit... v21.11.10
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: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoAdd db_revs file for 21.11.10 release
Arthur Suzuki [Fri, 22 Jul 2022 12:57:40 +0000 (14:57 +0200)]
Add db_revs file for 21.11.10 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoUpdate release notes for 21.11.10 release
Arthur Suzuki [Fri, 22 Jul 2022 12:07:37 +0000 (14:07 +0200)]
Update release notes for 21.11.10 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoIncrement version for 21.11.10 release
Arthur Suzuki [Fri, 22 Jul 2022 11:07:22 +0000 (13:07 +0200)]
Increment version for 21.11.10 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoFix translations for Koha 21.11.10
Arthur Suzuki [Fri, 22 Jul 2022 10:09:57 +0000 (12:09 +0200)]
Fix translations for Koha 21.11.10

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoTranslation updates for Koha 21.11.10
Koha translators [Fri, 22 Jul 2022 08:58:07 +0000 (05:58 -0300)]
Translation updates for Koha 21.11.10

2 years agoBug 28355: (QA follow-up) Move Note to new line
Katrin Fischer [Fri, 17 Jun 2022 20:10:55 +0000 (22:10 +0200)]
Bug 28355: (QA follow-up) Move Note to new line

There is an existing pattern for the 'Note:' in pref
descriptions, where it's always added on a new line.
This changes the formatting to match that pattern.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9bb5236be7c29348231004c3479e3543cd54c605)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28355: Add a note that SMS to email via mobile provider is not recommended
Nick Clemens [Fri, 17 Jun 2022 12:00:34 +0000 (12:00 +0000)]
Bug 28355: Add a note that SMS to email via mobile provider is not recommended

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 5aa603fa301d3109811ddb3c470a9976566babf2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8dbaa6d8712aa2a5224adbf5f04a4a0dfadb01de)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 28529: Make biblio-level hold itemtype count against max rules
Tomas Cohen Arazi [Wed, 1 Sep 2021 21:00:59 +0000 (18:00 -0300)]
Bug 28529: Make biblio-level hold itemtype count against max rules

The current situation is that biblio-level holds can be assigned an item
type, so they can only be fulfilled by items matching that specified
item type (be it item-level itype or the fallback to biblio-level).

But there's the situation in which max holds limits for a specific item
type can be overridden by using biblio-level holds with item type
selection (AllowHoldItemTypeSelection) enabled.

To test:
1. Have a patron of category 'Staff' (S)
2. Have 3 records with items with the 'BK' item type, and maybe others
3. Enable AllowHoldItemTypeSelection
4. Set a limit of 2 max holds for that category+item type
5. In the OPAC. Place bibio-level holds, with item type contraint to 'BK' on those 3 records
=> FAIL: You can place the 3 holds
6. Cancel the holds
7. Apply this patch and restart all
8. Repeat 5
=> SUCCESS: You can only place 2 holds
9. Run:
   $ kshell t/db_dependent/Reserves.t
=> SUCCESS: Tests pass!
10. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 years agoBug 28529: Regression tests
Tomas Cohen Arazi [Fri, 3 Sep 2021 19:47:14 +0000 (16:47 -0300)]
Bug 28529: Regression tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 years agoBug 30958: OPAC overdrive search result page broken for translations
Alex Buckley [Mon, 13 Jun 2022 22:54:54 +0000 (22:54 +0000)]
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 ade61b5e0c185fd7263ab6f101b1a4082d0ea0dd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f5c43cf2636e3e59d58b6ea739491dea192a51d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30997: Fix "CGI::param called in list context" warning in detail.pl
Petro Vashchuk [Mon, 20 Jun 2022 14:08:32 +0000 (17:08 +0300)]
Bug 30997: Fix "CGI::param called in list context" warning in detail.pl

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

CGI::param called in list context from
/usr/share/koha/intranet/cgi-bin/catalogue/detail.pl line 622

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. Open any biblio (details.pl) page.
2. Check the error log and find the upper mentioned warning,
check the timestamp to ensure that it was added when you loaded the page.
3. Apply the patch.
4. Load the page 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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 407564e3940ad08030383078fd1ce5c530a19f2d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 535f555468709316aaea99e3b71481c3b2a6a800)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29504: (follow-up) Account for other blockers
Martin Renvoize [Wed, 15 Dec 2021 09:20:52 +0000 (09:20 +0000)]
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 7a7716b6d8039476a6cc2d6403092cc2df42458e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3eceb3d5fe9c8c5ae6ce04720364acd21be0a7e6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 29504: Allow 'ADDITIONAL_MATERIALS' check to be confirmed
Martin Renvoize [Mon, 22 Nov 2021 11:33:25 +0000 (11:33 +0000)]
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 49ef741405d0b81ba0cb37dd81fa9a4b5aba5bbb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 39f89b43fd0a1083b85b4902b4338aee04224a44)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 12630: Rebase tests and cover CheckReserves
Nick Clemens [Fri, 10 Jun 2022 14:47:44 +0000 (14:47 +0000)]
Bug 12630: Rebase tests and cover CheckReserves

It turns out we do honor reservedate in CheckReserves, so a hold with a lower priority will
fill before a hold in the future. I add tests to cover this and fix the old tests to pass again

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 12b90bb02f50af547c8214e2e89620ef2ea50385)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 12630: Add regression tests
Jonathan Druart [Wed, 5 Nov 2014 09:32:21 +0000 (10:32 +0100)]
Bug 12630: Add regression tests

Verify that the 2 tests failed before applying this patch and return
green after.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2369076f99ce3415bcfe6ced74cc3edb6aef5a09)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 475a5b3fb2b2deeb92ae2e73590e297ea75d5df0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 12630: (QA follow-up) - Rename _ShiftPriorityByDateAndPriority to _ShiftPriority
Kyle M Hall [Mon, 25 Aug 2014 14:17:28 +0000 (10:17 -0400)]
Bug 12630: (QA follow-up) - Rename _ShiftPriorityByDateAndPriority to _ShiftPriority

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0ca445fca8262ad3a0e2b44c7516417e81532c43)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 648c3ad48a530510690ef34d2f918f56fe631a17)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 12630: Prioritizing "Hold starts on date" -holds causes all other holds to be...
Olli-Antti Kivilahti [Wed, 23 Jul 2014 05:41:47 +0000 (08:41 +0300)]
Bug 12630: Prioritizing "Hold starts on date" -holds causes all other holds to be prioritized as well!

-------------------------
-- REPLICATE LIKE THIS --
-------------------------

0. Enable AllowHoldDateInFuture-system preference!

1. Select a biblio with some holds.
2. Place a hold with the "Hold starts on date"-attribute set to future.
3. More the specific hold up on the priority queue.
4. Add another normal hold, observe how it is prioritized with the "Hold starts on date"-hold, leaving old holds to the prioritization queue tail.

Unfair eh?

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 05ac7e0d4a1d4247df43f4a83ead509cfaffa04c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8c509cf33029b376b9e426ede788c44654876b75)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30989: (QA follow-up) Use uri filter on OPAC tag cloud page
Katrin Fischer [Fri, 17 Jun 2022 22:23:31 +0000 (22:23 +0000)]
Bug 30989: (QA follow-up) Use uri filter on OPAC tag cloud page

This fixes 2 links on the page:
* The tag within the 'all tags' cloud
* The tag shown in the 'your tags' table

Test plan as before: Test with a tag like +++

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c3ffcda4614dccd57992d7460db277b80c9cdba0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30989: (QA follow-up) Use uri filter on staff detail page
Katrin Fischer [Fri, 17 Jun 2022 21:26:55 +0000 (21:26 +0000)]
Bug 30989: (QA follow-up) Use uri filter on staff detail page

This applies the same fix as the first patch but to the staff
interface detail page. With this fix, a tag like +++ can
be clicked and the tagged records will show.

To test:
- Tag some records in the staff interface with something like +++
- Go to the detail page of one of those recods
- Click on the tag
- Verify nothing is found
- Apply patch
- Repeat - all tagged records will show

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 84d173c1986f404a52d718638324c3149ba5d0e7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30989: Use uri filter where tag links are displayed
Lucas Gass [Fri, 17 Jun 2022 19:45:42 +0000 (19:45 +0000)]
Bug 30989: Use uri filter where tag links are displayed

TO test:
1. Turn on:  TagsEnabled.
2. Log in to the OPAC and create a tag like "LGBTQ+"
3. Add that record to a list
3. Now try  clicking on that tag from detail, results, and lists page.
4. If you click on the link for the "LGBTQ+" you will get a 'no results found page'.
5. Apply patch
6. Try clicking on each of the tags in detail, results, and lists. They should work now.

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 997262f6fe7f47b5b6f0fd5cc1032538b3a79b26)
(cherry picked from commit da66f3119ffc490baf9378baae83221aabef6205)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30925: Fix category parameter for addbybiblionumber
Marcel de Rooy [Mon, 20 Jun 2022 07:03:17 +0000 (07:03 +0000)]
Bug 30925: Fix category parameter for addbybiblionumber

In bug 28959 category was replaced in favor of public. But
unfortunately a few places were missed.
This fixes the addbybiblionumber templates.

Test plan:
Add a biblio to a list from the search results using the Add to
or Add to list button on OPAC/intranet.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 08dc55fb123d14c941e27e32c155e6c4afb2781f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30786: Fix capitalization in advanced search system preferences
David Nind [Wed, 18 May 2022 02:21:14 +0000 (02:21 +0000)]
Bug 30786: Fix capitalization in advanced search system preferences

This fixes the capitalization in the descriptions for the
AdvancedSearchTypes and OpacAdvancedSearchTypes system preferences.

Test plan:
1. In the staff interface, search the system preferences for
   'AdvancedSearch'.
2. Review the current descriptions for the AdvancedSearchTypes and
   OpacAdvancedSearchTypes system preferences.
3. Note that "..Shelving Location.." is used instead of "..Shelving
   location..".
4. Apply the patch.
5. Refresh the page.
6. Sentence case is now used for "Shelving location" in the
   descriptions (as per coding guideline HTML4: Upper and lower cases
   in strings).
7. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17b7ae56c539bfaaf2dae75f6855e9cda13ec904)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9abcf38e45190ec052bd570d8cb449d4d959987e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30677: Cleanup
Martin Renvoize [Tue, 28 Jun 2022 11:29:05 +0000 (12:29 +0100)]
Bug 30677: Cleanup

This patch cleans up the regular expression to remove the superflous
double check and use standard delimiters

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 72732a736d93ebab2b8d2737c39145abe9d2b500)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30677: Use lookahead in regex for biblioitem replacement
Martin Renvoize [Wed, 11 May 2022 15:47:59 +0000 (16:47 +0100)]
Bug 30677: Use lookahead in regex for biblioitem replacement

This patch takes Andrew's suggested fix using a lookahead regex to
correct our biblio vs biblioitem table name replacements.

Please use the preceeding unit test patch proposed by Jonathan to test.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 be3bd8af8b1f2dbff33d2228eb64fa77fe9362f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 191f53996acb5abd53396b8ad84c2944edef73ce)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30677: Add tests
Jonathan Druart [Fri, 6 May 2022 11:53:01 +0000 (13:53 +0200)]
Bug 30677: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 de4fcc91f02e7d8da645388c7287ed942fa4bae8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9fa5cf04ae77ded56343d5fb36eeb585577d4870)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30207: Allow any reserveforothers subpermission to access the page
Kyle Hall [Tue, 10 May 2022 10:56:15 +0000 (06:56 -0400)]
Bug 30207: Allow any reserveforothers subpermission to access the page

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2d56fb7e84a81fb084db7bd301550e28fd7bb6e7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2 years agoBug 30207: Librarians with only "place_holds" permission can no longer update hold...
Kyle Hall [Tue, 1 Mar 2022 16:49:49 +0000 (11:49 -0500)]
Bug 30207: Librarians with only "place_holds" permission can no longer update hold pickup locations

Bug 29540 increased the flags required to for modreserve.pl, but in doing so created a situation where a library can select a different pickup location for a hold, but upon clicking the "Update hold(s)" button, will be logged out due to having insufficient permissions for modreserve.pl.

Test Plan:
1) Create a librarian with "place_holds" permissions, but not "modify_holds_priority".
2) Place a hold for a patron
3) Attempt to change the pickup location from request.pl
4) Note you get logged out with a permissions error
5) Apply this patch
6) Restart all the things!
7) Attempt to change the pickup location from request.pl
8) This time it should succeed!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3a13667ad32c56577db6a8e075a4cea5512eed8a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>