Commit Graph

44909 Commits

Author SHA1 Message Date
Jenny Way 8bc2bf99da Bug 19188: Self checkout missing currency symbol
Test plan:
1. Under administration and system preferences, enable WebBasedSelfCheck
2. In OPAC give user fine by going to 'my account' at top right
3. Then under fines tab 'create manual invoice'
4. Make sure this amount is more than noissuescharge which can be
   changed under system preferences
5. Go to the web based self check from the OPAC URL
6. Log in as your user
7. Try to check out an item
7. Error 'Item cannot be checked out' should occur
8. With the patch, the currency symbol should show for the amount.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5eab08cc2e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 13f7ee3e93)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32a589f7aa)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Caroline Cyr La Rose d6fbec7bd4 Bug 32644: Terminology: staff/intranet and biblio in plugins-home page
This patch replaces some incorrect terminology in the plugins-home page.
The current terminology is available at https://wiki.koha-community.org/wiki/Terminology

To test:
0. Make sure you have no enhanced content plugins installed
1. Apply patch
2. Go to Administration > Manage plugins
3. Click 'View plugins by class'
   --> Notice that one of the options is 'View bibliographic record enhancement
   plugins for the staff interface'
4. Make sure this phrase is gramatically correct, makes sense and has no
   typos
5. Click on that option
   --> Notice that the message says 'No plugins that can enhance the bibliographic
   records in the staff interface are installed'
6. Make sure this phrase is gramatically correct, makes sense and has no
   typos

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fe829e5b2)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 807b3f6695)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1f0d5bb89d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Katrin Fischer e7b39cb4b8 Bug 32694: (QA follow-up) Fix missing TT filters
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b2c1c0efe1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 851739b52a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8cf822728d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Nick Clemens 5969b81de8 Bug 32694: Fix value of 'Keep current' option in receiving
This patch restores missing template toolkit markers around the variable

To test:
1 - Order an item in a basket
2 - Close the basket
3 - Attempt to receive the item, leaving budget as 'Keep current'
4 - 500 Error:
C4::Acquisition::ModReceiveOrder(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (koha_cclsny.aqorders, CONSTRAINT aqorders_budget_id_fk FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE) at /usr/share/koha/intranet/cgi-bin/acqui/finishreceive.pl line 120
5 - Apply patch
6 - Receive order successfully!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9531a82e97)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 6f0bbc2afc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 85d389c5e8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Alex Buckley f32ad78ef8 Bug 18247: Remove SQL queries from branch_transfer_limit.pl
1. Visit Administration > Patrons and circulation > Limit transfer limits

2. Observe collection codes are displayed as tabs on the Limit transfer
limits page when the BranchTransferLimitsType syspref = 'Collection
code'

3. Switch the BranchTransferLimitsType syspref = 'item type'. Refresh
the Limit transfer limits page and observe the tabs have changed to item
type codes

4. Apply patchset and restart services

5. Reload the Limit transfer limits page and confirm it displays
correctly with the  BranchTransferLimitsType = 'collection code' and
'item type'

6. Confirm you can successfully save transfer policies

Sponsored-by: Catalyst IT

Signed-off-by: Jacob Omara <jacob.omara@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e863f93c0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit b57ce0e15b)
(cherry picked from commit d5038e3124)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Nick Clemens fb06a4a09c Bug 32416: Add a warning to the file
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e88f31d8a2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ab0a00dcb9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0b1b8df1d5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Nick Clemens d53488da77 Bug 32416: Update attribute number for arp search to 9015
Bug 20078 updated the attribute for arp to 2014 to avoid conflict with 9013 not-on-loan-count

Bug 28830 then added Control-number-identifier as 2014, breaking arp again

This patch updates the number to 9015

