]> git.koha-community.org Git - koha.git/log
koha.git
6 months agoBug 22613: Add GET endpoint /patrons/{patron_id}/checkouts
Alex Arnaud [Wed, 10 Apr 2024 12:03:14 +0000 (14:03 +0200)]
Bug 22613: Add GET endpoint /patrons/{patron_id}/checkouts

This patch adds a new endpoint, for fetching checkouts from a specific
patron.

Test plan:

1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/patrons_checkouts.t
=> SUCCESS: Tests pass!
3. Run:
   $ curl -v -s -u koha:koha --request GET \
        http://kohadev.local/api/v1/patrons/{id}/checkouts
test with query parameters (they are the same as for /patrons/{id}/holds
=> SUCCESS: The API works!

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>
6 months agoBug 33478: DBIC schema update
Katrin Fischer [Fri, 26 Apr 2024 17:08:32 +0000 (17:08 +0000)]
Bug 33478: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: DBRev 23.12.00.032
Katrin Fischer [Fri, 26 Apr 2024 16:59:58 +0000 (16:59 +0000)]
Bug 33478: DBRev 23.12.00.032

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: (follow-up) Correct file permission
Lucas Gass [Tue, 26 Mar 2024 13:44:32 +0000 (13:44 +0000)]
Bug 33478: (follow-up) Correct file permission

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Consider TranslateNotices when saving notice styles
Aleisha Amohia [Thu, 29 Feb 2024 01:30:06 +0000 (01:30 +0000)]
Bug 33478: Consider TranslateNotices when saving notice styles

This patch ensures saving styles per notice still works as expected when the TranslateNotices system preference is enabled.

To test, enable the TranslateNotices system preference and attempt to save different CSS for each installed language for one notice. Confirm the correct CSS is saved for the correct language.

Confirm the CSS selector helpers are inserted into the textarea as expected.

Confirm the 'Apply format settings to all notices for this language' setting works, as in CSS is saved for all relevant language notices.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Make styles apply per notice
Aleisha Amohia [Thu, 19 Oct 2023 04:11:09 +0000 (04:11 +0000)]
Bug 33478: Make styles apply per notice

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to AR_SLIP
Aleisha Amohia [Sun, 12 Nov 2023 21:26:42 +0000 (21:26 +0000)]
Bug 33478: Apply formatting to AR_SLIP

To test:

1. Enable ArticleRequests system preference in Koha Administration -> Global system preferences
2. Log into the OPAC
3. Do a catalogue search
4. Click the 'Request article' button for a record
5. Fill in some information and submit
6. Go to the staff interface
7. Go to Circulation -> Article Requests
8. Click the Actions menu next to your article request and choose Print slip
9. Confirm your format settings for AR_SLIP are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to RECALL_REQUESTER_DET
Aleisha Amohia [Sun, 12 Nov 2023 21:37:02 +0000 (21:37 +0000)]
Bug 33478: Apply formatting to RECALL_REQUESTER_DET

To test:

1. Enable UseRecalls system preference and configure all relevant recalls circulation and fines rules
2. Search for a record with only one item
3. Check out this item to Patron A
4. Log into the OPAC as Patron B
5. Search for the item and place a recall
6. Go back to the staff interface
7. Check in the item
8. When the pop-up for the recall is triggered, confirm recall and print slip
9. Confirm your format settings for RECALL_REQUESTER_DET are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to ACCOUNTS_SUMMARY
Aleisha Amohia [Sun, 12 Nov 2023 21:35:58 +0000 (21:35 +0000)]
Bug 33478: Apply formatting to ACCOUNTS_SUMMARY

To test:

1. Go to a patron accounting page
2. Create a manual invoice and Save
3. Click the Print button in the patron toolbar
4. Click the 'Print account balance' button
5. Confirm your format settings for ACCOUNTS_SUMMARY are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to RECEIPT
Aleisha Amohia [Sun, 12 Nov 2023 21:34:51 +0000 (21:34 +0000)]
Bug 33478: Apply formatting to RECEIPT

To test:

1. Enable EnablePointOfSale and UseCashRegisters system preferences in Koha Administration -> Global system preferences
2. Go to Koha Administration -> Cash registers and add a new cash register
3. Go to Koha Administration -> Debit types and add a new debit type. Make sure you check the 'can be sold' option
4. Go to Point of sale
5. Select Add for your item under Items for purchase
6. Fill in Collect payment box and click Confirm
7. When payment is received, click Print receipt
8. Confirm your format settings for RECEIPT are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to ACCOUNT_CREDIT
Aleisha Amohia [Sun, 12 Nov 2023 21:33:29 +0000 (21:33 +0000)]
Bug 33478: Apply formatting to ACCOUNT_CREDIT

To test:

1. Go to a patron accounting page
2. Create a manual invoice and Save
3. You'll be redirected to the Transactions tab
4. Click the Pay button next to your invoice and confirm Payment
5. Click the Print button next to your Payment
6. Confirm your format settings for ACCOUNT_CREDIT are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to ACCOUNT_DEBIT
Aleisha Amohia [Sun, 12 Nov 2023 21:32:13 +0000 (21:32 +0000)]
Bug 33478: Apply formatting to ACCOUNT_DEBIT

To test:

1. Go to a patron accounting page
2. Create a manual invoice and Save
3. You'll be redirected to the Transactions tab
4. Click the Print button next to your invoice
5. Confirm your format settings for ACCOUNT_DEBIT are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to OVERDUES_SLIP
Aleisha Amohia [Sun, 12 Nov 2023 21:28:36 +0000 (21:28 +0000)]
Bug 33478: Apply formatting to OVERDUES_SLIP

To test:

1. Check out an item to a user. Set the due date to a time in the past so it is overdue
2. Click Print in the members toolbar, then Print overdues
3. Confirm your format settings for OVERDUES_SLIP are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to TRANSFERSLIP
Aleisha Amohia [Sun, 12 Nov 2023 21:27:54 +0000 (21:27 +0000)]
Bug 33478: Apply formatting to TRANSFERSLIP

To test:

1. Search for an item that was last seen at a library different from your logged in library i.e the holding library is Fairview but your logged in library is Centerville
2. Use the barcode to check in the item
3. When the popup to 'please return this item to <home library>' is triggered, click the Print slip button
4. Confirm your format settings for TRANSFERSLIP are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to HOLD_SLIP
Aleisha Amohia [Sun, 12 Nov 2023 21:24:53 +0000 (21:24 +0000)]
Bug 33478: Apply formatting to HOLD_SLIP

To test:

1. Place a hold on a record
2. Check in an item attached to the record
3. When the pop-up for the hold is triggered, confirm hold and print slip
4. Confirm your format settings for HOLD_SLIP are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Apply formatting to ISSUESLIP, ISSUEQSLIP, CHECKINSLIP
Aleisha Amohia [Sun, 12 Nov 2023 21:15:20 +0000 (21:15 +0000)]
Bug 33478: Apply formatting to ISSUESLIP, ISSUEQSLIP, CHECKINSLIP

To test:

1. Check out an item to a patron
2. Click Print in the members toolbar, then Print quick slip
3. Confirm your format settings for ISSUEQSLIP are applied

4. Click Print in the members toolbar, then Print slip
5. Confirm your format settings for ISSUESLIP are applied

6. Return the item
7. When the item is checked in, click the 'Print checkin slip' button
8. Confirm your format settings for CHECKINSLIP are applied

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: Save notice format settings
Aleisha Amohia [Tue, 18 Apr 2023 04:52:46 +0000 (04:52 +0000)]
Bug 33478: Save notice format settings

Save format settings for an individual notice, or for all notices
This patch implements a single style field for a slip to allow for advanced CSS customisation of printed notices. There are links to insert selectors as helpers. Styles can be applied for an individual notice, or all notices.

To test:

1. Apply the patches, install database updates, update schema if needed, and restart services
2. Go to Tools -> Notices and slips
3. Edit any notice
4. Go to the Format tab
5. Confirm there is a textarea for CSS, and links to insert helpful selectors for IDs like #receipt and #slip
6. Add some CSS and confirm it saves.
7. Test that 'apply these settings to all notices' option works. Test the confirmation box appears when this is checked.
8. Add a new notice and confirm CSS settings save successfully
9. The subsequent patches have specific testing plans for each printable notice. For each, confirm that SlipCSS stylesheet changes are applied first. Specific notice styles should be applied last.
10. Test with a non-HTML notice as well, such as RECALL_REQUESTER_DET. Plain (non_HTML) notices have always come with <pre> tags around them so the text is formatted slightly differently but any CSS from SlipCSS or the notice Format should still hold.

Sponsored-by: Colorado Library Consortium
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: DBRev 23.12.00.031
Katrin Fischer [Fri, 26 Apr 2024 16:32:51 +0000 (16:32 +0000)]
Bug 31791: DBRev 23.12.00.031

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: (follow-up) Tidy AddBiblio
Tomas Cohen Arazi [Wed, 20 Mar 2024 14:34:20 +0000 (11:34 -0300)]
Bug 31791: (follow-up) Tidy AddBiblio

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Display record source on the detail view
Tomas Cohen Arazi [Wed, 20 Mar 2024 12:52:25 +0000 (12:52 +0000)]
Bug 31791: Display record source on the detail view

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Add Koha::Biblio::Metadata->record_source
Tomas Cohen Arazi [Wed, 20 Mar 2024 12:50:39 +0000 (09:50 -0300)]
Bug 31791: Add Koha::Biblio::Metadata->record_source

This patch adds a method for retrieving the related *Koha::RecordSource* from a *Koha::Biblio::Metadata* object.

The method is covered by tests:

1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Biblio/Metadata.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Add x-record-source-id header to POST /biblios
Tomas Cohen Arazi [Thu, 8 Feb 2024 23:18:35 +0000 (20:18 -0300)]
Bug 31791: Add x-record-source-id header to POST /biblios

This patch adds support for setting the record source on the API. It
does so by adding support for a new header `x-record-source-id`.

Setting the record source is restricted to patrons with the
`set_record_sources` permission.

A 403 error is returned on an attempt to set it without the correct
permissions.

The feature is documented on the spec.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass! Tests cover the right use cases!
3. Play with Postman (or similar)
4. Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Add 'source_record_id' param to {Add,Mod}Biblio(Marc)
Tomas Cohen Arazi [Thu, 8 Feb 2024 23:18:07 +0000 (20:18 -0300)]
Bug 31791: Add 'source_record_id' param to {Add,Mod}Biblio(Marc)

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Limit editing locked records
Tomas Cohen Arazi [Wed, 7 Feb 2024 14:06:32 +0000 (11:06 -0300)]
Bug 31791: Limit editing locked records

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Add edit_locked_records and set_record_sources subpermissions
Tomas Cohen Arazi [Fri, 2 Feb 2024 20:13:47 +0000 (17:13 -0300)]
Bug 31791: Add edit_locked_records and set_record_sources subpermissions

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Add record locking based on source
Tomas Cohen Arazi [Fri, 2 Feb 2024 19:26:28 +0000 (16:26 -0300)]
Bug 31791: Add record locking based on source

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: DB changes
Tomas Cohen Arazi [Fri, 2 Feb 2024 19:24:58 +0000 (16:24 -0300)]
Bug 31791: DB changes

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: Add Koha::Biblio->can_be_edited
Tomas Cohen Arazi [Fri, 2 Feb 2024 19:23:42 +0000 (16:23 -0300)]
Bug 31791: Add Koha::Biblio->can_be_edited

Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31335: Remove unnecessary holds fetch from routing-preview
Jonathan Druart [Wed, 10 Aug 2022 10:10:00 +0000 (12:10 +0200)]
Bug 31335: Remove unnecessary holds fetch from routing-preview

This $count variable is not used later, and I didn't find why it was
there in previous versions.

Test plan:
Use `git log -p serials/routing-preview.pl` and confirm we can remove
this block

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35746: (follow-up) Fix invalid tt in html tag
Brendan Lawlor [Fri, 26 Apr 2024 15:03:51 +0000 (15:03 +0000)]
Bug 35746: (follow-up) Fix invalid tt in html tag

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35746: add multiselect to report dropdowns
Brendan Lawlor [Tue, 20 Feb 2024 15:37:40 +0000 (15:37 +0000)]
Bug 35746: add multiselect to report dropdowns

Rebased for changes to guided_reports_start.tt

This patch adds the ability to use multi select in report dropdowns.

It uses syntax similar to using a list and when using the :all option
WHERE i.homebranch in <<Select libraries|brnaches:in>>

Test plan:
1. Create an SQL report with with new syntax for multi select
    SELECT
    i.homebranch,
    count(*)
    FROM items i
    WHERE i.homebranch in <<Select libraries|branches:in>>
    GROUP BY i.homebranch
2. Save the report
3. Note that you get the error
    The authorized value category (branches:in) you selected does not exist.
4. Apply the patch and repeat steps 1 and 2
5. Note the report saves successfully
6. Run the report
7. Note the select dropdown is now a multiselect
8. Run the report with multiple selections
10. Click show SQL and note that multi select parameters get inserted into the query like:
     WHERE i.homebranch in ('CPL', 'FFL', 'FPL')
11. Test other types of queries with multiple multi selects and lists etc

Sponsored-by: CLAMS
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35826: Make copy of cost matrix when substituting inf
Andreas Jonsson [Wed, 13 Mar 2024 11:09:39 +0000 (12:09 +0100)]
Bug 35826: Make copy of cost matrix when substituting inf

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>
6 months agoBug 35826: Add unit tests.
Andreas Jonsson [Sun, 10 Mar 2024 18:50:13 +0000 (19:50 +0100)]
Bug 35826: Add unit tests.

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>
6 months agoBug 35826: Keep items on retry.
Andreas Jonsson [Sun, 10 Mar 2024 18:49:40 +0000 (19:49 +0100)]
Bug 35826: Keep items on retry.

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>
6 months agoBug 35826: Fix errors in transport cost optimization
Andreas Jonsson [Thu, 8 Feb 2024 20:13:42 +0000 (20:13 +0000)]
Bug 35826: Fix errors in transport cost optimization

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>
6 months agoBug 35826: optimize on transport cost when building holds queue
Andreas Jonsson [Sun, 21 Jan 2024 19:47:55 +0000 (19:47 +0000)]
Bug 35826: optimize on transport cost when building holds queue

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>
6 months agoBug 36505: (follow-up) Consistent error codes in POST
Tomas Cohen Arazi [Tue, 9 Apr 2024 06:56:00 +0000 (08:56 +0200)]
Bug 36505: (follow-up) Consistent error codes in POST

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36505: Add support for `extended_attributes` in PUT /patrons/:patron_id
Tomas Cohen Arazi [Mon, 8 Apr 2024 13:23:17 +0000 (15:23 +0200)]
Bug 36505: Add support for `extended_attributes` in PUT /patrons/:patron_id

This patch does what the title says. With it, you will be able to PUT on
the already existing endpoint, but also pass:

```json
[ { "type": "THE_TYPE", "value": "a" }, ... ]
```

Bonus: to ease testing I added `x-koha-embed: extended_attributes`
support.

To test:
1. Apply the unit tests
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: This is not implemented!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Exhaustive testes pass!
5. Sign off :-D

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36505: Unit tests
Tomas Cohen Arazi [Mon, 8 Apr 2024 13:22:31 +0000 (15:22 +0200)]
Bug 36505: Unit tests

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36495: (follow-up) Terminology: COUNTER is an abbreviation
Katrin Fischer [Fri, 26 Apr 2024 15:41:02 +0000 (15:41 +0000)]
Bug 36495: (follow-up) Terminology: COUNTER is an abbreviation

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36495: Use render_resource_deleted() helper everywhere
Tomas Cohen Arazi [Tue, 2 Apr 2024 19:11:49 +0000 (19:11 +0000)]
Bug 36495: Use render_resource_deleted() helper everywhere

This patch makes the API controllers use the render_resource_deleted() helper.

No behavior changes are expected.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1
=> SUCCESS: Nothing broke
3. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36495: Use render_resource_not_found() helper everywhere
Tomas Cohen Arazi [Tue, 2 Apr 2024 18:22:52 +0000 (18:22 +0000)]
Bug 36495: Use render_resource_not_found() helper everywhere

This patch makes the existing controllers use the new helpers for (most) 404 situations.
The remaining ones are subject to discussion.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36495: Add render_resource_not_found() and render_resource_deleted() helpers
Tomas Cohen Arazi [Tue, 2 Apr 2024 18:18:16 +0000 (15:18 -0300)]
Bug 36495: Add render_resource_not_found() and render_resource_deleted() helpers

This patch introduces two helpers to be used in controllers.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/responses.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36482: Add embed tests
Pedro Amorim [Thu, 4 Apr 2024 11:14:11 +0000 (11:14 +0000)]
Bug 36482: Add embed tests

prove t/db_dependent/api/v1/libraries.t

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36482: Make embedding work for GET /libraries/:library_id
Tomas Cohen Arazi [Mon, 1 Apr 2024 21:08:46 +0000 (18:08 -0300)]
Bug 36482: Make embedding work for GET /libraries/:library_id

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 36482: Allow embedding desks and cash_registers on libraries endpoints
Tomas Cohen Arazi [Mon, 1 Apr 2024 21:08:13 +0000 (18:08 -0300)]
Bug 36482: Allow embedding desks and cash_registers on libraries endpoints

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 36481: Add GET /libraries/:library_id/cash_registers
Tomas Cohen Arazi [Mon, 1 Apr 2024 20:52:46 +0000 (20:52 +0000)]
Bug 36481: Add GET /libraries/:library_id/cash_registers

This patch adds the mentioned route. For the task it:

* Adds Koha::Cash::Register->to_api_mapping with trivial mappings
* Adds a cash_register object definition on the API spec
* Adds a controller to handle requests
* Adds tests for the new endpoint

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ qa
=> SUCCESS: All green! Tests pass!
3. Play with Postman!
4. Sign off :-D

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>
6 months agoBug 36480: Add GET /libraries/:library_id/desks
Tomas Cohen Arazi [Mon, 1 Apr 2024 20:24:35 +0000 (20:24 +0000)]
Bug 36480: Add GET /libraries/:library_id/desks

This patch adds the mentioned endpoint. For it, it does:

* Add Koha::Desk->to_api_mapping
* Add desk.yaml with the correct data structure for desks
* Add the route to the spec
* Add tests

Note: Lucas and I had doubts about the right return value for when the feature is disabled.
I opted for returning 404 with a message telling the feature is disabled. This can be discussed.

To test:
1. Apply this patches
2. Run:
   $ ktd
  k$ qa
=> SUCCESS: All green, all tests pass!
3. Play with this using Postman.
4. Sign off :-D

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>
6 months agoBug 36480: Add Koha::Library->desks
Tomas Cohen Arazi [Mon, 1 Apr 2024 20:22:22 +0000 (20:22 +0000)]
Bug 36480: Add Koha::Library->desks

We add an accessor for the related desks. Tests are added.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Library.t
=> SUCCESS: Tests pass!
3. Sign off :-D

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>
6 months agoBug 35353: Add REST API endpoint to retrieve old holds
Jonathan Druart [Mon, 25 Mar 2024 15:42:18 +0000 (16:42 +0100)]
Bug 35353: Add REST API endpoint to retrieve old holds

Same as checkout but for holds, we need to provide a way to retrieve old
holds for a patron.

Test plan:
Create some holds for a patron, cancel and fulfill some, then use the
REST API endpoint with the new 'old' flag set to 1
  /api/v1/patrons/42/holds?old=1

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35353: DBIC specific
Jonathan Druart [Wed, 20 Dec 2023 10:23:52 +0000 (11:23 +0100)]
Bug 35353: DBIC specific

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35558: Do not retrieve the local image if none exists - OPAC
Jonathan Druart [Thu, 14 Mar 2024 14:01:39 +0000 (15:01 +0100)]
Bug 35558: Do not retrieve the local image if none exists - OPAC

Test plan:
 1 - Enable system preferences:
     LocalCoverImages
     OPACLocalCoverImages
 2 - open browser tools network page
 3 - Perform an intranet search
 4 - Note a request for each bib like:
    http://localhost:8081/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=35
 5 - Repeat on opac, same requests
 6 - Apply patches
 7 - Restart all
 8 - Repeat searches, note no fetches
 9 - Add local cover images to several biblios in the results
10 - Repeat searches
11 - Note the fetches are only for those records with images
12 - Confirm images still load correctly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35558: Do not retrieve the local image if none exists
Jonathan Druart [Wed, 13 Dec 2023 10:10:24 +0000 (11:10 +0100)]
Bug 35558: Do not retrieve the local image if none exists

On the search results we are fetching the thumbnails of the local cover
images using catalogue/image.pl
Which means 1 GET per results on the page.

This patch suggests to have this information beforehand in order to
reduce the number of hits and network traffic?

However the page load will be slightly slower ofc.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36443: Add a fax field / column to the batch patron modification tool
Laura Escamilla [Wed, 27 Mar 2024 19:55:26 +0000 (19:55 +0000)]
Bug 36443: Add a fax field / column to the batch patron modification tool

To test:
1. Create or modify an existing patron account so that they have a
   value in their fax number field.
2. Go to Tools > Batch patron modification
    1. Add the patron card number, or borrower number into the
       modification tool and click on continue. There is no option for
       modifying fax numbers, nor are fax numbers visible in the
       modification table.
3. Apply the patch and restart_all
4. Repeat step 2
    1. A column for â€˜Fax’ is now visible after â€˜Other phone’
    2. Test the â€˜Fax’ field by clearing out the field with the checkbox.
       â€˜Checking the box right next to the label will disable the entry
       and delete the values of that field on all selected patrons.’
    3. Test the â€˜Fax’ field by updating the value with a new number
5. Sign off and have a wonderful day :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35728: DBRev 23.12.00.030
Katrin Fischer [Fri, 26 Apr 2024 15:12:09 +0000 (15:12 +0000)]
Bug 35728: DBRev 23.12.00.030

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35728: Add ability to NOT redirect to result when search returns only one record
Aleisha Amohia [Mon, 8 Jan 2024 23:04:25 +0000 (23:04 +0000)]
Bug 35728: Add ability to NOT redirect to result when search returns only one record

This enhancement adds a new system preference RedirectToSoleResult. By default it is enabled, which matches current behaviour - to redirect to the detail page if it is the only search result.

To test:

1) Apply the patch, install database updates, restart services.
2) Go to Koha Administration -> Global system preferences. The RedirectToSoleResult system preference is in the Searching tab. Confirm it is enabled (set to "Redirect") by default.
3) Conduct a catalogue search on the staff interface that you know will return a single result. Confirm you are redirected to the detail page.
4) Do the same search on the OPAC. Confirm you are redirected to the detail page.
5) Go back to the system preferences and disable the RedirectToSoleResult system preference by setting it to "Don't redirect"
6) Do the searches again on the staff interface and OPAC. Confirm you are NOT redirected to the detail page, and the search results page shows as expected.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35728: Add RedirectToSoleResult system preference
Aleisha Amohia [Mon, 8 Jan 2024 23:03:48 +0000 (23:03 +0000)]
Bug 35728: Add RedirectToSoleResult system preference

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33703: (follow-up) Fix typo in calendar.inc
Lucas Gass [Tue, 23 Apr 2024 13:34:10 +0000 (13:34 +0000)]
Bug 33703: (follow-up) Fix typo in calendar.inc

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33703: Add Maskito to about.tt
Lucas Gass [Mon, 22 Apr 2024 14:22:24 +0000 (14:22 +0000)]
Bug 33703: Add Maskito to about.tt

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33703: Add Maskito support for OPAC
Lucas Gass [Mon, 4 Mar 2024 18:39:35 +0000 (18:39 +0000)]
Bug 33703: Add Maskito support for OPAC

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33703: Add Maskito to dateaccessioned.pl
Lucas Gass [Mon, 4 Mar 2024 18:19:30 +0000 (18:19 +0000)]
Bug 33703: Add Maskito to dateaccessioned.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33703: Don't use Maskito when picking a range
Lucas Gass [Mon, 4 Mar 2024 18:05:40 +0000 (18:05 +0000)]
Bug 33703: Don't use Maskito when picking a range

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33703: Add time support
Lucas Gass [Wed, 31 Jan 2024 00:51:04 +0000 (00:51 +0000)]
Bug 33703: Add time support

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33703: Add Masikto core/kit for date masking
Lucas Gass [Tue, 30 Jan 2024 00:44:27 +0000 (00:44 +0000)]
Bug 33703: Add Masikto core/kit for date masking

