Commit graph

6380 commits

Author SHA1 Message Date
25abcc024f Bug 33402: Move ERM Cypress tests to their own directory
We need to move the existing Cypress tests (that are ERM only, t/cypress/integration/*.ts )
to their own subdirectory, eg t/cypress/integration/ERM

Test plan:
Confirm that the cypress tests are still passing after this change:
  perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3143549403)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-09 21:38:31 +01:00
fc4d7c3d4d Bug 18398: (follow-up) Update POD & Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 488e67656f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-09 21:34:01 +01:00
daada78639
Bug 32594: (QA follow-up) Adjust tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 66e9bc71e4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-03 13:08:00 +01:00
4193cda0f1
Bug 33229: (RMaint follow-up) Remove errant test from bug 31051
The backport braught in more than expected in the tests ;P

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-04-27 13:30:11 +01:00
91bcb58508 Bug 33229: (follow-up) Adjust tests to set anonymous patron before setting patron privacy to 2
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cf83ec866c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-18 12:28:43 +00:00
cf14f6f844 Bug 33229: Clear patron reading history when privacy is set to never
This patch adds a check to patron store routine. When privacy is changed
to 'Never' we should immediately clear their history

To test:
1 - Set system preferences:
   AnonymousPatron - to a valid borrowernumber
   OPACPrivacy - Allow
2 - Checkout some items to a patron with priacy set to default, return them
3 - Log in to opac as patron
4 - Confirm you can see your history
5 - Change history to Never
6 - Confirm history still viewable
7 - Apply patch, restart all
8 - Set privacy to Default
9 - Confirm you can still see history, not deleted when not set as Never
10 - Set privacy to 'Never'
11 - Confirm history is anonymized

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 7c45fc8bdf)
2023-04-18 12:27:51 +00:00
acac225161 Bug 32127: Add unit test
Run prove t/db_dependent/Template/Plugin/Categories.t

Signed-off-by: Lucas Gass <lucas@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 c101afb0a0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-18 12:05:51 +00:00
Katrin Fischer
babebab0cb Bug 29311: (follow-up) Fix t/db_dependent/selenium/regressions.t
The test was checking for the value of an input field.
But with this patch set, there is no longer an input, but
a link element with the title. This adjusts the patch to look
for the correct element.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 307df8f1af)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 21:25:19 +01:00
cffc3331e5 Bug 33422: Add cypress test
This patch adds a cypress test to check whether the "active" class is correctly updating when navigating

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b16749efb)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:37:50 +01:00
58b5baa504 Bug 32648: Avoid skipping record or hiding item
It seems that depending on other tests, the item could be hidden from the record, or
the entire record hidden because of the way we count hidden items.

I add a mock for the two HIddenItems prefs and hardcode an xml record
to avoid problematic data from test builder

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3db7173dde)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:34:39 +01:00
08e7057e25 Bug 29234: Further clean Z3950 Tests
We are deleting all authorised values in Session2.t and assuming they don't exist in Sesson.t

This patch ensures the tests will work regardless of data in DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d50f85cc6)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:11:26 +01:00
7f446bf225 Bug 29234: Set datesent for transfers in Z3950 Responder tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b96e61f1ea)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:11:13 +01:00
aeb6cae060 Bug 29234: (QA follow-up) Fix test that expects wrong defaults
This patch changes the get_items_that_can_fill tests so they explicitly
set a 'datearrived' as the new defaults for fresh transfer objects from
TestBuilder is more sane and has this field undef. Tests *should always*
create their required scenarios explicitly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6ab19f01b8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:04:52 +01:00
204eca096c Bug 32437: Add replace method to Koha::Import::Record objects
This patch adds a replace routine to Koha::Import::Record - largely
copying and updating code from C4::ImportBatch

To test:
prove t/db_dependent/Koha/Import/Records.t

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ecc92f92ca)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 17:47:45 +01:00
ccb0ce027b Bug 32437: Add Objects for ImportAuths
This patch:
1 - Adds an atomic update to add a primary key to import_auths table
2 - Adds objects for Koha::Import::Records::Auths
3 - Adds tests for import auth and biblio objects

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f41f272ff0)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 17:47:32 +01:00
fb3c29fb87 Bug 33159: Simplify ES handling and fix zebra handling
Before this patch we used two indexes for the thesaurus values, we can
simply index both needed fields into a single index and just form the
search correctly.

This patch also ensures we pass the 'thesaurus' vlaue for the heading
directly to the query builder - for zebra it goes through, and for ES
we convert it to the expected code.

This patch also moves the necessary mappings out of the user definable
mappings and hardcodes them. There is precedent for this with
'match-heading', it ensures matching works as expected

To test:
1 - Follow previous test plan in Zebra and ES

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 b0767f5eb6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:19:35 +00:00
9420a57486 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 ee60af86c6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:18:56 +00:00
559ac79c47 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 80f5b33511)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:17:58 +00:00
Julian Maurice
7bdb7cd90c 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 8bfb09b68b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:15:39 +00:00
91da80c89b Bug 32710: Try to prevent UI/Form/Builder/Item.t to fail randomly
See the FIXME, and commit 77a34e099a
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 4e6bc5385c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:15:03 +00:00
b428bd0b2a
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 b88d364018)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-24 10:35:16 +00:00
25a0f210ba
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 f718fe6a0a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-24 10:35:15 +00:00
bfeabc271a
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 a56cbc6d47)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-24 10:35:14 +00:00
89c685039d
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 7c5d0a208d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-24 10:35:13 +00:00
0093c3683a 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 185b431ebf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-21 16:35:49 +00:00
a1f79c1815 Bug 32713: (QA follow-up) Tests now require more complex structures
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afdc1690e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-21 16:31:39 +00:00
f481f79d83 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 2202f7f2c2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-21 16:30:33 +00:00
Agustin Moyano
f604e721e8
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 2055c84a95)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-21 09:33:58 +00:00
5455fcd371
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 ad83d2e07d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-21 07:41:43 +00:00
d1f3c6e806
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 67a81d1328)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-21 07:41:20 +00:00
a62dd95c21
Bug 32734: (RMaint follow-up) Clarify tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-21 07:38:09 +00:00
8906e758dc
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 64d3498da4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-20 16:51:50 +00:00
e1f9ba13e9
Bug 33161: (QA follow-up) Fix api_strings_mapping inconsistency
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 65711c9dab)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-20 16:51:06 +00:00
38611787b6
Bug 33161: Unit tests
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 35dd17735f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-20 16:50:13 +00:00
7bb845b3a5 Bug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t
Resolve:
    #   Failed test 'Item's biblioitemnumber has not changed'
    #   at t/db_dependent/ImportBatch.t line 407.
    #
    #          got: '4261'
    #     expected: '2371'

Do not compare $item1->biblionumber with $original_biblioitemnumber :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf8e0a394f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:19:48 +00:00
ffb1a70343 Bug 32804: (follow-up) Test that id's have not changed
Rather than assuming biblionumber and biblioitemnumber are the same, we
should test that they have not changed form their original values

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 520db70bf1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:19:29 +00:00
61f165728e Bug 32804: Add unit tests
JD amended patch
-    is( $item1->homebranch, $library->branchcode, "Item was overlayed succesfully" );
+    is( $item1->homebranch, $library->branchcode, "Item was overlaid successfully" );

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8f5d3612ee)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:18:43 +00:00
656969e79a Bug 33100: (QA follow-up) Trivial QA fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 057e6c2bc8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:17:28 +00:00
39d6ee4399 Bug 33100: Unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7490453663)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:16:53 +00:00
401b17bc06 Bug 33235: Fix cypress tests
Some inconsistencies leftovers from 32495 and 32997 were causing cypress tests to fail, this fixes them.

* Apply patch
* Run cypress tests and verify all pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16e6d93763)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:16:05 +00:00
7523587478 Bug 33263: Fix random failure in patrons_search.t
There is a missing wait_for_ajax. After we click "next", we need to make
sure we are using the correct response.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e81e2c9ed5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-17 17:10:38 +00:00
Agustin Moyano
7b3fd8f475 Bug 32734: Add REST endpoint to list biblios
This patch adds an endpoint to list biblios

To test:
1. apply patch
2. enable basic auth
3. call to GET /api/v1/biblios with the following Accept headers:
 * application/json
 * application/marcxml+xml
 * application/marc-in-json
 * application/marc
 * text/plain
4. notice how data changes with each Accept header
5. prove t/db_dependent/Koha/Biblios.t t/db_dependent/api/v1/biblios.t
6. sign off

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a4fb1ca3d1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-16 19:47:25 +00:00
Agustin Moyano
fed1e0ff76 Bug 31801: Add REST endpoint to modify a biblio
To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Pick a biblio to modify, and modify it's marc record
4. Make a PUT request to /api/v1/biblios/:biblionumber with one of the following content type header
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
5. Add the following header in the request 'x-framework-id: <framework id>'
5. Check that the biblio was modified
6. Sign off

Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4438c4da2e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-16 19:41:00 +00:00
Agustin Moyano
1c18e36b91 Bug 31800: Add REST endpoint to add a biblio
To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Make a POST request to /api/v1/biblios with one of the following content type header
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
4. Add the following header to the request: "x-framework-id: <framework id>"
5. Check that the biblio is created
6. Sign off

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5d6ccdf60)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-16 19:40:13 +00:00
b5052dca44 Bug 32684: Implement SIP patron status field "too many items lost"
The SIP patron status and information responses always return false foe "too many items lost". It would be reasonable to check the count of lost items still checked out to the patron and compare that to a threshold set in the sip config file. Though not all libraries operate in this way, it seems like a good and reasonable implementation as long is it is properly documented.

This patch adds the ability to set the SIP "too many items lost" flag
for a patron based on the number of lost checkouts the patron has where
the lost flag on those items is greater than the given flag value.

For example, one could specify that the flag be set if the patron has
more than 2 items checked out where itemlost is greater than 3.

By default the feature is disabled to retain the existing functionality.
If enabled, the default itemlost minimum flag value is 1 unless
specified.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t

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 877f8ed898)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-16 19:28:38 +00:00
57dbb67e60 Bug 32991: Add cypress tests for the dialog box
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dc40b5dd08)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-16 19:23:58 +00:00
91e2554685 Bug 32991: Fix cypress tests. Added new test for when deleting from show view.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 48b39533f6)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-03-16 19:23:18 +00:00
3bdb5d21a4
Bug 33214: (RMaint follow-up) Remove tests for unbackported feature
We haven't backport the strings_map functionality, so we don't need the
fixes to the tests for it here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-03-14 14:50:14 +00:00
1b49f1db1b Bug 33214: (follow-up) Make tests less fragile
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 12e3e91c13)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-14 10:44:25 +00:00
da12192de5 Bug 33214: (follow-up) Consistency on key names
This patch makes GetAuthorisedValueDesc used cache keys match what we
discussed on the bug, which seems to have been lost on some rebase and
highlighted by failing tests.

I also add some more cache flushes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 52315d60f3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-03-14 10:44:04 +00:00