]> git.koha-community.org Git - koha.git/log
koha.git
3 hours agoBug 38193: DBIC schema update main
Katrin Fischer [Thu, 24 Oct 2024 16:23:28 +0000 (16:23 +0000)]
Bug 38193: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38193: DBRev 24.06.00.043
Katrin Fischer [Thu, 24 Oct 2024 16:21:57 +0000 (16:21 +0000)]
Bug 38193: DBRev 24.06.00.043

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38193: Add cancellation_reason field to bookings table
Paul Derscheid [Thu, 17 Oct 2024 11:52:28 +0000 (11:52 +0000)]
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>
3 hours agoBug 35287: (Follow-up) Fix tests
Pedro Amorim [Thu, 24 Oct 2024 16:00:20 +0000 (16:00 +0000)]
Bug 35287: (Follow-up) Fix tests

Have a single point go get_license to be used by both Licenses_spec.ts and AdditionalFields_spec.ts

Test plan, apply patch:
$ yarn js:build
$ cypress run --spec t/cypress/integration/AdditionalFields_spec.ts
$ cypress run --spec t/cypress/integration/Licenses_spec.ts

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: Handle status in item auto-assignment for bookings
Martin Renvoize [Wed, 23 Oct 2024 10:09:06 +0000 (11:09 +0100)]
Bug 38175: Handle status in item auto-assignment for bookings

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: Unit tests for assign_item_for_booking
Martin Renvoize [Wed, 23 Oct 2024 10:07:52 +0000 (11:07 +0100)]
Bug 38175: Unit tests for assign_item_for_booking

This patch adds more comprehensive tests to the item autoassignment for
'Any item' handling in bookings.

We check for both random assignment, which was missing before now but
always intended, and that we take cancelled status into account.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: (QA follow-up) Unit test for filter_by_active change
Martin Renvoize [Tue, 22 Oct 2024 16:15:01 +0000 (17:15 +0100)]
Bug 38175: (QA follow-up) Unit test for filter_by_active change

We now filter out 'cancelled' and 'completed' bookings in the
filter_by_active method. We need tests for that.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: (QA follow-up) Ensure we handle cancelled in clash detection
Martin Renvoize [Tue, 22 Oct 2024 16:09:39 +0000 (17:09 +0100)]
Bug 38175: (QA follow-up) Ensure we handle cancelled in clash detection

We need to ensure we handle the new status tracking cancelled/completed
in our clash detection code too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: (QA follow-up) DRY out PATCH handling
Martin Renvoize [Thu, 17 Oct 2024 11:02:10 +0000 (12:02 +0100)]
Bug 38175: (QA follow-up) DRY out PATCH handling

We were repeating some code for the PATCH endpoint instead of using the
existing update handling code.  This lead to two issues:

1) We weren't catching status updates on standard updates, only the
   patch.
2) We were limiting the PATCH endpoint to just status updates when it
   could happily be used for other fields too.

This patch removes the introduction of the 'edit' method from both the
REST controller and the corresponding object and moves the logic into
the store method of the object where it's easily testable.

We also DRY out the notice sending code a little for re-use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: (QA follow-up) Remove superflous method
Martin Renvoize [Thu, 17 Oct 2024 08:22:41 +0000 (09:22 +0100)]
Bug 38175: (QA follow-up) Remove superflous method

If all we're doing is calling SUPER, then we don't need to wrap ;P

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: (follow-up) Refactor staff interface additions to vanilla JS; adjust modul...
Paul Derscheid [Wed, 16 Oct 2024 12:13:42 +0000 (14:13 +0200)]
Bug 38175: (follow-up) Refactor staff interface additions to vanilla JS; adjust modules, controllers for coding guidelines and consistency

In the spirit of the current movement for more modern JS, the refactor tries to limit jQuery usage.

Test plan:
    1) Create a booking on a bookable item
    2) Cancel it and see that it's simply deleted
    3) Apply the patch and run “restart_all”.
    4) Repeat the same cancel operation and see that it's still there, albeit with a different appearance.
    5) Try the filters in the table

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: Add tests
Thibaud Guillot [Tue, 15 Oct 2024 12:38:40 +0000 (12:38 +0000)]
Bug 38175: Add tests

Sponsored by: BibLibre
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 38175: Improve Bookings feature with status
Thibaud Guillot [Tue, 15 Oct 2024 12:29:22 +0000 (12:29 +0000)]
Bug 38175: Improve Bookings feature with status

With the integration of the new status column for bookings, it would be preferable to keep the booking in database and simply change its status to 'cancel' when you cancel it via the action button or the timeline.

So I've added partial updating via the API with a new PATCH method to partially edit a booking. It is currently active for status changes.
Graphically, this translates into the disappearance of the action buttons if the booking has already been canceled, although it remains visible in the table and timeline (the style is a proposal for the moment, intended simply to graphically differentiate a canceled booking from others).

I've also added a filter to the filter_by_active method to exclude cancelled bookings.

Test plan:
1) Create a booking on a bookable item
2) Cancel it and see that it's simply deleted
3) Apply the patch and run “restart_all”.
4) Repeat the same cancel operation and see that it's still there, albeit with a different appearance.
5) Try the filters in the table

Sponsored by: BibLibre
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 37803: Add patron notification when a new booking has been created successfully
Paul Derscheid [Mon, 2 Sep 2024 10:42:11 +0000 (12:42 +0200)]
Bug 37803: Add patron notification when a new booking has been created successfully

To test:
1) Apply the patch
2) Include the sample notice, e.g. run 'reset_all' on ktd
3) Create a booking
4) Look into the borrower notifications
5) Confirm the notice has been generated
6) Run t/db_dependent/Koha/Booking.t

Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 37204: (QA follow-up) Consistently pick notice library
Martin Renvoize [Wed, 16 Oct 2024 15:45:18 +0000 (16:45 +0100)]
Bug 37204: (QA follow-up) Consistently pick notice library

We should use the notice from the library that initiated the action that
triggered the notice. This should be available to us always in the
userenv.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 37204: (QA follow-up) Pass old_booking into GetPreparedLetter
Martin Renvoize [Wed, 16 Oct 2024 15:34:58 +0000 (16:34 +0100)]
Bug 37204: (QA follow-up) Pass old_booking into GetPreparedLetter

Thinking about the future, some libraries may wish to use the
old_booking object details in their notice so I opt to pass it into
GetPreparedLetter here to support that.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 hours agoBug 37204: Add a booking has changed notice to update a patron should a booking be...
Paul Derscheid [Wed, 28 Aug 2024 11:22:00 +0000 (13:22 +0200)]
Bug 37204: Add a booking has changed notice to update a patron should a booking be updated

This is a first draft. When reading your initial statement again I'm asking myself whether
a changed itemnumber is relevant to the patron.
The way I see it, the relevant fields are:
- pickup_library_id
- start_date
- end_date

