]> git.koha-community.org Git - koha.git/log
koha.git
8 weeks agoBug 34183: Remove MARC format hint from OPACResultsLibrary system preference description
Katrina Bassett [Thu, 25 Jul 2024 23:46:37 +0000 (23:46 +0000)]
Bug 34183: Remove MARC format hint from OPACResultsLibrary system preference description

Test Plan
1. Navigate Koha Administration
2. Search for OPACResultsLibrary
3. Note that sentence "Please note that this feature is currently available for MARC21 and UNIMARC." is removed

Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37515: Add common class to all places where an item type image is shown
Owen Leonard [Mon, 29 Jul 2024 18:28:00 +0000 (18:28 +0000)]
Bug 37515: Add common class to all places where an item type image is shown

This patch adds an "itemtype-image" class to templates in all places
where we show itemtype images. This patch affects both the OPAC and the
staff client.

To test you should have icons associated with multiple item types.

- Apply the patch and go to Administration -> System preferences
- Search for "itemtype"
  - noItemTypeImages should be set to "Show"
  - OpacNoItemTypeImages should be set to "Show"
  - BiblioItemtypeInfo should be set to "Show"
- Search for "usercss"
  - Add an obvious style rule for item type images to IntranetUserCSS
    and OPACUserCSS, e.g.

    .itemtype-image { border: 3px solid orange; }

- In the staff interface, check the following pages to confirm that your
  custom style is visible:

  - Administration -> Item types
    -> Edit
  - Administration -> Authorized values -> CCODE -> Edit a CCODE
  - Advanced search
    - Search results
    - Bibliographic details
  - Place hold
  - Lists -> List contents view (must set the item-level_itypes
    preference to "bibliographic record")

- In the OPAC:
  - Advanced search
    - Search results
      - Bibliographic details
  - Place hold
  - Log in as a user with checkouts ->
    - View the checkouts tab on the patron summary page
  - Lists -> List contents view (must set the item-level_itypes
    preference to "bibliographic record")

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37490: Add a test to detect when yarn.lock is not updated
Mason James [Fri, 26 Jul 2024 10:54:15 +0000 (22:54 +1200)]
Bug 37490: Add a test to detect when yarn.lock is not updated

to test...

1/ set koha repo to state where yarn.lock is not updated

    $ git reset --hard 67db70d4

2/ run test, observe FAIL

    $ prove ./xt/verify-yarnlock.t
    ./xt/verify-yarnlock.t .. error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
    ./xt/verify-yarnlock.t .. 1/1
    #   Failed test 'verify yarn.lock file is updated correctly'
    ...
    Result: FAIL

3/ set koha repo to state where yarn.lock is updated

    $ yarn install

4/ note yarn.lock is now updated

    $ git status
    ...
    modified:   yarn.lock

5/ run test, observe SUCCESS

    $ prove -v ./xt/verify-yarnlock.t
    ./xt/verify-yarnlock.t ..
    ok 1 - verify yarn.lock file is updated correctly
    All tests successful.
    Files=1, Tests=1,  1 wallclock secs ( 0.02 usr  0.01 sys +  1.16 cusr  0.27 csys =  1.46 CPU)
    Result: PASS

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 33731: Allow for default sounds on SCO page
Lucas Gass [Wed, 14 Aug 2024 16:35:42 +0000 (16:35 +0000)]
Bug 33731: Allow for default sounds on SCO page

To test:
1. APPLY PATCH
2. Enable AudioAlerts system preferencce
3. Set up some audio alerts to trigger on the SCO page. ( I used #sco_main for east testing)
4. Make sure the sounds work properly.

Note: It is not my favorite thing to duplicate these assets for intranet and OPAC, is there a better way?

modified:   koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/IM_notification.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/beep.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/call.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/critical.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/device_connect.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/device_disconnect.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/ending.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/fail.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/incoming_call.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/loading.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/loading_2.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/maximize.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/minimize.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/new_mail_notification.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/opening.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/panic.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/popup.ogg
new file:   koha-tmpl/opac-tmpl/bootstrap/sound/warning.ogg

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37691: Improve visibility of password expiration reset link
Owen Leonard [Wed, 21 Aug 2024 10:31:09 +0000 (10:31 +0000)]
Bug 37691: Improve visibility of password expiration reset link

This patch moves the password expiration reset link into the error box
so that it is more prominent.

To test, apply the patch and rebuild the staff interface
CSS:
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface

Try to log in to the staff interface as a user whose password has
expired. You will probably have to use SQL to update a patron record
directly, e.g.

UPDATE borrowers SET password_expiration_date = '2022-01-01' WHERE borrowernumber = X;

When you submit your login details the page should reload with an error
message: "Error: Your password has expired." Within the red dialog you
should see the "You must reset your password" link.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 33925: Improve translation of title tags: Serials
Owen Leonard [Tue, 6 Jun 2023 15:29:12 +0000 (15:29 +0000)]
Bug 33925: Improve translation of title tags: Serials

This patch updates serials templates so that title tags can be more
easily translated. Some templates have been updated for consistency as
well: Harmonizing page title, breaddrumb navigation, and page headers;
Adding "page-section" <div> where it was lacking.

To test, apply the patch and confirm that the following pages have the
correct title tags:

- Serials home
  - Serials search results
    - Subscription details
      - Subscription edit
        - Search for vendor
        - Search for bibliographic record
      - Subscription renew
      - Serial collection
      - Create and modify routing list
        - Preview routing list
          - View routing slip
      - Claims
      - Check expiration
      - With a subscription which has manual history enabled, click the
        "Edit history" link under the "Planning" tab.
     - Select multiple serial search results and batch edit
  - New subscription
  - Manage frequencies: Create and edit
  - Manage numbering patterns: Create and edit

Signed-off-by: Loïc Vassaux-Artur <loic.vassaux-artur@outlook.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 36945: Fix several missed instance of breadcrumb WRAPPER use
Owen Leonard [Thu, 23 May 2024 12:32:01 +0000 (12:32 +0000)]
Bug 36945: Fix several missed instance of breadcrumb WRAPPER use

This patch corrects some templates which never got the breadcrumb
WRAPPER update. Some breadcrumbs and page titles have been updated to be
more consistent with page headings.

To test, apply the patch and enable the "CatalogConcerns" system
preference if necessary. Check the following pages to confirm that the
breadcrumbs menu looks correct and that breadcrumbs are consistent with
page titles and page headings.

- Circulation -> Upload offline circulation file (.koc)
  - Upload file -> Add to offline circulation queue
  - View pending offline circulation actions
- Cataloging -> Cataloging concerns
- Reports -> Cash register stats

Sponsored-By: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37081: Reword button on addorderiso2709.tt
Lucas Gass [Mon, 17 Jun 2024 13:54:45 +0000 (13:54 +0000)]
Bug 37081: Reword button on addorderiso2709.tt

To test:
1. Go to Acquisition and create or find a vendor.
2. Create a new basket.
3. Add to basket -> from a new file
4. Upload a .mrc file and stage fro import.
5. Add the files to your basket.
6. For each item in the basket notice the button set which includes MARC, Card, and Add order.
7. APPLY patch and reload the page.
8. Add order should now be New order.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37493: [DONT PUSH] Test only - Force test fail
Pedro Amorim [Fri, 26 Jul 2024 13:20:07 +0000 (13:20 +0000)]
Bug 37493: [DONT PUSH] Test only - Force test fail

Apply this patch only, run:
1) cypress run --spec "t/cypress/integration/flatpickr_spec.ts"
2) run `git status`.
  Notice t/cypress/screenshots/ and t/cypress/videos/ show