To test:
1. Apply patch
2. Restart all, clear browser cache
3. In the staff interface start testing some flatpickr instances with direct inputs.
4. Try entering your dates without delimiters, '/' or '-', or '.'.
5. Make sure the dates are well formed.
6. Test with each of dateformat's Koha supports. ( system preference 'dateformat').
7. Add/edit an item with the dateaccessioned.pl plugin loaded, making the dates are well formed.
8. Make an item bookable by going to the item tab of a record and setting at least 1 item to "Bookable:".
9. Now "Place booking", which should trigger a modal.
10. In the "Period" date picker, which is a range, the dates should NOT be formatted.
11. Log in to the OPAC and try some date pickers ( self reg/borrower mod/ect )

Some places to test:
    -Patron record date of birth
    -Patron record registration date
    -Patron record expiry date
    -Checkouts, manually set a due date
    -Patron category, enrollment period

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: DBIC schema update
Katrin Fischer [Fri, 26 Apr 2024 13:30:02 +0000 (13:30 +0000)]
Bug 35919: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: DBRev 23.12.00.029
Katrin Fischer [Fri, 26 Apr 2024 13:09:53 +0000 (13:09 +0000)]
Bug 35919: DBRev 23.12.00.029

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: (QA follow-up) Address QA concerns
Tomas Cohen Arazi [Mon, 22 Apr 2024 12:25:08 +0000 (09:25 -0300)]
Bug 35919: (QA follow-up) Address QA concerns

