]> git.koha-community.org Git - koha.git/log
koha.git
6 months agoBug 10758: Show title of deleted biblio on basket page
Marcel de Rooy [Mon, 12 Feb 2024 08:01:26 +0000 (08:01 +0000)]
Bug 10758: Show title of deleted biblio on basket page

Test plan:
Find a completed order line and a cancelled one with deleted biblios.
Goto acqui/basket.pl
Check if you see the title if deleted_biblionumber is filled.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36615: Terminology: use 'on hold' instead of 'reserved' in OPAC self checkout
Caroline Cyr La Rose [Tue, 16 Apr 2024 21:19:13 +0000 (17:19 -0400)]
Bug 36615: Terminology: use 'on hold' instead of 'reserved' in OPAC self checkout

This patch changes the term 'reserved' to 'on hold' in the OPAC self
checkout feature.

To test:
1. Apply patch
2. Place a hold for a patron
3. Enable OpacTrustedCheckout
4. Log into the OPAC as another patron
5. Click Self checkout at the top of the page
6. Paste the item's barcode in the text input
7. Click 'Submit'
8. Make sure the warning sentence is correct and there are no spelling
   errors

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30623: Copy permissions from one user to another
Owen Leonard [Tue, 26 Apr 2022 11:29:13 +0000 (11:29 +0000)]
Bug 30623: Copy permissions from one user to another

This patch adds controls to the patron "Set permissions" page allowing
the user to copy a set of permissions from one patron to another.

The patch also makes a minor correction to global staff interface CSS to
correct the appearance of non-primary split buttons.

To test, apply the patch and rebuild the staff interface CSS. You may
want to clear your browser cache.

- Locate a patron in the staff client and choose More -> Set
  permissions. You might want to start with a staff patron who has
  multiple permissions enabled.
- You should see two new buttons in the toolbar immediately above the
  list of permissions: "Copy settings," a split button with a secondary
  option to choose "Forget copied settings"; and "Paste settings" which
  should be disabled by default.
- Clicking the "Copy settings" button should trigger the copy icon to
  cycle/fade from the copy icon to the check-mark icon and back to the
  copy icon. I thought this interaction needed some visual feedback
  since it doesn't otherwise trigger visible action.
- Clicking the "Copy settings" button should also enable the "Paste
  settings" button.
- Locate another patron, preferable one with permissions visibly
  different from your first choice.
- On their "Set permissions" page, click the "Paste settings" button.
  The list of permissions should expand all settings and all the
  checkboxes should now match your original choice.
- At this stage you could find another patron and paste the same
  permissions again.
- Click "Copy settings -> Forget copied settings." The "Paste settings"
  button should become disabled.
- Using the browser console to check the contents of Local Storage
  should confirm that the "copiedPermissions" entry has been removed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19097: (follow-up) Fix typo 'altough'
Nick Clemens [Thu, 2 Nov 2023 11:15:52 +0000 (11:15 +0000)]
Bug 19097: (follow-up) Fix typo 'altough'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19097: Adjust some GetMarcFromKohaField calls
Marcel de Rooy [Mon, 30 Oct 2023 13:00:01 +0000 (13:00 +0000)]
Bug 19097: Adjust some GetMarcFromKohaField calls

We need to:
[1] Remove obsolete framework parameters if any (yes there are).
[2] Check scalar context calls if any (most probably not).

Ad 1:
How to find them? Git grep and look at each hit. You will need the -C
parameter to add a few context lines around the call even.

Found one in C4/Biblio.pm and six in Suggestions.t with ''.
Found one in C4/Items on a second line. Similar one in Koha/EDI.
Note: sub receipt_items in EDI has no unit tests yet.

Also did a few git searches like:
git grep GetMarcFromKohaField | grep -v -P "GetMarcFromKohaField.*;"| grep -P "GetMarcFromKohaField\s*\("
Note: Seeing still three lines; they are all fine. Last line comes from
testing to trigger the warn.

Ad 2:
Have been looking at each git grep line and did not spot any
scalar context call. Before this report, we had an example in
POD and the Biblio test only.

