Commit graph

54145 commits

Author SHA1 Message Date
Emily Lamancusa
9bfc29f910 Bug 37089: cud-delete_confirm should not be cud
Adjust aqbudgets.pl and currency.pl to check for the correct op value

To test:
Part 1 - Delete a fund
1. Go to Acquisitions > Funds
2. Try to delete a fund
   --> Confirmation page shows fund name as '' and fund amount as 0.00
3. Click "Yes, delete this fund"
   --> The fund is still there

Part 2 - Delete a currency
3. Go to Acquisitions > Currencies
4. Try to delete a currency
   --> Confirmation shows empty values for currency and rate
5. Click, "Yes, delete this currency"
   --> An error message appears and the currency is not deleted

6. Apply patch and restart_all
7. Repeat steps 1-5
   --> Confirmation pages display correct information, and deletions
       occur successfully

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>
(cherry picked from commit 5083d5752c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 19:22:52 +00:00
Phil Ringnalda
3e84279d3e Bug 37080: Cannot delete MARC bibliographic frameworks or authority types
The scripts for managing both bib and authority frameworks are now expecting
an op 'cud-delete_confirm' but delete_confirm isn't cud, it's just a GET of a
page asking if you are sure. The scripts just need to expect the op they are
actually getting, delete_confirm.

Test plan:
 1. Administration - MARC bibliographic framework - New framework
 2. Give the framework any code and description and Submit
 3. Actions menu for your new framework - Delete
 4. Note the message says 'Confirm deletion of framework '' ()?" rather than
    having the code and description included.
 5. Click Yes, note that deleting failed
 6. Administration - Authority types - New authority type
 7. Give the authority type any type and description and Submit
 8. Actions menu for your authority type - Delete
 9. Note the message again says '' () rather than 'desc' (FOO)
10. Click yes, note that deleting failed
11. Finally! Apply patch, reset_all
12. Repeat steps 1-10, this time noting that you get 'desc' (FOO) rather than
    '' (), and that deleting works.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c81b201dc9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 19:21:37 +00:00
Emily Lamancusa
9edb3346f4 Bug 37090: Correct op parameter in edi_accounts.pl
To test:
1. Go to Acquisitions > EDI Accounts
2. Create an EDI account if one is not already there
3. Try to delete the EDI account
--> Page refreshes and nothing happens
4. Apply patch, restart_all, and refresh the page
5. Try to delete the EDI account again
--> A confirmation page displays with correct information
6. Click "Yes, delete"
--> The EDI account is deleted

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 199b21bfc3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 18:07:16 +00:00
804404ab3f Bug 30623: (RM follow-up) Terminology: settings -> permissions
We're copying permissions not settings here, so it makes sense to make
that clear in the wording.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ee560652ec)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 18:03:11 +00:00
Brendan Lawlor
96097d8058 Bug 35294: Fix typos in catalogue code comments
Test plan:
1. git grep -n -E 'barocode|preproccess' to find the files and line # of typos
2. Apply the patch
3. git grep -E 'barocode|proccess'
4. See no results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e8ef0f9417)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:59:04 +00:00
David Nind
a0d5b813d5 Bug 25520: Fix the SMS number input hint on the OPAC messaging page
This makes the hint when entering an SMS number on the OPAC messaging
settings page the same as the staff interface hint: "Please enter
numbers only. Prefix the number with + or 00 if including the country
code." For some countries using either +XX or 00XX are accepted,
for example: +49 or 0049.

Test plan:
1. Set the SMSSendDriver system preference to Email
2. View the current hint for entering an SMS number in the staff
   interface:
   2.1 Go to Patrons > + New patron > Patron.
   2.2 Scroll down to the 'Patron messaging preferences' section at the
       end of the page.
   2.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + or 00 if including the country code.".
3. View the current hint for entering an SMS number in the OPAC:
   3.1 Go to the OPAC > Your account (log in if required).
   3.2 Select the 'Messaging' tab/section.
   3.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + if including the country code.".
   3.4 The difference: "..or 00.." is missing.
