Commit graph

724 commits

Author SHA1 Message Date
phette23
8bf9368d75
Bug 39260: Fix typo in acquisitions baskets API docs
To test:
- Go to /api/v1/.html#op-get--acquisitions-baskets-managers
- See 'possibe' misspelling
- Apply patch and revisit
- Spelling is fixed

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-07 15:41:17 +01:00
Lari Taskula
423588a060
Bug 28907: REST - Remove allow-owner from public article requests cancel route
To test:
1. prove t/db_dependent/api/v1/article_requests.t
2. Apply patch
3. prove t/db_dependent/api/v1/article_requests.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:33 +01:00
Lari Taskula
41cac0d9fc
Bug 28907: REST - Remove allow-owner from public checkout availability route
To test:
1. prove t/db_dependent/api/v1/checkouts.t
2. Apply patch
3. prove t/db_dependent/api/v1/checkouts.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:33 +01:00
Lari Taskula
53d4a37b2b
Bug 28907: REST - Remove allow-owner from public patron hold cancellation
To test:
1. prove t/db_dependent/api/v1/patrons_holds.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons_holds.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:32 +01:00
Lari Taskula
3a1e5d74f7
Bug 28907: REST - Remove allow-owner from public guarantors can see charges and checkouts
To test:
1. prove t/db_dependent/api/v1/patrons.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:31 +01:00
Lari Taskula
b2e1ac1299
Bug 28907: REST - Remove allow-owner from public checkouts route
To test:
1. prove t/db_dependent/api/v1/checkouts.t
2. Apply patch
3. prove t/db_dependent/api/v1/checkouts.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:31 +01:00
Lari Taskula
3ccf9d4ee1
Bug 28907: REST - Remove allow-owner from public password route
To test:
1. prove t/db_dependent/api/v1/patrons_password.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons_password.t

Observe success in both cases.

https://bugs.koha-community.org/show_bug.cgi?id=28907
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:30 +01:00
Johanna Räisä
ec43f339d3
Bug 38253: (follow-up) add missing swagger definition
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:31 +01:00
Johanna Räisä
2071aae29f
Bug 38253: Add lowest priority REST API endpoint for holds
This patch adds a new endpoint to toggle the lowest priority of a hold via the REST API.

To test:
1) Apply the patch
2) perl build-resources.PL
3) prove t/db_dependent/api/v1/holds.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:31 +01:00
b1b96351b7
Bug 38689: Display errors in a modal
This patch adds a `(with errors)` link next to the status of any edifact
messages that produced errors on processing.  The link will popup a
modal containing the error details recorded for that message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-21 16:41:20 +01:00
6ffb26cd0b
Bug 38689: Add Koha::Edifact::File::Error(s) classes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-21 16:41:19 +01:00
adae95debe
Bug 37256: Add 'PUT' for circulation rule sets
Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:32 +01:00
f4342c922d
Bug 37256: Defined 'context' of circulation rules
This is a follow-up to the previous bug exposing circulation rules over
the API.

We formally define a definition for a circulation rules set including a
new 'context' object the defines the context, library_id,
patron_category_id and item_type_id combination of the rules returned.

This is just a patch I missed in the last submission that I'd meant to
add and it's important for the PUT part of this patchset.

Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:31 +01:00
5d67151107
Bug 39007: Update API spec and unit test
Test plan:
1) Run prove t/db_dependent/api/v1/erm_sushi_services.t - FAIL
2) Apply patch
3) Repeat step 1 - PASS
4) Inspect patch diff and note that last_audit has been added to the API definition

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-31 15:57:32 +01:00
a98760a994
Bug 38926: Make POST /biblios return 400 if AddBiblio fails
We don't have proper exceptions in the `C4::Biblio::AddBiblio` method,
but we at least know `$biblio_id` will be `undef` in the even of an
error processing the call.

This patch makes the controller handle this situation so (at least) it
is obvious that something bad happened.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail! The endpoint returns 200 even on error!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! The endpoint returns a 400 with a reasonable
message!
5. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-24 12:02:16 +01:00
bb2e88a1e3
Bug 38461: Do not rely on biblio_id=1
It might not exist!