This patch:

* Adds the missing entry in permissions.inc
* Moves the configuration entry above 'Record overlay rules'
* Adds the 'Record sources' link to the left navigation column, in the
  right position.
* Makes the <title> element be constructed the same way the 'cities'
  page is.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Fix cypress tests
Jonathan Druart [Tue, 19 Mar 2024 11:24:21 +0000 (12:24 +0100)]
Bug 35919: Fix cypress tests

And remove "remove", "delete" inconsistency

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Adjust h1
Jonathan Druart [Tue, 19 Mar 2024 11:17:49 +0000 (12:17 +0100)]
Bug 35919: Adjust h1

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Add Koha::Biblio::Metadata->source_allows_editing
Tomas Cohen Arazi [Thu, 25 Jan 2024 15:29:37 +0000 (12:29 -0300)]
Bug 35919: Add Koha::Biblio::Metadata->source_allows_editing

This patch adds a convenient method that tells if the record is
editable, according to it's record source.

To test:
1. Apply this patch
2. Run:
   $ ktd
  k$ prove t/db_dependent/Koha/Biblio/Metadata.t
=> SUCCESS: Tests pass! Use cases covered!
3. Sign off :-D

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 31791: Rename can_be_edited -> source_allows_editing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Add superlibrarian permission to Permissions.t
Matt Blenkinsop [Tue, 27 Feb 2024 09:30:58 +0000 (09:30 +0000)]
Bug 35919: Add superlibrarian permission to Permissions.t