4. Apply the patch.
5. Refresh the OPAC messaging page.
6. The hint text for the OPAC is now the same as the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 313cf37a53)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:56:54 +00:00
David Nind
9b8e18657e Bug 36922: Patron attributes - update hint text for "Is a date"
The date field for patron attributes is now repeatable (enhancement made
in Koha 24.05 with bug 32610). This updates the hint text to reflect
the change.

Test plan:
1. Go to add a patron attribute (Administration > Patrons and
   circulation > Patron attribute types > + New patron attribute type )
2. Note that the hint for the "Is a date" field says "...Date attributes
   cannot be repeatable or linked to an authorised value category.".
3. Apply the patch.
4. Reload the page.
5. Note that the hint now says "...Date attributes are repeatable,
   but cannot be linked to an authorised value category."
6. Sign off D:

PA amended: 'are repeatable' -> 'can be repeatable'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a8e1d8dc90)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:53:58 +00:00
David Nind
cbc0d4161b Bug 36338: Update onboarding error message when creating the Koha administrator patron
Update the error message for the web installer onboarding
section when creating the Koha administrator patron (where
the card number or username already exists):
- Fix capitalization
- Use the same label in the error message as used in
  the form

Error message before: The patron has not been created!
Card number or Userid may already exist.

Error message after: The patron was not created! The
card number or username already exists.

Test plan:
1. Option 1:
   1.1 Review the diff for the patch and make sure that
       the updated text makes sense.
       . Previous text: The patron has not been created!
         Card number or Userid may already exist.
       . Updated text: The patron was not created! The
         card number or username already exists.
OR
2. Option 2:
   2.1 Access the database server:
       mysql -uroot -ppassword -hkoha-db-1
   2.2 Drop the koha_kohadev database:
       drop database koha_kohadev;
   2.3 Create the database: create database koha_kohadev;
   2.4 Add privileges (for a real installation this would
       be limited):
       grant all on koha_kohadev.* to koha_kohadev;
   2.5 Restart everything (there may be some errors listed):
       flush_memcached and then restart_all
   2.6 Access the web installer: go to 127.0.0.1:8081
   2.7 Use the database user name and password: get from
       /etc/koha/sites/kohadev/koha-conf.xml
       (default: koha_kohadev, password)
   2.8 Continue through the installation process until you
       reach 'Selecting default settings':
      . Make appropriate selections to use all the sample
        data options and settings
   2.9 For the 'Onboarding' step - Create Koha
       administrator patron:
       . Surname: Acevedo
       . First name: Henry
       . Card number: make up a number that doesn't exist in
         the sample date, for example: 741852963
       . Library: Centerville
       . Patron category: Staff
       . Username: 23529000035676 (this is an existing
         value already in the sample data)
       . Password: a valid password, for example:
         KohaCon2024
       . Confirm password: repeat password used
       . Submit
         ==> Error message before patch: The patron has not
             been created! Card number or Userid may
             already exist.
   2.10 Apply the patch.
   2.11 Repeat step 2.9
   2.12 The error message is now: The patron was not created!
        The card number or username already exists.

3. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bd195784a0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:52:16 +00:00
Janusz Kaczmarek
dca760d5b2 Bug 36930: Item search gives irrelevant results when using 2+ added filter criteria
In the Item search the librarian is allowed, in the first step, to define
additional filters like Title, Author, Publisher, Publication date etc.
(in the third fieldset).  This works fine but only for one criterion.
If one adds two or more criteria, the filter does not apply at all.

Test plan
=========
1. Make an Item search with the Pulblisher filter. Put
   %University of California% as the value.
   You should get 5 rows (with standard ktd test data set), three
   from 1982, and two from 1988.
2. Edit search -> add the second criterion: AND Publication date is 1982.
   You would expect three rows but you get 900+ rows.
3. Apply the patch; restart_all.
4. Repeat p. 2. You should get the expected three rows.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bdc7ac2c93)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:50:38 +00:00
David Nind
e7acfdbf65 Bug 36961: Fix typo in opacreadinghistory system preference description
Fix a spelling error in the opacreadinghistory system preference
description - 'itms' to 'items'.

Test plan:
1. In the staff interface view the description for the
   opacreadinghistory system preferences (Koha administration >
   System preferences > search for opacreadinghistory).