But maybe I'm not seeing it.

To test:
1) Apply the patch
2) Make an item bookable
3) Add a booking for a given patron
4) Check the patron notices tab, should not contain any notices
5) Change either start date, end date or pickup library and save
6) Check the patron notices tab, should contain a notice with the updated details
7) Run the tests under t/db_dependent/Koha/Booking.t
8) Sign off

Signed-off-by: LEBSimonsen <simonsen@bz-sh.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 37391: Make QR code for bibliographic record in OPAC use canonical link
Michał Kula [Wed, 17 Jul 2024 11:42:36 +0000 (11:42 +0000)]
Bug 37391: Make QR code for bibliographic record in OPAC use canonical link

In /opac-detail.pl page there's an option to show a QR code to open up
said record on your phone or share it with others in such a way.

Currently, it simply uses the current `location.href` of the browser.
This isn't ideal, because such URL can be much longer, resulting in
more complex/harder to scan QR code, plus URL parameters can contain
extra junk, such as our previous search query that led us to current
record, which we might not necessarily want to share.

Thus, now having simple canonical URLs after the "Depends On" patch was
merged in, we can replace these QR codes to link to them instead.

To test:
1. Visit biblio detail page in OPAC
2. Click the button to show QR code in the right pane (preference
   'OPACDetailQRCode' must be enabled)
3. Notice that the QR code is much simpler/less complex now
4. Scan the QR code with your phone and confirm it's in the desired
   format of <URL>/bib/123 and that it opens up properly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 37969: DBRev 24.06.00.042
Katrin Fischer [Thu, 24 Oct 2024 13:19:28 +0000 (13:19 +0000)]
Bug 37969: DBRev 24.06.00.042

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 37969: Add missing language code nor
Lari Taskula [Thu, 19 Sep 2024 21:07:04 +0000 (21:07 +0000)]
Bug 37969: Add missing language code nor

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Test plan:
- Start KTD with Elastic: ktd --es7 up
- Edit a record, e.g. "Dom Casmurro : a novel" and change the language
  code in 008/35-37 from "eng" to "nor":
  Before: 980914s1997    nyu           00011 eng b
  After:  980914s1997    nyu           00011 nor b
- Do a search that finds the edited record and some other records,
  so you can see the list of resulots and the facets, e.g. "dom"
- Verify that "nor" is shown in the languages facet
- Apply this patch and run koha-upgrade-schema kohadev
- Do the search again and verify that "Norwegian" is now shown instead
  of "nor"

Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 30955: (QA follow-up) Move LIST notice to new lists module
Katrin Fischer [Thu, 24 Oct 2024 13:09:37 +0000 (13:09 +0000)]
Bug 30955: (QA follow-up) Move LIST notice to new lists module

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 30955: DBRev 26.04.00.041
Katrin Fischer [Thu, 24 Oct 2024 13:08:01 +0000 (13:08 +0000)]
Bug 30955: DBRev 26.04.00.041

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 30955: (follow-up) Merged related notices into lists
Jake Deery [Thu, 24 Oct 2024 08:12:09 +0000 (08:12 +0000)]
Bug 30955: (follow-up) Merged related notices into lists

This patch merges the SHARE_ACCEPT and SHARE_INVITE notices into the
lists module. This makes a clearer case for introducing the lists module
in the first place.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 30955: (QA follow-up) Reduce database hits and clarify notice
Martin Renvoize [Wed, 23 Oct 2024 13:26:39 +0000 (14:26 +0100)]
Bug 30955: (QA follow-up) Reduce database hits and clarify notice

This patch updates the library selection from using the new owners home
library to using the current sessions library in keeping with the
direction of travel in other bugs of this type in Koha currently.

We also update the default notice text to clarify who sent the notice vs
who previously owned the list.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 hours agoBug 30955: Sends notice to new owner at transfer
Jake Deery [Wed, 10 Jul 2024 15:18:26 +0000 (16:18 +0100)]
Bug 30955: Sends notice to new owner at transfer

This patch adds a new notice, TRANSFER_OWNERSHIP, under a new module,
Lists. When a list is transferred to a new owner, this notice is
triggered, containing a short paragraph detailing the list name.

TO TEST:
a)  log in as a koha superlibrarian
b)  go to the lists module, create a public list, and make a note of the
    title used
c)  on the lists module, transfer the list to some other user, and make
    a note of the user used
d)  go to the patron notices page for the user in step c
e)  ensure that a notice has been generated
    1)  check the contents of the notice, it should contain
      - the new owner's name
      - the list's title
      - the old owner's name & (if set) email
f)  under tools > notices, modify the notice for TRANSFER_OWNERSHIP
g)  repeat steps c-e
    1)  ensure the modifications you've made are now visible in the notice

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
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>
5 hours agoBug 37888: Show all jobs, order by "queued", remove last hour filter
Julian Maurice [Fri, 4 Oct 2024 11:41:44 +0000 (13:41 +0200)]
Bug 37888: Show all jobs, order by "queued", remove last hour filter

By default the background jobs page now shows the most recently queued
jobs, whatever their status is.

By doing that, the jobs enqueued less an hour ago are always visible if
there are any (well, the first page at least), so the "last hour" filter
becomes way less useful and it's better to remove it as it caused
problems (see bug 37905) and the "1 hour" duration was arbitrary.

The "current jobs only" filter is still useful as lots of quick
background jobs can push running jobs away from the first page and it's
a common use case to list running jobs

Test plan:
1. Start some background jobs (batch item modification for instance)
2. Make them run and wait for finish
3. Stop the background jobs workers
4. Start some more background jobs
5. You should now have running and non-running background jobs. Go to
   the admin background jobs page
6. Verify that all background jobs are shown and that they ordered by
   queued time (last queued job first)
7. Verify that "Current jobs only" filter still works

Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 36836: (QA follow-up) Tiny fixes to terminology and capitalization
Katrin Fischer [Thu, 24 Oct 2024 10:03:14 +0000 (10:03 +0000)]
Bug 36836: (QA follow-up) Tiny fixes to terminology and capitalization

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: (QA follow-up): Add v-bind:key
Pedro Amorim [Mon, 21 Oct 2024 10:31:24 +0000 (10:31 +0000)]
Bug 35287: (QA follow-up): Add v-bind:key

Remove more unused imports

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: (QA follow-up): Squash
Pedro Amorim [Fri, 16 Aug 2024 11:01:31 +0000 (11:01 +0000)]
Bug 35287: (QA follow-up): Squash

Remove leftover unused code
Add missing pod
Tidy
Removed redundant commented in AdditionalFields_spec.ts

Run:
qa -c 11 -v 2