Permissions.t was failing when running a jenkins build to another branch with this bug applied. Permissions.t was missing the permission for record sources and is now added in this patch

Test plan:
1) prove t/Koha/Auth/Permissions.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Add cypress tests
Tomas Cohen Arazi [Wed, 24 Jan 2024 19:18:55 +0000 (16:18 -0300)]
Bug 35919: Add cypress tests

This patch adds Cypress tests for the `record sources` CRUD as required
by QA.

I tried to cover all the UI interactions and behaviours.

To test:
1. Have all the patches applied
2. Run:
   $ ktd --shell
  k$ cypress run --spec t/cypress/integration/Admin/RecordSources_spec.ts
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Add record sources admin page
Tomas Cohen Arazi [Wed, 24 Jan 2024 19:18:13 +0000 (16:18 -0300)]
Bug 35919: Add record sources admin page

This patch introduces a Vue.js based record sources managing page. To
test it:

1. Apply this patch
2. Build the Vue.js stuff:
   $ ktd --shell
  k$ yarn js:build
  k$ restart_all
3. On the staff interface, go to Administration > Record sources
4. Play with the interface and the offered actions
=> SUCCESS: Things go well
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Add /record_sources endpoints
Tomas Cohen Arazi [Wed, 24 Jan 2024 19:17:17 +0000 (16:17 -0300)]
Bug 35919: Add /record_sources endpoints

