Commit Graph

56003 Commits

Author SHA1 Message Date
Jonathan Druart 5829cb6b4f
Bug 38436: Restore hide columns when empty
If a column has no data on the items table we should hide the column.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:55 +01:00
Jonathan Druart a29dac8385
Bug 38436: Adjust columns_settings.inc for KohaTable
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:55 +01:00
Jonathan Druart 369ca5b0fd
Bug 38436: Fix column visibility when bKohaColumnsUseNames is used
When the columns displayed in the table can vary (depending on sysprefs)
we use bKohaColumnsUseNames. This allows us to use the name of the
columns instead of there order number.

The code was totally wrong, and didn't retrieve the correct number.

A good example to confirm that is to add:
 console.log("%s is at %s".format(this.columnname, used_id));
at the end of the `if ( use_names ) {` block of _dt_visibility.

If at least one column is hidden by default and cannot be toggled (and
so won't appear in the list of the columns of the "Column visibility" button),
there will be a shift.

This line was definitelly wrong:
 var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' );
We cannot rely on the order of the visible columns, we need to retrieve
the list of the columns using DT's api.

Now the columns are retrieved using their class names, and from DT's
api.
The code is way nicer and more inline with how we are supposed to play
with DT.
Look at those 2 lines to pass the list of columns to the colvis button:
  let included_columns = table_settings.columns.filter(c => !c.cannot_be_toggled);
  columns: included_columns.map(c => '.' + c.columnname).join(',')

Test plan:
Play intensively with the items table (detail.pl), but also with the
other tables not using bKohaColumnsUseNames (eg. patrons search)
You need to set column as hidden by default and/or cannot be toggled.
You need to play with the "Columns" button.
Note that you need to remove the localStorage keys starting with 'DataTables_'
to retrieve the visibility settings from what is defined in the admin area.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:54 +01:00
Jonathan Druart 4e12775e4f
Bug 38436: Rename columns_settings.columnname in DB
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:54 +01:00
Jonathan Druart 42df19b3e1
Bug 38436: Adjust column names for the holdings tables
Removing the prefix holdings_ and otherholdings_
Could have been done at the code level but does not seem necessary to
have different column names

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:53 +01:00
Jonathan Druart 558d4335f8
Bug 38436: Store loaded_from_state in data instead of DT's settings
This has been introduced by bug 33484 as we needed to know if the state
was loaded (from URL or localStorage).

If the state is loaded then we need to:
1. not redirect if only one patron to display (to prevent a blocking
   situation)
2. display the table (ie. not defer loading)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:52 +01:00
Jonathan Druart f29ed160aa
Bug 38436: Store bKohaColumnsUseNames in data instead of DT's settings
DataTable's settings do no longer allow to store custom properties.
Here we are passing bKohaColumnsUseNames to the constructor, but we
cannot retrieve it later from DT's api.

We need to store it in data().

Test plan:
0. Do not apply this patch
1. In _dt_visibility add console.log(settings.bKohaColumnsUseNames);
   where relevant
2. Open your browser, clear localStorage entries (we want to reach the
   set_default() code)
3. Hit http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4
Notice that the value is true then false (displayed once per columns).
This is because we are calling _dt_visibility twice:
 * with the 'settings' we passed to the constructor:
1044         [hidden_ids, included_ids] = _dt_visibility(table_settings, settings, this)
 * from set_default() where we pass the settings retrieved from DT's api
900         [hidden_ids, included_ids] = _dt_visibility(table_settings, settings, $("#"+settings.nTable.id));

4. Apply this patch, console.log again and confirm that it's now true.

Notice that everything is then buggy...

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:52 +01:00
Jonathan Druart 0d24de094a
Bug 38436: Do not try to build the table if tab is not there
If we don't have the "other holdings" tab, no need to try to build the
table.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:51 +01:00
Nick Clemens 5dad538b40
Bug 28294: (follow-up) Adjust call to request transfer
The call expects a library object, not a  branchcode, likely rebasing issue

To test:
1 - Place a hold for an item at a different library than current library
2 - Check item in and confirm transfer
3 - Check item in again
4 - Kaboom!
5 - Apply patch/restart_all
6 - Check item in again
7 - Ok!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:51 +01:00
Pedro Amorim 459be64976
Bug 38492: Update occurrences of _() to __()
Test plan, ktd:
1) Generate translation files
$ gulp po:update --lang de-DE
2) Verify that strings using _() do not exist on the pot file:
$ cat -n misc/translator/Koha-messages-js.pot | grep "Copied!"
$ cat -n misc/translator/Koha-messages-js.pot | grep "Form not submitted because of the following problem"
$ cat -n misc/translator/Koha-messages-js.pot | grep "No matches found"
3) Apply patch. Repeat test plan.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:50 +01:00
Katrin Fischer d2a6c4673b
38424: Update yarn.lock
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 11:36:27 +01:00
Tomas Cohen Arazi 884197cf83
Bug 38424: Upgrade redoclyly/cli version to latest stable
This patch updates the used version of redocly/cli to the latest stable.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
=> FAIL: You get