Verify everything is green

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: (Follow-up 37389): ExtendedAttributes
Pedro Amorim [Fri, 26 Jul 2024 14:24:44 +0000 (14:24 +0000)]
Bug 35287: (Follow-up 37389): ExtendedAttributes

Apply ExtendedAttributes Mixin to AdditionalFields

To test the ExtendedAttributes mixin search is working:
1) Create 2 or more searchable licenses additional fields
2) Create a new license and enter values in these searchable fields
3) Go to the licenses list, use the column filters to search on more
than one column, verify that the search work as intended (AND operator)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Vue - Add additional fields support to ERM Licenses
Pedro Amorim [Wed, 8 Nov 2023 12:35:29 +0000 (11:35 -0100)]
Bug 35287: Vue - Add additional fields support to ERM Licenses

Test plan, k-t-d:
1) Add a new additional field for the newly supported 'erm_licenses', visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=erm_licenses
2) Create 4 fields by clicking on '+ New field'
2.1) 'text non-repeatable'
2.2) 'text repeatable', check the 'repeatable' box
2.3) 'av non-repeatable', pick an authorised value category
2.4) 'av repeatable', pick an authorised value category and check the 'repeatable' box
3) Add a new ERM license, visit:
/cgi-bin/koha/erm/licenses/add
4) Notice there is now a 'Additional fields' section at the bottom listing the fields we created
5) Fill in the mandatory regular license fields and play around with the additional fields
5.1) Put in some text in the text fields, test out the 'clear' and '+new' buttons
5.2) Select some AV options from the AV fields, deselect them, notice the repeatable one allows for multiple selection, the non-repeatable one does not
6) Save the license. On the list table, click on the license name (to navigate to the show page), or if license id=1, visit:
/cgi-bin/koha/erm/licenses/1
7) Notice the additional fields are listed there, AV fields show their human readable description, not the AV code. Repeatable fields are shown comma separated
8) Edit the license, visit:
/cgi-bin/koha/erm/licenses/edit/1
9) Play around again, do some more inserting and deletion of additional fields. Save. Notice everything is as expected.

Searchable testing:
10) Go back to the additional fields admin panel, visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=erm_licenses
11) Edit one field (AV or not) that you have inserted some data in, in the previous steps, and tick the 'searchable' box
12) Go back to licenses, visit:
/cgi-bin/koha/erm/licenses
13) Notice the searchable additional field now has its own column in the licenses list table
14) If the searchable field is AV, it has a dropdown with the AV values of the same AV category
15) If the searchable field not AV, it has a text input that allows for normal text search
16) If the searchable field is repeatable and has multiple values, its displayed in comma separated

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Vue preparation - Extend KohaTable to consider searchable additional fields
Pedro Amorim [Wed, 8 Nov 2023 12:34:43 +0000 (11:34 -0100)]
Bug 35287: Vue preparation - Extend KohaTable to consider searchable additional fields

This follows the same pattern as in subscription serials searchable additional fields, i.e. if an additional field is searchable, it is added to the list table - with the corresponding search inputs and functionality

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Vue preparation - AdditionalFields
Pedro Amorim [Wed, 8 Nov 2023 12:34:19 +0000 (11:34 -0100)]
Bug 35287: Vue preparation - AdditionalFields

New api client: additional-fields-api-client.js to interact with the REST endpoint introduced by bug 35197
2 new components:
- AdditionalFieldsEntry: Component used to extend the FormAdd component including the corresponding additional fields
- AdditionalFieldsDisplay: Component used to display the additional fields associated to a data record implementing it (makes use of strings_map)

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: REST API - Add additional fields support to ERM Licenses
Pedro Amorim [Wed, 8 Nov 2023 12:33:20 +0000 (11:33 -0100)]
Bug 35287: REST API - Add additional fields support to ERM Licenses

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Admin
Pedro Amorim [Wed, 8 Nov 2023 12:32:49 +0000 (11:32 -0100)]
Bug 35287: Admin

ERM licenses is now a table option in the additional fields admin panel
ERM licenses allows for the 'searchable' option (as well as 'repeatable')

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Preparation: AdditionalFields License Mixin
Pedro Amorim [Wed, 8 Nov 2023 12:32:10 +0000 (11:32 -0100)]
Bug 35287: Preparation: AdditionalFields License Mixin

Koha::Object::Mixin::AdditionalFields needs to come before Koha::Object
in the inheritance so that the strings_map method that is called is
the one from Mixin and not from Koha::Object.
This is only required for Koha classes implementing the AdditionalFields Mixin and expose data through the REST API, because strings_map is implement in both the aforementioned classes

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Preparation: Extend AdditionalFields Mixin
Pedro Amorim [Wed, 8 Nov 2023 12:31:18 +0000 (11:31 -0100)]
Bug 35287: Preparation: Extend AdditionalFields Mixin

The mixin now implements the extended_attributes method to be utilized by any Koha class that implements the AdditionalFields Mixin and is exposed through the REST API
It also implements a strings_map to be utilized in the same fashion as described above. This is useful because additional fields may be an authorised value

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Add unit tests
Pedro Amorim [Thu, 9 Nov 2023 13:47:32 +0000 (13:47 +0000)]
Bug 35287: Add unit tests

Test plan, k-t-d:
prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 35287: Add cypress tests
Pedro Amorim [Wed, 8 Nov 2023 14:53:40 +0000 (13:53 -0100)]
Bug 35287: Add cypress tests

Test plan, k-t-d:
cd /kohadevbox/koha
cypress run --spec "t/cypress/integration/AdditionalFields_spec.ts"

Signed-off-by: Edith Speller <edith.speller@ukhsa.gov.uk>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 33292: Add unit tests
Matt Blenkinsop [Thu, 26 Sep 2024 13:00:26 +0000 (13:00 +0000)]
Bug 33292: Add unit tests

Test plan:
1) In KTD, set ClaimReturnedLostValue to any value
2) Checkout an item to a patron
3) Add a manual invoice to that patron's account against that item barcode
4) In the patron's checkouts table, click the Claim returned button
5) The checkbox will have the option to "Refund previous lost fee"
6) Tick this box and submit
7) Have a look at the patron's transactions. There will now be a new line refunding the lost fee from step 3
8) Run the unit tests
prove t/db_dependent/Circulation/ReturnClaims.t
prove t/db_dependent/api/v1/return_claims.t

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 33292: Add logic to handle refunding a lost fee
Matt Blenkinsop [Thu, 26 Sep 2024 12:59:36 +0000 (12:59 +0000)]
Bug 33292: Add logic to handle refunding a lost fee