To test:
1 - Apply first patch
2 - Attempt searching by arp, no results (add a unique 526$d to a record to ease searching)
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
    cp etc/zebradb/biblios/etc/bib1.att /etc/koha/zebradb/biblios/etc/bib1.att
    cp etc/zebradb/ccl.properties /etc/koha/zebradb/ccl.properties
5 - Restart zebra
6 - Rebuild indexes
7 - Search again, success!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e6efa82099)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 54f0873019)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5ccbc9ea92)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Nick Clemens c0d1ff21c9 Bug 32321: Pre-populate material type for 006 in advanced cataloging editor
To test"
1 - Edit a record in advanced cataloging editor with field helpers enabled
2 - Choose a material type, not BKS, from dropdown
3 - Set the first position to something
4 - Save the record
5 - 006 shows 'BKS'
6 - Apply patch
7 - Reload
8 - Record should show correct value
9 - Edit 006 and confirm the first position correctly determines material type

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7818717f3c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 8a28f6e259)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fc4056c802)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Kyle Hall 36772abfbe Bug 32573: Send ACK message to RabbitMQ before handling the job
Splitting off this functionality from bug 32558. This is the comment that started this discussion: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32558#c15

From the O'Reilly book Mobile and Web Messaging:

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3c5bd02e1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 0f7b8008f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2fd293fa6e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:30 +01:00
Matt Blenkinsop 1ff7c6bdcd Bug 32221: Borrowers.password should no longer be an option
When creating a notice template the user has the option to add the borrower's
password to the template. This should be removed as the password should not be
an option to be added to a notice.

Test plan:
1) Navigate to Tools > Notices and slips
2) Either create a new notice or edit an existing notice
3) Observe that in the list of fields available to insert into the message body,
   there is the option for "borrowers.password"
4) Apply patch
5) Navigate to the same menu
6) Observe that the "borrowers.password" option is now no longer visible

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9608b16a6b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 7a143c19ad)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2a81c5d8cc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:29 +01:00
Kyle Hall 32469eb7e0 Bug 32656: Script delete_records_via_leader.pl no longer deletes items
Bug 29788 inadvertantly replaced a call to safe_delete() with safe_to_delete()
such that any time the script should delete an item it only checks to see if
the item is delectable, after which deletion of the record fails because the
items were not deleted.

Test Plan:
1) Mark a record with items to be deleted via the record leader
2) Run delete_records_via_leader.pl -i -b -v
3) Note the script says it is deleting the items but then the record
   deletion fails. Note the items remain in the items table of the
   database.
4) Apply this patch
5) Repeat step 2
6) This time the items and record should be deleted!

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 790f00781a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 03a9b13958)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0f430ce9a8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-02-17 13:08:29 +01:00
Tomas Cohen Arazi 98a970b9fb
Increment version for 21.11.17 release
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-03 09:30:59 -03:00
Tomas Cohen Arazi 419bb79fc4
Bug 32330: (QA follow-up) No 'queue' column in 21.11.x
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-03 09:30:58 -03:00
Arthur Suzuki e350767f6b
Update release notes for 21.11.16 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-27 14:44:54 +01:00
Arthur Suzuki f1a5e2f810
Increment version for 21.11.16 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-27 14:28:16 +01:00
Arthur Suzuki 09f26f0d3b
Revert "Bug 31873: Check ->find before calling ->safe_delete"
This reverts commit e4ab9602c0.
2023-01-27 12:03:34 +01:00
Arthur Suzuki 932c2f9519
Bug 32330 : [21.11] column 'queue' is actually called 'type' 2023-01-27 11:25:41 +01:00
Arthur Suzuki 2d46616524
Fix translations for Koha 21.11.16
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-27 11:06:33 +01:00
Koha translators 2e7b38917a
Translation updates for Koha 21.11.16 2023-01-27 11:06:33 +01:00
Jonathan Druart e825b301e3
Bug 31244: [21.11.x] Fix 500 if logout and not logged in
Can't use an undefined value as a HASH reference at /kohadevbox/koha/C4/Auth.pm line 985
        C4::Auth::checkauth('CGI=HASH(0x5603b7dc4300)', 0, 'HASH(0x5603b2633238)', 'intranet', undef, 'intranet-main.tt') called at /kohadevbox/koha/C4/Auth.pm line 186
        C4::Auth::get_template_and_user('HASH(0x5603b7b83d08)') called at /kohadevbox/koha/mainpage.pl line 40