2. Note that it reads "Allow patrons to see what itms they have
   checked out in the past."
3. Apply the patch.
4. Refresh the page.
5. Note that 'itms' is now spelt correctly as 'items'.
6. Sign off.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cd95ea29c0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:49:37 +00:00
2d4537ba12 Bug 36940: Resolve two warnings on undefined branchip
If you enabled AutoLocation and have a branch without ip, this
triggers warnings.

Test plan:
Check logs in this situation with/without this patch by logging out
and in again on staff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2f1ffbc6ec)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:48:12 +00:00
e7afd54cc8 Bug 34573: (follow-up) Add better logic for add/update title and headers
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 865ca8b1fc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:46:26 +00:00
David Nind
17069dfb1e Bug 34573: (follow-up) Additional updates for modify vendor page
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 58c1f64f77)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:46:26 +00:00
e5600ea8dc Bug 34573: Fix inconsistencies in acquisitions modify vendor title tag
This patch updates the vendor details template so that the title tag
correctly reflects whether the user is viewing the vendor or modifying
it.

To test, apply the patch and go to Acquisitions.

- Locate a vendor and view the details (supplier.pl?booksellerid=X)
  - The title should read "Vendor X > Acquisitions > Koha"
- Edit the vendor.
  - The title should read "Modify vendor X > Acquisitions > Koha"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3baaf5a324)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:46:26 +00:00
Julian Maurice
5b5aa52547 Bug 34077: Allow to use --category-code as the only filter option
--category-code was not checked in the "at least one filter option"
check but it is clearly a filter option.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5cb77532e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:44:43 +00:00
Julian Maurice
0061ffc6ce Bug 34077: Improve documentation and error messages of writeoff_debts.pl
* Change the SYNOPSIS to better describe the different ways to use the
  script
* Only show the SYNOPSIS when options used are wrong (unknown option,
  no filter options, or neither -c nor -v)
* Show the options details only with --help
* Clarify the fact that -v is required when -c is not supplied in the
  description of both options
* Print a specific error message for the following cases:
  * no filters options
  * neither -c nor -v was supplied

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 215b29a737)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:44:43 +00:00
227a5619a4 Bug 36937: Remove warning from unit tests
This patch fixes a warning in the unit tests

Test plan:
1) prove t/db_dependent/api/v1/password_validation.t
2) There will be a warning in the output - 'Use of uninitialized value $status in numeric eq (==)'
3) Apply patch
4) Re-run the test
5) The warning will disappear

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5e7572ad7a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:42:16 +00:00
David Nind
a4e5980710 Bug 30715: Terminology for the log viewer - use 'Staff interface' instead of 'Intranet'
The log viewer (Tools > Additional tools > Log viewer) uses
'Intranet' as:
- an option for filtering what log entries to display.
- a value in the log entries interface column, for log entries.

Koha's terminology guideline is to use 'Staff interface' instead of
'Interface' (https://wiki.koha-community.org/wiki/Terminology#I).

Test plan:
1. Perform some actions that will create log entries when using the
   staff interface. For example:
   1.1 Enable the UseRecalls system preference.
   1.2 Edit the title for a record.
   1.3 Add an item for a record.
2. Use the log viewer to view the logged changes:
   2.1 Go to Tools > Additional tools > Log viewer.
   2.2 Select Submit.
   2.3 Log entries are displayed for the changes made.
3. Note that:
   3.1 For the log viewer 'Interface' filter options, "All" is
       selected by default, and other options are Intranet, OPAC,
       SIP, Command-line, REST API, and Cron job.
   3.2 For the changes viewed in step 2, the value displayed in
       the 'Interface' column is 'Intranet'.
4. Apply the patch.
5. Refresh the page.
6. Note that:
   5.1 For the interface filter options, 'Intranet' is now changed
       to 'Staff interface'.
   5.2 In the list of log entries, the value in the interface column
       is now 'Staff interface'.
7. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 540ec4f6dc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:36:11 +00:00
e8ab419a99 Bug 36999: Fix 00-strict.t fails to find koha_perl_deps.pl
Since Bug 36323 moved koha_perl_deps.pl it is not needed anymore in 00-strict.t
It fails with :
koha_1       | Can't stat koha_perl_deps.pl: No such file or directory
koha_1       |  at /usr/share/perl5/Test/Strict.pm line 151.

Patch remove koha_perl_deps.pl from @dirs.
It contains misc.

Test plan :
prove t/db_dependent/00-strict.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 325a96a406)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-18 17:33:55 +00:00
Phil Ringnalda
0aa348b665 Bug 37031: Club enrollment from staff interface fails due to Entrollment typo
There is a typo in svc/club/enroll - it tries to call
Koha::Club::Entrollments->search when it should be
Koha::Club::Enrollments. This causes and error when
enrolling patrons in clubs.