3) Apply 2nd patch. Repeat 2). Notice its empty

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 34185: Capitalized OPAC in OpacItemLocation syspref
Laura_Escamilla [Fri, 30 Aug 2024 16:54:19 +0000 (16:54 +0000)]
Bug 34185: Capitalized OPAC in OpacItemLocation syspref

To test:
1. In K-T-D git grep for “OpacItemLocation”
    1. Notice that related XSLT / XSL scripts are not coming up. Only .pm, .pl and .sql scripts.
2. Git grep for “OPACItemLocation”. Note that XSLT/XSL files show up but not the .pm, .pl and .sql scripts.
3. Apply the patch. Updatedatabase. Restart_all
4. Git grep for “OPACItemLocation”
    1. Notice that both the XSLT/XSL files in addition to the .sql, .pm and .pl scripts are now showing up.
5. Sign off and have a spectacular day :D

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 37004: Add branchcode as HTML class to each grouped result in search results
Lucas Gass [Fri, 31 May 2024 21:12:04 +0000 (21:12 +0000)]
Bug 37004: Add branchcode as HTML class to each grouped result in search results

To test:
1. Apply patch and restart_all
2. Do a catalog search that returns results.
3. Using the browsers dev tools inscpet the page and look for the 'available_items_loop_items' class in the 'Location column'.
4. Each child <li> element should have a class that is the branchcode.
5. Make sure that branchcode is correct.
6. Change the StaffSearchResultsDisplayBranch system preference. Make sure that each branchcode is still correct.
7. Change the system preference 'noItemTypeImages' to 'Dont show'.
8. Make sure the branchcode is still correct.
9. Checkout an item that would show up in these search results.
10. Do steps 3-8 again excpet this time look for the HTML element 'onloan_items_loop_items'.
11. Put some items in transfer that would show up in these search resultss.
12. Do steps 3-8 again excpet this time look for the HTML element 'other_items_loop_items'.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 35239: (follow-up) Correct more missing label inconsistencies
Owen Leonard [Fri, 26 Jul 2024 18:17:11 +0000 (18:17 +0000)]
Bug 35239: (follow-up) Correct more missing label inconsistencies

This patch corrects a couple more labels and modifies the process of
cloning a patron attribute field so that each new cloned row has
matching label and input.

To test, apply the patch and, if necessary, create some patron attribute
types:

- Go to Administration -> Patron attribute types
- Create at least two new patron attribute types.
- Go to Tools -> Batch patron modification.
- Submit a batch of patrons for batch modification
- In the list of fields to modify, test that clicking each label gives
  focus to the corresponding field (except date fields, we need to fix
  that globally).
- Click "New" next to the patron attribute field.
  - A copy of the field should be created. Test that the new field also
    has matching label and <select>

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 weeks agoBug 35239: Missing form field ids in batch patron modification template
Catalyst Bug Squasher [Thu, 25 Jul 2024 23:01:04 +0000 (23:01 +0000)]
Bug 35239: Missing form field ids in batch patron modification template

Test Plan
1. Tools > Batch patron modification
2. List valid card number in text box
3. [Continue]
4. Edit patrons form, click on input box label
5. Matching input box gets focus

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36085: (QA follow-up) Tidy members/memberentry.pl
Paul Derscheid [Tue, 27 Aug 2024 14:04:59 +0000 (16:04 +0200)]
Bug 36085: (QA follow-up) Tidy members/memberentry.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36085: Only superlibrarians can protect patrons
PerplexedTheta [Thu, 18 Jul 2024 11:01:44 +0000 (12:01 +0100)]
Bug 36085: Only superlibrarians can protect patrons

A drive-by patch which hopes to resolve bug 36085 by only allowing superlibrarians
to protect or unprotect patrons.

Test plan:
a)  prepare two koha staff users:
        1)  a superlibrarian
        2)  a user that only has permission to edit patrons
b)  when logged in as the user prepared in step a2 (non-superlibrarian),
    then go to edit any patron
        *)  note how you can set the protected yes/no radios
c)  apply the patch
d)  repeat steps a-b as this same user
        *)  note how you can now no longer see the protected yes/no radios
e)  log in as the user prepared in step a1 (superlibrarian), then repeat
    steps a-b
f)  note how the protected yes/no radios are back

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: (QA follow-up) Tidy changes to t/db_dependent/Koha/Item.t
Paul Derscheid [Thu, 22 Aug 2024 12:23:52 +0000 (12:23 +0000)]
Bug 34440: (QA follow-up) Tidy changes to t/db_dependent/Koha/Item.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Unit test for change to Koha::Item
Martin Renvoize [Thu, 22 Aug 2024 10:02:58 +0000 (11:02 +0100)]
Bug 34440: Unit test for change to Koha::Item

This adds a unit test for the new preparation_period handling introduced
into the find_booking method of Koha::Item.

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Enforce lead/trail restrictions
Martin Renvoize [Thu, 25 Jul 2024 15:15:18 +0000 (16:15 +0100)]
Bug 34440: Enforce lead/trail restrictions

This patch adds rule enforcement into the user interface. When
attempting to make a booking now, instead of just visually displaying
the lead and trail period and highlighting when an overlap appears, we
now block the ability to select a date when such an overlap case is
found.

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Highlight overlaping lead and trail periods
Martin Renvoize [Mon, 15 Jul 2024 15:23:02 +0000 (16:23 +0100)]
Bug 34440: Highlight overlaping lead and trail periods