Test plan:
Open a private window
Hit /cgi-bin/koha/mainpage.pl?logout.x=1

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Rebased for 21.11.x
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-01-27 11:06:32 +01:00
Nick Clemens c0fa919492
Bug 22042: Block all return actions when BlockReturnOfWithdrawn items is set to block
Currently this syspref only bokcs the literal 'return' from a patron, i.e. the checkin

It still processes transfers, refunds lost items, updates NotForLoan status etc.

We should block all of these things

To test:
1 - Set BlockReturnOfWithdrawn to block
2 - Set an item as lost and withdrawn
3 - Check it in
4 - Item is found
5 - Apply patch
6 - Repeat 1-3
7 - Checkin is blocked, item still lost

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 321d8f7ce6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:55:04 +01:00
David Cook b23df4c8c0
Bug 32481: Limit prefetch size for background jobs worker
This patch adds a prefetch size of 1 to the background jobs worker,
so that it fetches 1 message at a time. Without this change,
the RabbitMQ connection timeout when too many messages for slow tasks
are fetched at the same time.

To test:
0. Apply patch
1. Run background worker
2. Rapidly enqueue multiple jobs that in total will take longer
than 30 minutes to process

Bug 32481: Use correct prefetch syntax for RabbitMQ

According to https://www.rabbitmq.com/stomp.html the header to
use for managing the prefetch is "prefetch-count".

You can verify the number of delivered and unacknowledged messages
on a channel on a connection by running "rabbitmqctl list_channels"
on the RabbitMQ host. This will tell you how many messages have been
delivered and are awaiting acknowledgement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd89c38321)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 6238ce057e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0b206ff709)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:31:03 +01:00
Jonathan Druart 6bf469bb4a
Bug 32349: Remove find-nonutf8 tests
We don't run it and it does not seem very useful. Let's remove it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 26cce9e1c4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 299a7fdf9c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b7632281d1)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:25:46 +01:00
Jonathan Druart aee75b61fc
Bug 32349: Remove TEST_QA
There is an env var that we are passing from koha-testing-docker, TEST_QA.
It's used in Koha from a single test file, t/00-testcritic.t.
If not set, no test is run.

Do we really need this? libtest-perl-critic-perl is packaged and automatically installed.

Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0adc264edb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a375a94225)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a5e6294167)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:25:46 +01:00
Arthur Suzuki 3dacf04ccf
DBRev 21.11.15.001
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:21:13 +01:00
Fridolin Somers 020f777724
Bug 32330: Add indexes to table background_jobs
Table background_jobs should have indexes to optimize queries.

Query on borrowernumber :
mainpage.pl:    my $already_ran_jobs = Koha::BackgroundJobs->search(
mainpage.pl-        { borrowernumber => $logged_in_user->borrowernumber } )->count ? 1 : 0;

Query on status and queue :
misc/background_jobs_worker.pl:        my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues });

Test plan :
Run updatedatabase and play with background jobs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8755f77599)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f2ec246fd6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a579ff4fe4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:18:17 +01:00
Lucas Gass b9140b31a5
Bug 31492: Set CSRF token in circulation.pl
To test:
* Turn on patronimages system preferences
* Go to any patron account
* Hover over the 'dummy image' for the Add button
* Browse and select an image for upload
* Saving results in the following error:

The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.