This patch allows the return claims endpoint to handle the refunding of a lost fee for the item if the checkbox is checked

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 33292: Add a checkbox to refund a lost fee on return claim
Matt Blenkinsop [Thu, 26 Sep 2024 12:59:17 +0000 (12:59 +0000)]
Bug 33292: Add a checkbox to refund a lost fee on return claim

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 38248: Fix condition when item has no return_claims in API response
David Cook [Wed, 23 Oct 2024 22:35:00 +0000 (22:35 +0000)]
Bug 38248: Fix condition when item has no return_claims in API response

This change just fixes a condition to not break when an item has no return_claims
in an API response.

Test plan:
0) Apply the patch and koha-plack --restart kohadev
NOTE: You may need to rebuild your swagger spec since bug 27919 was pushed
redocly bundle --ext json api/v1/swagger/swagger.yaml \
  --output api/v1/swagger/swagger_bundle.json
1) Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
2) Create an item with a status of "Lost"
3) Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4) Note that the item table loads without a problem

5) In system preferences, set the ClaimReturnedLostValue syspref to any value
6) Checkout an item to a patron
7) Click "Claim returned" and make the claim
8) Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
9) Note that the item table loads without a problem and "(Claimed returned") appears
for the item that was claimed returned

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 38240: Do not hide columns if no items to display
Jonathan Druart [Wed, 23 Oct 2024 13:34:09 +0000 (15:34 +0200)]
Bug 38240: Do not hide columns if no items to display

If you filter items using the column filters and that no item are displayed, all columns will be hidden (because no data for those columns) and it is then impossible to reset the filters show items again.

Test plan:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4
All items are from CPL
Select another library
=> No items displayed
Without this patch the headers are hidden and it's impossible to modify
the filters
With this patch the columns that were displayed on the last draw are
still there, letting you modify the filters

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 38117: Only show 'not checked in' message if item is checked out
Nick Clemens [Tue, 8 Oct 2024 11:11:54 +0000 (11:11 +0000)]
Bug 38117: Only show 'not checked in' message if item is checked out

To test:
 1 - Enable system preference 'ShowAllCheckins'
 2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
 3 - Check in an item
 4 - Note 'Item was not checked in message'
 5 - Confirm it happens for any item that is not currently issued
 6 - Check out an item to a patron
 7 - Mark the item as withdrawn
 8 - Check the item in
 9 - Note message 'Item was not checked in' appears too
10 - Apply patch
11 - Confirm checking in an item not checked out only shows 'Not checked out'
12 - Confirm the withdrawn item still shows 'Item was not checked in'
13 - Confirm above message remains whne checking in more items that were not issued

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 36171: Fix template toolkit tags split by HTML parser
Kevin Carnes [Mon, 12 Aug 2024 08:55:57 +0000 (10:55 +0200)]
Bug 36171: Fix template toolkit tags split by HTML parser

It appears that the template parser parses HTML tags first and then template
toolkit tags. This can cause a template toolkit tag that contains an HTML tag
to have its start and end markers separated. This causes it to be treated as
text that can be translated instead of a template toolkit tag.

This patch searches for text sections that have a template toolkit end marker
without a start and then searches for the start in previous sections. It then
creates a new template toolkit section with the start and end markers.

The action buttons in the staff Lists view have been changed to allow
translation.

To test:
1. You will need to edit the staff-prog.po for a language and modify the
   the translation for "SET line_break". You can change SET to FOO.
2. Install the translation for the language.
3. View the details of a patron in the staff interface with the language.
4. The page will have an error.
5. Apply the patch.
6. Install the translation for the language.
7. View the details of a patron in the staff interface with the language.
8. The page should now display correctly.

If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure
that the template tag is no longer included in .po file.

You can also add translations for "Edit", "Delete", and "Transfer" in
messages.po to make sure that the action buttons are translated in the Lists
view.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Amended-by: Jonathan Druart
Tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 hours agoBug 38249: Fix typo in koha-list --help
Tomas Cohen Arazi [Wed, 23 Oct 2024 21:01:08 +0000 (18:01 -0300)]
Bug 38249: Fix typo in koha-list --help

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 23295: DBRev 24.06.00.040
Katrin Fischer [Thu, 24 Oct 2024 08:45:15 +0000 (08:45 +0000)]
Bug 23295: DBRev 24.06.00.040

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 23295: (QA follow-up) Terminology: borrowers => patrons
Katrin Fischer [Thu, 24 Oct 2024 08:45:09 +0000 (08:45 +0000)]
Bug 23295: (QA follow-up) Terminology: borrowers => patrons

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 23295: (QA follow-up) Fix up qa script issues
Kyle M Hall [Tue, 8 Oct 2024 16:42:15 +0000 (16:42 +0000)]
Bug 23295: (QA follow-up) Fix up qa script issues

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 23295: (follow-up) Add 'NOTICE_FAILURE_SUSPENSION' as a new system restriction...
Alex Buckley [Tue, 8 Oct 2024 04:20:13 +0000 (04:20 +0000)]
Bug 23295: (follow-up) Add 'NOTICE_FAILURE_SUSPENSION' as a new system restriction type

Sponsored-by: Catalyst IT
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 23295: Automatically restrict (debar) patrons when email/sms notices fail
Alex Buckley [Wed, 10 Jul 2019 17:28:23 +0000 (17:28 +0000)]
Bug 23295: Automatically restrict (debar) patrons when email/sms notices fail

When the 'RestrictPatronsWithFailedNotices' syspref is enabled then
patrons with email and sms notices which failed sending (have a
message_queue.status field of 'failed') have a restriction (debarment)
applied to them.

Test plan:
1. In the Koha staff client > Tools > Overdue notice/status triggers and
create the 'First' rule for all patron categories as:

Delay: 1
Letter: Overdue Notice
SMS: ticked

Ensure you have an SMS notice for the ODUE letter.

2. In the system preferences make sure you enter dummy data into the
SMSSendUsername, SMSSendPassword and EmailSMSSendDriverFromAddress
sysprefs

2. Find two non-debarred patrons and make sure they have invalid SMS numbers set. The SMS numbers must be INCORRECT, for example "123" as an SMS number. Leaving this field empty will result in the message_transport_type defaulting to 'print' instead of 'sms'.

3. Check one item out to each patron in step 2

4. Jump into the database and run the query:

UPDATE issues SET date_due=<2 days before current date> WHERE
borrowernumber=<borrower1>;

UPDATE issues SET date_due=<2 days before current date> WHERE
borrowernumber=<borrower2>;

5. Go to  misc/cronjobs directory and enter the Koha shell:

sudo koha-shell <instancename>

6. Run: ./overdue_notices.pl

7. Exit the shell and jump back into the database and run the query:

SELECT message_transport_type, status FROM message_queue WHERE
borrowernumber=<borrower1> OR borrowernumber=<borrower2>;

8. Confirm both new notice records have the message_transport_type is 'sms' and the status of 'pending'

9. Exit the database and re-enter the Koha shell and run the command:
./process_message_queue.pl