This patch introduces endpoints for managing record sources. This is
done on top of Koha::RecordSource(s) following the current coding style.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/record_sources.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: Add Koha::RecordSource(s) classes
Tomas Cohen Arazi [Wed, 24 Jan 2024 19:16:36 +0000 (16:16 -0300)]
Bug 35919: Add Koha::RecordSource(s) classes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35919: DB changes
Tomas Cohen Arazi [Wed, 24 Jan 2024 19:12:52 +0000 (16:12 -0300)]
Bug 35919: DB changes

This patch adds:

* A new table: `record_sources`.
* A new user permission: `manage_record_sources`.
* A FK on record_sources.recour_source_id on the biblio_metadata tables

Record sources will contain a name and (for now) a flag telling if
records from the specific source can be manually edited.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35348: Remove cookie consents link from opac consents
Martin Renvoize [Fri, 17 Nov 2023 11:18:27 +0000 (11:18 +0000)]
Bug 35348: Remove cookie consents link from opac consents

The cookies details modal is now visible for all users from a footer
link, we no longer need it under the 'Consents' tab for logged in users.

Test plan
1) Enable CookieConsent and add a placholder tracker cookie to
   CookieConsentedJS preference
2) Log into the OPAC
3) Note that the 'Consents' link no longer appears in the users page.
4) Enable 'PrivacyPolicyConsent'
5) Note that the 'Consents' link now appears but on navigating to it
   there is no link for Cookie consents.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35348: Ensure users can access cookie details in staff client