This adds a further distinction between a lead/trail period and whether
it would conflict with an existing booking or not.

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: (follow-up) Enable flatpickr only once rules are populated
Martin Renvoize [Mon, 15 Jul 2024 13:42:26 +0000 (14:42 +0100)]
Bug 34440: (follow-up) Enable flatpickr only once rules are populated

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Update for change to /circulation_rules
Martin Renvoize [Fri, 21 Jun 2024 11:25:24 +0000 (12:25 +0100)]
Bug 34440: Update for change to /circulation_rules

We updated the preceeding bug that introducing the /circulation_rules
endpoint such that it always returns an array.

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Use circulation_rules for buffer timing
Martin Renvoize [Fri, 21 Jun 2024 11:13:18 +0000 (12:13 +0100)]
Bug 34440: Use circulation_rules for buffer timing

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Simplify modal code using isSameOr* functions
Martin Renvoize [Tue, 26 Mar 2024 13:38:34 +0000 (13:38 +0000)]
Bug 34440: Simplify modal code using isSameOr* functions

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Add isSameOrBefore dayjs plugin
Martin Renvoize [Tue, 26 Mar 2024 13:38:04 +0000 (13:38 +0000)]
Bug 34440: Add isSameOrBefore dayjs plugin

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Add handling for lead/trail display
Martin Renvoize [Mon, 25 Mar 2024 22:28:20 +0000 (22:28 +0000)]
Bug 34440: Add handling for lead/trail display

This patch adds code to insert classes into the flatpickr for lead and
trail time on bookings and includes some scss additions to highlight
said periods in display.

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Add itemtype selection to bookings modal
Martin Renvoize [Wed, 27 Mar 2024 22:04:07 +0000 (22:04 +0000)]
Bug 34440: Add itemtype selection to bookings modal

Whilst we still don't need to know the specific item we will need to
know the itemtype to be able to fetch the correct circulation rules for
adjusting the datepicker with lead and trail times.

This patch adds such a picker option. You should be able to select the
item or itemtype in either order.. selecting itemtype first will limit
the items list to options available (and 'Any item').. upon selecting a
specific item the itemtype selector should become disabled and reflect
the itemtype of the item selected.

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Take preparation period into account at checkout
Martin Renvoize [Wed, 27 Mar 2024 17:29:00 +0000 (17:29 +0000)]
Bug 34440: Take preparation period into account at checkout

This patch ensures we catch checkouts that would interfer with the
preparation period set for an existing booking by adding said period to
the bookings search.

We also reduce the proposed due date for the checkout to be confirmed by
the preparation period for the item.

Test plan
1) Set a booking preparation period for an itemtype
2) Add a booking for an item with that itemtype to fall beyond the due
   date that the item would be assigned if you were to check it out now
   to your test user, but within the number of days you've set for your
   preparation period.
3) Attempt to check the item out to your test user.
4) Note that we catch the booking and warn and that the latest return
   date suggested take the preparation period into account.

Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/>
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34440: Add lead and trail time to circulation rules
Martin Renvoize [Mon, 26 Feb 2024 13:50:11 +0000 (13:50 +0000)]
Bug 34440: Add lead and trail time to circulation rules

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37177: "item" should be "record" in list page
Owen Leonard [Fri, 9 Aug 2024 11:57:53 +0000 (11:57 +0000)]
Bug 37177: "item" should be "record" in list page

This patch rewords areas of the lists and cart templates so that the
term "record" is preferred over "item" when referring to a bibliographic
record.

To test, apply the patch and go to Lists in the staff interface.

- If necessary, create a new list.
- From the list contents view, click "Add records" in the toolbar.
  - Submit some valid barcodes and biblionumbers
  - After adding biblionumbers you should see the message "The record
    ( [number] ) has been added to the list"
  - After adding barcodes you should see the message "The record for
    this item ( [barcode] ) has been added to the list"
- Click "Add records" again
  - Submit some of the same barcodes and biblionumbers
    - You should see these messages:
      - "The record for this item ( [barcode] ) has not
         been added to the list. Please verify it is not already in the
         list."
      - "The record ( [number] ) has not been added to the
        list. Please verify it is not already in the list.
- Check the checkbox for one or more titles on your list and click
  "Remove selected"
  - You should see the message, "The record has been removed from the
    list."
- Perform a catalog search and from the results screen, select one or
  more results and add them to the cart.
  - Open the Cart and confirm that the controls at the top of the table
    of titles reads "Selected records: ..."

Sponsored-by: Athens County Public Libraries
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>
2 months agoBug 37758: Add descriptive labels for accessibility
Laura_Escamilla [Wed, 28 Aug 2024 19:45:48 +0000 (19:45 +0000)]
Bug 37758: Add descriptive labels for accessibility

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37740: Fix saved SQL reports tab switching
Owen Leonard [Wed, 28 Aug 2024 18:28:57 +0000 (18:28 +0000)]
Bug 37740: Fix saved SQL reports tab switching

The tabs on the saved SQL report page are not really full tabs, they're
just styled that way. There is only one tab "panel," and clicking each
tab triggers a DataTable filter so that the tab only shows the relevant
data.

The problem with this setup is that when Bootstrap tries to "switch"
tabs, it wants to hide the initial tab and then show the new one. There
is no "new" one here.

The attached patch solves this problem by adding a CSS rule to
guided_reports_start.tt with higher specificity than our global CSS
making the relevant tab pane visible at all times.

To test, apply the patch and go to Reports -> Use saved.

- If necessary, create multiple SQL reports and assign them to different
  report groups (Accounts, Acquisitions, Catalog, etc.).
- Test that tab switching works:
  - The tab should be style as "active" after you click it.
  - The table of reports should be filtered to include only reports in
    the relevant report group.

Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37741: Do not send cookie back from error pages
David Cook [Tue, 27 Aug 2024 01:48:58 +0000 (01:48 +0000)]
Bug 37741: Do not send cookie back from error pages

This change stops the cookie from being sent back from error pages,
so that backcalls that cause errors don't overwrite the existing cookie
used by the foreground request page.

Test plan:
0. Apply the patch and koha-plack --reload kohadev
1. Set syspref IntranetFavicon to http://localhost:8081/cgi-bin/koha/bad.jpg
2. Open browser developer tools
3. Go to http://localhost:8081/cgi-bin/koha/mainpage.pl
4. Open the Network tab, disable the cache, and shift refresh
5. Notice that bad.jpg fails to load with a 404
6. Try to login to Koha
7. Confirm login works

*. Extra points if you note that the cookie returned by the first
mainpage.pl request is used for the bad.jpg lookup and the second
mainpage.pl request.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37048: Use template wrapper for self checkout page
Owen Leonard [Thu, 6 Jun 2024 17:14:35 +0000 (17:14 +0000)]
Bug 37048: Use template wrapper for self checkout page