10. Jump back into the database re-run the query from step 7 and confirm
the status is 'failed' for both

11. Also run the query:
SELECT * FROM borrower_debarments WHERE borrowernumber=<borrower1> OR
borrowernumber=<borrower2>;

Notice there is no added debarment to these two patrons

12. Apply patch, restart memcached and plack. In the
installer/data/mysql directory enter the Koha shell and run the command:
./update_database.pl

13. In the Administration > Global System Preferences interface of the
staff client notice there is a new system (set to "Don't" by default)
named 'RestrictPatronsWithFailedNotices'.

Enable it (i.e. select 'Do')

14. Create a new file in the /etc/cron.daily directory named koha-custom and
add the following line to it:

koha-foreach --chdir --enabled
/usr/share/koha/bin/cronjobs/restrict_patrons_with_failed_notices.pl

15. In the  misc/cronjobs directory enter the Koha shell and run the command:
./restrict_patrons_with_failed_notices.pl

16. The script should output text saying: There are borrowers with
failed SMS or email notices

However because you haven't given the script the argument -c it won't
apply debarments (restrictions) to any of the patrons with the failed
SMS or email notices.

16. Query the borrower_debarments table:

SELECT * FROM borrower_debarments WHERE borrowernumber=<borrower1> OR
borrowernumber=<borrower2>;

Notice they still have no restriction

17. Now in the Koha shell run the command:
./restrict_patrons_with_failed_notices.pl -c

18. Notice the script outputs the text:
There are borrowers with failed SMS or email notices
Applying restriction to patron <borrowernumber>: <borrower firstname>
<borrower surname>;

19. Repeat step 16 and notice both patrons now have 1 restriction each
with the borrower_debarments.type=SUSPENSION and comment=SMSnumber
invalid and expiration=NULL

20. Query the borrowers table:
SELECT debarred, debarredcomment FROM borrowers WHERE
borrowernumber=<borrower1> OR borrowernumber=<borrower2>;

21. Notice the values are:
debarred= 9999-12-31
debarredcomment= SMS number invalid

22. Repeat step 17 and notice the script outputs:
There are borrowers with failed SMS or email notices

Patron <borrowernumber>: <borrower firstname> <borrower surname> is currently restricted due to having an invalid SMS number. No new restriction applied"

23. Repeat step 16 and notice no new debarment has been added to those
borrowers as they have already been restricted from having a failed SMS
notice.

24. In the Koha home directory run the command:
prove t/db_dependent/Koha/Notices.t

This unit test contains the tests for the new subroutines added to
Koha/Notice/Message.pm which are restrict_patron_when_notice_fails() and
get_failed_notices()

25. All tests should pass

26. Sign off

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 37109: Don't initialise claims fields when duplicating acquisitions orders
Aleisha Amohia [Tue, 18 Jun 2024 03:29:32 +0000 (03:29 +0000)]
Bug 37109: Don't initialise claims fields when duplicating acquisitions orders

These fields don't exist in the aqorders table and don't need to be
set/passed on.

* claims_count (dropped in Bug 24161)
* claimed_date (dropped in Bug 24161)
* placed_on (no evidence of this field existing in aqorders)
* received_on (no evidence of this field existing in aqorders)

To test:

1. Go to Acquisitions
2. Create a vendor if you don't already have one
3. Create a basket if you don't already have one
4. Add an order to the basket and Save
5. Add another order to the basket, choose "From existing orders
   (copy)"
6. Continue through the process and confirm you're able to duplicate the
   order as normal
7. Confirm tests still pass t/db_dependent/Koha/Acquisition/Order.t

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: DBRev 24.06.00.039
Katrin Fischer [Thu, 24 Oct 2024 08:45:00 +0000 (08:45 +0000)]
Bug 28575: DBRev 24.06.00.039

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: (QA follow-up) Tidy more
Nick Clemens [Tue, 1 Oct 2024 11:00:48 +0000 (11:00 +0000)]
Bug 28575: (QA follow-up) Tidy more

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: (QA follow-up) Tidy and test count
Nick Clemens [Tue, 1 Oct 2024 10:57:25 +0000 (10:57 +0000)]
Bug 28575: (QA follow-up) Tidy and test count

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: (QA follow-up): Add further unit tests
Matt Blenkinsop [Wed, 26 Jun 2024 13:55:04 +0000 (13:55 +0000)]
Bug 28575: (QA follow-up): Add further unit tests

This patch adds further unit tests for the messaging in _set_found_trigger

prove t/db_dependent/Koha/Item.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: Add unit tests
Matt Blenkinsop [Fri, 7 Jun 2024 10:23:38 +0000 (10:23 +0000)]
Bug 28575: Add unit tests

prove t/db_dependent/Circulation.t

Sponsored-by: Rapid City Public Library
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: Add a new check-in message for the new syspref
Matt Blenkinsop [Tue, 11 Jun 2024 10:43:24 +0000 (10:43 +0000)]
Bug 28575: Add a new check-in message for the new syspref

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: Stop lost fine refund if fine is older than syspref value
Matt Blenkinsop [Fri, 7 Jun 2024 10:23:01 +0000 (10:23 +0000)]
Bug 28575: Stop lost fine refund if fine is older than syspref value

Test plan:
1) Apply patch and reset_all
2) Checkout an item to a patron
3) Mark that item as lost
4) Add a manual invoice for that item's barcode to the patron's account
5) Pay that fine in the Make a payment tab
6) In system preferences, search for NoRefundOnLostFinesPaidAge
7) Set this to -1. I use this value here to avoid needing to go into the database to change the date of the payment we made in step 5. Any fines older than -1 days (i.e. all fines) will be caught by the syspref which is what we want to test)
8) Check in the item
9) The check in message should display "Any lost item fees for this item will remain on the patron's account."
10) Navigate to the Patron's account and confirm that no credit has been added and that the lost fee has therefore not been refunded
11) Run unit test: prove t/db_dependent/Circulation.t

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 hours agoBug 28575: Add new syspref 'NoRefundOnLostFinesPaidAge'
Matt Blenkinsop [Fri, 7 Jun 2024 10:22:23 +0000 (10:22 +0000)]
Bug 28575: Add new syspref 'NoRefundOnLostFinesPaidAge'

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36766: DBRev 24.06.00.038
Katrin Fischer [Wed, 23 Oct 2024 17:58:18 +0000 (17:58 +0000)]
Bug 36766: DBRev 24.06.00.038

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36766: (QA follow-up) Pass more variable to the template
Kyle M Hall [Fri, 27 Sep 2024 20:20:18 +0000 (16:20 -0400)]
Bug 36766: (QA follow-up) Pass more variable to the template