Martin Renvoize [Fri, 17 Nov 2023 11:08:08 +0000 (11:08 +0000)]
Bug 35348: Ensure users can access cookie details in staff client

We remove the check on JSConsents content so that when cookie consent is
enabled we retain the option for users to get more information about
what cookies are being used.

Test plan
1) Enable CookieConsents
2) Do not add any tracking cookies for the staff client into
   CookieConsentedJS preference
3) Note that 'My consents' appears in the user menu
4) Clicking 'My consents' opens the 'Cookie consent' modal displaying
   information about the cookies used.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35348: Add cookies link to opac footer
Martin Renvoize [Thu, 16 Nov 2023 17:24:27 +0000 (17:24 +0000)]
Bug 35348: Add cookies link to opac footer

This patch adds a link that opens the cookies info dialogue to the opac
footer when the CookieConsent feature is enabled.

Test plan
1) Enable CookieConsent
2) On the OPAC you should now see a 'Cookies' link at the bottom of the
   page.
3) Clicking the link should open the "Cookie consent" modal where you
   can see the details of the cookies you have accepted and change your
   choices.
4) Bonus points: Enable 'OpacProblemReports' and note it aligns left of
   'Cookies' in the same footer bar.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: DBRev 23.12.00.028
Katrin Fischer [Fri, 26 Apr 2024 12:05:45 +0000 (12:05 +0000)]
Bug 16122: DBRev 23.12.00.028

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: Add note to database update to point out new script
Martin Renvoize [Mon, 18 Mar 2024 10:16:15 +0000 (10:16 +0000)]
Bug 16122: Add note to database update to point out new script

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: Tidy changed code blocks
Martin Renvoize [Mon, 18 Mar 2024 10:06:25 +0000 (10:06 +0000)]
Bug 16122: Tidy changed code blocks

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: Add unit test
Lucas Gass [Mon, 11 Mar 2024 23:34:55 +0000 (23:34 +0000)]
Bug 16122: Add unit test