Try to find them by performing smarter git searches?
Did look again at results for:
git grep GetMarcFromKohaField | grep -v -P "\)\s*=\s*&?(C4::Biblio::)?GetMarcFromKohaField" | grep -v -P "use "
The tests from this grep are included in the last test plan line.

Test plan:
Read the patch.
Run t/db_dependent/Biblio/TransformHtmlToMarc.t
Run t/db_dependent/Items.t
Run t/db_dependent/Suggestions.t
Run prove t/Biblio2.t t/db_dependent/Biblio.t t/db_dependent/Filter_MARC_ViewPolicy.t t/db_dependent/Koha/Authorities.t t/db_dependent/Koha/Biblio/Metadata.t t/db_dependent/Koha/Filter/EmbedItemsAvailability.t t/db_dependent/Koha/SearchEngine/Search.t t/db_dependent/XISBN.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19097: Remove wantarray from GetMarcFromKohaField
Marcel de Rooy [Mon, 30 Oct 2023 14:11:17 +0000 (14:11 +0000)]
Bug 19097: Remove wantarray from GetMarcFromKohaField

The routine should be called in list context now.
Warns also about use of obsoleted framework parameter. This
is the case for several years already btw. But may help us
catch a forgotten occurrence? Can be removed later.

In a follow-up we will check for second parameters and
we will update calls in scalar context.

Test plan:
Prove t/db_dependent/Biblio.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 19097: Remove wantarray from GetMarcSubfieldStructureFromKohaField
Marcel de Rooy [Mon, 30 Oct 2023 13:20:14 +0000 (13:20 +0000)]
Bug 19097: Remove wantarray from GetMarcSubfieldStructureFromKohaField

Replacing wantarray by always returning all mappings.
In a few cases only we expect multiple ones.
Changing two calls to pick the first hit, and add comment about
the implicit assumption being made (as before, no behavior change).

Test plan:
Look at results of git grep GetMarcSubfieldStructureFromKohaField
Run t/db_dependent/Biblio.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35646: (follow-up) Correct firstaquidate type
Nick Clemens [Thu, 18 Apr 2024 13:10:16 +0000 (13:10 +0000)]
Bug 35646: (follow-up) Correct firstaquidate type

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35646: Unit tests
Nick Clemens [Fri, 22 Dec 2023 18:52:57 +0000 (18:52 +0000)]
Bug 35646: Unit tests

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35646: Allow use of publication date fields in serial numbering pattern
Nick Clemens [Fri, 22 Dec 2023 18:20:09 +0000 (18:20 +0000)]
Bug 35646: Allow use of publication date fields in serial numbering pattern

This patch extends the numbering pattern field to accept subsititutions for:
{Year} {Day} {DayName} {Month} {MonthName}

These fields are based on the publication date for the serial issue.

To test:
0 - Apply patch
1 - Setup a enw numbering pattern
    Serials->Manage numbering patterns + New numbering pattern
2 - In the numbering formula enter: {X} {Y} {Z} {Year} {Month} {Day} {MonthName} {DayName}
3 - Populate X/Y/Z in the table as you wish, these should be unaffected by patch
4 - Set a Frequency /  First issue plublication date / Subscription length
5 - Click 'Test pattern'
6 - Confirm the dates in the Number match the publication date values
7 - Try with different frequencies to confirm they match
8 - Save the pattern
9 - Create a new subscription and use the new pattern
10 - Confirm it works as expected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35903: In cataloguing authority plugin using autocomplete must set operator exact
Fridolin Somers [Thu, 25 Jan 2024 08:50:28 +0000 (09:50 +0100)]
Bug 35903: In cataloguing authority plugin using autocomplete must set operator exact

When cataloguing and using authority plugin, there is auto-completion on inputs and default operator is "contains".
When using auto-completion and selecting a result it would be logical to set operator "exact".

See doc https://api.jqueryui.com/autocomplete/#event-select

This patch also adds auto-completion missing on "Search all headings".