Libraries may want to use this for more varied purposes and
adjust the language of the email based on the sftp upload
that succeeded or failed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36766: (QA follow-up) Add single dash paramter options
Kyle M Hall [Fri, 27 Sep 2024 20:15:21 +0000 (16:15 -0400)]
Bug 36766: (QA follow-up) Add single dash paramter options

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36766: (QA follow-up) Tidy and use die_on_error over return
Nick Clemens [Fri, 27 Sep 2024 18:31:28 +0000 (18:31 +0000)]
Bug 36766: (QA follow-up) Tidy and use die_on_error over return

Tidy and add exec to atomic update
Fix POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36766: Only list the file basename as the SFTP put destination
Alex Buckley [Fri, 17 May 2024 02:17:55 +0000 (02:17 +0000)]
Bug 36766: Only list the file basename as the SFTP put destination

Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36766: Make SFTP notice more customisable
Alex Buckley [Thu, 9 May 2024 18:14:56 +0000 (06:14 +1200)]
Bug 36766: Make SFTP notice more customisable

SFTP_FAILURE and SFTP_SUCCESSFUL notices can be configured from Notices
and slip tool.

Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36766: Add a command-line utility to SFTP a file to a remote server
Alex Buckley [Thu, 2 May 2024 18:50:19 +0000 (06:50 +1200)]
Bug 36766: Add a command-line utility to SFTP a file to a remote server

To test you need to have a remote server you are authorised to SFTP files to.

Test plan:
1. Apply patch and restart services

2. Generate a file on your Koha server. Place it in /tmp/test.mrc

3. Manually connect to the SFTP remote host and accept the hostkey

4. Enter Koha shell

5. Run the sftp_file.pl command-line script
./sftp_file.pl --host <your remote hostname> --user <your user> --pass <your password> --upload_dir <your upload directory> --file /tmp/test.mrc

6. Confirm the SFTP was successful

Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 31143: (QA follow-up) Tidy
Nick Clemens [Fri, 27 Sep 2024 17:45:01 +0000 (17:45 +0000)]
Bug 31143: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 31143: (QA follow-up) move script to maintenance
Nick Clemens [Fri, 27 Sep 2024 17:43:16 +0000 (17:43 +0000)]
Bug 31143: (QA follow-up) move script to maintenance

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 31143: Fix/identify all cases where '0000-00-00' may still remain in the database
wainuiwitikapark [Tue, 24 Sep 2024 04:53:05 +0000 (04:53 +0000)]
Bug 31143: Fix/identify all cases where '0000-00-00' may still remain in the database

This patch identifies date fields in the database (timestamp, datetime, date) that are 0000-00-00 and sets them to NULL

Test plan -

Examples of setting up some 0000-00-00 date fields:

e.g. Borrowers table
update borrowers set dateexpiry="0000-00-00" where borrowernumber=49;

e.g. Items table
update items set datelastseen="0000-00-00" where itemnumber=12;

To identify the cases:
1) Set up some 0000-00-00 date fields
2) Run the misc/maintenance/search_for_data_inconsistencies.pl script
3) Run fix_invalid_dates.pl -v

To fix the cases:
1) Run fix_invalid_dates.pl -c -v
2) Notice the value has changed from 0000-00-00 to NULL

e.g. Borrowers table
select dateexpiry from borrowers where borrowernumber=49;

e.g. Items table
select datelastseen from items where itemnumber=12;

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 31143: Work around subtracting datetime if date_of_birth undef
Pedro Amorim [Tue, 6 Aug 2024 09:41:32 +0000 (09:41 +0000)]
Bug 31143: Work around subtracting datetime if date_of_birth undef

To test:
1) Run the following SQL:
update borrowers set dateofbirth = '0000-00-00' where borrowernumber = 45;
2) Access the borrower edit page through staff UI:
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=45
3) Notice you get an error
4) Run the script:
perl misc/maintenance/search_for_data_inconsistencies.pl
5) Notice you get an error
6) Apply patch restart plack and repeat -> no errors

This is not perfect but its all I have time for, for now. Follow-ups are welcomed as always.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36118: (QA follow-up): Make labels translatable
Pedro Amorim [Mon, 21 Oct 2024 11:07:15 +0000 (11:07 +0000)]
Bug 36118: (QA follow-up): Make labels translatable

Also move the space+colon from 'Patron notice sent: ' label to ill-request-log.inc template
Adjust status_change.tt 'From' capitalized because for status changed this is now:
$ Status changed: From "New request" to "Requested"
Instead of the previous:
$ Status changed from "New request" to "Requested"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36118: Update status and send notice core actions logging
Pedro Amorim [Mon, 1 Apr 2024 12:24:54 +0000 (12:24 +0000)]
Bug 36118: Update status and send notice core actions logging

1) Enable ILLlog sys pref
2) Enable ILLModule and install 'FreeForm', run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
3) Create a new FreeForm request, visit:
<INTRA_URL>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
4) You need to checkout FreeForm's branch compatible with 24.05:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout 24.05.x
koha-plack --restart kohadev
5) Pick a type, insert '42' on cardnumber and pick a library, hit 'Create'
6) On the next screen, click 'Confirm request' and confirm.
7) Click 'ILL request log', notice the entry is there but has no information about who did the logged action.
8) Apply patches. Repeat steps 3) to 6). Notice the logged action now has information about the user who did the action.
9) Extra: Click 'Send notice to patron' and confirm that action is also logged with patron information.

To my knowledge, these are the only 2 actions logged by core Logger.
Backends logging their own actions that want patron information need to add it themselves following this pattern.

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36118: Move common ILL log parts to single ill-request-log.inc file
Pedro Amorim [Mon, 1 Apr 2024 12:20:58 +0000 (12:20 +0000)]
Bug 36118: Move common ILL log parts to single ill-request-log.inc file

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36118: Preparation: Move action logs tt methods
Pedro Amorim [Mon, 1 Apr 2024 11:23:15 +0000 (11:23 +0000)]
Bug 36118: Preparation: Move action logs tt methods

This moves action logs related methods to its own .inc file in order to be reusable

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
26 hours agoBug 36118: Send patron object to template
Pedro Amorim [Mon, 19 Feb 2024 16:18:33 +0000 (16:18 +0000)]
Bug 36118: Send patron object to template

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38173: Fix description of koha-dump --exclude-indexes
Magnus Enger [Tue, 15 Oct 2024 11:47:25 +0000 (13:47 +0200)]
Bug 38173: Fix description of koha-dump --exclude-indexes

To test:
- Look at debian/scripts/koha-dump
- The description of --exclude-indexes reads:
  "Include Zebra indexes on the backup"
- Apply the patch
- Look at the file again. The description is now:
  "Exclude Zebra indexes from the backup"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38200: Remove dead code to delete authorities in authorities/authorities.pl