Apply patch and try again. You shouldn't need to try twice, it should work on the first attempt now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f0e6f25428)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 11d88ba12f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 715afc2826)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:11:26 +01:00
Géraud Frappier 123d2a144e
Bug 32255: Resolve "Cannot use file upload in batch record modification"
When using the batch record modification tool with a file of biblionumbers, nothing happens. When we click 'Continue' the file is somehow removed before continuing.

To test:
1. Get a file of biblionumbers (if you already have a file, proceed to step 2)
   1.1. Go to Reports
   1.2. Click on 'Create from SQL'
   1.3. Enter a report name (e.g. biblionumbers)
   1.4. Enter the following SQL query

SELECT biblionumber FROM biblio LIMIT 100

   1.5. Click 'Save report'
   1.6. Click 'Run report'
   1.7. Click 'Download' > 'Tab separated text'

2. Create a MARC modification template (if you already have a MARC modification template, proceed to step 3)
   2.1. Go to Cataloging > MARC modification template
   2.2. Click 'New template'
   2.3. Enter a template name (e.g. Add note)
   2.4. Click 'Submit'
   2.5. Click 'New action'
   2.6. Choose
        - Add new
        - Field 500 a
        - with value Note
   2.7. Click 'Add action'

3. Batch modify records
   3.1. Go to Cataloging > Batch record modification
   3.2. In the 'Upload a file tab', choose the biblionumber file
   --> Note that the name of the file appears next to the Choose button
   3.3. In 'Template', select the MARC modification template
   3.4. Click 'Continue'
   --> The name of the file disappears next to the Choose button and goes back to 'No file chosen'
   --> Message 'No records were modified

4. Apply path
   4.1. Procede step 3.
   4.2. See that we can see the list now

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bc974ef361)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit e99f339be5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b5174a9217)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 14:10:05 +01:00
Fridolin Somers 042db086aa
Bug 32348: Add library public in columns settings
Bug 27360 added public info on libraries table.
This should be added to columns settings.
Currently the column "STMP server" can not be managed in settings.

Test plan :
Play with columns settings of table Administration > Libraries

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2286524692)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a7f471c548)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bcf43b4e9c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:57:34 +01:00
Emmi Takkinen 2570fe4f67
Bug 30694: Set decreaseloanholds undef when deleting circulation rule
When one tries to delete rule with field "Decreased loan period
for high holds" filled, delete fails without errors. This happens
because rule isn't set in code section handling the delete in
smart-rules.pl.

To test:
1. Create a new circulation rule and fill all fields.
2. Try to delete the rule.
=> Rule isn't deleted, all fields except "Decreased loan period
for high holds" are now empty or have value "Unlimited".
3. Modify the rule and set field "Decreased loan period for high
holds" empty.
4. Delete the rule.
=> Rule is deleted successfully.
5. Create a new rule, fill all fields expect field "Decreased loan
period for high holds".
6. Delete the rule.
=> Rule is deleted successfully.
7. Apply this patch.
8. Again create a new rule with field "Decreased loan period for high holds" filled.
9. Try to delete the rule.
=> Rule is deleted successfully.

Sponsored-by: Koha-Suomi Oy

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 91fc31c32b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 63fd9be98b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bc18581f8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:49:50 +01:00
Fridolin Somers 424caa64be
Bug 20596: (QA follow-up) perltidy
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa13c1a9d1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d2ac793be2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8441834b84)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:45:27 +01:00
David Cook c713d1c357
Bug 20596: Add unit test for multiple values in authority search
This patch adds a unit test which returns 2 authority records
via an implicit OR when searching for strings from two different
authority records.

Test plan:
1. prove t/db_dependent/Search.t

Signed-off-by: Jan Kissig <jan.kissig@th-wildau.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 76d676a868)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5921e1c523)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8146d064b5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:45:27 +01:00
David Cook 41d51f5cbb
Bug 20596: Join authority queries together with OR
This patch joins authority queries together with OR like Elasticsearch.

To the best of the author's knowledge, this code only gets triggered
when using record matching rules, but there may be other situations
where it's used.