This patch updates the OPAC's self checkout page template to use
WRAPPERs for the Bootstrap tabs markup.

To test, apply the patch and enable the "WebBasedSelfCheck" system
preference if necessary.

- Navigate to the self checkout page
  (http://127.0.0.1:8080/cgi-bin/koha/sco/sco-main.pl)
  - Start checking out to a patron
    - You should see three tabs, "Checkouts", "Holds", and "Charges."
      The tabs should look correct and work correctly.

Sponsored-By: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36919: Remove yet another warning from Koha/Object.t
Jonathan Druart [Wed, 22 May 2024 09:23:07 +0000 (11:23 +0200)]
Bug 36919: Remove yet another warning from Koha/Object.t

DBIx::Class::Storage::DBI::insert(): Missing value for primary key column 'currency' on Currency - perhaps you forgot to set its 'is_auto_increment' attribute during add_columns()? Treating 'currency' implicitly as an autoinc, and attempting value retrieval at /kohadevbox/koha/Koha/Object.pm line 172
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36919: Remove another warning from Koha/Object.t
Jonathan Druart [Wed, 22 May 2024 09:22:44 +0000 (11:22 +0200)]
Bug 36919: Remove another warning from Koha/Object.t

C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm
line 1890.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36919: Remove a warning from Koha/Object.t
Jonathan Druart [Wed, 22 May 2024 09:22:06 +0000 (11:22 +0200)]
Bug 36919: Remove a warning from Koha/Object.t

Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/Koha/Patron.pm line 446.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37759: Duplicated "Set library" menu item caused by bad merge
Owen Leonard [Wed, 28 Aug 2024 14:21:52 +0000 (14:21 +0000)]
Bug 37759: Duplicated "Set library" menu item caused by bad merge

This patch removes an unnecessary block of markup accidentally left
behind during a rebase of Bug 35402, removing a duplicate "Set
library..." menu item from the header menu in the staff interface.

After the batch, users who have permission to change their logged-in
library should see only a single "Set library..." menu item in the user
menu found on the right-hand side of the header menu.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34486: (QA follow-up) Tidy changes to opac/opac-detail.pl
Paul Derscheid [Thu, 22 Aug 2024 08:40:31 +0000 (08:40 +0000)]
Bug 34486: (QA follow-up) Tidy changes to opac/opac-detail.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34486: Show OPAC Column Due Date only if items on loan exist
Owen Leonard [Mon, 5 Aug 2024 13:43:19 +0000 (13:43 +0000)]
Bug 34486: Show OPAC Column Due Date only if items on loan exist

This patch updates the OPAC bibliographic detail page so that in the
holdings table, the following columns are hidden if they contain no
data: Call number, date due, materials, checkouts, barcode,
and item-level holds.

To test, apply the patch and restart services.

- In the staff interface, go to Administration -> System preferences.
- Search for OPACShowHoldQueueDetails and set it to "Show holds and
  their priority level."
- Search for OPACShowHoldQueueDetails and set it to "Show holds and
  their priority level."
- In the OPAC, locate a bibliographic record with multiple items.
- View the detail page and confirm that the holdings table doesn't show
  these columns if there is no data in any of the rows: Call number,
  date due, materials, barcode, and item-level holds
- For each of the affected fields, update the record the record so that
  there is data to be shown for at least one of the items:
  - Edit an item to add: call number, materials specified, barcode
  - Check out an item to someone in order to show the date due column
  - Place an item-level hold on one of the items to show the item holds
    column.
- Go to Administration -> Table settings -> OPAC -> biblio-detail and
  configure some columns to be hidden by default. Confirm that your
  changes are correctly shown in the OPAC holdings table.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34088: Add unit tests
Martin Renvoize [Wed, 21 Aug 2024 10:28:50 +0000 (11:28 +0100)]
Bug 34088: Add unit tests

This patch adds unit tests to cover the moved and newly introduced
methods in the Koha namespace.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Fixed QA complaint about file permissions.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 34088: Short circuit database upgrade check
David Cook [Thu, 22 Jun 2023 00:56:12 +0000 (00:56 +0000)]
Bug 34088: Short circuit database upgrade check

If the database version and the code version are the same, we should
short circuit and exit immediately.

This patch adds the Koha::Installer module which can very quickly
check if a db or atomic update is needed.

It also moves the logic for C4::Installer::TransformToNum to
Koha::Installer::TransformToNum for performance reasons.

It also moves the logic for C4::Installer::get_atomic_updates to
Koha::Installer::get_atomic_updates for performance reasons.

Test plan:
1. Apply patch
2. Run `time koha-upgrade-schema kohadev`
3. Note that it completes in less than .1 seconds

4. To test db updates, change the database Version to a number
slightly behind the code version, and run
`time koha-upgrade-schema kohadev`
5. Note that the correct version update is processed

6. To test atomic updates:
cp installer/data/mysql/atomicupdate/skeleton.pl \
       installer/data/mysql/atomicupdate/bug_34088.pl
7. Run `time koha-upgrade-schema kohadev`
8. Note that it takes over 1 second to run and the atomic update
is attempted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37686: Fix render_resource_not_found() and render_resource_deleted() misses
Tomas Cohen Arazi [Tue, 20 Aug 2024 13:59:23 +0000 (10:59 -0300)]
Bug 37686: Fix render_resource_not_found() and render_resource_deleted() misses

This patch refactors some small pieces of code to use the helpers as
prescribed on our coding guidelines [1] instead of manually crafting
responses.

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

[1] https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#REST4:_Controller_code_.5BDRAFT.5D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37755: Fix batch del record (adding the missing _panel suffix)
Jonathan Druart [Wed, 28 Aug 2024 13:01:04 +0000 (15:01 +0200)]
Bug 37755: Fix batch del record (adding the missing _panel suffix)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37755: Fixed JavaScript for modification tabs
Jake Deery [Wed, 28 Aug 2024 11:02:50 +0000 (12:02 +0100)]
Bug 37755: Fixed JavaScript for modification tabs

This patch addresses a new bug which prevents correct submission on mod
borrowers and mod records (mod + delete). The bug appears to have been
introduced since the recent Bootstrap5 switch, and shouldn't be surfacing
anywhere else in the system

Note that the test plan focuses on tools/modborrowers.pl. The error also
appears to exist on tools/batch_record_modification.pl and
tools/batch_delete_records.pl, but is a lot harder to reproduce.

Please see https://chat.koha-community.org/koha-community/pl/fmnzzgy5cpghtpdc9a9ow75scr
and follow-up comments for details on reproducing this.

To test:
a)  go to tools/modborrowers.pl and try to enter valid cardnumbers or
    borrowernumbers
    1)  notice how you cannot proceed