This code is not trivial and should ideally be moved to somewhere it
could be reused easily. But good enough for now to fix the failing tests.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-20 17:41:15 +01:00
15803e4f29
Bug 36627: (QA follow-up): Rename borrowernumber -> patron_id
To test:
$ prove t/db_dependent/api/v1/erm_counter_logs.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-30 15:12:44 +01:00
7b75586ead
Bug 36627: Rename embed method to patron
This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 13:36:14 +01:00
da475321a5
Bug 36627: Embed patron record for display
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 13:36:13 +01:00
Michał Kula
7df4eda9ec
Bug 37393: fix "In bundle:" link not showing for items in staff interface
The cause was erroneous check `[% IF bundlesEnabled %]` before the parent bundle information is requested+shown. The `bundlesEnabled` variable checks if the current biblio ITSELF is of collection type, so should only be used for whether to show the button to add new items to the bundle items, NOT for querying whether current item is part of a bundle, as the items that make up the bundle aren't of collection type themselves.

The second fixed problem was that `bundle_host` didn't contain `.biblio` subitem (which'd contain the actual host biblio title) as the JavaScript code assumed, and it wasn't possible to request it with the API either.

Test plan: please follow the reproduction instructions from bug and ensure that the described issue is gone.

If you run into an error 400 on the detail page, you need to refresh API definitions, in kts shell you'drun:

redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
koha-plack --restart kohadev

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-04 16:32:49 +01:00
c9c2dc6c7c
Bug 36454: (QA follow-up) Use native is_expired instead of redundant JS calculation
Test plan:
1) $ yarn api:bundle
2) $ koha-plack --restart kohadev
3) Make a patron expired, search for them. Verify the 'expired' badge still shows

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:04:25 +01:00
c3628506e3
Bug 33641: (follow-up) Add field to api spec
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I changed the attribute name to match our guidelines (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-15 09:13:19 +01:00
f20582bb0d
Bug 37850: (QA follow-up): Update illemail REST API attribute name
To test
1) yarn api:bundle && koha-plack --restart kohadev
2) Enable ILLModule and put some 'ILL staff email:' on some library
3) Access <staff_url>/api/v1/libraries
4) Notice the attribute reads ill_email

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-12 17:50:16 +01:00
ce5c7695e2
Bug 38390: Add subscriptions+count to vendors embed
This patch adds the subscriptions+count option to the embeddable enum
for the /vendors endpoint.

Test plan
1) Inspect the change to t/db_dependant/api/v1/acquisitions_vendors.t
   and confirm it's testing for the addition of subscriptions_count.
2) Run the above tests and confirm it passes

Note: For the above tests to pass, you will need to ensure your api
bundle is rebuilt after the patches are applied and restart plack.
`yarn build && restart_all` in ktd

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:23 +01:00
738700b49a
Bug 34355: (QA follow-up) Permissions fixes
This patch addresses some permissions errors and updates the breadcrumbs to reflect this

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:18 +01:00
37d18425fe
Bug 37809: (follow-up) Allow embedding item.biblio too
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:19 +01:00
8fd91cb7ba
Bug 37809: (follow-up) Remove wrong embed
It seems to me like a copy and paste error coming from the holds
endpoint.

To test:
1. Use a REST API tool like Postman to ask for some patron's checkouts
2. Add x-koha-emebed: cancellation_requested
=> FAIL: It explodes, cannot embed it
3. Apply this patch
4. Repeat 2
=> SUCCESS: cancellation_requested no longer a valid option
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: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:18 +01:00
f5420d27f8
Bug 37809: Add more embed options to checkouts endpoints
This patch adds more embed options to checkouts endpoints.
To test you really need to try them on a REST tool.

* patron
* item
* library

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:17 +01:00
2e83345479
Bug 28633: Add preferred name field to patrons
This patch adds a new field 'preferred_name' to the patron record.

On storage (creation or update) the preferred_name is set to the firstname if no
value is passed. Patron modifications will set the preferred name to the firstname if
the preferred_name field is hidden

With this patchset preferred_name will always be set - either to the firstname, or a specified value.

PatronAutoComplete/ysearch is updated to use 'preferred_name'

To test:
 1 - Apply patches
 2 - Update database and restart all, clear browser cache
 3 - Load a patron in staff module
 4 - Confirm you see and can add a preferred name
 5 - Confirm the preferred name and first name now displays on patron details
 6 - Remove first name from patron record and confirm it no longer shows
 7 - Edit sysprefs BorrowerMandatoryFields and BorrowerUnwantedFields to confirm you can make
     new field required or hidden
 8 - Sign in as patron to opac
 9 - Confirm preferred name shows