Test plan:
1) Create a new authority Topical Term with heading "Cart"
2) Create a new authority Topical Term with heading "Carthage"
3) Create a new biblio record
4) Use authority plugin on field 650
5) You see current operator are "contains"
6) Enter "Car" in "Search main heading ($a only):"
7) You see auto-completion showing "Cart" and "Carthage"
8) Click on "Cart"
9) You see operator changes to "is exactly"
10) Submit form to see the results
11) Clear form and repeat 6-9 for the three other inputs

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35586: Added the collection to the location column in the OPAC cart
Laura Escamilla [Sat, 16 Dec 2023 16:11:50 +0000 (16:11 +0000)]
Bug 35586: Added the collection to the location column in the OPAC cart

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35727: Remove unused code in HoldsQueue::MapItemsToHoldRequests
Andreas Jonsson [Mon, 8 Jan 2024 16:57:20 +0000 (17:57 +0100)]
Bug 35727: Remove unused code in HoldsQueue::MapItemsToHoldRequests

Test plan:

prove t/db_dependent/HoldsQueue.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36499: (follow-up) Update "Date last borrowed" to "Last checkout date"
Katrin Fischer [Mon, 29 Apr 2024 07:35:17 +0000 (07:35 +0000)]
Bug 36499: (follow-up) Update "Date last borrowed" to "Last checkout date"

This makes the description on the item search form match with
the column name in the results and avoids the "borrow" for the
more Koha common term "checkout".

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36499: Added datelastborrowed column to item search results
Laura Escamilla [Thu, 4 Apr 2024 13:26:06 +0000 (13:26 +0000)]
Bug 36499: Added datelastborrowed column to item search results

Test plan:
1. Apply patch
2. Checkout an item to a patron
3. Perform an item search and either search as is, or add a “Last checkout date:” of today’s date for a more refined search.
    1. Notice that there is now a date last borrowed column by the date due column
    2. Export the table into a CSV and notice that there is also a date last borrowed column there
4. Sign off and have an amazing day :D

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36605: Add update_lastseen to handle_patron_status for SIP
Nick Clemens [Tue, 16 Apr 2024 03:50:21 +0000 (03:50 +0000)]
Bug 36605: Add update_lastseen to handle_patron_status for SIP

This patch extends the TrackLastPatronActivity trigger to cover SIP status messages as well.
Other SIP messages like Checkin/Checkout should be covered by those values in system preference, so
should not need adjustment.

To test:
prove -v t/db_dependent/SIP/Message.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35511: (follow-up) Tweaks to CSS, adding aria-hidden to icons
Owen Leonard [Fri, 12 Apr 2024 15:08:09 +0000 (15:08 +0000)]
Bug 35511: (follow-up) Tweaks to CSS, adding aria-hidden to icons

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35511: Add visual indicators of patron edit form collapsible sections
Owen Leonard [Wed, 6 Dec 2023 17:26:27 +0000 (17:26 +0000)]
Bug 35511: Add visual indicators of patron edit form collapsible sections

This patch updates CSS and markup in the patron add/edit form so that
there is better visual indication that sections can be collapsed by
clicking headings.

The JS function for showing and hiding sections has also been updated to
reduce verbosity.

Unrelated markup change for the sake of accessibility: A <label> has
been added to the "Show collapsed fields" checkbox which is seen when
CollapseFieldsPatronAddForm is active.

To test, apply the patch and go to Patrons -> New patron.

- Each section of the form should have an arrow indicator by the section
  heading indicating whether it is expanded or collapsed.
- Mousing over the heading should show a border to help show the
  clickable region.
- Clicking the header should collapse the section and the arrow
  indicator should change to reflect that the section is collapsed.
- Go to Administration -> Sytem preferences and search for
  CollapseFieldsPatronAddForm.
- Make some selections from the dropdown and save your changes.
- Return to the patron entry form and confirm that your selections are
  collapsed by default.

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>
6 months agoBug 35689: Add id and classes to each MARC note in OPAC bibliographic details
Owen Leonard [Wed, 3 Jan 2024 16:01:56 +0000 (16:01 +0000)]
Bug 35689: Add id and classes to each MARC note in OPAC bibliographic details