b)  APPLY PATCH
c)  repeat steps a
    1)  notice how you can now proceed
d)  SIGN OFF

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37753: Fixed navigation links when editing authority type subfields
Eric Garcia [Wed, 28 Aug 2024 16:00:46 +0000 (16:00 +0000)]
Bug 37753: Fixed navigation links when editing authority type subfields

To test:
1. Go to Koha administration > Catalog > Authority types.
2. For any authority type, select Actions > MARC structure.
3. For any tag that has multiple subfields (for example 020 ISBN), select Actions > Subfields.
4. Select Edit for any subfield.
5. Notice that the links are now in the standard tabbed style.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37752: Add missing class to navigation tab links
Lucas Gass [Tue, 27 Aug 2024 20:11:23 +0000 (20:11 +0000)]
Bug 37752: Add missing class to navigation tab links

To test:
1. Go to  Administration > MARC bibliographic frameworks > Default framework Tag 942 > subfield structure
2. Notice the tabs at the top have no style.
3. APPLY PATCH
4. 1 -3 again, tabs should look right.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37739: (follow-up) Add extra space in markup
Lucas Gass [Wed, 28 Aug 2024 14:21:48 +0000 (14:21 +0000)]
Bug 37739: (follow-up) Add extra space in markup

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37739: Adjust vendor deletion modal code after bootstrap 5 update
Jonathan Druart [Tue, 27 Aug 2024 09:36:38 +0000 (11:36 +0200)]
Bug 37739: Adjust vendor deletion modal code after bootstrap 5 update

This patch fixes a conflict between bug 31921 and bug 35402.

Test plan:
Create a vendor then delete it using the "Delete vendor" button
Confirm that the modal looks like other modals in Koha.
Click the "x", "No" and "Yes". Confirm that "x" and "no" close the modal
but "yes" correctly delete the vendor.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37697: use shadow DOM for additional contents preview
David Cook [Wed, 21 Aug 2024 05:58:59 +0000 (05:58 +0000)]
Bug 37697: use shadow DOM for additional contents preview

This change uses the declarative HTML style of Shadow DOM
to encapsulate the additional contents preview so that they don't
affect the main Koha page.

Test plan:
0. Create opacheader with following content:
<style>* { background-color: red }</style>
<p>This is awesome</p>
1. Note that most background-color in /cgi-bin/koha/tools/additional-contents.pl
is now red
2. Click "Preview content" for "opacheader"
3. Note that the background-color of the "p" in "opacheader" is red

4. Apply the patch

5. Refresh the page at /cgi-bin/koha/tools/additional-contents.pl
6. Note that the background-color is normal again
7. Click "Preview content for "opacheader"
8. Note that the background-color of the "p" in "opacheader" is red

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37748: (follow-up) Move tooltip initialization to staff-global.js
Owen Leonard [Wed, 28 Aug 2024 10:56:38 +0000 (10:56 +0000)]
Bug 37748: (follow-up) Move tooltip initialization to staff-global.js

This patch moves generic initializations of Bootstrap tooltips into
staff-global.js.

Templates which included custom tooltip initialization have been updated
to use the global function.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37748: Adjust the 'Update child to patron' selenium test
Jonathan Druart [Wed, 28 Aug 2024 11:59:15 +0000 (13:59 +0200)]
Bug 37748: Adjust the 'Update child to patron' selenium test

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37748: In Bootstrap 5 "disabled" class must be on anchor tag, not list item
Owen Leonard [Tue, 27 Aug 2024 11:43:01 +0000 (11:43 +0000)]
Bug 37748: In Bootstrap 5 "disabled" class must be on anchor tag, not list item

This patch revises the markup for disabled dropdown menu items to
conform to Bootstrap 5 requirements. The patch also revises many
instances of Bootstrap tooltips which were not working -- tooltips which
should be shown with many of the disable dropdown items.

In BS5, a tooltip can't be attached to a disabled link. Instead the
tooltip must be attached to the link's container. These changes also
include the addition of "aria-disabled='true'" to the disabled menu
items.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37375: Fix holdings table not loading if MARC framework is missing certain 952...
Lari Taskula [Tue, 16 Jul 2024 16:01:45 +0000 (16:01 +0000)]
Bug 37375: Fix holdings table not loading if MARC framework is missing certain 952 subfields

When you've catalogued a record with MARC framework that is for some reason missing
certain 952 subfields (8, a, b, c, or y), holdings table is no longer loading but
stuck in the "Processing..." loader.

To test, open Koha in two browser tabs:

IN TAB 1 (framework configuration):
1. Create a new MARC framework "TEST", based on the default MARC framework

IN TAB 2 (record view):
2. Create a new record using MARC framework "TEST"
3. Add an item to the newly created record
4. Observe item visible on the record's holdings list

IN TAB 1 (framework configuration):
5. Delete all 952 subfields in framework "TEST" except: 8, a, b, c, y

IN TAB 2 (record view):
6. Refresh page
7. Observe item visible on the record's holdings list
8. Open your browser's console for upcoming error messages

Iterating remaining subfields in following order,
| <FIELD> | <NAME>
------------------------------------------------------
| 952$8   | row._strings.collection_code
| 952$c   | row._strings.location
| 952$a   | row._strings.home_library_id
| 952$b   | row._strings.holding_library_id
| 952$y   | row._strings.item_type_id

IN TAB 1 (framework configuration):
9. Delete subfield <FIELD> in framework "TEST"

IN TAB 2 (record view):
10. Refresh page
11. Observe error "Uncaught TypeError: <NAME> is undefined" (Firefox)
(or Cannot read properties of undefined (reading 'str') (Chromium))

12. Apply patch

IN TAB 2:
13. Refresh page
14. Observe item visible on the record's holdings list

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37734: Fix insert runtime parameter button in reports
Brendan Lawlor [Mon, 26 Aug 2024 15:02:34 +0000 (15:02 +0000)]
Bug 37734: Fix insert runtime parameter button in reports

The drop down item links had two class attributes which
prevented javascript from opening the modal.
This patch combines the classes into one class attribute.