10 - Edit account on opac and confirm field is present
11 - Verify DefaultPatronSearchFields contains 'preferredname' if your pref had firstname
12 - Perform checkout and patron search using preferred_name, confirm patron is found
13 - Enable PatronAutoComplete system preference
14 - Type patron's surname into Checkout or patron search but don't hit enter
15 - Confirm patron is displayed with 'preferred_name' in the preview
16 - Set 'preferred_name' in all 'Unwanted' preferences
17 - Confirm editing a patron in staff interface sets both fields when firstname updated
18 - Confirm a patron modification sets both fields when firstname updated
19 - Create a patron / perform self registration and confirm both fields set when preferred_name is hidden
20 - Remove preferred_name from Unwanted prefs and confirm preferred_name is set to firstname if nothing passed

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:09 +01:00
131ff0f402
Bug 28633: DB update
This adds the field to necessary tables and updates API and columns def
and sets preferred name to firstname

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:08 +01:00
c10c244a28
Bug 22421: (QA follow-up) Update API mapping and specs
We missed some cases where the API specs and mappings were missing for
the new old_issue_id field.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-08 17:06:06 +01:00
9a0cc6ad2a
Bug 28965: Add /public/lists
This patch adds a route for publicly retrieving lists.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-08 16:09:21 +01:00
6ece137123
Bug 37577: Add additional fields for ERM packages
This bug adds support for additional fields in the ERM module's
packages, similar to how Bug 35287 added support for additional fields
in the ERM module's licences, and Bug 37576 added support for additional
fields in the ERM module's agreements.

To test (k.t.d):
a)  APPLY PATCH
b)  Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts
    1)  Note how the tests pass
c)  Add new additional fields for 'erm_packages'
    1)  Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_packages
    2)  Create field one called 'text non-repeatable'
    3)  Create field two called 'text repeatable', check 'repeatable'
    4)  Create field three called 'av non-repeatable', pick LANG authorised
        value
    5)  Create field four called 'av repeatable', pick LOC authorised value,
        check repeatable
d)  Create new local package
    1)  Go to /cgi-bin/koha/erm/eholdings/local/packages/add, notice the new
        additional fields section
    2)  Complete all mandatory fields for a new package
    3)  Experiment with the four different additional field types – it
        may be useful to watch the Cypress-generated test video for
        guidance
    4)  Select some AV options from the AV fields, deselect them, notice
        the repeatable one allows for multiple selection, the non-repeatable
        one does not
e)  Save the package, then view it
    1)  To view the package, click its name in the table list on
        /cgi-bin/koha/erm/eholdings/local/packages
    2)  notice the additional fields on display
    3)  also notice that the authorised values are in their human-readable
        form, and not their coded form
f)  Edit the package, then view it again
    1)  Go to /cgi-bin/koha/erm/eholdings/local/packages/edit/1
    2)  Play around again with the fields. Save.
    3)  Repeat step e, have the edits shown up?
g)  Test searchability
    1)  Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_packages
    2)  Edit one of the fields and make sure searchable is checked (ensure
        you choose a field that has some data in it)
    3)  Go to /cgi-bin/koha/erm/eholdings/local/packages
    4)  Notice that the searchable field(s) are now columns in the table
    5)  Notice that searchable AV fields contain a drop-down
    6)  Notice that searchable text fields have an input field
    7)  Perform a search on the additional field
    8)  Notice that the searching is working as expected
h) SIGN OFF

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-08 16:09:19 +01:00
f348afbae8
Bug 37576: Add additional fields for ERM agreements
This bug adds support for additional fields in the ERM module's
agreements, similar to how Bug 35287 added support for additional fields
in the ERM module's licences.

To test (k.t.d):
a)  APPLY PATCH
b)  Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts
    1)  Note how the tests pass
c)  Add new additional fields for 'erm_agreements'
    1)  Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements
    2)  Create field one called 'text non-repeatable'
    3)  Create field two called 'text repeatable', check 'repeatable'
    4)  Create field three called 'av non-repeatable', pick LANG authorised
        value
    5)  Create field four called 'av repeatable', pick LOC authorised value,
        check repeatable
d)  Create new agreement
    1)  Go to /cgi-bin/koha/erm/agreements/add, notice the new additional
        fields section
    2)  Complete all mandatory fields for a new licence
    3)  Experiment with the four different additional field types – it
        may be useful to watch the Cypress-generated test video for
        guidance
    4)  Select some AV options from the AV fields, deselect them, notice
        the repeatable one allows for multiple selection, the non-repeatable
        one does not
e)  Save the agreement, then view it
    1)  To view the licence, click its name in the table list on
        /cgi-bin/koha/erm/agreements
    2)  notice the additional fields on display
    3)  also notice that the authorised values are in their human-readable
        form, and not their coded form
f)  Edit the agreement, then view it again
    1)  Go to /cgi-bin/koha/erm/agreements/edit/1
    2)  Play around again with the fields. Save.
    3)  Repeat step e, have the edits shown up?