Test plan:
1. Without the patch, Tools - Patron clubs - New club template - name it
   and save
2. New club - (your template) - name it and save
3. Circulation - check out to a patron - Clubs tab - Enroll - Finish
   enrollment, get alert() about failure to enroll
4. Apply patch, restart_all
5. Enroll - Finish enrollment, success

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>
(cherry picked from commit f02d90938d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-17 21:33:49 +00:00
739915b547 Bug 37316: Adjust tests
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e071ba329d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-17 21:11:42 +00:00
8bd61eba3d Bug 37316: Treat empty string barcodes as undef
To test:
1.Add the following to MarcItemFieldsToOrder:

homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g|949$j
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l
coded_location_qualifier: 949$f
enumchron: 949$h

2. Add the following to MarcFieldsToOrder:

price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

3. Acquisitions > Find a vendor
4. Create a new basket -> Add to basket -> From new file
5. Use the file uplodaded in this bug report.
6. Set format to MARCXML and stage for import.
7. Add staged files to basket
8. Select all, make sure you add an item type, and choose 'Do not look for matching records'
9. Save and kaboom.
10. APPLY PATCH and restart_all
11. Follow the steps again, this time no kaboom.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b68373ae42)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-17 21:11:42 +00:00
9a50edfa7f Bug 37316: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7b4bdf286c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-17 21:11:42 +00:00
Brendan Lawlor
3986061572 Bug 37059: Fix insert button in notices and slips
This patch fixes the insert button in notices and slips. The container id needed to be appened with '_panel'

To Test:
1. Edit any notice or slip and try to use the insert button
2. Nothing happens
3. Apply patch and refresh the browser
4. Edit any notice or slip and use the insert button
5. Confirm the parameters are inserted into the tempalte as expected.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5c5a7d42e6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-17 20:57:00 +00:00
a3db039d41 Bug 35942: OPAC user can enroll several times to the same club
Test Plan:

1) Create 3 clubs, 1 limited to library A, 1 limited to library B and one not limited
2) Use a patron with home library A.
3) Go to the opac-user page, "Clubs" tab show 0/2 (the one from library B is not listed)
4) Browse to /cgi-bin/koha/svc/club/enroll?id=1
5) Reload that page a couple times
6) Note the patron is now enrolled in the same club multiple times
7) Delete those enrollments
8) Apply this patch
9) Restart all the things!
10) Repeat steps 2-7, note the lack of duplicate enrollments!
11) Repeat steps 2-10 for the staff interface

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c735c027fa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 20:07:29 +00:00
Andrii Nugged
12edba3773 Bug 37014: Fix after-modal-POST to transmit "not_returned" message
The bug report addresses an issue where the message "Item was not checked in" erroneously appears during the second POST after a manual or modal check-in process.

1. In circ/returns.pl:
   - Introduced a new hash `%rinot_returned` to track items not returned across pages.
   - Updated the logic to capture the "not returned" status from the query parameters.
   - Adjusted the input processing loop to include `not_returned` status.
   - Modified the section handling barcode check-ins to appropriately initialize and update the `not_returned` status.

2. returns.tt:
   - Added hidden input fields in the template to include `not_returned` status in the form submissions.

The changes ensure that the "not_returned" status is correctly tracked and displayed, preventing the erroneous message from appearing on subsequent POST requests.