Phil Ringnalda [Fri, 18 Oct 2024 03:16:14 +0000 (20:16 -0700)]
Bug 38200: Remove dead code to delete authorities in authorities/authorities.pl

It has probably never been used. There's no sign of any UI to delete from
the authority editor or auth_finder in the last 13 years of templates, and
it was unused when it landed; the patch that actually made the first patch
work, a month later, put deleting authorities in authorities_home.pl, where
it has been ever since.

It certainly hasn't been used since bug 17600 landed in 2021, since it
doesn't 'use C4::AuthoritiesMarc qw( DelAuthority );' and so if you try to
use it you just get an error for your trouble.

Sponsored-by: Chetco Community Public Library
Signed-off-by: Yanjun Li <yanjun.li@bywatersolutions.com>
Amended-by: Jonathan Druart
tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 37787: Remove mention of elastic_index from POD
Magnus Enger [Thu, 5 Sep 2024 06:38:44 +0000 (08:38 +0200)]
Bug 37787: Remove mention of elastic_index from POD

After the introduction of misc/workers/es_indexer_daemon.pl,
misc/workers/background_jobs_worker.pl should not handle the
elastic_index queue. But the latter script still mentions this
queue in the POD. This patch removes that mention.

To test:
- Run perldoc misc/workers/background_jobs_worker.pl
- Verify "elastic_index" is mentioned under --queue
- Apply this patch
- Run perldoc again and verify the mention of "elastic_index"
  is gone

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 37787: Undocument koha-worker --queue elastic_index
Magnus Enger [Fri, 30 Aug 2024 08:00:25 +0000 (10:00 +0200)]
Bug 37787: Undocument koha-worker --queue elastic_index

To test:
- Copy the koha-worker script to the standard location:
  $ sudo cp debian/scripts/koha-worker /usr/sbin/koha-worker
- Check "sudo koha-worker --help" and verify elastic_index is
  not mentioned in the list of "current queues"
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
  how to check the "man" page. elastic_index should not be
  mentioned in the list of "Current queues".
- Both places aboce should have a note about elastic_index not
  being active when koha-es-indexer is running.

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38060: Load bookings table on page load if tab href exists in URL hash
Pedro Amorim [Wed, 2 Oct 2024 10:25:55 +0000 (10:25 +0000)]
Bug 38060: Load bookings table on page load if tab href exists in URL hash

Test plan, k-t-d or sandbox:
1) Start by making an item bookable. Visit a record's detail page:
<staff_url>/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
2) Make the first item (39999000003154) bookable by setting 'Bookable': Yes and click 'Update'
3) At the top of the page, you should now see a 'Place booking' button. Click that.
4) Select the patron: type 'koha' and pick 'koha (42)'. (This is borrowernumber 51).
5) Select booking dates, any date interval in the future. Click 'Submit'.
6) Attempt to access this patron's detail page with the bookings tab open:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=51#bookings_panel
7) Notice the tab opens, but the table does not render.
8) Attempt the same in the circulation page:
<staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#bookings_panel
9) Again, notice the tab opens, but the table does not render.
10) Apply patch. Repeat steps 6) and 8). Notice the table now renders.

Additional testing:
1) Place a hold for this patron and attempt to access the holds tab directly:
/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#holds_panel
2) Notice it opens the tab and renders the table. This was already the case prior to this patch, this patch is only bringing the same behavior to the bookings tab for consistency.

Signed-off-by: Dave Daghita <ddaghita@mckinneytexas.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38237: Add POD
Nick Clemens [Wed, 23 Oct 2024 12:50:48 +0000 (12:50 +0000)]
Bug 38237: Add POD

This patch adds POD to the script and rpelaces the custom help script with pod2usage

TO test:
perl misc/cronjobs/erm_run_harvester.pl
Confirm you get helpful usage data

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38237: Add logging to erm_run_harvester cronjob
Nick Clemens [Wed, 23 Oct 2024 12:22:16 +0000 (12:22 +0000)]
Bug 38237: Add logging to erm_run_harvester cronjob

This patch simply adds logging to the cronjob

To test:
1 - Enable CronjobLog
    http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CronjobLog
2 - Enable ERMModule
    http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ERMModule
3 - Home -> E-resource Management -> Data providers -> New data provider
    Fill from registry or create your own, but change the URL and put in any required numbers
    We don't need a real test, just to run the ob
4 - perl misc/cronjobs/erm_run_harvester.pl --begin-date 2024-01-01 --dry-run --debug
5 - View the logs, no log of the script
6 - Apply patches
7 - Run the job again
8 - Check logs
9 - Success!

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38177: Fix lengthMenu by removing extend
Jonathan Druart [Tue, 22 Oct 2024 08:52:46 +0000 (10:52 +0200)]
Bug 38177: Fix lengthMenu by removing extend

$.extend is doing a deep copy of the objects.

```
var dataTablesDefaults = { "lengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, __('All')]] };
var mine = {lengthMenu: [[1, 2, 5, 10], [1, 2, 5, 10]]};
$.extend(true, {}, dataTablesDefaults, mine);
```
Returns:
```
[
  1,
  2,
  5,
  10,
  -1
]
```
Which is ugly and not what we want.

We only need to merge the first level. Using the spread operator (...) will do the trick here.

Note that we certainly want to adjust all the other occurrences of
extend for DT's options.

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>
27 hours agoBug 38177: Fix lengthMenu for components using KohaTable
Pedro Amorim [Mon, 21 Oct 2024 15:09:44 +0000 (15:09 +0000)]
Bug 38177: Fix lengthMenu for components using KohaTable

EBSCO HoldingsIQ doesnt consider a "All" option so neither should we.
At the moment, if we pick 'All', only 100 are listed due to the logic in Providers/EBSCO/build_query_pagination.
The original code hints at trying to do this but its not working.
I think this got lost sometime during KohaTable.vue

This patch should also have the same entry for EHoldingsEBSCOTitlePackagesList but that isnt using KohaTable and for some reason its not picking up on either aLengthMenu or lengthMeny, always shows 'All'.

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>
27 hours agoBug 38177: Do not use stash to retrieve parameters
Jonathan Druart [Wed, 16 Oct 2024 08:11:24 +0000 (10:11 +0200)]
Bug 38177: Do not use stash to retrieve parameters

The pagination for EBSCO's titles, packages and resources is broken. We
shouldn't rely on $c->stash but use params from the request instead.

Test plan:
1) Setup all the system preferences in ERM:
<staff_url>/cgi-bin/koha/admin/preferences.pl?tab=erm
2) Enable EBSCO in ERMProviders. Set the ERMProviderEbscoApiKey and ERMProviderEbscoCustomerID prefs.
3) Do a search that returns more than 20 records. Click on a page other than 1. Notice the records do not change (Page is the same).
4) Apply patch. Repeat. Notice pagination now works.