Building on Bug 14156, this patch updates the OPAC bibliographic
detail page's display of MARC notes to add the tag number in both a
class (for consistent styling across the same tag number) and id (for
unique styling for each repeated tag).

To test:

- As a quick test for custom CSS, go to Administration -> System
  preferences and locate the OPACUserCSS preference.
  - Add this testing CSS:

   .marcnote { font-size:140%; font-family: serif; }
   .marcnote-500 { background-color: #66FFCC; }
   .marcnote-511 { background-color: #99FFFF; }
   .marcnote-520 { background-color: #CCFF00; }
   .marcnote-521 { background-color: #CCFFFF; }
   .marcnote-538 { background-color: #FFCCCC; }
   .marcnote-546 { background-color: #FFFFCC; }

- Locate a record with multiple notes fields. In the sample data, record
  46, "Viridiana" is a good example which works well with the above CSS.
- On the bibliographic detail page for the record, click the
  "Descriptions" tab.
  - Each MARC note should be colored according to the tag it comes from.
  - Inspect the HTML to confirm that each paragraph also has its own
    unique ID.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34082: Cut some redundancy in OPAC JavaScript string translations
Owen Leonard [Fri, 16 Jun 2023 16:07:35 +0000 (16:07 +0000)]
Bug 34082: Cut some redundancy in OPAC JavaScript string translations

This patch consolidates some JS code so that we're not defining a string
ine one place and using it once elsewhere. With JS-friendly translations
tools we don't need this workaround.

To test, apply the patch and go to Administration -> Circulation and
fine rules.

- Configure an item type rule with the "OPAC item level holds" setting
  set to "Force."
- Log in to the OPAC and locate a record with that item type and
  multiple items. An example in the sample data:
  /cgi-bin/koha/opac-detail.pl?biblionumber=12
- Place a hold on the item.
  - The holds screen should show a table of items.
  - Open your browser's developer tools.
  - In the Console tab, paste in this code and hit ENTER:

    $(".checkitem").prop("checked", false);

  - All radio buttons in the table of items should be cleared.
- Click the "Confirm hold" button. You should get an alert:
  "Expecting a specific item selection."

- Log in to the OPAC and click the "Search history" tab from the user
  summary page.
- Check one or more checkboxes next to search history items and click
  the "Remove selected searches."
  - You should get an alert: "Are you sure you want to delete selected
    search history entries?"

- Log in to the OPAC, create a new list if necessary, and add some
  titles to the list.
- Test that confirmation messages show correctly:
  - Deleting a single title by clicking the "Remove
    from this list" link.
  - Deleting multiple titles by checking boxes and
    clicking "Remove from list."
  - Deleting a list.

- In Administration -> System preferences, enable TagsEnabled if
  necessary.
- Log in to the OPAC and tag one or more items.
- From the Tag cloud page, check one or more boxes for your tags, and
  click the "Delete selected tags" button at the bottom of the page.
- The confirmation message should display correctly.

- To test the change to opac-account.tt you have to install a payment
  plugin, e.g.
  https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal,
  and attempt to submit a payment which is below the minimum payment
  threshold set in the plugin's configuration.

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>
6 months agoBug 34032: (QA follow-up) Tidy code
Kyle M Hall [Fri, 12 Apr 2024 11:11:00 +0000 (07:11 -0400)]
Bug 34032: (QA follow-up) Tidy code

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34032: Use reserves.patron_expiration_date if set
Emmi Takkinen [Mon, 6 Nov 2023 12:31:03 +0000 (14:31 +0200)]
Bug 34032: Use reserves.patron_expiration_date if set

If reserves.patron_expiration_date is set use it as holds
expiration date when waiting status is reverted.

To test:
1. Apply this patch.
2. Add hold for patron A and set expiration date manually.
3. Check in item on hold for patron A and confirm hold was
set as waiting.
4. Revert holds waiting status.
=> Hold should still have expiration date you set manually
in step 2.
5. Check that you have DefaultHoldExpirationdate and other
DefaultHold sysprefs set.
6. Add hold for patron B, but this time do not set expiration
date.
7. Check in item on hold for patron B, revert waiting status.
=> Hold should now have expiration date set based on
DefaultHold sysprefs.

Also prove t/db_dependent/Hold.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34032: Set new expirationdate if waiting status is reverted
Emmi Takkinen [Wed, 21 Jun 2023 11:36:08 +0000 (14:36 +0300)]
Bug 34032: Set new expirationdate if waiting status is reverted

When one reverts holds waiting status holds expiration
date is not set even if DefaultHoldExpirationdate
syspref is enabled. This patch adds new param
hold_reverted to be used when RevertWaitingStatus is
used to determine if expiration date should be set again.

To test:
1) Make sure you have DefaultHoldExpirationdate syspref enabled.
2) Find hold with status "Waiting".
3) Revert waiting status.
=> Note that hold has no expiration date set.
4) Apply this patch.
5) Repeat steps 2 and 3.
=> Expiration date should now be set based on reserve
date.

Also prove t/db_dependent/Hold.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35996: Make it clear that --category-code can not be used alone
Matt Blenkinsop [Mon, 5 Feb 2024 16:50:32 +0000 (16:50 +0000)]
Bug 35996: Make it clear that --category-code can not be used alone

This patch adds a clarification to writeoff_debts.pl to make it clear that --category-code can't be used as the only filter when running the script. If this is the case, the script just displays the help menu as it is expecting one of the other filters

Test plan:
1) Run perl misc/cronjobs/writeoff_debts.pl --category-code TEST --confirm
2) Observe that the help menu is displayed instead of running the script
3) Check the help menu for the text added in this patch