To test:
1. Apply patch, updatedatabase & schema, restart all Services
2. Go to Administration > Table setting. Find the holdings table ( Catalog > holdings_table ) and turn the local use column on.
3. Go to an item record and notice the column 'Local uses'
4. Turn the system preference RecordLocalUseOnReturn Off.
5. Check in an item that is not checkout out. No local use should be recorded for the item.
6. Turn RecordLocalUseOnReturn on and check in an item that is not checked out. Local use on that item should increment by 1.
7. Create a statistical patron and check an item out to them. Local use should increment by 1.
8. Go to /api/v1/items?external_id={barcode} and make sure the numbers for localuse look correct.

To test maintainence script:
1. Without the patch, have RecordLocalUseOnReturn on.
2. Check in some items to record localuse in the stats table. Keep note of those stats.
3. Apply the patches, updatedatabase.
4. Run the maintenance script, perl update_localuse_from_statistics.pl
5. Now check that items.localuse is congruent with what is in the stats table

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: Add maintenance script to update items.localuse from stats
Lucas Gass [Wed, 3 May 2023 23:24:53 +0000 (23:24 +0000)]
Bug 16122: Add maintenance script to update items.localuse from stats

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: Add display and Table settings
Lucas Gass [Mon, 22 Apr 2024 15:31:17 +0000 (15:31 +0000)]
Bug 16122: Add display and Table settings

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: Increment items.localuse
Lucas Gass [Mon, 11 Mar 2024 23:26:17 +0000 (23:26 +0000)]
Bug 16122: Increment items.localuse

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: API and Schema updates
Lucas Gass [Fri, 7 Apr 2023 16:51:01 +0000 (16:51 +0000)]
Bug 16122: API and Schema updates

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 16122: Add localuse column to items and deleteditems
Lucas Gass [Fri, 7 Apr 2023 16:30:36 +0000 (16:30 +0000)]
Bug 16122: Add localuse column to items and deleteditems

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: DBRev 23.12.00.027
Katrin Fischer [Fri, 26 Apr 2024 12:01:31 +0000 (12:01 +0000)]
Bug 36206: DBRev 23.12.00.027

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: (follow-up) More conditions on display
Martin Renvoize [Thu, 25 Apr 2024 12:17:42 +0000 (13:17 +0100)]
Bug 36206: (follow-up) More conditions on display

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: (follow-up) Fix Typos
Martin Renvoize [Thu, 25 Apr 2024 12:13:30 +0000 (13:13 +0100)]
Bug 36206: (follow-up) Fix Typos

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: (QA follow-up) Tidy admin-home.pl
Kyle M Hall [Fri, 15 Mar 2024 18:19:36 +0000 (14:19 -0400)]
Bug 36206: (QA follow-up) Tidy admin-home.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: (follow-up) Change file permission
Lucas Gass [Tue, 5 Mar 2024 17:00:41 +0000 (17:00 +0000)]
Bug 36206: (follow-up) Change file permission

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: Add 'Run administration tool' to plugin actions
Martin Renvoize [Fri, 1 Mar 2024 08:08:08 +0000 (08:08 +0000)]
Bug 36206: Add 'Run administration tool' to plugin actions

