Martin Renvoize [Tue, 10 Oct 2023 16:09:38 +0000 (17:09 +0100)]
Bug 29002: Prevent booking a checked out item
This patch updates the bookings logic to prevent placing a booking
on an item that is checked out to start prior to it's due date.
Test plan
1) Follow the previous test plans
2) Add a checkout of an item
3) Attempt to place a booking and note that the item is not available to
be booked until after it's due date.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 11 Oct 2023 16:20:42 +0000 (17:20 +0100)]
Bug 29002: Ensure bookings stash is up to date
This patch adds the edited/added booking to the bookings stash such that
subsequent triggers of the place/edit booking modal will reflect the
change in thier picker.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 10 Oct 2023 14:25:20 +0000 (15:25 +0100)]
Bug 29002: Fix patron selection and clarify variable names
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 10 Oct 2023 11:07:49 +0000 (12:07 +0100)]
Bug 29002: Fix item select options
SQUASH INTO RESET BUG?
This patch ensures that when a period is not selected we remove all item
selection limitations from the item select.
Prior to this patch, if you clicked to edit a booking, cancelled, then
clicked to place a new booking.. the modal would prevent selection of
the item which you just edited.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 3 Oct 2023 14:30:56 +0000 (15:30 +0100)]
Bug 29002: Reset timeline object on cancel
When cancelling out of the modal confirm, we should reset the changed
object in the timeline rather than leaving it with the appearance that
the edit succeeded.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 3 Oct 2023 07:07:10 +0000 (08:07 +0100)]
Bug 29002: Fix async bookings load issues
This patch updates the modal booking form to only fire the ajax request
upon first modal opening and then moves the data related setup into a
function that can be trigger either upon promise resolution or
immediately if the data already exists at the time the modal is opened.
We also update some instances of datetime processing to use dayjs
endOf('day') function as it appears to work more reliably with timezone
maths that our prior work that used direct mathematical manipulations.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 29 Sep 2023 13:23:25 +0000 (14:23 +0100)]
Bug 29002: Properly reset item in form
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 29 Sep 2023 12:40:52 +0000 (13:40 +0100)]
Bug 29002: Focus on edited/added timeline item
This patch triggers a re-focus of the timeline when a new bookings is
added or an existing booking is edited such that the resulting booking
is scrolled to in the visable timeline.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 23 Aug 2023 10:54:19 +0000 (11:54 +0100)]
Bug 29002: Fix patron display for new bookings in timeline
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 22 Aug 2023 15:11:29 +0000 (16:11 +0100)]
Bug 29002: Always reset the place/edit form on modal close
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 18 Aug 2023 16:43:25 +0000 (17:43 +0100)]
Bug 29002: Add an edit modal
This patch updates the place_booking modal so it may be used as an
edit/confirmation modal at booking edit time.
Test plan
1) Follow the previous test plans
2) Note the new 'Edit' option in the bookings list table
3) Click the 'Edit' button to trigger the edit modal
4) Edit the dates, item or patron and confirm that upon clicking save
the edit works as expected.
5) Edit a booking via the timeline
6) Note that the edit not triggers the same edit dialogue modal where
you can make further changes.
7) Save and note the timeline and bookings table reflect the changes.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 13 Jun 2023 13:11:17 +0000 (14:11 +0100)]
Bug 29002: Assign item at time of booking
This patch updates the logic to ensure we always assign an item at the
point of booking instead of assuming we can assign the item at fulfilment time.
This makes the logic significantly simpler on the client when trying to
calculate available dates.
Test plan
1) Attempt to create a new booking using the 'Any item' option in the
modal
2) Note that upon placing your booking you are assigned an item for that
booking.
NOTE: We add a FIXME to the client code to highlight something to test
when/if someone decides to have another try and moving the item
assigment to just in time as aposed to up front.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 18 Aug 2023 10:14:00 +0000 (11:14 +0100)]
Bug 29002: Add cardnumber to patron display in bookings table
Update the table display to include patron cardnumber to match that of
the display in the timeline view above.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 18 Aug 2023 10:12:22 +0000 (11:12 +0100)]
Bug 29002: Hide search header in bookings table
This patch disables the header search on the bookings display table
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 18 Aug 2023 10:04:01 +0000 (11:04 +0100)]
Bug 29002: Display patron rather than booking id in timeline
This patch improves the display of the bookings timeline to display who
the booking is for rather than a cryptic booking id.
Test plan
1) Follow the previous test plans
2) Navigate to the bookings display tab
3) Note that the timeline now displays each booking with the patron
title as expected as apposed to "Booking XX"
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 18 Aug 2023 09:31:35 +0000 (10:31 +0100)]
Bug 29002: Trigger table reload on timeline move
This patch triggers the bookings table to refresh when a booking it
edited on a page where the table is visable.
Test plan
1) Follow the previous test plans
2) Edit a booking
3) Note that on saving the table is updated to reflect your edit
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 17 Aug 2023 17:14:18 +0000 (18:14 +0100)]
Bug 29002: Match select2 patron format to patron_autocomplete
This still needs a little work to fully match, but is getting close now.
I'd love to convert the existing autocompletes to select2 styling
instead actually.. maybe convert the select here to patron_autocomplete
and then work on a patch to convert patron_autocomplete to a select2
implimentation.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 14 Jul 2023 15:41:21 +0000 (16:41 +0100)]
Bug 29002: (follow-up) Use $patron_to_html function
This didn't exist when we first wrote this code.. it's a useful addition
now.
Test plan
1) Follow the test plans for previous patches
2) Note the proper display of patron names in the bookings list table
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 14 Jul 2023 13:24:38 +0000 (14:24 +0100)]
Bug 29002: (follow-up) Rebase fix, remove q_header
We have removed q_header support in master, so we now need to remove it
in this patchset too.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 19 May 2023 15:48:40 +0000 (16:48 +0100)]
Bug 29002: (follow-up) Add bookings count to side menu
This patch adds booking counts to the bookings option in the side menu
for biblio display pages.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 19 May 2023 15:39:39 +0000 (16:39 +0100)]
Bug 29002: (follow-up) Fix biblio-view-menu on bookings tab
Another rebase change, we moved from can_ in Auth.pm to Koha.Preference
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 18 May 2023 14:34:58 +0000 (15:34 +0100)]
Bug 29002: (follow-up) Update for WRAPPER bugs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 16 May 2023 22:09:48 +0000 (23:09 +0100)]
Bug 29002: Enable editing bookings from the timeline
This patch allows for editing bookings using drag and drop on the
timeline view.
Test plan
1) Follow the test plans from the previous patches
2) Navigate to the bookings tab of a biblio where you have created some
test bookings
3) Note you can click on a booking in the timeline to highlight it.
4) Note you can then drag the booking forward or backwards along the
timeline to trigger an edit
5) Note you can drag the start or end of a booking to extend a booking
and trigger an edit
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 10 Nov 2021 11:42:17 +0000 (11:42 +0000)]
Bug 29002: Add bookable state to items
This patch adds a bookable boolean to enable/disable the ability to book
an item ahead of time
Test plan
1) Navigate to the 'Items' tab of a biblio
2) Note the new 'Bookable' option and select at least one item to allow
bookings to take place
3) Note that without any items selected as 'bookable' one does not have
the 'Place booking' option or the 'Bookings' tab on the biblio
details page.
4) Note that when at least one item is bookable, the place booking modal
now only displays items that are marked as bookable in the item
selection
5) Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 15 May 2023 15:56:24 +0000 (16:56 +0100)]
Bug 29002: Use vis-timeline in bookings view
This patch uses vis-timeline to display a timeline of bookings on the
booking details display tab.
Test plan
1) Follow the steps from the previous patch test plans
2) Note the new visual timeline view of bookings on the bookings detail
page.
3) Confirm that clicking the red cross next to a booking triggers the
cancellation modal
4) Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 15 May 2023 15:55:44 +0000 (16:55 +0100)]
Bug 29002: Add vis-timeline
This is a preparitory patch to add the vis-timeline javascript library.
We will use if to display bookings in a timeline view on the bookings
page.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 8 Dec 2021 14:59:17 +0000 (14:59 +0000)]
Bug 29002: Add modal based booking cancellation
This patch adds a modal based booking cancellation flow to the biblio
bookings display tab page.
Test plan
1) Follow the test plans for the previous patches
2) Note a new column now appears in the bookings table with a 'Cancel'
action button against each booking
3) Cancel one of the bookings using the new cancel button
4) A modal dialog should appear allowing you to continue with the
cancelation or cancel
5) Confirm the cancelled booking is removed from the bookings table
6) Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 18 May 2023 13:52:58 +0000 (14:52 +0100)]
Bug 29002: Fix 'Place booking' for cat pages
We added the 'Place booking' option to the cat-toolbar, but it require
includes for select2 and calendar which weren't present everywhere..
This patch corrects that.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Mon, 15 May 2023 15:30:26 +0000 (16:30 +0100)]
Bug 29002: Add bookings view
This patch adds a new view to the biblio details page to display any
bookings that may have been made.
Test plan
1) Run through the steps from the previous patch
2) Note the appearance of a new 'Bookings' option in the left menu
3) Click the bookings option to load the new bookings page for the
biblio
4) See that the booking from the previous patch appears on the page
5) Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 29 Sep 2021 14:17:38 +0000 (15:17 +0100)]
Bug 29002: Add ability to book material from the staff client
This patch introduces a new modal to the biblio details page to allow
booking of materials.
Test plan
1) Navigate to the details page of a biblio
2) Note the new 'Place booking' button in the toolbar
3) Click the new button and note the new modal dialogue
4) Enter part of a patron name or cardnumber and then select from the
presented results
5) Optionally pick an item from the select list
6) Select a start date and end date from the calender
7) Submit
8) Attempt to book the same item to another user, note that the dates
previously selected are now greyed out.
9) Experiment with different items and all items options to confirm the
available slots in the datepicker update as expected.
10) Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 16 Sep 2021 08:17:30 +0000 (09:17 +0100)]
Bug 29002: Add bookings objects and API classes
This patch adds new Koha::Object based classes for bookings logic and
adds API controllers to expose the new bookings data via the REST API's.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 15 Sep 2021 15:30:15 +0000 (16:30 +0100)]
Bug 29002: DBIC Schema Build
Rebuild of DBIx::Class schema files for the new table and relations
added.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 15 Sep 2021 15:29:43 +0000 (16:29 +0100)]
Bug 29002: Add bookings table
This patch adds a new bookings table to store booking details.
Test plan
* Confirm that kohastructure and the atomicupdate match such that an
install or upgrade result in the same table being present on the
system.
Sponsored-by: PTFS-Europe Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Wed, 12 Jul 2023 09:19:15 +0000 (09:19 +0000)]
Bug 18203: Add per borrower category restrictions on placing ILL requests
Test Plan:
- Enable ILLModule sys pref and install any backend, or run
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
- Verify you can place new ILL requests in OPAC and Intranet
- Apply patch
- In borrower categories, verify there's a new column for 'can place ILL in opac' and is set to 'yes' by default
- Edit your borrower's patron category and set 'can place ILL in opac' to 'No'
- Verify you can no longer place new ILL requests in OPAC
- Verify you also cannot place new ILL requests through URL:
:8080/cgi-bin/koha/opac-illrequests.pl?method=create&backend=FreeForm
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Wed, 12 Jul 2023 09:15:03 +0000 (09:15 +0000)]
Bug 18203: DB specific and atomicupdate
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 9 Oct 2023 21:51:08 +0000 (21:51 +0000)]
Bug 8367: (QA follow-up) Fix QA script
* Add +x to atomic database update file
* Perltidy
* Add spans to rewritten tab label for translatability
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Mon, 6 Mar 2023 20:03:14 +0000 (20:03 +0000)]
Bug 8367: (QA follow-up) Improve display when value not set for rule
When a rule is not set for a speficic line, the value in the syspref
will be used. This should be made clear in the interface.
To test:
1 - Add a new rule for a specific item type
2 - Do not fill the 'Hold pickup period'
3 - Confirm that the rule defaults to the system preference
4 - Hover on 'Default' in the circ rules under 'Hold pickup period'
5 - Confirm the text is readable
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Mon, 6 Mar 2023 15:50:13 +0000 (15:50 +0000)]
Bug 8367: (QA follow-up) Update message on Hold waiting pickup report
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=8367 Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Fri, 13 Jan 2023 01:39:50 +0000 (14:39 +1300)]
Bug 8367: (follow-up) possible to delete circ rule
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Tue, 1 Nov 2022 19:48:19 +0000 (08:48 +1300)]
Bug 8367: (follow-up) Remove unnecessary code and atomic update
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Mon, 14 Mar 2022 03:34:54 +0000 (16:34 +1300)]
Bug 8367: (follow-up) Fix tests
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Mon, 14 Mar 2022 00:59:37 +0000 (13:59 +1300)]
Bug 8367: (follow-up) Remove pickup delay message from OPAC
It adds unnecessary complexity and information.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Wed, 2 Mar 2022 21:03:28 +0000 (10:03 +1300)]
Bug 8367: (follow-up) Fix pickup delay text on OPAC and other bits
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Tue, 21 Sep 2021 05:21:42 +0000 (05:21 +0000)]
Bug 8367: Make database update idempotent (across different MariaDB versions)
The previous query seemed to work on MariaDB 10.1.48 (used by koha-testing-docker),
but it didn't work on MariaDB 10.3.29 (default in Debian 10 as of this writing),
but this patched query works on both indempotently.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Tue, 7 Sep 2021 07:09:43 +0000 (07:09 +0000)]
Bug 8367: Make database update idempotent
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
So that pickup delay can have a different value per patron category,
item type or branch.
To test:
1) Update database, restart services
2) Set ReservesMaxPickUpDelay syspref (if not already set)
3) Edit your circulation rules and set a value under 'Holds pickup
period (day) that is DIFFERENT from ReservesMaxPickUpDelay. Set a few
different numbers for different branches as well.
4) Place a hold on a biblio from the staff client.
5) Check in an item from that biblio and confirm the hold as waiting
6) Confirm the expiration date is calculated using the 'Holds pickup
period' value instead of the ReservesMaxPickUpDelay syspref
7) Revert the waiting status and delete the hold
8) Re-place the hold on the biblio on the OPAC. Notice that when you
change the pick up location, the number of days in the pickup message
below the dropdown changes based on the circ rules.
9) Create a holiday with a date that will overlap with the 'Holds pickup
period'
10) Check in an item from that biblio and confirm the hold as waiting
11) Confirm the expiration date is calculated using the 'Holds pickup
period' value AND considers the special holiday
12) Confirm tests pass t/db_dependent/Holds/WaitingReserves.t
13) Test Talking Tech:
13a) Enable TalkingTechItivaPhoneNotification
13b) Go to Tools -> Notices & slips. Add content to the HOLD phone
(itiva) notice.
13c) In your terminal, run perl
/path/to/koha/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl -o
~/itiva.tmp -w 0 --type=RESERVE
Sponsored-by: Catalyst IT Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 22 Jun 2023 15:42:52 +0000 (15:42 +0000)]
Bug 34098: Improve translation of some strings in the patron import template
This patch updates a few sections of the patron import template in order
to import the way strings are identified for translation.
To test, apply the patch and install another translation if necessary.
- Go to Tools -> Import patrons
- Under "Notes," you should see a link, "Download a Starter CSV file
with all the columns."
- Test the process of importing a batch of patron records.
- When the import completes, confirm that the status messages are
correct:
X imported records
X overwritten records
X not imported because they are already in borrowers table and
overwrite is disabled
X not imported because they are not in the expected format
X records parsed
TESTING TRANSLATABILITY
- Update a translation, e.g. fr-FR:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the updated strings, e.g.
misc/translator/po/fr-FR-messages.po
- Locate strings pulled import_borrowers.tt for translation and confirm
that they are readable and have context information under 'msgctxt'
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 18 Oct 2023 14:18:40 +0000 (14:18 +0000)]
Bug 35091: Improve translation of usage statistics country list
This patch reworks country-list.inc so that each country name can be
wrapped separately in the t() translation function and be processed
individually during the translation process.
To test, apply the patch and update a translation, e.g. fr-FR:
- perl misc/translator/translate update fr-FR
- Edit the updated po file for the language you chose, e.g.
misc/translator/po/fr-FR-messages.po, and locate strings from
country-strings.inc. Each country names should show up as a separate
string for translation.
- Update the file to fill in translated strings for one or more
countries. For example:
- Install the updated po file:
- perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
preferences -> language.
- Go to Administration -> Share usage statistics and check the "Your
country" dropdown. The list should look correct.
- Switch to your updated translation and confirm that the country names
you translated show up as expected.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 20 Oct 2023 18:18:38 +0000 (18:18 +0000)]
Bug 26824: Use confirmation modal when removing titles from a list in the OPAC
This patch changes the process of removing a title from a list so that
it uses a confirmation modal dialog instead of a JavaScript alert.
To test, apply the patch and view the contents of a list in the OPAC.
- Click the "Remove from this list" link under one of the titles.
- You should see a modal confirmation message, "Are you sure you want
to remove this item from the list?" It should show the title of the
item on the list.
- Test both the "Yes" and "No" choices.
- Check the box next to one title on the list, and click the
"Remove from list" link at the top of the table.
- You should see a modal confirmation message, "Are you sure you want
to remove this item from the list?" It should show the title of the
item on the list.
- Test boh the "Yes" and "No" choices.
- Check the box next to multiple titles on the list and click the
"Remove from list" link at the top of the table.
- You should see a modal confirmation message, "Are you sure you want
to remove these items from the list?" It should show the titles of
all the records you selected.
- Test both the "Yes" and "No" choices.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Tue, 9 May 2023 22:11:00 +0000 (22:11 +0000)]
Bug 33575: (QA follow-up) Fix date sorting on Date column
Implements correct date sorting for different date formats on the Date column.
See:
https://wiki.koha-community.org/wiki/DataTables_HowTo#Sorting_dates_regardless_of_date_format_preference Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Fri, 21 Apr 2023 14:10:51 +0000 (14:10 +0000)]
Bug 33575: (follow-up) don't allow priority and pickup location to be hidden
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Thu, 20 Apr 2023 15:47:01 +0000 (15:47 +0000)]
Bug 33575: Add dataTable to hold table on /reserve/request.tt
To test:
1. Have a record with several holds on it.
2. Go to the holds page for that record ( /cgi-bin/koha/reserve/request.pl?biblionumber=144 )
3. Cannot sort by columns
4. Apply patch, restart_all
5. Now the table should be a dataTable that will allow you sort.
6. Try hiding columns by clicking on the 'Columns' icon above the table, make sure columns are correctly being hidden.
7. Try to hide columns by going to Adminstration > Table settings ( Circulation > Holds > patron_holds_table ), make sure columns are correctly being hidden.
8. Now login with a user who has the 'place_holds' permission but does NOT have the 'modify_holds_priority' permssion.
9. The table will not have the change priority columns. Make sure all columns can still be hidden/shown correctly for that use.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds context for translation to the term "Order". It is
sometimes used as a verb (e.g. to order) and sometimes as a noun (e.g.
an order).
To test:
1. Go to the various pages and make sure Order appears correctly in
English
- orderreceive: when receiving multiple orders, the table heading
- parcel: when receiving an order, there is a "View" menu with
"Order", "MARC", and "Card"
- z3950_search: when adding an order from an external source, if
you hover the mouse on the Order option, there is a thing that
opens (a tooltip?) with the word "Order"
2. Apply patch
3. Redo step 1 in English, make sure the pages still work
4. Update the translation files
gulp po:update --lang fr-CA
5. View the messages.po file and make sure the term is translated for
both verb and noun context (you can put anything, just something
different to tell them apart)
6. View the pages in the other language, the terms should be
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Julian Maurice [Tue, 17 Oct 2023 15:13:55 +0000 (17:13 +0200)]
Bug 35079: Replace --force-extract by --generate-pot={always,auto,never}
This restores the original behaviour of always building the POT file
in order to not break existing workflows
Option --force-extract is deleted in favor of a new option
--generate-pot that can have 3 values:
* always: always build the POT file. This is the default value
* auto: build the POT file only if it does not exist
* never: never build the POT file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Julian Maurice [Tue, 17 Oct 2023 14:33:37 +0000 (16:33 +0200)]
Bug 35079: Rebuild POT files only if necessary or asked explicitely
By default, gulp tasks po:create and po:update won't rebuild the POT
files if they already exist.
Both tasks gained a new option --force-extract to rebuild them
unconditionally
This makes it possible to create/update PO files for multiple languages
sequentially without rebuilding the POT file for each language.
For instance:
gulp po:update --lang fr-FR
# do something with the PO files
gulp po:update --lang en-GB
# ...
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Wed, 2 Aug 2023 11:56:46 +0000 (07:56 -0400)]
Bug 34456: Add the ability to download a template rendered report as a file
Bug 34136 adds the ability to render a report using a notice template rather than displaying data in a table. It would be even more useful to be able to download the contents as a file where the notice subject can be used as the filename so the filename can be generated dynamically ( such as adding the current date as part of the filename ).
Test Plan:
1) Follow the test plan for Bug 34136
2) Run your report
3) Note under the Download menu the new item "Download as" with the
subject line for your template
4) Click that link, note the file contains the contents of your report!
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 26 Oct 2023 18:03:40 +0000 (18:03 +0000)]
Bug 35171: Add send_empty option to runreport
This patch adds a new 'send_empty' option to runreport.pl
To test:
1 - Create a report in Koha that will not return any results:
SELECT barcode FROM items WHERE 1=2
2 - perl misc/cronjobs/runreport.pl 1
3 - Output is: NO OUTPUT: 0 results from execute_query
4 - perl misc/cronjobs/runreport.pl 1 --send_empty
5 - Output is: no results were returned for the report
6 - perl misc/cronjobs/runreport.pl 1 --send_empty --email
7 - It will die on an email error unless you have SMTP configured - this si good, it means we sent an email
8 - Bonus points: Test on a system that can correctly send emails, confirm it works :-)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch harmonizes the attribute names with what is used for `items`
and `checkouts` in terms of terminology.
It also adapts the tests so they are less random failure-prone (they had
a fixed value for the item type, which might make things explode if the
chosen value already exists on the DB.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Andreas Jonsson [Sat, 16 Sep 2023 10:13:15 +0000 (10:13 +0000)]
Bug 34008: Add REST endpoint for list of itemtypes
Test plan:
* Enable the system preference RESTBasicAuth
* curl -s --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/itemtypes
should give 401 Unauthorized
* curl -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/itemtypes
should produce JSON-list of itemtypes
* curl -s -u koha:koha --header "x-koha-embed: translated_descriptions" --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/itemtypes
should include the field translated_descriptions containing the translated descriptions, if any
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] perltidy -b t/db_dependent/api/v1/itemtypes.t # Resolve bad score of 44
[EDIT] chmod 755 t/db_dependent/api/v1/itemtypes.t
[EDIT] perltidy -b Koha/REST/V1/ItemTypes.pm
Lesson: Please run qa tools yourself and adjust accordingly?
Edit (tcohen): I restored the item_type_translated_description.yaml file
as the entire API was broken because of the lack of it. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 28 Jul 2023 15:39:38 +0000 (15:39 +0000)]
Bug 33664: Add ability to cancel order lines in closed baskets
At the moment it's only possible to cancel order lines while the
basket is still open or from the pending orders page during processing
a shipment. The latter requires you to add a shipment and fake an
invoice. To make things easier we want to optionally allow cancelling
order lines in closed baskets from the basket summary page.
Before applying the patch:
1) Set up data
* Create a new basket
* Create a few order lines, at least 3
* Close the basket
* Receive shipment and receive one order line
2) Verify current behaviour
* On basket summary page: you cannot cancel while the basket is closed
* On the pending orders page you can cancel
Apply patch, run database update, restart_all
3) Verify new behaviour
* Verify that nothing has changed on pending orders and basket summary
* Switch new system preference CancelOrdersInClosedBaskets to "Allow"
* Verify that pending orders hasn't changed a bit
* Verify that you now can cancel your order lines in the closed basket
Exception: the received order line should not be cancellable
Test anything else that you think might make sense ;)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 17 Oct 2023 11:39:44 +0000 (12:39 +0100)]
Bug 35074: Add support for category_code to writeoff_debts
This patch adds support for passing category_code as a limiter for the
writeoff_debts script.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 27 Oct 2023 13:02:27 +0000 (14:02 +0100)]
Bug 35074: Use patron relationship alias
This patch updates the existing Koha::Account::Line->patron accessor to
use the new aliased 'patron' relation in the schema class
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 27 Oct 2023 13:01:35 +0000 (14:01 +0100)]
Bug 35074: Add patron relationship alias
This patch adds the 'patron' relationship alias to the Acountline
DBIx::Class schema.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Michael Hafen [Fri, 27 Jan 2023 18:14:32 +0000 (11:14 -0700)]
Bug 32730: Add Patron Lists tab to patron details and circulation pages
Test Plan:
1. Apply patch
2. create a patron list if there aren't any
3. search for a patron
4. observe the "Patron lists" tab showing the list that the patron is not in
5. try adding the patron to the list and removing them from the list to
be sure the feature has full operation
6. click "Check Out" on the side bar menu to navigate to the circulation
page for this patron
7. observe the "Patron lists" tab, and verify it operates as it did on the
patron details page
Bug 32730: (follow-up) Minor corrections
by Owen Leonard
This patch corrects an instance of an incorrect capital letter
("Patron Lists" -> "Patron lists") and makes minor tweaks to
indentation.
Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Edit: (tcohen) new files should be run through perltidy ALWAYS. Did it
and squashed it here.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Magnus Enger [Thu, 15 Jun 2023 12:21:19 +0000 (12:21 +0000)]
Bug 26170: Add protected status for patrons
This set of patches makes it possible to protect patrons from being accidetally
deleted or merged with other patrons, from the UI and from (well behaved) cron
jobs. The following subroutines are affected:
- Koha::Patron::delete
- Koha::Patron::merge_with
- Koha::Patron::safe_to_delete
- C4::Members::GetBorrowersToExpunge
Please note:
- This does not intend to protect patrons from being edited, only from being
deleted
To test:
* Tests
- Run the affected tests:
prove t/db_dependent/Members.t
prove t/db_dependent/Koha/Patrons.t
* Editing protected status and manual deletion
- Add a new user, note the presence of the "Protected" field under "Library
management", but leave it at the default "No", for now.
- Note that "Protected" is displayed in the "Library use" section of the patron
details.
- Note that More > Delete is avaiable as an action when the patron is saved
- Edit the user and set "Protected" to "Yes"
- Note that More > Delete is now disabled, with a note that the patron is protected
* Batch patron deletion
- Go to Tools > Batch patron deletion and anonymization
- Check the box for "Verify you want to delete patrons"
- Choose the category of your protected patron for "whose patron category is"
and click "Next" to run the actual deletion
- Check that your protected patron was not deleted
* Merging patrons
- Make sure you have two patrons with similar names or the same category, so
you can find them with one search. One should be protected, one not.
- Search for the patrons, tick their boxes and click on "Merge selected patrons"
- Select one of the patrons as the "patron to keep".
. Click on "Merge patrons"
- "No valid patrons to merge were found" should be shown
- Repeat this with the other patron as the "patron to keep"
(A future enhancement could be to not allow a protected patron to be selected for
merging in the first place.)
* misc/cronjobs/delete_patrons.pl
- Make sure you have a protected patron, in a category with at least one more
patron.
- Run something like this (at least in ktd):
$ perl misc/cronjobs/delete_patrons.pl --category_code <code> -v --confirm
(Replace <code> with the actual categorycode.)
- Make sure the borrowernumber of the protected patron is not mentioned in the
output of the script.
- Check the protected patron was not deleted
- Check the non-protected patrons were deleted
* REST API (with ktd)
- Make sure you still have a protected patron, and note their borrowernumber
- Enable RESTBasicAuth and restart all the things
- Run these two commands from the command line on the host:
$ curl -u koha:koha --request GET "http://localhost:8081/api/v1/patrons/54"
$ curl -u koha:koha --request DELETE "http://localhost:8081/api/v1/patrons/54"
(Replace 54 with the actual borrowernumber of your protected patron.)
- The first curl command should give you the patron details. The second should
give this output:
{"error":"Protected patrons cannot be deleted","error_code":"is_protected"}
There could be more functions/scripts where patrons are deleted that I have not
thought about. Please report them on the bug if you find any!
Update 2023-10-19: Fix "More > Delete" on patron, so link can not be clicked.
Update 2023-10-19: Rebase
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Magnus Enger [Thu, 15 Jun 2023 12:13:45 +0000 (12:13 +0000)]
Bug 26170: Database update
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Julian Maurice [Tue, 28 Mar 2023 15:02:19 +0000 (17:02 +0200)]
Bug 33353: Add compatibility with Search::Elasticsearch 8.0
For some reasons, with Search::Elasticsearch 8.0 JSON::true is
interpreted as 1 and Elasticsearch will always respond that it found "at
least 1 record". Something like this:
{
total => {
value => 1,
relation => 'gte'
}
}
Replacing JSON::true by \1 works with every version of
Search::Elasticsearch I tested (6.80, 7.717, 8.0)
Also worth noting:
Search::Elasticsearch will stop being supported by Elastic
https://github.com/elastic/elasticsearch-perl/issues/220
We might need to find an alternative for future versions of
Elasticsearch
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Philip Orr <philip.orr@lmscloud.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Julian Maurice [Tue, 28 Mar 2023 14:41:08 +0000 (16:41 +0200)]
Bug 33353: Add compatibility with Elasticsearch 8.x
Elasticsearch 8 removed the support of types. This patch adapts the
requests accordingly.
With this patch, Koha will still be compatible with Elasticsearch 7.x
but will no longer work with Elasticsearch 6.x
Since Elasticsearch 6.x is no longer maintained, this should not be a
problem.
Test plan:
1. Install Elasticsearch 8
(use docker image: docker.io/koha/elasticsearch-icu:8.x)
2. Change the elasticsearch server location in $KOHA_CONF
3. Run misc/search_tools/rebuild_elasticsearch.pl -r -b -v
It should fail
4. Apply the patch
5. Run misc/search_tools/rebuild_elasticsearch.pl -r -b -v
It should end with "Total XXX records indexed"
6. Try to search some biblios and verify that it works the same as
before
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Philip Orr <philip.orr@lmscloud.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Fri, 27 Oct 2023 16:24:16 +0000 (16:24 +0000)]
Bug 34587: Updated cypress tests
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 05cf3d9f6a7ddf163d2e144436a6ff8e5854d7e4) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Matt Blenkinsop [Thu, 26 Oct 2023 09:09:10 +0000 (09:09 +0000)]
Bug 34587: Fix ->validation->output in API endpoints
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Wed, 25 Oct 2023 13:58:22 +0000 (13:58 +0000)]
Bug 34587: (QA follow-up): squash
Tidy
$c->validation in API controllers
File permissions
.inc file filters
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>