1. Perform a manual check-in of an item, but make some warning modal appear: for ex., transfer: check-in the item in not home library.
2. Press OK on the modal. There will be a POST transition again to redraw the checked-in items list.
3. Verify that the "Item was not checked in" message appears erroneously near the item's row.
4. Apply the patch.
5. Repeat steps 1-3 and check that there will be no erroneous "Item was not checked in" message.

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f567d41b91)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 20:03:55 +00:00
87d1a6aabc Bug 37005: Fix problem with item_type_description being undefined
To test:
1. Set noItemTypeImages to 'Don't show'
2. Find a record with items and notice the holdings table never loads.
3. APPLY patch, maybe clear borwser cache too.
4. Try again, the holdings table should load.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 37b66a2d7c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 20:02:01 +00:00
08305283ff Bug 37187: Fix deletion of label batches and label templates
This patch uses the new form-submit JS to convert the label management
deletion link from a GET operation to POST.

To test, apply the patch and go to Cataloging -> Label creator.

- Click Manage -> Label batches. Create a batch if necessary.
- Click the "Delete" button in the "Actions" column. You should get a
  confirmation message, "Are you sure you want to delete this?"
  - Test both the confirming and cancelling.
- Perform the same test with Manage -> Label templates.
- From the Manage -> Label batches page, click "edit" on one of the
  batches.
- Right above the "Items in batch number X" is a toolbar which should
  have a button, "Delete batch." Test that it works correctly to delete
  the batch.

Sponsored-by: Athens County Public Libraries
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>
(cherry picked from commit 5f156ad3df)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 19:59:10 +00:00
642acf7566 Bug 36956: Allow all providers to be displayed in reports
This patch fixes an incorrect usage of the API which was only returning 20 results.

Test plan:
1) Go to ERM module and make sure you have more than 20 data providers stored in your database.
1) (Optional) Run the following command (k-t-d) to create 21 data providers:
  perl -MKoha::Database -e '
      my $schema = Koha::Database->schema;

      $schema->resultset("ErmUsageDataProvider")->create({
          name => "name ".$_
      }) for (1..21)
  '
2) Go to eUsage / reports and create new report (cgi-bin/koha/erm/eusage/reports)
3) Check that only the first 20 data providers are displayed in the drop down
4) Apply patch
5) yarn build or reset_all to rebuild the javascript
6) Repeat steps 1-3, all providers should now be displayed

PA amended patch: Updated commit message test plan

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6afe1e14dc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 19:35:44 +00:00
Phil Ringnalda
c4a481a65a Bug 37078: Damaged status not showing in detail.pl
The API returns the fact that an item is damaged in 'damaged_status' but the
code that builds the holdings table is looking for 'damaged' so it doesn't
find that an item is damaged.

Test plan:
1. Administration - Authorized values - DAMAGED row, click Add
2. Give it the Authorized value 2 and the Description Awful
3. On a record with more than one item, like Empress of the blues,
   edit one item to have Damaged status: Damaged and one to have
   Damaged status: Awful
4. On the bib detail view, note that the status column shows both
   as 'Available'
5. Apply patch, refresh
6. Note that now one shows as Damaged and one as Awful (verifying that
   the value is being read from the AV, not the fallback default which
   is also 'Damaged')

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 65e0ffa882)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 19:30:18 +00:00
ad968a00d0 Bug 36459: Do not duplicate duedatespec IDs
To test;
1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date
   (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer
   populated in that field.
4. You must add the date again here.
5. APPLY PATCH
6. Try again and this time the confimration date should be set
   correctly.
7. Follow the test plan from Bug 18885 to make sure on site checkouts
   still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e33714cd0d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 19:27:55 +00:00
d925cb586a Bug 36424: Remove trailing comma in DBRev 23.06.00.061
This fixes a syntax erorr in the database update for
the bookings tables.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f7e1559a79)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-11 19:23:07 +00:00
Laurae
dc92d3aebd Bug 37071: Updated the purchase suggestions link
To test:
1. Go to a patron account and click on “New purchase suggestion” under the “Purchase Suggestions” tab.
    1. Clicking on the button will take you to the suggestions management page.