WNC amended patch - added same warning in the option section

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36565: EDI files API docs fixes (bug 30070 follow-up)
Tomas Cohen Arazi [Wed, 10 Apr 2024 12:07:11 +0000 (14:07 +0200)]
Bug 36565: EDI files API docs fixes (bug 30070 follow-up)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 36565: Preservation module API docs fixes (bug 30708 follow-up)
Tomas Cohen Arazi [Wed, 10 Apr 2024 12:04:57 +0000 (14:04 +0200)]
Bug 36565: Preservation module API docs fixes (bug 30708 follow-up)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 36565: Biblio merge API docs fixes (bug 33036 follow-up)
Tomas Cohen Arazi [Wed, 10 Apr 2024 12:04:12 +0000 (14:04 +0200)]
Bug 36565: Biblio merge API docs fixes (bug 33036 follow-up)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 36565: ILL requests API docs fixes (bug 22440 follow-up)
Tomas Cohen Arazi [Wed, 10 Apr 2024 11:44:28 +0000 (13:44 +0200)]
Bug 36565: ILL requests API docs fixes (bug 22440 follow-up)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 36565: Bookings API docs fixes (bug 29002 follow-up)
Tomas Cohen Arazi [Wed, 10 Apr 2024 08:14:18 +0000 (10:14 +0200)]
Bug 36565: Bookings API docs fixes (bug 29002 follow-up)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 36565: Unit tests
Tomas Cohen Arazi [Wed, 10 Apr 2024 11:39:55 +0000 (13:39 +0200)]
Bug 36565: Unit tests

This patch introduces tests on the OpenAPI spec so that all tags used in
path definitions have their corresponding entry at the top level 'tags'
section.

This it important for correctly rendering the API documentation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
6 months agoBug 35856: (follow-up) Expand display of radio button choices
Owen Leonard [Thu, 28 Mar 2024 12:00:14 +0000 (12:00 +0000)]
Bug 35856: (follow-up) Expand display of radio button choices

This patch swaps out the icons with tooltips with visible hints,
expanding the radio button options to hopefully make it more readable.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35856: added options to runtime parameter modal
Brendan Lawlor [Wed, 24 Jan 2024 17:15:09 +0000 (17:15 +0000)]
Bug 35856: added options to runtime parameter modal