Authority search in cataloguing plugins use a different path, and
authority search in authority home doesn't allow multiple queries,
so they'll never trigger this OR joining of queries.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Create a record matching rule with the following:
Matching rule code: NID
Description: NormdatenID
Match threshold: 100
Record type: Authority record
Search index: Any
Score: 101
Tag: 035
Subfields: a
Offset: 0
Length: 0
Normalization rule: None

Click "Remove this match check"

2. Stage gnd.xml (from BZ 20596 attachments)
- Choose "MARCXML" for "Format"
- Choose "Authority" for "Record type"
- Choose "NID" for "Record matching rule"
- Click "Stage for import"
3. Note the job gets to "100% Finished"
(Before this patch, it would say "0% Failed")

4. View the batch
5. Import the record
6. Repeat steps 2-4 and note that the record matching rule
worked

7. Go to http://localhost:8081/cgi-bin/koha/authorities/authorities-home.pl
8. Search for "e"
9. Note that the search works

10. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
11. Click tab 6
12. Click on the tag editor next to "a Personal Name"
13. Type "e" into each box and click "Search"
14. Note that the search works

Signed-off-by: Jan Kissig <jan.kissig@th-wildau.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b2a23149bd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9a319b8169)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f4462b8402)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:45:27 +01:00
Marcel de Rooy eb0f3101f8
Bug 32457: Fix CGI vulnerability in addorder.pl
Test plan:
Go to acqui/addorder.pl.
Create two items.
Check if results still match your expectations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b389f9a361)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 427d0b32e9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fc980aed31)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:31:19 +01:00
Mona Panchaud 2d6b182e89
Bug 32115: Add ID to check-out default help message dialog to allow customization
This adds a div with the id attribute selfcheckdefaulthelpmessage to
the first paragraph of the web based self check help page.

To test:
* Enable WebBasedSelfCheck
* Go to: /cgi-bin/koha/sco/sco-main.pl in the OPAC
* Log in and open help
* Verify by looking at the source code, that the first paragraph
  starting with "If this is your first time..." now has an id.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 46cad29c5a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c47336e24c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2c4f0357c4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:29:17 +01:00
Kyle Hall 6a5a16202f
Bug 31166: Digest option is not selectable for phone when PhoneNotification is enabled
Digests are not available via Talking Tech, but the artificial limit should not be in place for the non-TT phone notices. If only phone is selected, digest remains disabled.

Test Plan:
1) Apply this patch
2) Enable TalkingTechPhoneNotification
3) Verify behavior hasn't changed
4) Disable TalkingTechPhoneNotification, Enable PhoneNotification
5) Note disgest option is now selectable if only phone is selected

Signed-off-by: Evelyn Hartline <evelyn@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Bug 31166: (QA follow-up) Remove debugging lines

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Bug 31166: (QA follow-up) Implement on OPAC side

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Squashed by RM
(cherry picked from commit 0622e118db)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7932027496)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 90c5cbbd49)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:26:35 +01:00
David Nind 64d12f5232
Bug 32302: (follow-up) Hide ISBN label when list sent from the staff interface
This makes the same change to the staff interface. Lists sent
from the staff interface hide the ISBN label in the email message
when there are no ISBNs for a record.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 69ddb83f41)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d2cc5f116)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e9462982b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:25:44 +01:00
David Cook a813daed5e
Bug 32302: Hide "ISBN" label when no ISBN data when sending list
There is a logic mistake in the opac-sendshelf.tt template where
we test if the "ISBN" key exists in the "BIBLIO_RESULT" hash when
we should really be testing if the arrayref returned by "ISBN" is
empty or not, since that "ISBN" key always exists and contains at least
an empty arrayref.