Search titles, packages and resources
Use the pagination and modify the number of results per page

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>
27 hours agoBug 31581: Remove zebra files for NORMARC
Jonathan Druart [Tue, 22 Oct 2024 08:02:56 +0000 (10:02 +0200)]
Bug 31581: Remove zebra files for NORMARC

Those are leftovers, we should have removed them on bug 18984.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks good!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 37395: Fix columns visibility on Vue tables
Jonathan Druart [Tue, 24 Sep 2024 12:20:59 +0000 (14:20 +0200)]
Bug 37395: Fix columns visibility on Vue tables

On bug 33066 we reworked a lot of datatables.js to make the JS function
reusable from the Vue component (and especially the KohaTable
component). I guess the regression comes from this change, but I am
surprised that we didn't catch it when testing.

The was a mistake for _dt_visibility, we didn't pass the node. Actually
we cannot pass it as we do not have it yet.

This "node" variable is only used when bKohaColumnsUseNames is passed
(ie. we do not rely on the order of the columns but we need to rely on
their data-colname attributes).

There is then a limitation here: we cannot use bKohaColumnsUseNames from
Vue, but we do not yet.

An ideal fix would be too big for now, especially for an hypothetic use
case.

Test plan:
Confirm that the "Columns" button are now back for the tables of the Vue
apps (ERM, Preservation) and that the settings are taken into account
(hide by default, etc.)

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 35769: Remove extra parenthesis
Jonathan Druart [Wed, 24 Jan 2024 15:20:50 +0000 (16:20 +0100)]
Bug 35769: Remove extra parenthesis

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 35769: Fix untranslatable strings in request.tt
Katrin Fischer [Fri, 12 Jan 2024 22:52:42 +0000 (22:52 +0000)]
Bug 35769: Fix untranslatable strings in request.tt

This fixes some strings in the JavaScript part of the
template that were missing from the po files.

This is one way to test:
* Apply patch
* Run gulp po:update --lang <language-code>
* Compare strings changed in the patch, with strings
  appearing in <language-code>-staff-prog.po
* Translate the strings and remove "fuzzy" line
* In k-t-d, run:
  sudo koha-translate --install <language-code> --dev <instance>
* Verify that now the translated version of the template contains
  your translated strings
* Verify the translated page works correctly, no errors

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38148: (QA follow-up) Code comments
Nick Clemens [Tue, 22 Oct 2024 20:06:01 +0000 (20:06 +0000)]
Bug 38148: (QA follow-up) Code comments

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38148: Revert back to get_effective_rule
Pedro Amorim [Tue, 22 Oct 2024 10:48:14 +0000 (10:48 +0000)]
Bug 38148: Revert back to get_effective_rule

And update the first conditional logic.
This patch aims to maintain the logic behind the first patch, but restore get_effective_rule.
get_effective_rule_value is using cache and I believe that is the reason why Items.t fail when using that.

Test plan:
1) Search for 'music' on OPAC
2) Notice records have the 'place hold' link
3) Visit circulation rules on Staff:
<staff_url>/cgi-bin/koha/admin/smart-rules.pl
4) On 'Default checkout, hold and return policy' , under 'Hold policy' pick 'From any library'. Hit 'Save'.
5) Repeat 1). Notice the 'place hold' link is gone.
6) Apply patch. restart plack. Repeat 1). Notice the 'place hold' is shown again

Run:
$ prove t/db_dependent/Koha/Items.t

Signed-off-by: andrewa <andrew.auld@ptfs-europe.com>
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38148: Check value of holdallowed circ rule properly
Aleisha Amohia [Fri, 11 Oct 2024 01:53:11 +0000 (01:53 +0000)]
Bug 38148: Check value of holdallowed circ rule properly

It was noted on Bug 29087 that the value of circulation rules needs to be checked differently, so this follow-up addresses that.

To test:

1. Apply patch and restart services
2. Search for a record on the OPAC. Confirm you can see a link to place a hold.
3. Search for this record on the staff interface and place a hold. Go to Circulation -> Holds to pull and confirm your hold shows in the list.
4. Confirm tests still pass t/db_dependent/Koha/Holds.t

Sponsored-by: Whanganui District Council
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: andrewa <andrew.auld@ptfs-europe.com>
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 38148: Unit tests
Nick Clemens [Tue, 22 Oct 2024 19:54:42 +0000 (19:54 +0000)]
Bug 38148: Unit tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 hours agoBug 27919: (follow-up) Fix translations
Matt Blenkinsop [Tue, 22 Oct 2024 10:30:45 +0000 (10:30 +0000)]
Bug 27919: (follow-up) Fix translations

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 27919: (QA follow-up): Add unit tests
Matt Blenkinsop [Mon, 1 Jul 2024 10:03:50 +0000 (10:03 +0000)]
Bug 27919: (QA follow-up): Add unit tests

prove t/db_dependent/Circulation/ReturnClaims.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 27919: (QA follow-up): Add alerts to the UI to show there are return claims
Matt Blenkinsop [Mon, 1 Jul 2024 09:50:45 +0000 (09:50 +0000)]
Bug 27919: (QA follow-up): Add alerts to the UI to show there are return claims

This patch adds info to the UI to show when there is a return claim. It also reconciles the behaviour for allowing the lost status to be changed. Previously the lost status could not be changed if there was a return claim. This is now possible and a message is shown highlighting the fact that there is a return claim as well as the new lost status.

Test plan:
1) Add a return claim to an item.
2) Check the holdings table on the record page and observe that the "Status" column now shows that there is a return claim
3) Click on the barcode for that item in the table to get to the item editing page
4) Observe that the select for the item lost status is not disabled
5) Change the status and save - the form should save correctly and display both the new status as well as a message showing that there is a return claim.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 27919: Update syspref description
Matt Blenkinsop [Thu, 6 Jun 2024 08:55:58 +0000 (08:55 +0000)]
Bug 27919: Update syspref description

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 days agoBug 27919: Return claims shouldn't change lost status if already set
Matt Blenkinsop [Tue, 28 May 2024 13:22:44 +0000 (13:22 +0000)]
Bug 27919: Return claims shouldn't change lost status if already set

This patch prevents a return claim from changing the lost status if it has already been set.

Test plan:
1) In system preferences, set the ClaimReturnedLostValue syspref to any value
2) Checkout an item to a patron
3) Set that item as lost, using a different status to the one you set in step 1
4) Create a return claim on the item
5) Check the item's lost status, it should now have been set to the value you set in step 1
6) Apply patch
7) reset_all
8) Repeat steps 1-5, this time the status should remain at the value you set in step 3 and not be overwritten by the return claim
9) Repeat steps 1,2,4 and 5 - this time the lost status should be set to the value you set in step 1 as we didn't have a pre-existing lost status

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>