To test:
1. Go to Reports > Create from SQL
2. Click the Insert runtime parameter button
3. Click on any of the drop down options
4. Nothing happens :(
5. Apply patch
6. Repeat steps 2 and 3 for all different parameters
7. Notice the modal launches :)
8. Confirm the parameters are inserted as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35402: Fix some selenium tests
Jonathan Druart [Tue, 27 Aug 2024 06:50:38 +0000 (08:50 +0200)]
Bug 35402: Fix some selenium tests

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37513: Only display delete button if usage_count == 0
Tomas Cohen Arazi [Mon, 19 Aug 2024 17:52:24 +0000 (14:52 -0300)]
Bug 37513: Only display delete button if usage_count == 0

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37513: Add a way for KohaTable to decide if a button should be displayed
Tomas Cohen Arazi [Mon, 19 Aug 2024 17:50:20 +0000 (14:50 -0300)]
Bug 37513: Add a way for KohaTable to decide if a button should be displayed

This patch adds, for the case of object parameters in the actions config
entry for the KohaTable Vue component, a check for a function on the
current row, that will be used to determine if a button needs to be
displayed or not.

It checks for the function to be defined, and uses it for checking
displayability.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37513: Allow embedding usage_count in record sources
Tomas Cohen Arazi [Mon, 19 Aug 2024 14:42:21 +0000 (11:42 -0300)]
Bug 37513: Allow embedding usage_count in record sources

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37513: Add Koha::RecordSource->usage_count
Tomas Cohen Arazi [Mon, 19 Aug 2024 14:35:13 +0000 (11:35 -0300)]
Bug 37513: Add Koha::RecordSource->usage_count

This patch adds the `usage_count` method to be used for embedding from
the API. Tests cover all use cases.

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37513: Handle Koha::Exceptions::Object::FKConstraintDeletio in controller
Tomas Cohen Arazi [Mon, 19 Aug 2024 14:16:00 +0000 (11:16 -0300)]
Bug 37513: Handle Koha::Exceptions::Object::FKConstraintDeletio in controller

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37682: Lazy-load modules for setters in koha-preferences tool
David Cook [Tue, 20 Aug 2024 04:31:31 +0000 (04:31 +0000)]
Bug 37682: Lazy-load modules for setters in koha-preferences tool

This change lazy-loads modules for setters in the
koha-preferences tool, so that getters are free to run super fast.

Between BZ 37657 and BZ 37682 we effectively eliminate the
overhead of running "get" or "dump" commands via the koha-preferences
tool.

Test plan:

1. time misc/admin/koha-preferences get SearchEngine
2. Note time is about .35 seconds
3. time misc/admin/koha-preferences dump
4. Note time is about .35 seconds
5. Create sysprefs.yml

   ---
   marcflavour: MARC21
   viewMARC: 1

6. time misc/admin/koha-preferences load -i sysprefs.yml
7. Note time is about .35 seconds
8. time misc/admin/koha-preferences set SearchEngine Elasticsearch
9. Note time is about 1 seconds

10. Apply patch
11. Repeat the koha-preferences commands above
12. Note that the "dump" and "get" commands run in about .09-.1
seconds. The "load" and "set" commands still take the same amount
of time as their behaviours haven't changed

13. misc/admin/koha-preferences set SearchEngine Elasticsearch1
14. koha-mysql kohadev
15. select * from action_logs where module = 'SYSTEMPREFERENCE'
 order by action_id desc limit 5;
16. Note that the action log showing Elasticsearch1 update says
    "interface"
 of "commandline" and "script" of "koha-preferences"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37657: Make koha-preferences CLI tool faster
David Cook [Tue, 20 Aug 2024 04:13:38 +0000 (04:13 +0000)]
Bug 37657: Make koha-preferences CLI tool faster

By using Koha::Database->dbh() to use a minimal database handle
which doesn't preload the whole DBIx::Class schema, we're able to
run the same command 2-3 times faster.

This is beneficial when running the tool in a loop which runs the
command serially one by one.

Test plan:

1. time misc/admin/koha-preferences get SearchEngine
2. Note time is about 1 second
3. time misc/admin/koha-preferences dump
4. Note time is about 1 second
5. Create sysprefs.yml

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37452: Modernise the view in showdiffmarc
Martin Renvoize [Wed, 24 Jul 2024 14:59:31 +0000 (15:59 +0100)]
Bug 37452: Modernise the view in showdiffmarc

The showdiffmarc view available from manage stage records when a match
is found looks dated.

This patch adds a page-section, centers the display as a whole and
converts the link back to the staging area to an action button.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37349: Use cache for authority types and remove extra fetch
Nick Clemens [Fri, 12 Jul 2024 15:56:45 +0000 (15:56 +0000)]
Bug 37349: Use cache for authority types and remove extra fetch

This patch caches the authority types when fetched during linking to avoid grabbing the same type more than once.
Additionally it removes a second call to fetch the same type in some scenarios

To test:
1 - Apply patch
2 - Enable linking during cataloging/updating records
3 - Edit a record and confirm it is linked ocrrectly
4 - Run the authority linking cron and confirm it works as expected

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37620: Fix Total-Count headers
Matt Blenkinsop [Tue, 27 Aug 2024 09:21:30 +0000 (09:21 +0000)]
Bug 37620: Fix Total-Count headers

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36915: (QA follow-up) Passing less to encourage traversal
Martin Renvoize [Thu, 15 Aug 2024 14:29:30 +0000 (15:29 +0100)]
Bug 36915: (QA follow-up) Passing less to encourage traversal

I generally push for contextual use of accessors in TT notices and try
to reduce extra lookups.

In this case we can access the pickup library branchname directly using
the pickup_library relation available to us in the booking object we
pass.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36915: (follow-up) Add tests
Paul Derscheid [Thu, 8 Aug 2024 10:35:21 +0000 (10:35 +0000)]
Bug 36915: (follow-up) Add tests

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>
2 months agoBug 36915: (follow-up) Include branchname in sample notice
Paul Derscheid [Tue, 6 Aug 2024 13:22:10 +0000 (13:22 +0000)]
Bug 36915: (follow-up) Include branchname in sample notice

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>
2 months agoBug 36915: (follow-up) Make basic sample notice html and add breaks
Paul Derscheid [Mon, 5 Aug 2024 12:07:48 +0000 (12:07 +0000)]
Bug 36915: (follow-up) Make basic sample notice html and add breaks

Signed-off-by: David Nind <david@davidnind.com>
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>
2 months agoBug 36915: (follow-up) Basic sample notice
Martin Renvoize [Wed, 26 Jun 2024 14:56:59 +0000 (15:56 +0100)]
Bug 36915: (follow-up) Basic sample notice

Signed-off-by: David Nind <david@davidnind.com>
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>
2 months agoBug 36915: (follow-up) Pass object to GetPreparedLetter
Martin Renvoize [Wed, 26 Jun 2024 14:27:14 +0000 (15:27 +0100)]
Bug 36915: (follow-up) Pass object to GetPreparedLetter