Test plan:
1. Apply patch and restart your Koha Starman
2. Create a public list containing records with 020 MARC fields and
records without 020 MARC fields
3. View the list in the OPAC
4. Click "Send list" and email it to yourself
5. Note that only records with 020 MARC fields with show "ISBN:"
in the email output

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44366c0985)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 45a53a3d5e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f5ac9b281e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:25:05 +01:00
Didier Gautheron cfb37201db
Bug 32355: Add css class url to URL syspref
Add missing css class to URL syspref.

To Test:
1 - open admin/preferences.pl
2 - Search for URL
3 - casServerUrl, UsageStatsLibraryUrl, KohaManualBaseURL,
    PrivacyPolicyURL, LibrisURL input field size are small.
4 - Apply patch
5 - all URL fields have the same bigger size.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit af794a6cfa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5bd6dfcc59)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e6db0d3e07)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:11:21 +01:00
Kyle Hall d27798f793
Bug 28975: (QA follow-up) Fix indentation, simplify if statement
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 72c10b2227)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 91830a27e2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93db86326b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:10:46 +01:00
The Minh Luong 441c282779
Bug 28975: Holds queue lists can show holds from all libraries even with IndependentBranches
When using IndependentBranches, usually all branches are removed from the drop-down menus. But in the Holds Queue page, there is the possibility to choose "All branches". From there, you can see holds from all libraries.

To recreate :
1) Activate IndependentBranches, IndependentBranchesPatronModifications and IndependentBranchesTransfers
2) Create a staff user with limited permissions (NOT a superlibrarian), including holds permissions. Here are mine as an example
  - circulate (all)
  - catalogue
  - borrowers
    - delete_borrowers
    - edit_borrowers
  - reserveforothers (all)
  - reports (all)
3) Create (or make sure you already have) a patron in another branch (we'll call them patron X)
4) Place a hold for patron X on an available item from their own library
5) Run misc/cronjobs/holds/build_holds_queue.pl
6) Go to Circulation > Holds queue and make sure you can see the hold
7) Log in as your limited staff patron
8) Go to Circulation > Holds queue
9) In the drop-down menu, choose "All" and click Submit
-- Notice you see the hold of the patron from another branch under Patron
column: "A patron from library <library name>"
11) Apply the patch.
12) Notice that the "All" option is no longer available for the limited patron. Limited patrons can't see holds from other libraries anymore.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fe2e2f9400)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 6d2756b7d7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2a2ffb4fcf)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:05:30 +01:00
Jonathan Druart fafddbb105
Bug 32291: (bug 16735 follow-up) Remove ref to library category in branches.tt
On bug 16735 we rewrite the library groups system. Those references in
branches.tt were part of the previous code, and they can be removed.

Test plan:
Confirm the above and that those code errors are never sent to the
template.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4f8b742cbe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit e111430461)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 14acae6f9f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 11:05:15 +01:00
Kyle M Hall a642ce783c
Bug 31675: Remove packages from debian/control that are no longer used
As far as I can tell, we are no longer using CGI::Session::Serialize::YAML or YAML::Syck, but they are still marked dependencies for the Debian package.

Signed-off-by: Danyon Sewell <danyonsewell@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 56ecfc55fc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 114fa96a06)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:57:35 +01:00
Nick Clemens 7d1aa6892e
Bug 32037: Check for existence of object before building link
This patch adds a check on the existence of the object and passes this to the template

I also drop a level of IF by moving to ELSIF

To test:
 1 - Enable ReturnLog amd IssueLog
 2 - Checkout an item to a patron
 3 - Return it
 4 - View 'Modification log' tab of the borrwer
 5 - Note item links, test them, they work
 6 - Delete the item
 7 - Reload and try links again, they do not work
 8 - Apply patch
 9 - Reload, no more links