2. Apply the patch.
3. Go back to the patron account and click on the “New purchase suggestion” link again. This time it will take you to the purchase suggestion form. You are now able to successfully submit a purchase suggestion.
4. Sign off and have an amazing day. :D

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
(cherry picked from commit a7484ed759)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 17:02:28 +00:00
d0ded0c737 Bug 37037: (RM follow-up) Add hint at end of script run
This patch adds a hint to the end of the script to notify the end user
that they may need to run the build_holds_queue cronjob if they are
using RealTimeHoldsQueue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8dd9c94c57)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 17:00:00 +00:00
690ee4483b Bug 37037: touch_all_biblios.pl triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled
If RealTimeHoldsQueue is on, touch_all_biblios triggers a update_holds_queue_for_biblios background job for each affected record. This will result in a as many background jobs being queued up as records! It makes far more sense for this script to not do that which gives the administrator the option for running the holds queue builder if the changes would affect holdability, or to not run it at all.

Test Plan:
1) Run touch_all_biblios.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this patch
5) Merge touch_all_biblios.pl again
6) Note that no update_holds_queue_for_biblios jobs were queued

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 45bfbd0e2d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 17:00:00 +00:00
Sam Lau
4056c1e0c2 Bug 35869: Removes the dismiss button from messages on OPAC SCO module
This removes the "Dismiss" button from the SCO module. Currently, the
"Dismiss" button is present, however it does not function properly and
logs the user out if they press it. As noted on previous chats, keeping
the button would require serious changes, thus it's easier just to remove
the functionallity.

To test:
1) Enable  WebBasedSelfCheck
2) Add an OPAC mesaage to a patron account
3) Login to self check ( http://localhost:8080/cgi-bin/koha/sco/sco-main.pl )
4) See the OPAC message, click dismiss.
5) Notice you are logged out at redirected to:
   ( http://localhost:8080/cgi-bin/koha/opac-dismiss-message.pl )
6) Apply patch
7) Log back into the self checkout module
8) Notice that there is no longer a "Dismiss" button for the message.
9) Log into OPAC into the same user's account
10) On the summary page, note that there is still a dismiss button.
11) Ensure this still works properly
12) sign-off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2313bc3103)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 16:56:49 +00:00
Emmi Takkinen
310d19e6b3 Bug 37021: Change item_id type as integer in holds endpoint
When one makes a GET call to holds endpoint and hold has
item attached to it, item_id is handled as string not integer
as it should.

To reproduce:
1. Make sure you have hold waiting in your database.
2. Call endpoint api/v1/holds/?q=[{"me.status":"W"}].
=> Note that holds item_id is displayed as item_id: "12345".
3. Apply this patch.
4. Call endpoint again.
=> item_id should now be displayed as 12345.

Also prove t/db_dependent/api/v1/holds.t.

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 20e0c056c6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 16:54:54 +00:00
Matthias Le Gac
f4b73a16ff Bug 36166: Disable select to add to list if opacuserlogin is disabled
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8d3c3b35e0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 16:52:21 +00:00
38b618c4a5 Bug 36207: (RM follow-up) CSRF correction
I think there was a rebase issue here where we split the form into two
forms instead of one.  This patch returns us to one form with two
different submit options (one for selected tags and one per tag) that
both trigger the confirmation modal before submitting to the controller.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0ac23a6247)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 16:48:00 +00:00
8e9652665f Bug 36207: Use confirmation modal when removing tags from titles in the OPAC
This patch changes the process of removing a tag from a title on the
user's tag list. It now uses a confirmation modal dialog instead of a
JavaScript alert.

The patch also makes some minor tweaks to CSS to correct style on
"remove" links.

To test, apply the patch and rebuild the OPAC CSS.

 - Log in to the OPAC as a user who has submitted multiple tags or tags
   on multiple items.
  - Open the "Tags" link in the sidebar of the user summary page.
  - Click the "Remove tag" link next to one of the titles in the table
    of the user's tags.
  - You should see a modal confirmation message, "Are you sure you want
    to remove the selected tag from this title?" It should show the
    title and the tag which will be removed.
  - Test both the "Yes, remove tag" and "No, do not remove tag" choices.

  - Check the box next to one of the tagged titles and click the
    "Remove selected tags" button at the bottom of the table.
  - You should see a modal confirmation message, "Are you sure you want
    to remove this item from the list?" It should show the title and
    the tag which will be removed.
  - Test boh the "Yes" and "No" choices.

  - Check the box next to multiple tagged titles and click the
    "Remove selected tags" button at the bottom of the table.
  - You should see a modal confirmation message, "Are you sure you want
    to remove the selected tags from these titles" It should show the
    titles of all the records you selected and the corresponding tags to be
    removed.
  - Test both the "Yes" and "No" choices.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e834a575ae)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-10 16:48:00 +00:00