g)  Test searchability
    1)  Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements
    2)  Edit one of the fields and make sure searchable is checked (ensure
        you choose a field that has some data in it)
    3)  Go to /cgi-bin/koha/erm/agreements
    4)  Notice that the searchable field(s) are now columns in the table
    5)  Notice that searchable AV fields contain a drop-down
    6)  Notice that searchable text fields have an input field
    7)  Perform a search on the additional field
    8)  Notice that the searching is working as expected
h) SIGN OFF

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-08 16:09:17 +01:00
f33b59b0d0
Bug 33462: (QA follow-up) Adapt API spec
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-11-01 08:17:14 -03:00
32c4fbcbc0
Bug 38204: (QA follow-up) Require name property
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 07:47:41 +01:00
64d9579c47
Bug 38204: Add api endpoint to list baskets
This patch adds an API endpoint to list baskets
It uses CanUserManageBasket to respect the users permissions and sysprefs

Test plan:
1) prove t/db_dependent/api/v1/acquisitions_baskets.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 07:47:40 +01:00
fca373bc5f
Bug 37639: Add items.stack to items endpoint
To test:
1. Apply patch and restart_all, and yarn api:bundle
2. Check the items endpoint for items.stack ( http://localhost:8081/api/v1/items/144 )
3. The data is there, and correct.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-29 16:14:36 +01:00
63c3b68338
Bug 30648: deleted_biblio_id can be null
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-29 16:14:32 +01:00
a7ead95c14
Bug 30648: Add new field to REST API
Maybe we just undef it since ti will always be null except for old_hold obecjts
and we don't have that route yet

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-29 08:46:44 +01:00
908d4f62ad
Bug 38222: Add cancellation reason to bookings patch definition; reformat bookings definition
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 16:41:31 +02:00
d02a717ab6
Bug 35906: (QA follow-up) Fix item-type schema
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 15:34:42 +02:00
db6cce8852
Bug 35906: Remove preference and add override handling
This patch updates the bookable nature of items to allow setting at the
itemtype level and then overriding that setting at item level should you
so wish to do so.

We also now properly handle the item_level-itypes preference such that
we look at item or biblioitem level appropriately.

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 15:34:41 +02:00
6392f90b5f
Bug 33736: (follow-up) Remove top-level embed in bookings.yaml
For reference, see: bug 30536.

Sponsored-by: PTFS Europe Ltd
Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 11:09:57 +02:00
f5d0dceb82
Bug 33736: Add item location and filter by library to bookings to collect report
This patch adds a new 'Location' field to the bookings to collect
report. We display with the current item location or an onloan status
with the due date.

We also add filtering for status != 'waiting' to the base query to rule
out items marked as ready for collection already (however, we don't yet
have a way of marking such a status so this won't have any effect yet).

Sponsored-by: PTFS Europe Ltd
Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 11:09:56 +02:00
1f7038d11a
Bug 33736: Add pendingbookings report
This patch adds a 'Bookings to collect' page to circulation that allows
for a workflow similar to 'Holds to pull', but for bookings.

Sponsored-by: PTFS Europe Ltd
Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 11:09:54 +02:00
Johanna Raisa
d3a71a446a
Bug 30661: Allow to update more hold parameters via REST API
This patch adds hold_date and expiration_date to holds edit endpoint

Test plan:

1) prove t/db_dependent/api/v1/holds.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 11:09:52 +02:00
Johanna Raisa
a50eacf11d
Bug 30660: Add cancellation reason to holds delete endpoint
This patch adds cancellation reason to holds delete endpoint.

Test plan:
1) prove t/db_dependent/api/v1/holds.t

PA amended: tidy

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 11:09:49 +02:00
Jan Kissig
3fac0dc36f
Bug 37253: Enhance POST /checkouts endpoint to accept barcode or item_id
This patch adds external_id as a body param in POST /checkouts which acts as the items barcode.
This enhances the checkouts route to checkout items directly via barcode which could be useful for external
tools like Koha Offline Circulation Tool

Test plan:

a) apply patch
b) enable system preference RESTBasicAuth
c) check out an item via an API testing tool. Be sure that item is not checked out already.

   Auth: username: koha  &  password: koha
   Body JSON:
   {
     "external_id" : "39999000011418",
     "library_id": "CPL",
     "patron_id": 5
   }
   POST http://localhost:8081/api/v1/checkouts
d) check response code 201 and response content

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 11:09:48 +02:00
fb3a28ef24
Bug 38193: Add cancellation_reason field to bookings table
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: Thibaud Guillot <thibaud.guillot@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-24 18:27:27 +02:00