This patch updates the logic to pass the object to be deleted through to
GetPreparedLetter.

This way, as we add fields and accessors to the object in the future,
they will automatically become available to the notices.

Signed-off-by: David Nind <david@davidnind.com>
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>
2 months agoBug 36915: Send email notification when a booking is cancelled
Thibaud Guillot [Wed, 22 May 2024 07:59:51 +0000 (09:59 +0200)]
Bug 36915: Send email notification when a booking is cancelled

When a booking is cancelled, patron received an email based on specific
letter.

Test plan:

1) Create a letter with code "BOOKING_CANCELLATION" on "Notices and
   slips" tool.
2) Add booking or go on item already booked in advance.
3) Cancel it
4) Verify in message_queue table directly or go on patron page and click
   on "Notices" tab section.

Sponsored by: Association de Gestion des Œuvres Sociales d'Inria (AGOS)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
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>
2 months agoBug 14322: (follow-up) Fix quotes for translatable string
Katrin Fischer [Mon, 26 Aug 2024 16:42:35 +0000 (16:42 +0000)]
Bug 14322: (follow-up) Fix quotes for translatable string

Always use double quotes around translatable strings.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35402: (follow-up) Remove duplicate of import in staff-global.scss
Paul Derscheid [Mon, 26 Aug 2024 12:08:51 +0000 (14:08 +0200)]
Bug 35402: (follow-up) Remove duplicate of import in staff-global.scss

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35402: (follow-up) Remove bootstrap version 4 and revert import paths to 'bootstrap'
Paul Derscheid [Mon, 26 Aug 2024 12:00:10 +0000 (14:00 +0200)]
Bug 35402: (follow-up) Remove bootstrap version 4 and revert import paths to 'bootstrap'

This patch
- removes bootstrap 4 from the project dependencies.
- reverts the import paths for sass back to 'bootstrap' from 'bootstrap5'.
- updates yarn's lockfile.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35402: (follow-up) Reintroduce bsBanner includes
Paul Derscheid [Mon, 26 Aug 2024 11:51:19 +0000 (13:51 +0200)]
Bug 35402: (follow-up) Reintroduce bsBanner includes

I initially removed this because it failed to build, but this issue seems to be resolved.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35402: (follow-up) Use ~ to resolve to nearest node_modules when building css
Paul Derscheid [Mon, 26 Aug 2024 11:31:46 +0000 (13:31 +0200)]
Bug 35402: (follow-up) Use ~ to resolve to nearest node_modules when building css

- This patch adds a new dev dependency node-sass-tilde-importer.
- We use the tilde to resolve to the nearest node_moduldes, meaning
- /kohadevbox/koha/node_modules
or
- /kohadevbox/node_modules
- We explicitly prefix the last path component with an underscore to prevent the
  resolution from failing (this doesn't seem necessary for all cases, though)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36707: Links on itemnumbers in report should say "item", not "record"
Owen Leonard [Fri, 9 Aug 2024 12:49:55 +0000 (12:49 +0000)]
Bug 36707: Links on itemnumbers in report should say "item", not "record"

This patch changes the labels on SQL report result links so that the
term "item" is used for editing or viewing an item.

To test, apply the patch and go to Reports -> Saved reports

- If necessary, create a report which will return biblionumbers and
  itemnumbers, e.g.

  SELECT itemnumber, biblionumber FROM items LIMIT 20

- Save and run the report. In the results, test the menus which can be
  triggered by clicking a biblionumber or itemnumber.
  - A biblionumber's menu should have "Edit record" and "View record."
  - An itemnumber's menu should have "Edit item" and "View item."

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37574: (follow-up) Fix translatability in .tt file
Katrin Fischer [Mon, 26 Aug 2024 08:35:03 +0000 (08:35 +0000)]
Bug 37574: (follow-up) Fix translatability in .tt file

JS in a .tt file needs to use the single underscore.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37574: (follow-up) disable ordering and searching on status column
Paul Derscheid [Thu, 8 Aug 2024 07:38:05 +0000 (07:38 +0000)]
Bug 37574: (follow-up) disable ordering and searching on status column

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>
2 months agoBug 37574: Add visual indicator that bookings are expired
Paul Derscheid [Wed, 7 Aug 2024 10:51:31 +0000 (10:51 +0000)]
Bug 37574: Add visual indicator that bookings are expired

Adds a status column to the table configuration that displays whether a
booking is active or expired (at the moment).
This column is conditionally shown in the 'Show Expired' state, meaning
after expired bookings are loaded into the table.

To test:
1) Create a couple booking for any item for a single patron.
2) Open a db shell with `koha-mysql <INSTANCE>`
3) Update one or two of the created bookings with:
   update bookings set start_date = '<date in the past>', end_date = '<date also in the past'> where booking_id = '<booking id of the booking you just created>'.
4) Go the the bookings tab of said item.
5) Click the 'Show Expired' option in the top left of the table.
6) Note that bookings are tagged with 'Expired' and 'Active'.
7) Repeat 5 and 6 for the bookings tab in the patron's details view.
8) Sign off.

Note: the bootstrap classes for v5 are already included so they become
colored once the patch is in.

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>
2 months agoBug 14322: (follow-up) Make 'Copied!' tooltip translatable
Brendan Lawlor [Mon, 26 Aug 2024 14:49:01 +0000 (14:49 +0000)]
Bug 14322: (follow-up) Make 'Copied!' tooltip translatable

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 14322: (QA follow-up) Tidy itemsearch.tt
Paul Derscheid [Thu, 15 Aug 2024 10:31:40 +0000 (10:31 +0000)]
Bug 14322: (QA follow-up) Tidy itemsearch.tt

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 14322: (follow-up) Perl tidy
Brendan Lawlor [Thu, 1 Aug 2024 13:59:28 +0000 (13:59 +0000)]
Bug 14322: (follow-up) Perl tidy

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 14322: (follow-up) add check for single logical operator param
Brendan Lawlor [Wed, 31 Jul 2024 20:25:33 +0000 (20:25 +0000)]
Bug 14322: (follow-up) add check for single logical operator param

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 14322: (follow-up) make shareable link load results immediately
Brendan Lawlor [Mon, 22 Jul 2024 14:20:46 +0000 (14:20 +0000)]
Bug 14322: (follow-up) make shareable link load results immediately

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 14322: (follow-up) update shareable link button style
Brendan Lawlor [Mon, 22 Jul 2024 14:17:06 +0000 (14:17 +0000)]
Bug 14322: (follow-up) update shareable link button style

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 14322: Add shareable link button to item search
Brendan Lawlor [Fri, 12 Jul 2024 16:03:57 +0000 (16:03 +0000)]
Bug 14322: Add shareable link button to item search