Lari Strand
7102672032 Bug 34718: Input field in fund list (Select2) on receive is inactive
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cbae441055)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-03 16:24:40 +00:00
18a186969e Bug 36983: Fix incorrect required class
This patch fixes an error on the B_address2 field which sets it to be
required incorrectly

Test plan:
1) In PatronSelfRegistrationBorrowerMandatoryField, set B_address to be
   required.
2) In the OPAC, navigate to the self registration form.
3) In the Alternate address section, fill in the Address field that you
   have just set to be required. Ensure that you leave the Address 2
   field blank.
4) Fill in all other required fields and submit the form, it should show
   you that the Address 2 field is required, even though it shouldn't be
5) Apply patch
6) Refresh the page and repeat steps 1-5, it should allow youto submit
   the form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 009d83648c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-03 16:23:06 +00:00
b12f880c93 Bug 36894: Display journal article ILL request author
This patch fixes the ILL request table to display authors for journal article request types

Test plan:
1) Create an ILL request with the type of Journal Article and add an author in the Article author field
2) Click on the List requests button to see the table
3) The Author field should be blank for the request you created
4) Apply patch
5) Hard refresh the browser to reload the javascript
6) The author field should now be visible

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 11eb0d1da7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-03 16:20:46 +00:00
4f49e37c6e Bug 36948: (follow-up) Add chomp to sip log4perl config
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8e0d18e35a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-03 16:17:55 +00:00
309cc9c9d1 Bug 36948: (follow-up) Allow IPv[46] in port config
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fcd7e884bc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-03 16:17:55 +00:00
2c156f8ce1 Bug 36948: (follow-up) Remove log_file param, adjust caller_depth
We keep OPEN when people still use log_file or setsid.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c0d76f707b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-03 16:17:55 +00:00
7076762bba Bug 36948: Resolve SIP issues in D12
My Koha testing docker SIP started dying repeatedly after launch. After investigation, I
found it was a problem with logging and default ports.

In D12 there is no syslog anymore, everythign uses journal. Four our purposes, lets log SIP issues
to sip.log by default

Attaching a patch to clear things up.

To test:
1 - Open KTD/D12
2 - tail -f /var/log/koha/kohadev/*.log
3 - On another terminal 'restart_all'
4 - Wait a bit, notice SIP dying
5 - Apply patch
6 - Update SIPconfig:
    server-params:
    log_file='/var/log/koha/kohadev/sip.log'
    service with port 8023:
    port="127.0.0.1:8023/tcp"
7 - Restart all
8 - Confirm SIP no longer dies

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5dc1ec387d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-03 16:17:55 +00:00
Emily Lamancusa
796300926c Bug 37000: (follow-up) Add foreign key last
Certain configurations of MySQL will not allow a column to be changed
from nullable to non-nullable if the column has a foreign key constraint.
Add the foreign key constraint last to avoid issues from this.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8e788af50b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-06-27 22:12:04 +00:00
a4d7767fa4 Bug 37000: (Bug 36120 follow-up) Improve reliability of database update
This patch adds a series of fallthroughs to ensure pickup_library_id is
always set prior to adding the NOT NULL constraint.

We initially only looked at items.homebranch but as that's a nullable
field itself, we now look at items.holdingbranch before finally
defaulting to the first available branch in the branches table in the
worst case.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8cedcfd5c8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-06-27 22:12:04 +00:00
710e002b32 Bug 37026: Fix JS error on sco-main.tt
To test:
1. Have a patron with some checkouts, holds, and charges that can login into the SCO module.
2. To go  sco-main.pl and login
3. Try changing tabs and notice the console error:

 dataTables is not defined

 4. APPLY PATCH
 5. Try again, there should be no error.
 6. Make sure you can switch the tabs without any issues.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b9ca6b4a36)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-06-27 22:09:09 +00:00