```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json

    ╔════════════════════════════════════════════════════════╗
    ║                                                        ║
    ║  A new version of Redocly CLI (1.25.11) is available.  ║
    ║  Update now: `npm i -g @redocly/cli@latest`.           ║
    ║  Changelog: https://redocly.com/docs/cli/changelog/    ║
    ║                                                        ║
    ╚════════════════════════════════════════════════════════╝

bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 207ms.
Done in 1.34s.
```

3. Apply this patch
4. Run:
  k$ sudo yarn install --modules-folder /kohadevbox/node_modules
5. Repeat 2:
=> SUCCESS: You get

```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 200ms.
Done in 1.29s.
```

6. Restart plack and check the API loads without issues:
  k$ koha-plack --restart kohadev;  tail -f /var/log/koha/kohadev/*.log
7. Run the tests:
  k$ prove -r t/db_dependent/api/
=> SUCCESS: No failures
8. 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: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 11:36:26 +01:00
Matthias Meusburger 4bfb4da587
Bug 35659: (QA follow-up) Fix DateTime and cronlogaction messages
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-19 16:59:55 +01:00
Jonathan Druart 57f317ff10
Bug 36640: (follow-up) Fix itemsearch
We replaced 'columnFilter', and it's no longer there.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-19 16:59:55 +01:00
Lucas Gass 14f0499086
Bug 38315: Add expired class to expired patrons in patron search results
To test:
0. APPLY PATCH
1. Have some expired patrons
2. Do a search that will return some expired patrons and some not expired.
3. Look at the 'Expires on' column.
4. The expired patrons should have an expired class set and the date should be red/italic.

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>
2024-11-19 16:35:17 +01:00
Janusz Kaczmarek abfba936fb
Bug 38239: Incorrect number of items to pull (in Holds to pull) with partially filled holds
With a over-sufficient number of items, when more than one patron has
placed hold, and the holds have been partially filled (checked-in =
waiting for pick up), the number of items to pull in the Holds
to pull table shows the total number of holds, including those waiting.
This erroneously suggests to the librarian to pull an excessive number
of items from the shelves.

Test plan:
==========

1. For a bibliographic record with more than two items (in ktd, e.g.
   "Lanark a life in four books"), place hold for two patrons.
2. On the Holds to pull page control that there are two items to pull.
3. As a librarian from the library of one of the patrons, Check-in one
   item.
4. Note that in Holds to pull table you still see two items to pull,
   which is misleading.
5. Apply the patch; restart_all.
6. Now you should see only one item to be pulled.

Sponsored-by: Ignatianum University in Cracow
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>
2024-11-19 16:35:16 +01:00
David Nind 1c6dfb5f35
Bug 38344: Fix typo - space before exclamation mark in "Thank you !"
In English, there should not be a space before an exclamation mark
in a sentence. For example, "Thank you !" is not correct.

Test plan:
1. Search the codebase for "Thank you !": grep -rn "Thank you !" *
2. Result - one occurance:
   C4/SIP/ILS.pm:317:    return (1, 'Thank you !', '');
3. Apply the patch.
4. Repeat step 1.
5. There should now be no occurances.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-19 16:35:16 +01:00
George Veranis 9a72d3c757
Bug 28075: (follow-up) adding all choices and values of 135a
Extend patch of 135a to cover all choices with all possible values as
described by IFLA for 135a.

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>
2024-11-19 16:35:15 +01:00
Didier Gautheron 3fa03e2e66
Bug 28075: Add missing UNIMARC coded data 135a
This patch add more values to selection of 135a in UNIMARC

Test Plan:
    1) Add on default framework the field 135a and check the Editor option
    2) Set on plugin section the value of unimarc_field_135a.pl
    3) Open cataloguing editor and use 135 field tag editor to select a value
    4) Apply patch
    5) Open cataloguing editor and use 135 field tag editor to select a value,
       after patch you have more options to select

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>
2024-11-19 16:35:15 +01:00
Phil Ringnalda ddddaf2e3d
Bug 38463: Unnecessary CSRF token in OPAC authority search
Bug 37069 correctly changed OPAC authority searches from a POST to a GET, but
forgot to remove the CSRF token that is only needed for a POST, so now it
clutters up the URL by making the first 107 characters of the query string
meaningless.

Test plan:
 1. Without the patch, in the OPAC, go to Authority search
 2. Change the dropdowns to non-default values so you have meaningful search
    conditions, and search for something that will return results, like
    Topical Term/starts with/a/in any heading/Heading descendant
 3. Copy the URL of your search results, paste it in an email compose window,
    look at what you just pasted and wonder whether that big opaque string is
    actually safe to send to a coworker. Go to lunch. Come back and wonder
    what you searched for, and look at the URL in the browser to try to tell
 4. Apply patch, click the browser back button, reload the page, search again
 5. Copy and paste the URL, notice it looks fine to send, just a search. Look
    at the URL in the browser address bar, notice that within the limits of
    your window size, you can see what you searched for

Sponsored-by: Chetco Community Public Library
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>
2024-11-19 16:35:14 +01:00
Owen Leonard 72d332b0ce
Bug 37946: (follow-up) Update menu style to hide
We shouldn't use hide() to hide the Bootstrap menu. The correct move
here is to empty the "style" attribute.

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>
2024-11-19 16:35:14 +01:00
Owen Leonard 38ade44def
Bug 37946: Double menu when clicking the caret in Z39.50 search
This patch makes some adjustments to the JS for the Z39.50 search
results page to correct the behavior of dropdown menus. If the split
button's menu trigger is clicked a cloned version of the menu shouldn't
appear along with the default one.

To test, apply the patch and clear your browser cache if necessary.

- Go to Cataloging -> New from Z39.50.
- Perform a search which will return multiple results.
- Click any table cell in the results except the last one.
  - You should get a popup menu with "MARC preview," "Card preview," and
    "Import."
  - Each menu item should work correctly.
- Test the button in the last column to confirm that both the "primary"
  button works correctly and that the popup menu works correctly.
- Test the process of adding a new authority from Z39.50 to confirm that
  the authority search results table works the same as the bibliographic
  one.

Signed-off-by: David Nind <david@davidnind.com>
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>
2024-11-19 16:35:13 +01:00
Matt Blenkinsop 7cf80c0b6d
Bug 38326: (QA follow-up) Tidy
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-19 16:35:13 +01:00
Lucas Gass 9d3d165207
Bug 38326: Don't convert to copynumber
To test:
1. Set copynumber in MarcItemFieldsToOrder: copyno: 965$z
2. Have a mrc file that includes this marc field
3. Stage a mrc file for import
4. Notice the copynumber isn't correctly copied over
5. APPLY PATCH, restart_all
6. Try again, this time it should work.

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-19 16:35:12 +01:00
Katrin Fischer 5bb6f8c1cb
Revert "Bug 38299: [DO NOT PUSH] Test dbrev"
This reverts commit 0be29ed976.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-19 09:11:25 +01:00
Owen Leonard d7ae20f0cb
Bug 24690: Make OPACPopupAuthorsSearch work with search terms containing parenthesis
This patch updates the OPACPopupAuthorsSearch feature so that it wraps
search terms with quotes. This is the behavior we have in place for
author searches outside the context of OPACPopupAuthorisSearch, e.g.
'au:"Criterion Collection (Firm)"'

To test, apply the patch and enable the OPACPopupAuthorsSearch system
preference.

- Search for a record in the OPAC which has author data containing
  parentheses (it should not be a field linked to an authority record).
- View the detail page for that record.
- Click on one of the problematic author links.
- This should trigger a modal window with a list of authors and
  checkboxes for each.
- With just the single checkbox checked, click "Search."
- The search should return the correct results.
- Test other author searches to confirm that they work too.

Sponsored-by: Athens County Public Libraries
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>
2024-11-18 17:44:42 +01:00
Owen Leonard a873200517
Bug 38346: Make sidebar checkboxes consistent
This patch makes some changes to markup and CSS in order to make
checkboxes in sidebars more consistent with each other and better
styled.

To test apply the patch and rebuild the staff interface CSS. Check the
sidebar forms on these pages and verify that the checkbox inputs look
correct. The label should be on the same line as the checkbox.

- Serials -> Search serials -> Results: The "Has routing list" line.
- Administration -> Funds: The "Show my funds only" checkbox.
- Circulation -> Overdues: "Show any items currently checked out."
- Suggestions: "Include archived."

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:41 +01:00
Emily Lamancusa 6807b62104
Bug 37866: (QA follow-up) Fix another missed case
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:41 +01:00
Emmi Takkinen 974c9bd76e
Bug 37866: Unable to resolve claim from patron details page if syspref ClaimReturnedLostValue is disabled
If ones tries to resolve a claim from patrons detail page
and syspref ClaimReturnedLostValue is disabled,
"Resolve return claim" pop up isn't displayed. Page just
jumps to the top of the page. However this works from the
patron check out page.

This happens because in moremember.tt line 765 we only
check if  ClaimReturnedLostValue is enabled. In
circulation.tt line 1023 we check if either
ClaimReturnedLostValue or BundleLostValue syspref is enabled.

To test:
1. Disable syspref "ClaimReturnedLostValue" (set used value empty).
2. Find patron with claims (or create them).
3. Navigate to patrons detail page and from there open "Claims" tab.
4. Press "Resolve" button.
=> Pop up isn't displayed and page jumps to the top of the page.
5. Repeat steps on patrons check out page.
=> Pop up is displayed.
6. Apply this patch.
=> Pop up should now be displayed both in patrons details and check
out pages.

Sponsored-by: Koha-Suomi Oy
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>
2024-11-18 17:44:40 +01:00
Jonathan Druart c654f4cb40
Bug 38299: (follow-up) (discussion) Move failure into same level
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:40 +01:00
Martin Renvoize 5a5a0dbbce
Bug 38299: (discussion) Move failure into same level
This patch adds the failures in at the same level as the rest of the
revision output (i.e. indented under the specific database revision) and
uses the standard failure coloring instead of the local update_error
class.

This is a proposal and may need more work to clarify and perhaps remove
the duplicated/collected errors at the bottom of the update. Now that we
hard stop if an update fails, I'm not sure collecting errors at the
bottom makes as much sense as it once did?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:39 +01:00
Emily Lamancusa c5d899c584
Bug 38299: Update tests
To test:
prove -v t/Koha/Installer/Output.t

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>
2024-11-18 17:44:38 +01:00
Emily Lamancusa c79d533a04
Bug 38299: Use say_failure when printing update errors to the console
Bug 35681 added subroutines to print colored output from database
updates. Incorporate the subroutine say_failure into the error handling
in the upstream code, so that errors caught upstream can take advantage
of this new subroutine and display in red.

To test:
1. Apply patch for test dbrev
2. From the kshell, run updatedatabase
--> The messages for success, info, warning, and failure that were
    explicitly printed in the dbrev are colored, but the database error
    is not colored.
3. Apply other patches
4. Run updatedatabase again
--> All messages including the database error are now colored

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>
2024-11-18 17:44:38 +01:00
Emily Lamancusa bae04ca3fd
Bug 38299: Make filehandler optional for colored outputs
Allow say_success, say_failure, etc, to omit the filehandler parameter
so that they can be used without explicitly opening a filehandler if you
are just printing to STDOUT and don't already have one.

If a filehandler is passed, the existing behavior is unchanged.

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>
2024-11-18 17:44:37 +01:00
Emily Lamancusa 0be29ed976
Bug 38299: [DO NOT PUSH] Test dbrev
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:37 +01:00
Owen Leonard 70f001d8b8
Bug 38380: Fix other instances of obsolete col-*-offset classes from templates
This patch corrects a few remaining instances of obsolete col-*-offset
classes from a few different templates.

To test, apply the patch and make sure you have the system preferences
AllowCheckoutNotes and ArticleRequests.

- Go to Circulation -> Article requests. If necessary, create an article
  request.
  - From the list of requests, click Actions -> Cancel request. The
    "Confirm deletion" modal form should be well-formatted.
  - From the list of requests, under the "New" tab, click a record
    title to view the details for that article request.
    - In the list of patron requests, click the "X" to delete the
      request. The "Confirm deletion" modal form should be
      well-formatted.
- Log into the OPAC as a user with checkouts. On your summary page,
  under the "Checked out" tab, click the "Add note" button and save a
  new note.
- Go to Circulation -> Checkout notes. The layout should look correct.
  Toggle the CircSidebar system preference and reload the checkout notes
  page. It should still look correct.
- The last change, to the patron clubs template page, only modifies a
  comment.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:36 +01:00
Phil Ringnalda 77c003ed54
Bug 29818: Cannot save subscription frequency without display order
The schema says that subscription_frequencies.displayorder can be null, and
everything else deals with it being null just fine, but if you try to save
a new frequency without specifying display order with strict_sql_modes set,
you get an error.

Test plan:
 1. Without the patch, Serials - Manage frequencies - New frequency
 2. Description is mandatory, so fill it in, then click Save
 3. Boom! Apply patch, restart_all
 4. Repeat steps 1-2, and verify that no error is thrown and the new
    frequency shows up (at the top of the list since nothing comes before
    something)
 5. New frequency, fill in Description, try typing something other than a
    number in Display order and saving. You should be told to follow the
    directions that only numeric characters are allowed

Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:35 +01:00
Nick Clemens d794891005
Bug 37326: decode barcode file in inventory tool
This patch ensures that barcodes uploaded as a file into batchMod are run through
any transformations to match the behaviour of barcodes entered in a list

To test:
1 - Edit BarcodeSeparators system preference to remove \s
2 - Install barcode transformer plugin:
    https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/tag/v1.2.0
3 - Configure the plguin:
item:
  -
    match: "^[A-Z]* \| "
    search: "^[A-Z]* \| "
    replace: ""
  -
    match: " \| .*$"
    search: " \| .*$"
    replace: ""
4 - Go to Cataloging->Batch item modification
5 - Enter a list of barcodes into the 'Scan one by one' box like:
ERR | 12345 | ERR
FOO | 23456 | FOO
BAR | 34567 | BAR
6 - Click 'Continue'
7 - Note the barcodes not found are:
12345
23456
34567
8 - Save the barcodes with extra text into a file
9 - Perform batch mod, supplying the barcodes via the file
10 - Note the barcodes not found are the original strings
11 - Apply patch, restart all
12 - Perform batch modification using file again
13 - Note the not found barcodes are the transformed version
14 - Sign off!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:35 +01:00
David Cook f067830305
Bug 37854: Re-indent HTML (whitespace-only)
This whitespace only change re-indents the HTML

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:34 +01:00
David Cook 79b5228116
Bug 37854: Add fieldset.rows so that Javascript works
This change adds a fieldset.rows that the Javascript produced
by C4/Barcodes/ValueBuilder.pm will work here too like it
does for /cgi-bin/koha/cataloguing/additem.pl and
/cgi-bin/koha/acqui/neworderempty.pl

The fieldset.rows element ruins the styling, so we add some context
specific styling to the styling is preserved.

Test plan:
0. Apply the patch
1. Set "autoBarcode" to "generated in the form <branchcode>yymm0001"
2. Create a vendor
3. Create a backet with "Create items when" set to "receiving an order"
4. Add an order (any order)
5. Close the basket
6. Receive the shipment
7. Click in the barcode field
8. Note that you get a barcode like CPL24090001 and not undefined24090001

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:34 +01:00
David Cook 8b952b1a34
Bug 38416: Tidy
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:33 +01:00
David Cook a9eaefa3b8
Bug 38416: Add unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:33 +01:00
David Cook 0d862343dd
Bug 38416: Failover to MARCXML if cannot roundtrip USMARC during indexing
This change failsover to MARCXML from USMARC if there are any
warnings generated by MARC::File::USMARC::decode when trying to
roundtrip the record.

Test plan:
0. Apply the patch
1. Setup your koha-testing-docker to use Elasticsearch
2. Create a new record with 15,000 characters in the 500$a field
3. Index that record
(e.g. perl misc/search_tools/rebuild_elasticsearch.pl --biblios -v -v)
4. Note that a warning saying the following appears:
"Warnings encountered while roundtripping a MARC record to/from USMARC.
Failing over to MARCXML"
5. View the "Elasticsearch record" on the detail page and note that the
marc_format is MARCXML
6. Perform a search for the record (the keyword should be something that
brings up other results too)
7. Note that the record appears correctly in the search results

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:32 +01:00
Emily Lamancusa 1c3ed6e4db
Bug 38186: Don't initiate transfer when cancelling hold on lost item
To test:
0. In the Circulation Rules, set the default return policy to "item
    returns home (default settings have this already)
1. Find an item belonging to a branch other than the logged-in branch
2. Place a hold on that biblio record for pickup at the logged-in branch
3. Check in the item to set the hold to waiting
4. Set the expiration date to a date in the past
   To do this in KTD:
   ktd --shell
   koha-mysql kohadev
   UPDATE reserves SET expirationdate = < yesterday's date >;
5. Set a lost status on the item
6. Go to Circulation > Holds awaiting pickup
--> The hold should appear on the "holds waiting past their expiration
     date" tab
7. Click the "Cancel and return to <homebranch>" button next to the hold
8. Open the biblio record for the item
--> Note that the lost status is gone and the item shows as in-transit
9. Apply patch
10. Repeat steps 2-8 on the same item
--> This time, the item is still lost and is not in-transit

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:31 +01:00
David Cook 425af8aaad
Bug 30745: (QA follow-up) tidy
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:31 +01:00
Olivier V 2b19d59a1b
Bug 30745: (follow-up) Rewritting the st-date-normalized test
The patch was corrupted, and was rewritten as the original one by
Hammat

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:30 +01:00
Hammat Wele 6c0b557ea1
Bug 30745: Fix error 500 when item is not found while using zebra
Plan test :
- Apply this batch
- Set Zebra as searchEngine
- Go to Cataloging -> # Label creator
- Click on New, Select Label batch
- Click on Add item(s)
- Search for for inexisting items
=> The page should refresh itself (so that it has the same behavior as elasticSearch)

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:30 +01:00
Emily-Rose Francoeur b17df14745
Bug 30745: Display pagination for the results page
I have fixed the pagination issue when the search returns multiple results.

Test plan:
    - Enable elasticsearch
    - git to labels/label-item-search.pl
    - search using after date only
            => check you get items with date-of-acquisition greater than after
date
    - search using before date only
            => check you get items with date-of-acquisition less than before
date
    - search using after and before date
            => check you get items with date-of-acquisition between after and
before
    - Combine this searches with a specified index
    - enable zebra and repeat these tests
pagination tests
    - Perform a search that returns more than 20 notices
    - Navigate through different result pages using page numbers, the "Next" button, and the "Previous" button
	    => On each page, check that "Results X through X of X" displays the correct information

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:29 +01:00
Alex Arnaud b06e648de7
Bug 30745: handle ES ranges for date of acquisition
Test plan:
  - Enable elasticsearch
  - git to labels/label-item-search.pl
  - search using after date only
    => check you get items with date-of-acquisition greater than after
date
  - search using before date only
    => check you get items with date-of-acquisition less than before
date
  - search using after and before date
    => check you get items with date-of-acquisition between after and
before
  - Combine this searches with a specified index
  - enable zebra and repeat these tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=30845
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:28 +01:00
Alex Arnaud e0230f6e6f
Bug 30745: Use query builder and search_compat in label-item-search
Test plan:
  - apply this patch,
  - make some searches in labels/label-item-search.pl using
    the 3 form input (index, after date, before date),
  - check it works like before

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=30845
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:28 +01:00