This patch adds the new 'Run administration tool' option to the plugin
actions dropdown menu for plugins with such a function.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: Expose administration page to users with plugins_admin permission
Martin Renvoize [Fri, 1 Mar 2024 08:02:47 +0000 (08:02 +0000)]
Bug 36206: Expose administration page to users with plugins_admin permission

This patch updates the intranet home page logic such that the
administration button appears for those users with just the 'admin'
subpermission of plugins to allow them to access such plugins.

We also update the display logic found inside the admin-home page so
that user see plugin management appropriately.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36206: Add 'admin' plugins option
Martin Renvoize [Thu, 29 Feb 2024 18:08:41 +0000 (18:08 +0000)]
Bug 36206: Add 'admin' plugins option

This patch adds an admin plugins class to the plugins system and
displays such plugins under the 'Plugins' section in the Administration
page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 13706: Minor tidy/spelling issues
Tomas Cohen Arazi [Mon, 11 Mar 2024 13:25:23 +0000 (10:25 -0300)]
Bug 13706: Minor tidy/spelling issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 13706: New script dedup_authorities.pl
Julian Maurice [Fri, 27 Jul 2012 10:30:41 +0000 (12:30 +0200)]
Bug 13706: New script dedup_authorities.pl

This script allow to deduplicate authorities automatically.

Script is in misc/maintenance/

It works this way:
 1) authorities are fetched from the database. You can limit fetched
 results by authtypecode, or directly by specifying WHERE clause
 2) for each authority:
  2.1) build a Zebra query using the 'search_form' for the heading
  2.2) run the query, retrieve the results
  2.3) among duplicates, choose the one we want to keep (use
  --choose-method option).
  2.5) use C4::Authorities::merge to merge authorities
 3) delete the merged authorities

Use --help for more informations on options

To be done:
1 - Move to module and cover with tests
2 - Add option to only merge unused authorities
3 - Expand 'ppn' option to be 'control-number' option and allow specifying field
4 - More?

1 & 2 I will attempt - 3 & 4 may be future enhancements

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36295: Space out content blocks in batch record modification
Brendan Lawlor [Fri, 12 Apr 2024 16:40:41 +0000 (16:40 +0000)]
Bug 36295: Space out content blocks in batch record modification

This patch adds a float clearing class to a line break in the batch record modification template to fix a spacing issue in Chrome.

To test apply the patch and go to Cataloging -> Batch record modification

There should be space between the two sections.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36295: Space out content blocks in batch record deletion
Owen Leonard [Tue, 9 Apr 2024 12:02:40 +0000 (12:02 +0000)]
Bug 36295: Space out content blocks in batch record deletion

This patch adds a float-clearing line break to the batch record deletion
template so that the "Record type" section has visual separation from
the record number submission tabs.

To test, apply the patch and go to Cataloging -> Batch record deletion.

There should be padding between the two sections.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>