This patch adds radio checkboxes to the reports runtime parameter modal for adding param options :all and :in.

The :in param option functionality depends on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35746

Test plan:
1. Apply patch
2. Create a report from SQL
3. Click Insert runtime parameter and choose any option other than date, list or text field
4. Note the form now includes a radio checkbox for parameter options
5. Choose 'Include option for all' and click Insert parameter
6. Note the parameter is inserted with :all option like <<label|authval:all>>
7. Choose 'Allow multiple selections' and click Insert parameter
8. Note the parameter is inserted with :in option like <<label|authval:in>>
9. Make sure that parameter options are not included on the form for date, list and text field

Thanks!

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30324: (follow-up) Remove stray comments
Nick Clemens [Fri, 26 Apr 2024 16:04:35 +0000 (16:04 +0000)]
Bug 30324: (follow-up) Remove stray comments

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30324: Don't use default rule if we have a parent rule
Nick Clemens [Thu, 11 Jan 2024 16:21:48 +0000 (16:21 +0000)]
Bug 30324: Don't use default rule if we have a parent rule

Currenty, if we find only a defult rule for a checkout we are ignoring the parent rule.
We should not use the default if there is a parent rule

To test:
 1: have an itype BK
 2: create an itype BK2, set BK as the parent to BK2
 3: create a circ rule for All Patrons, item type BK (displays as "Books (All)" in the circ rules interface), setting total checkouts to 1
 4: do not create any rule specifically for the BK2 itype
 5: have some BK items and some BK2 items
 6: check a BK item out to a patron
 7: check a BK2 item out to the same patron, observe you are not blocked from doing so
 8: try to check out a second BK2 item to the same patron, get message "Too many checked out. 1 checked out, only 1 are allowed."
 9: try to check out a second BK item to the same patrons, get message "Too many checked out. 2 checked out, only 1 are allowed."
10: return both items
11: check a BK2 item out to your patron
12: try to check a BK item out to your patron, get message "Too many checked out. 1 checked out, only 1 are allowed."
13: Apply patch
14: Repeat 7, you are now blocked
15: Other results should be the same

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Michael Adamyk <madamyk@ckls.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30324: Unit tests
Nick Clemens [Thu, 11 Jan 2024 14:50:35 +0000 (14:50 +0000)]
Bug 30324: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31791: (follow-up) Fix Permissions.t
Tomas Cohen Arazi [Fri, 26 Apr 2024 20:16:34 +0000 (17:16 -0300)]
Bug 31791: (follow-up) Fix Permissions.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 months agoBug 36495: Fix erm_counter_files.t
Tomas Cohen Arazi [Fri, 26 Apr 2024 20:10:21 +0000 (17:10 -0300)]
Bug 36495: Fix erm_counter_files.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 months agoBug 36206: (follow-up) Fix Permissions.t
Tomas Cohen Arazi [Fri, 26 Apr 2024 20:06:44 +0000 (17:06 -0300)]
Bug 36206: (follow-up) Fix Permissions.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 months agoBug 35249: (follow-up) Use Asset.css to fix QA script failure
Katrin Fischer [Fri, 26 Apr 2024 17:29:30 +0000 (17:29 +0000)]
Bug 35249: (follow-up) Use Asset.css to fix QA script failure

 FAIL koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt
   FAIL   forbidden patterns
forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 12)
forbidden pattern: Do *not* include full path to css files, use the Asset TT plugin (bug 20538) (line 12)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35249: Remove sort indicator on th
Jonathan Druart [Thu, 21 Mar 2024 11:36:35 +0000 (12:36 +0100)]
Bug 35249: Remove sort indicator on th

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35249: Remove tableDnD from the about page
Jonathan Druart [Thu, 21 Mar 2024 11:26:51 +0000 (12:26 +0100)]
Bug 35249: Remove tableDnD from the about page

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35249: Adjust table id and style
Jonathan Druart [Thu, 21 Mar 2024 11:25:36 +0000 (12:25 +0100)]
Bug 35249: Adjust table id and style

