Nick Clemens [Tue, 7 Mar 2023 19:23:44 +0000 (19:23 +0000)]
Bug 33159: Correctly form thesaurus term for non-subject headings
Bug 30280 fixed things for subject heading, but didn't take into account
that all non-subject headings are considered LCSH - this means we can't
really handle different thesauri for controlled headings outside of
subjects - maybe a topic for a new bug, but we should fix matching for
them now
To test:
1 - Set sysprefs:
RequireChoosingExistingAuthority - don't require
AutoCreateAuthorities - generate
CatalogModuleRelink - Do
AutoLinkBiblio - Do
LinkerModule - first match
2 - Find a record with an author attached to an authority, I used
biblionumber 3 "Introduction to Attic Greek"
3 - Edit in advanced editor
4 - Delete the $9 link
5 - Save the record
6 - It generates a new number
7 - Repeat 4-5, it does it again
8 - Apply patch and restart all
9 - Repeat 4-5
10 - It links to the original authority
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 297a07f5f876f819336cbed2f15cf53c573b2444) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 7 Mar 2023 19:23:22 +0000 (19:23 +0000)]
Bug 33159: Unit tests
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ee60af86c62b9ed8583af130a9d48752cc18a74c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Thu, 14 Oct 2021 11:05:08 +0000 (12:05 +0100)]
Bug 29234: Transit on checking
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be8a3ee8304d305a3f684a435a366d5b9ea69b27) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Mon, 27 Mar 2023 10:58:43 +0000 (10:58 +0000)]
Bug 29234: Unit test
This patch adds a test that a pending stock rotation transfer is initiated on
checkin, as well as updating the defaults for creating transfer objects
To test:
prove -v t/db_dependent/Circulation.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 80f5b3351123225b93ab9b85a30b0428790234bf) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
When we worked on Koha::Biblio::Metadata, we agreed
biblio_metadata.schema would be the sourceof truth when it comes to the
record schema.
This patch acknowledges that, while retaining the fallback to the
syspref.
To test:
1. Apply this patch
2. Run:
$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass, behavior is unchanged.
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 075ef09f48b66df7766c22e1c9ecf1d3cf7a039a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Wed, 23 Nov 2022 14:43:06 +0000 (15:43 +0100)]
Bug 32336: Fix encoding of MARCXML output for REST API (UNIMARC)
Test plan:
1. Be sure to test on a UNIMARC instance
2. Enable system preferences RESTPublicAPI and RESTPublicAnonymousRequests
3. Create a biblio with some diacritics
4. Restart koha and do not interact with OPAC or the staff interface
(this may change $MARC::File::XML::RecordFormat)
5. Query the public API to retrieve the created biblio in MARCXML. For
instance with cURL:
You should see encoding issues.
6. Apply the patch and restart Koha.
7. Repeat step 5.
You should see no encoding issues.
8. You should also test /api/v1/biblios/<biblionumber> (this one
requires authentication, so cURL might not be the most practical
tool; use your favorite tool for this)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a02ba56f177fe6d05ad9ae1518d583c6a3ea8ac) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Fri, 20 Jan 2023 14:33:39 +0000 (15:33 +0100)]
Bug 32336: Add unit test for UNIMARC encoding problems in REST API
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8bfb09b68b33a09d4da28b9dcc7b61d98a49801d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Fri, 31 Mar 2023 08:33:02 +0000 (10:33 +0200)]
Bug 32710: Try to prevent UI/Form/Builder/Item.t to fail randomly
See the FIXME, and commit 77a34e099a9f3bcef2076a4170e8c8d843c403eb
Actually we are doing the trick (of removing _) before we are creating
another itemtype, we need to do it right before we are comparing.
Test plan:
Run in a loop, be patient, it failed for me (without the patch) at run
245
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e6bc5385cc262d4a9148e2e5cd2ef2a04032348) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Clemens Tubach [Thu, 30 Mar 2023 12:24:22 +0000 (12:24 +0000)]
Bug 33136: Added class "page-section" to the result page table of serial record search
Added class "page-section" to the result page table of serial record search to fit into the new staff design.
To test:
- Go to serials
- Create a new subscription
- Click o nzthe "Search for Record" link
- Search for something (example: e)
- Verify the result table
- Apply the patch
- Repeat the steps
- The result table should have the correct background
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 532d4d0ac646970f3740f9f4867aded2d70ccef3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be54d835cb3c2801193d574c0b38ca4d3e7503b4) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c66589555a270b1be5c51dfa9faae77b0a26c60e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d2677a4ac5c32a10be9fc955f406b22949fecec) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a81e94844fd70df50ea96058793c7f383ef9c4d1) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 848ff6cf9511467413c440bfb4cd9c8e21654090) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b37a45717e5173d78ee6a8e8050b50a4605ebbbe) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 28c9f9e1aa526229159480944035b24665016e9a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2b5784c5cbb9a0a1db7ce14d120b6ff5efe19324) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8f85d85d9c768dab783c9fd15a3566bf0d3216c3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 898dceff486bce544ee5a0a4f9f902207410ec59) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Tue, 14 Feb 2023 09:36:45 +0000 (09:36 +0000)]
Bug 30162: Fix staff interface link in OPAC XSLT files for 830$w
All the links in the Utils files shoudl be built using the $searchurl
variable to adapt the link to either staff or OPAC.
To test:
* Enable UseControlNumber system preference
* Create a record with the following fields:
490 1 _ ‡aEffective software development series
830 _ 0 ‡aEffective software development series.‡w13736978
$w can be anything for this use case or another $w from your catalog.
Easiest might be to enable the Advanced cataloguing editor to be
able to insert these lines easily. If you are using the sample data,
the example shoudl work as is.
* Save the record and open it in the staff interface and the OPAC
* The link in the OPAC should be broken, staff should work
* Apply patch
* Now both links should work
Co-authored-by: Anke Bruns <Anke.Bruns@gwdg.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 55c89d871558b430399c6911894448b2d2264b6d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Philip Orr [Thu, 30 Mar 2023 08:28:54 +0000 (08:28 +0000)]
Bug 32217: Fixed typo in error message for authentication providers
Changed the error message for authentication providers to use
"in" instead of "with".
To Test:
Review the patch file closely and verify changes.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd3e65b5badcc593b41acabdb4c84533056134b3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad7d3e5099bf97ede706d496e33d817a618d74e3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b1fa6e27b02c3468901e739c2363751a43cbc137) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de5bda34459a3c52655f6792e72476d6f3c94a0d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e05a69b256c29089ae5e454f520d0dfafd6eaa7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c2de3c97c022ecfa1ce93ec7dff99994fc97361e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1807cbc0e27e38356ba760b338125e020fb338cf) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 830ea1a099005bd7ca4ae795a319469a804a8bb6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6b0ff0c745a1cf91b0d402f09f65dfbbdc3d3740) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17e20f4ec4a1674a2faac9df9ad5231ffd9ddaf1) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6964253fb4b166d0a7ad703a42953ff6444f543) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0bc83b3673659f347979ad998dfc9d9400d4c024) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f152facf7cc44a97cd2670c8ef4ca17a78528fd) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3fc800d91a34e36de84611ef3f092eb51f552966) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff97b1fe439fe3b0a4e521d4c65165137e366f4c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4ff5f2704843b23853d33f2e99ffd56a5dcec00) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 577a237a3f15a5a3c2e27761a900994e439affcf) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a8b5003dc7dd2208fcd7ef0e2ae01f4232db17d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Some old-style code is making our tests fail when run in Debian Testing.
This patch addresses this.
To test:
1. Launch bookworm KTD:
$ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
$ ktd --shell
k$ prove t/00-testcritic.t
=> FAIL: It fails!
3. Apply the patch
4. Repeat 2
=> SUCCESS: Tests now pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10d12f999f9b8bff228c9c20f1ca4f0c7144201f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 14 Mar 2023 13:36:14 +0000 (13:36 +0000)]
Bug 33133: Move fast cataloging to first column
This move the link and adds its own heading
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 909dedd3f648dfc1a2d4c09be5daeb46d8b26c83) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Fri, 3 Mar 2023 20:23:31 +0000 (20:23 +0000)]
Bug 33133: Add fast cataloging to 'Cataloging' page
This patch adds a check for the existence of the Fast Add framework to
the Koha mainpage and the cataloging home page
If it exists, and the user has fast cataloging permission then there
will be a link to Cataloging on the home page, and to Fast add on the
cataloging page
To test:
1 - Have two patrons, one with superlibrarian and one with only
catalogue + fast_cataloging
2 - Make sure you have a fast add framework (code:FA)
3 - Have two windows/tabs one with each patron (one private/incognito or
use two browsers)
4 - View mainpage.pl for both
5 - Superlibrarian has Catalogue link, other does not
6 - Browse to http://localhost:8081/cgi-bin/koha/cataloguing/cataloging-home.pl
7 - Superlibrarian sees stuff, other can access page, but has no buttons
8 - Apply patch
9 - Repeat 4 - both have a link
10 - Repeat 7 - both have a link to fast add
11 - Confirm fast add link works
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 85cfdb1f5bdee7c235516a161770a44e27ff8f62) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Wed, 29 Mar 2023 07:38:50 +0000 (09:38 +0200)]
Bug 32807: Fix cypress tests
Cypress tests were failing, not sure I understand why exactly as I don't
recreate the failure when using the interface. We could simplify the if
logic anyway.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d183715d758735fab4079a25a2fe1d73901a3ae9) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Wed, 22 Feb 2023 07:48:48 +0000 (08:48 +0100)]
Bug 32807: Fetch count instead of all entries for agreements and licenses
To list agreements and licenses we are retrieving the whole list to
simply know if at least one exists (and display the table that will
fetch the X first elements to display).
We should call count instead.
Test plan:
List agreements and licenses.
If none exists, the table is not displayed but a "There are no...
defined" message instead.
If at least one exists the table must be there
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 f781fdb4a231e074b36099d0a724fad576518921) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Mon, 2 Jan 2023 22:50:48 +0000 (22:50 +0000)]
Bug 32003: Add page-section to order search results and fix heading hierarchy
This adds a page-section to the order search results and moves
the former second h1 heading 'search results' to a h2 heading
below 'Order search', so we have a proper hierarchy
In acquisitions:
* Make sure you have an order with at least one order line
* Do an empty orders search
* Verify there are 2 h1 headings on the page and the results table doesn't
have a white background
* Apply patch
* Verify the results list now has a white background and the second
now smaller heading has been moved into this area
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> 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 7b2644bf2b0faf22375979bdf0fa8f4f0335425c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Tue, 28 Mar 2023 12:57:10 +0000 (12:57 +0000)]
Bug 32964: (follow-up) Additional rewording for XSLT item display
Test plan:
Check OPAC preferences, OPACResultsMaxItems and siblings.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 487b67c3efdacb206a58ab6a8573707a1068e918) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 32964: OPACResultsMaxItemsUnavailable description is misleading
This patch rephrases the last part of the description of the
OPACResultsMaxItemsUnavailable system preference to clarify the link
to the OPACResultsUnavailableGroupingBy option.
It also changes some terminology to follow the guidelines
(capitalization, library instead of branch).
To test:
1. Apply patch
2. Go to Administration > Global system preferences
3. Search for OPACResultsMaxItems
4. Read the sentence for OPACResultsMaxItemsUnavailable, make sure it
makes sense, the grammar and spelling are ok, respects terminology
and capitalization guidelines
5. Try the link in the description, make sure it goes to the correct
syspref
6. Read the sentence and options for OPACResultsUnavailableGroupingBy,
make sure it makes sense, the grammar and spelling are ok, respects
terminology and capitalization guidelines
7. Optionally, try the various options, they should still work as
intended
Signed-off-by: Laura Escamilla <laura.escamilla@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 f3fb1747752b664dea3df5824c73863f11aacbf8) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Thu, 23 Feb 2023 22:31:09 +0000 (22:31 +0000)]
Bug 32945: (QA follow-up) Fix capitalization of id in even more places
This fixes additional strings pointed out by QA.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d22f885b064f599d753afc94ac7caf0a4ead5ce7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
To test:
* Some of these are hard to make happen or require specific
data, easiest will be to review the patch itself closely.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 956c8fb49117744a56b39a24800e58fed2ba1d7c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Thu, 23 Feb 2023 20:36:38 +0000 (20:36 +0000)]
Bug 32969: (follow-up) Remove obsolete inline CSS
A couple of templates have some inline CSS intended to style jQueryUI
tabs. These instances can be removed:
- opac-readingrecord.tt: Tabs have been replaced with Bootstrap.
- opac-idref.tt: There doens't appear to be any tab-related markup in
the template at all.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 82859c8568d86c2c9e443d9731b68646b5d20332) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Wed, 15 Feb 2023 15:36:23 +0000 (15:36 +0000)]
Bug 32969: Remove references to jQueryUI assets and style in the OPAC
This patch removes the jQueryUI assets from Bootstrap OPAC files and
removes the links to those assets from the templates. References in CSS
to jQueryUI-related elements are also removed.
To test, apply the patch and rebuild the OPAC CSS.
Test various pages in the OPAC to confirm that there are no visible
changes. The browser console should not warn of missing files.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f383fe586de0b8bd6a9978953c0279d254c31dd) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Mon, 20 Mar 2023 15:43:39 +0000 (15:43 +0000)]
Bug 33278: Correct JS for activating default tab on various pages
The conversion of the header search tabs to Bootstrap resulted in a bug
on several staff interface pages: The first tab isn't selected by
default. The jQuery selector isn't specific enough.
The patch also corrects a template error which was introduced to
merge-record.inc by Bug 32683.
To test, apply the patch and test the following pages to confirm that
the first tab on each page is selected by default:
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 df6432fcc833f00bb6e45894004a0ad26d5ced28) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
For single bibs we use an ajax select2 dropdown, and we don't use this
value
To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63772a9cb25e58ff221540c2a76a7f447bbdeecc) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 14 Mar 2023 13:04:35 +0000 (13:04 +0000)]
Bug 32883: (QA follow-up) Adjust ordering for pickups
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 017694fd9547ef2e2c909b9de2246ab38c40d5c7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Mon, 6 Feb 2023 15:48:54 +0000 (16:48 +0100)]
Bug 32883: Correct cubside pickups ordering
They are displayed by date of creation, it's not what we want for "to be
staged" for instance, where it needs to be ordered by date/time of
scheduled pickup.
Test plan:
Create several curbside pickups, to have some in the different tabs
Confirm that the order is the one you expect.
=> to be staged ordered by pickup date/time
=> stage and ready ordered by pickup date/time
=> patron is outside ordered by arrival date/time
=> delivered today ordered by *desc* delivered date/time
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4943f060712422f4f5dcf8065b1f2593e18a1a6d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Johanna Raisa [Fri, 29 Jul 2022 05:37:50 +0000 (08:37 +0300)]
Bug 30966: Record Overlay Rules - can't use Z39.50 filter
This patch fixes overlay rules on z39.50 import
Test plan:
1) Create protection overlay rule to some fields for z39.50.
2) Import a record via z39.50.
3) See that the protected fields are replaced on the editor.
4) Apply the patch.
5) Import a record again.
6) See that the protected fields are in place on the editor.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0970eef56df1ac8fee1f3c5f0216a164be5048ec) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 22 Mar 2023 19:12:01 +0000 (19:12 +0000)]
Bug 33309: Index items after renewal transaction completes
This patch ensures a record is indexed only after the renewal transaction
has completed successfully. Otherwise the job cannot be found by the background process
worker, becaue it was not yet in the DB
To test:
1 - Make sure you are using ES, and the es indexer is running
2 - tail -f /var/log/koha/kohadev/*.log
3 - Issue an item to a patron and renew it
4 - Note error in es-indexer-output.log like:
[2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129)
5 - Apply patch
6 - Renew again
7 There should be no error
8 - Search for the record and confirm items info displays correctly
9 - View the background jobs in admin, confirm the most recent job has completed
Signed-off-by: Janusz Kaczmarek <januszop@gmail.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 a63b0d00306d639241a400cecbe3b0125ee8d303) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Thu, 9 Mar 2023 13:17:05 +0000 (13:17 +0000)]
Bug 33137: Make column names match
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2792007245f2dfda600b6d2e2fa97a1f634b7a26) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Wed, 8 Mar 2023 16:40:24 +0000 (16:40 +0000)]
Bug 33137: Add call number to pay-fines-table and table settings
To test:
1. Apply patch and restart_all
2. From a patron's Accounting tab add some invoices that are related to an item.
3. From the 'Make a payemnt' notice the new Call number column.
4. Using Table settings, make sure you can properly hide the column.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e657c3d5a9ec142113eba19bf106eb662796f6f0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Wed, 8 Mar 2023 16:24:26 +0000 (16:24 +0000)]
Bug 33137: Add Home library to pay-fines-table and table settings
To test:
1. Apply patch and restart_All
2. From a patron's Accounting tab add some invoices that are related to an item.
3. From the 'Make a payemnt' notice the new Home library column. Make sure it displays correctly and is the same as what you see on the 'Transactions' tab.
4. Using Table settings, make sure you can properly hide the column.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eae0a7e065f867b9ba729281ba83b2568045ad50) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 15 Feb 2023 10:50:33 +0000 (23:50 +1300)]
Bug 33019: Make sure ES records are indexed the first time
This patch ensures records are indexed when they are created.
Previously, we were launching the indexer inside of of a transaction.
This meant that the job was being enqueued, but not being found by the
worker, becaue it was not yet in the DB
This patch skips record indexing in the transaction, and moves the indexing
command after
To test:
1 - Make sure you are using ES, and the es indexer is running
2 - tail -f /var/log/koha/kohadev/*.log
3 - Create a new record
4 - Note error in es-indexer-output.log like:
[2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129)
5 - Apply patch
6 - Create another record
7 There should be no error
8 - Search for the record and confirm it can be found
9 - View the background jobs in admin, confirm the most recent job has completed
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.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 48b1f230e8ea517450a02359e6f7fd530eda8b67) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
typeof str === "string"
must be
typeof params.body === "string"
Test plan:
With this patch, bug 33289 is not working properly. The body contains
"pref_var=value"
instead of
pref_var=value
and the syspref `var` contains `value"`
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Pedro Amorim <pedro.amorim@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 17de3a6feeed8237108c76ac2bf8e1cfddffc127) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
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 299903c0d3b51ea83b3c724a689609182c417b2b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
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 f690f59e0e5e67eca5da6f5079d922abd9225702) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
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 5800082f7ffa4d85ce9c2ba5da2a23c9021934c3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This is part of the refactoring happening in bug 30975
Test plan:
1. Verify that the plugin continues to work as before
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>
https://bugs.koha-community.org/show_bug.cgi?id=32831
(cherry picked from commit 4d196b176d6cfb258e9c729116db377cf5e17fd1) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Mon, 20 Mar 2023 18:21:06 +0000 (17:21 -0100)]
Bug 33282: Feed an array of titles so that no dialog message appears
Including but not limited to the one we're testing for
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b88d3640181c51b8d366313c4ac7044644f627d9) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pedro Amorim [Mon, 20 Mar 2023 18:19:53 +0000 (17:19 -0100)]
Bug 33282: Move get_title to index.js to be invoked by different specs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f718fe6a0aac993c08e911739e324c409ea93230) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pedro Amorim [Mon, 20 Mar 2023 18:07:27 +0000 (17:07 -0100)]
Bug 33282: Remove useless intercept
JD amended patch: replace "redundant" with "useless". It's not the same
intercept, but we don't need the one removed by this patch.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a56cbc6d47ab11e7d4f599e2eec3a03a7c7f4690) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pedro Amorim [Mon, 20 Mar 2023 18:05:52 +0000 (17:05 -0100)]
Bug 33282: Rename Dialog.spec.ts to Dialog_spec.ts
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c5d0a208d473e409cc8f1e633816e5e63a74c6d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 22 Mar 2023 09:25:56 +0000 (10:25 +0100)]
Bug 32923: Allow to embed user_roles for agreements
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 479d8719c548c11ae8fd26343324f085ee92b536) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Fri, 17 Mar 2023 17:43:18 +0000 (17:43 +0000)]
Bug 19361: (QA follow-up) Make sure "Not an authorised value" appears in the pull down
This is to make sure that the small icon with the additional tooltip
style explanation is not as easily missed.
Also updates text slightly:
* Pull downs: "X (Not an authorised value)"
* Tooltip: "The current value X is not configured for the authorised value category controlling this subfield"
Switches from exclamation triangle to the more "alerting" exclamation-triangle :)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c123b414800a9a7f20d1a7948baa6ea43025eec6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e0880ed3c93a07a999efab85ff18d305a158a893) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fdc82e6c6dc0d9853e5950c0c07805fcc2a1e2ac) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 19 Oct 2022 13:56:51 +0000 (13:56 +0000)]
Bug 19361: Display unauthorized values when cataloging and add a warning
This patch adds a warning and tool tip when an unauthorised vlaue is encountered during item
or biblio editing, and adds the value to the list to allow preserving the value (in case the
librarian is only editing another part of the record, or there is some reason to retain)
To test:
1 - Edit a record in advanced cataloging editor
2 - Under settings click 'Show fields verbatim'
3 - Edit 942$c to 'HAM' or some other invalid itemtype
4 - Save record
5 - sudo koha-mysql kohadev
UPDATE items SET location = 'HAM' WHERE biblionumber = {biblionumber from above}
6 - Edit the biblio and items, confirm the HAM value shows in dropdowns
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1dc022513cea57afb39e49273ffc3043d0094cd5) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Thu, 23 Feb 2023 22:16:56 +0000 (22:16 +0000)]
Bug 33060: Fix yes/no setting to 1/0 in system preference YAML files
Boolean system preferences need to use 1 and 0 for true and false,
not yes and no now. This fixes a few occurences that have
been added in the last release:
To test:
* Make sure these preferences save to the db as 0/1 as expected.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d11abd548bc879aa01216f9c2b472cc8621dcda8) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8ba4aabf079d23680a7e40b004b1914864963659) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 33227: Remove invalid spec and adjust the code accordingly
The spec contains a non-standard definition for the body param. Removing
it from the spec makes us need to handle the 'body' manually in the case
of JSON data.
This patch basically does that. It also changes the uses of
$c->validation, which are discouraged by the
Mojolicious::Plugin::OpenAPI dev/maintainer. I do it to highlight what
we must do in other places and the fact that there's no behavior change.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/biblios.t \
xt/api.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 185b431ebfc869dde06ab87efcd562fc786388ae) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This patch adds a unit test that launches the swagger-cli validator
against our spec.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 502e34e9b0f709d0ab9260da107c1c1e5c7e11d8) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Fri, 17 Mar 2023 21:46:21 +0000 (21:46 +0000)]
Bug 33076: (QA follow-up) Update context hint to "EDIFACT message QUOTE"
As discussed on the bug, this updates the hint to make it
easier for translators to decide on the correct translation.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 73edf936ae9be2a704389896e5ad316eb8cf96ec) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 32713: (QA follow-up) Tests now require more complex structures
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afdc1690e01daef72e6e2304bcdf7dec18fe653c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Wed, 1 Mar 2023 16:42:30 +0000 (16:42 +0000)]
Bug 32713: Throw exception on unexpected x-koha-embed header
This patch adds an exception to stash_embed that is thrown when we
find an x-koha-embed header that we're not expecting.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33de3ef9dcc8d2c0b021b2da80a2c6673cd06e82) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Thu, 2 Mar 2023 09:37:14 +0000 (09:37 +0000)]
Bug 32713: Unit tests
This patch adds unit tests to prove we return a 400 and an appropriate
error message when calling an endpoint that is not defined to support
x-koha-embed whilst passing an x-koha-embed header.
Test plan:
1) Run test prior to applying second patch and confirm it fails
2) Run test after applying second patch and confirm it passes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2202f7f2c29444b5cc587e09729cbf770323d96b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Agustin Moyano [Mon, 27 Feb 2023 22:10:31 +0000 (19:10 -0300)]
Bug 33083: Add a generic class to handle methods for collections of records
To test:
1. Apply patch
2. prove t/db_dependent/Koha/Objects/Record/Collections.t
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2055c84a9583cc53fc71f054ccaa7eea1d559aae) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adapts the other controllers that rely on
add_pagination_headers outside of `objects.search`.
To test:
1. Apply this patchset
2. Run:
$ ktd --shell
$ prove t/db_dependent/api/v1/* \
t/db_dependent/Koha/REST/Plugin/Objects.t \
t/db_dependent/Koha/REST/Plugin/Pagination.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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 347d8787dc9aa69d6a3265ef61d42014290720f2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 33080: Allow pagination to be built from stashed values
The way the old `objects.search` was build implied several totals were
calculated there, and passed to the `$c->add_pagination_headers` helper.
With the introduction of `objects.search_rs` and the ability of doing
things to the resultset afterwards, it felt like out of place to have
the pagination headers be implicitly set inside `objects.search_rs`.
This patch makes the search_rs stash some required values (from the original request) and
makes `add_pagination_headers` accept those values. This way other
callers can still build their own pagination values, while allowing this
simplified implementation.
Full-stack tests still pass, and the helper tests are moved to the
`db_dependent` section and are now more meaningful as well
To test:
1. Apply this patch
2. Run:
$ ktd --shell
$ prove t/db_dependent/Koha/REST/Plugin/Pagination.t \
t/db_dependent/api/v1/
=> SUCCESS: Tests pass! Nothing broken!
3. Sign off :-D
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 ad83d2e07d3c2c28e962b1a2e8d04b6f25a4a868) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 33080: Introduce objects.search_rs, objects.find_rs and objects.to_api
This patch introduces the mentioned helpers, and reimplements
objects.search and objects.find in terms of them.
To test:
1. Apply patch
2. restart_all
3. Check that any API that uses objects.search helper is still running
(GET /api/v1/items, GET /api/v1/holds, etc)
4. prove t/db_dependent/Koha/REST/Plugin/Objects.t
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 67a81d1328ad5f8720b3bf350ac494a0cd26f516) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Wed, 7 Dec 2022 18:41:26 +0000 (18:41 +0000)]
Bug 32421: Add collection column to holds to pull
To test:
1. Place some holds
2. Go to Circulation > Holds to pull
3. Notice there is not column to indicate collection ( CCODE )
4. Apply patch and restart services
5. Step 2 again, this time you should see a column for holds to pull
6. Using both the Columns button and via 'Table setting' attempt to hide the column and other columns. Ensure everything is being heiiden correctly.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 32421: (follow-up) Correct table settings
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 375fbd1704d9f5d7d6bc729c7d2c514ccc94bb3b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pedro Amorim [Mon, 20 Mar 2023 13:25:19 +0000 (13:25 +0000)]
Bug 32923: Fix licenses spec
Bug 32713 is now validating embed and brought this flaw to light.
Before this patch, listing licenses on ERM would result in a 400 bad request
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fb86ccdc5696fb15bf057469a5c962f8c228211) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 3 Nov 2022 11:02:21 +0000 (11:02 +0000)]
Bug 32118: Add optional support for `:` as the modifier
This patch adds optional support for using `:` as the modifier for
invoking the 'count' method for relations as discussed.
We retain support for `+` for backward compatability to prevent a
breaking change.
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 64d3498da4c62f8a2fa3d28c7cfe8b0a9e251288) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 65711c9daba5c07ffba5f7cfa6085be2116a75f8) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Edit: added missing test for unmapped attribute
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 35dd17735f4e5b39b0a56a3d72d010fd7d176a32) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 33161: (follow-up) Remove stray variables and fix POD
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7bde825a33cbc49a2363909c20adb74c6e8c6931) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 9 Mar 2023 13:14:04 +0000 (13:14 +0000)]
Bug 33161: Clarify method names
The api_strings_mapping method isn't really only about api strings.. we
deal with database fields in and out.. we just happen to then use those
in to_api to map in the api.
This patch simply renames the standard method whilst we're still early.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bbff26575f59e325ba6a3db1d5b986f5356fe2ae) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 9 Mar 2023 12:43:05 +0000 (12:43 +0000)]
Bug 33161: (follow-up) Consistent use of db fields throughout
We should stick to DB field names as long as possible to allow re-use
and only convert to api field names via to_api_mapping at the last
moment inside the parent to_api function.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 04736dd0bafbef608e56e8cd4dae63bb4eb93fe6) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>