10 - Checkout and return another item
11 - This one has links, and they work as before

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 03c8725b4e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 21d01baebc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:52:26 +01:00
Fridolin Somers 59f365b6f3
Bug 31881: Fix search link in MARC view
In framework a subfield can be defined with a link (with a search field).
This create an hyperlink in MARC view.
Currently with Elasticsearch the link does not work because search query contains 'field,phr:',
which is useless since the link contains 'idx=field,phr'.
With Zebra looks like the idx param is ignored.

Test plan :
1) Use Elasticsearch search engine
2) Edit subfield 245$a in default framework
3) Enter 'title' in 'Link'
4) Save
5) Create a record with default framework with 245$a = 'The Fifth Elephant'
6) Go to MARC view
7) Click on link in 245$a
8) You find the record

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 535936ea9c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7fe444dae3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:44:37 +01:00
Thibaud Guillot 396fd76431
Bug 32016: Remove debug console.log
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc90a41699)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 556fe3af0c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:36:55 +01:00
Thibaud Guillot 3691950ea9
Bug 32016: Fix clear filter button behavior
For example, if you filter by global search input a datatable which saves its previous state when you want to return to this datatable, the backup is recovered in a cookie but the "clear filter" button is disabled because for it the input is empty, the verification of the recovery of the cookie not being made.

When loading I therefore added the verification of the cookie and if the search value is not empty then the button can be activated.

Test plan:

1) Be sure to have some orders and baskets which can be received
2) Go to 'cgi-bin/koha/acqui/booksellers.pl' and click on 'Receive
shipments'
3) Enter something in global search
4) Go to receive and cancel or save to be back on datatable
5) See that you cannot remove your previous input by the 'clear filter'
button
6) Apply this patch
7) Repeat steps 3) and 4)
8) See that now you can remove your search

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=31881
(cherry picked from commit a054207896)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b14493c908)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:36:47 +01:00
Jonathan Druart 81b0a77e8a
Bug 32622: Fix Auth.t on D10
It's caused by a version mismatch of Test::MockModule with D10,
which does not have this commit: fef9e742e4

We should remove the chaining here.

Test plan:
Confirm that Auth.t still pass, and is fixed on D10

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d3b4edf009)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit b36b7d5751)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3622b51abb)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:02:33 +01:00
Marcel de Rooy e4ab9602c0
Bug 31873: Check ->find before calling ->safe_delete
When there is no item, you cannot safely delete it :)

Resolve this warning:
  Can't call method "safe_delete" on an undefined value at /usr/share/koha/cataloguing/additem.pl line 379
(Line numbers may vary across versions.)

Test plan:
Open item editor.
Add a new item.
Add another tab with same form. Delete new item.
Go back to former tab. Try to delete again.
You should see an alert now on top of the form.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d8a35585b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 65d267dd90)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-26 10:02:20 +01:00
Jonathan Druart 527b2b634f
Bug 29458: Fix selenium test
The authentication.t selenium tests (and a couple of others) were
failing with:
Error while executing command: element not interactable: Element <input class="btn btn-primary" type="submit"> could not be scrolled into view at /usr/local/share/perl/5.32.1/Selenium/Remote/Driver.pm line 411. at /usr/local/share/perl/5.32.1/Selenium/Remote/Driver.pm line 356.

We changed the other of the form, and t::lib::Selenium::submit_form was
not getting the correct (first) form. The one from the auth modal was
retrieved and submit button was clicked. Selenium raised an error as it
is not displayed.
The ->is_displayed selenium method does not work, as per the doc
"""
Note: This does *not* tell you an element's 'visibility' property; as it still takes up space in the DOM and is therefore considered 'displayed'.
"""
https://metacpan.org/pod/Selenium::Remote::WebElement#is_displayed

"The internet" is saying we should be able to use the following in our
xpath expression: not(ancestor::div[contains(@style,'display:none')]
but it actually only works if the display:none rule is defined on the
node (not from .css). Which does not work for us.

The only solution I found is to check for the size of the element, which
is (0,0) if not effectively displayed.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5520b8fb84)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-01-13 17:45:46 +01:00