We could eventually have a table for authorities, so better to have a
specific table id.

Also I think it's better to have the table smaller than taking the whole
width

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35249: Use DataTables RowReorder extension instead of tableDND jQuery plugin
Owen Leonard [Mon, 30 Oct 2023 17:53:41 +0000 (17:53 +0000)]
Bug 35249: Use DataTables RowReorder extension instead of tableDND jQuery plugin

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 22613: Add GET endpoint /patrons/{patron_id}/checkouts
Alex Arnaud [Wed, 10 Apr 2024 12:03:14 +0000 (14:03 +0200)]
Bug 22613: Add GET endpoint /patrons/{patron_id}/checkouts

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

Test plan:

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33478: DBIC schema update
Katrin Fischer [Fri, 26 Apr 2024 17:08:32 +0000 (17:08 +0000)]
Bug 33478: DBIC schema update

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

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

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

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

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

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

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

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

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

To test:

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

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

To test:

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

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

To test:

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

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

To test:

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

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

To test:

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

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

To test:

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

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

To test:

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

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

To test:

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

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

To test:

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

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

To test:

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

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

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

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

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

To test:

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

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

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

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

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

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

The method is covered by tests:

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

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

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

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

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

The feature is documented on the spec.

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

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

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

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

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

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

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

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

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

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

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

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

Rebased for changes to guided_reports_start.tt

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

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

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35826: Add unit tests.
Andreas Jonsson [Sun, 10 Mar 2024 18:50:13 +0000 (19:50 +0100)]
Bug 35826: Add unit tests.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35826: Keep items on retry.
Andreas Jonsson [Sun, 10 Mar 2024 18:49:40 +0000 (19:49 +0100)]
Bug 35826: Keep items on retry.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35826: Fix errors in transport cost optimization
Andreas Jonsson [Thu, 8 Feb 2024 20:13:42 +0000 (20:13 +0000)]
Bug 35826: Fix errors in transport cost optimization

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35826: optimize on transport cost when building holds queue
Andreas Jonsson [Sun, 21 Jan 2024 19:47:55 +0000 (19:47 +0000)]
Bug 35826: optimize on transport cost when building holds queue

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36505: (follow-up) Consistent error codes in POST
Tomas Cohen Arazi [Tue, 9 Apr 2024 06:56:00 +0000 (08:56 +0200)]
Bug 36505: (follow-up) Consistent error codes in POST

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

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

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

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

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

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

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

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

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

No behavior changes are expected.

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

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

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

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

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

This patch introduces two helpers to be used in controllers.

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

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

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

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36482: Allow embedding desks and cash_registers on libraries endpoints
Tomas Cohen Arazi [Mon, 1 Apr 2024 21:08:13 +0000 (18:08 -0300)]
Bug 36482: Allow embedding desks and cash_registers on libraries endpoints

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36481: Add GET /libraries/:library_id/cash_registers
Tomas Cohen Arazi [Mon, 1 Apr 2024 20:52:46 +0000 (20:52 +0000)]
Bug 36481: Add GET /libraries/:library_id/cash_registers

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36480: Add GET /libraries/:library_id/desks
Tomas Cohen Arazi [Mon, 1 Apr 2024 20:24:35 +0000 (20:24 +0000)]
Bug 36480: Add GET /libraries/:library_id/desks

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

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36480: Add Koha::Library->desks
Tomas Cohen Arazi [Mon, 1 Apr 2024 20:22:22 +0000 (20:22 +0000)]
Bug 36480: Add Koha::Library->desks

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35353: Add REST API endpoint to retrieve old holds
Jonathan Druart [Mon, 25 Mar 2024 15:42:18 +0000 (16:42 +0100)]
Bug 35353: Add REST API endpoint to retrieve old holds

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

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

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

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

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

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

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

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

However the page load will be slightly slower ofc.

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

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

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

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

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

To test:

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>