This patch adds a 'Copy shareable link' button to the item search results page.
When pasted into the browser the item search form will be prefilled.
The item search form submission still gets it's parameters from the form.

Test plan:
1. Apply patch
2. Try some item searches (try searches using the '+ New field' button too)
3. On the results page click the 'Copy shareable link' button
4. Paste the link into the browser and hit enter
5. Notice the item search form is filled out exactly as you did earlier
6. Click 'Search' and confirm the results are as you would expect
7. Click 'Edit search', modify the search and search again
8. Test the 'Copy shareable link' button again
9. Test pasting the example link below
10. With default ktd data the search will return one result for:
     Intermediate Perl / Schwartz, Randal L.

http://localhost:8081/cgi-bin/koha/catalogue/itemsearch.pl?homebranch_op=%3D&homebranch=CPL&holdingbranch_op=%3D&holdingbranch=CPL&location_op=%3D&location=GEN&itype_op=%3D&itype=BK&ccode_op=%3D&ccode=REF&notforloan_op=!%3D&notforloan=1&itemlost_op=!%3D&itemlost=1&withdrawn_op=!%3D&withdrawn=1&damaged_op=!%3D&damaged=1&onloan=&f=publishercode&op=like&q=O'Reilly%2C&c=and&f=publicationyear&op=like&q=2006&c=and&f=title&op=not%20like&q=Javascript%20%3A&c=and&f=author&op=not%20like&q=Carlson%2C%20Lucas.&itemcallnumber_from=&itemcallnumber_to=&issues_op=%3E&issues=&datelastborrowed_op=%3E&datelastborrowed=&format=shareable

Sponsored-by: CLAMS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35838: Use template wrapper for tabs: Curbside pickups administration
Owen Leonard [Thu, 18 Jan 2024 16:21:56 +0000 (16:21 +0000)]
Bug 35838: Use template wrapper for tabs: Curbside pickups administration

This patch updates the curbside pickups administration template so that
it uses the new WRAPPER directive to build tabbed navigation.

To test, apply the patch and enable curbside pickups if necessary:
Administration -> System preferences -> CurbsidePickup.

- Go to Administration -> Curbside pickups.
- Confirm that the tabs look correct and behave as expected.

Signed-off-by: Loïc Vassaux--Artur <loic.vassaux-artur@outlook.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 20411: DBRev 24.06.00.026
Katrin Fischer [Mon, 26 Aug 2024 08:35:00 +0000 (08:35 +0000)]
Bug 20411: DBRev 24.06.00.026

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 20411: Output only if pref has been deleted
Jonathan Druart [Wed, 14 Aug 2024 08:19:16 +0000 (10:19 +0200)]
Bug 20411: Output only if pref has been deleted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 20411: Remove StaffDetailItemSelection system preference
Sam Lau [Wed, 10 Jul 2024 17:03:04 +0000 (17:03 +0000)]
Bug 20411: Remove StaffDetailItemSelection system preference

This patch removes the 'StaffDetailItemSelection' along with any usages of it. Now, the checkboxes on an item details page are always there.

To test:
1) Apply patch, restart_all, updatedatabase
2) In sys prefs, search for 'StaffDetailItemSelection', nothing should show up.
3) Visit an items details page, make sure there are checkboxes next each item that allow you to perform modification/deletion.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37309: Adjust test
Jonathan Druart [Mon, 26 Aug 2024 08:57:56 +0000 (10:57 +0200)]
Bug 37309: Adjust test

The test to catch wrong "op" in posted form was not supporting single
quotes.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37309: Adjustment for 33526
Jonathan Druart [Wed, 14 Aug 2024 09:09:55 +0000 (11:09 +0200)]
Bug 37309: Adjustment for 33526

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37309: Clear itemnumbers array before 'select all'
Jonathan Druart [Thu, 11 Jul 2024 12:47:09 +0000 (14:47 +0200)]
Bug 37309: Clear itemnumbers array before 'select all'

Otherwise the same itemnumber can appear several times in the array.
It could be moved to its own bug but this is only code cleaning it
seems, there is no impact on the UX

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37309: Fix behaviour when SeparateHoldings is in use
Jonathan Druart [Thu, 11 Jul 2024 12:41:54 +0000 (14:41 +0200)]
Bug 37309: Fix behaviour when SeparateHoldings is in use

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37309: (follow-up) Adjust appearance of controls
Owen Leonard [Thu, 11 Jul 2024 11:51:45 +0000 (11:51 +0000)]
Bug 37309: (follow-up) Adjust appearance of controls

This patch makes an adjustment to the style of .btn-link controls
associated with the holdings table. I've also updated the markup of the
other controls so that they match the updated batch controls.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37309: Improve Delete and Modify items links on the biblio detail page
Jonathan Druart [Thu, 11 Jul 2024 07:50:43 +0000 (09:50 +0200)]
Bug 37309: Improve Delete and Modify items links on the biblio detail page

The way the "Delete selected items" and "Modify selected items" links
are build on the bibliographic detail page is not nice. We could do
better, for instance using a proper form element instead of building an
URL.

Test plan:
Go to the detail page of a bibliographic record which has several items.
In the items table check some checkboxes and play with "select all",
"clear all" and the action buttons.
Notice that everything works as before.

Minor UI regression that must be fixed: there are CSS rules that cause
problem. When the action links are displayed or hidden the table is
moving up and down.
I think the problematic rules are:
  .btn {
    padding: 6px 12px;
    font-size: 12px;
  }
It makes the UI better if I remove them but still get the bumping
issue.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 2486: Show user comments in staff interface
Owen Leonard [Wed, 12 Jun 2024 12:54:47 +0000 (12:54 +0000)]
Bug 2486: Show user comments in staff interface

This patch the staff interface's bibliographic detail page, adding a tab
that shows comments submitted by users from the OPAC.

To test, apply the patch and restart services.

- If necessary, enable the "OPACComments" system preference and submit
  some comments in the OPAC.
- In the staff interface, locate the title you submitted comments on.
  - The bibliographic detail page should show a "Comments" tab with a
    count of the number of all comments (approved and unapproved).

Sponsored-By: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37141: (follow-up) Fix new strings for translation
Katrin Fischer [Mon, 26 Aug 2024 08:34:57 +0000 (08:34 +0000)]
Bug 37141: (follow-up) Fix new strings for translation

Adding underscores to make single double.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>