Nick Clemens [Tue, 27 Dec 2022 20:21:15 +0000 (20:21 +0000)]
Bug 32537: Add no-block option to SIP cli emulator
This patch adds the option to pass a no-block option and use this
in checkout/checkin/renew messages
To test:
1 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkin --item 39999000010831
2 - Confirm out like:
SEND: 09N20221227 20183920221227 201839APCPL|AOCPL|AB39999000010831|ACterm1|BIN|
(Note the N after 09)
3 - Apply patch
4 - Restart SIP, repeat 1
5 - Confirm still an N
6 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkin --item 39999000010831 -n N
7 - Confirm still an N
8 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkin --item 39999000010831 -n Y
9 - Confirm the send has a Y after 09
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 0880d809492f4011ef4cfac32129df4a2dd1fa71) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 61c4d9d37454cab2240cc1c43f811045e492a2ec)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 2 Feb 2023 14:57:14 +0000 (14:57 +0000)]
Bug 32797: Check if fields have a value, not if true
When saving OAI set mappgins we are checking for truth, this prevents
saving subfield 0. We should check for content
To test:
1 - Go to Admin->OAI sets
2 - Create a set
3 - Define mappings for the set
4 - Attempt to save a rule on field 952 subfield 0 (withdrawn)
5 - It does not save
6 - Apply patch
7 - Try again
8 - 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 6f606e00c597cfdfb30fe969b061a331c8a372db) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 677e68c7f1c3456b4a4bbb0e4141a797b99e676b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Tue, 7 Feb 2023 11:49:28 +0000 (06:49 -0500)]
Bug 32612: (QA follow-up) Add BINMODE method to C4::SIP::Trapper
The module Log::Log4perl::Appender::Screen is attempting to change
binmode during unit tests for SIPServer and is failing because of
our tie in SIPServer.pm for reasons unknown.
This patch implements the perltie method TIEHANDLE which allows the
binmode to be handled in the C4::SIP::Trapper package.
Kyle Hall [Thu, 2 Feb 2023 11:53:53 +0000 (06:53 -0500)]
Bug 32612: (QA follow-up) Update package files
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 cb1da500ec1d409c836b66e0a0a1836c2d56b1fe) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a538cfea5b8614a58c58e0dd219a4001a400e24d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Wed, 1 Feb 2023 17:37:44 +0000 (12:37 -0500)]
Bug 32612: (QA follow-up) Remove superfluous line
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> 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 09e0f8e30db2b99556d32cbf0276fbe4e117ebab) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 9b25eb0ed31320f0f03875442cadb43a703e2b77)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 11 Jan 2023 18:46:11 +0000 (18:46 +0000)]
Bug 32612: Add worker-error to log4perl conf
To test:
1 - Apply patch
2 - vim /etc/koha/sites/kohadev/log4perl.conf, Add lines below:
log4perl.logger.worker = WARN, WORKER
log4perl.appender.WORKER=Log::Log4perl::Appender::Screen
log4perl.appender.WORKER.stderr=1
log4perl.appender.WORKER.mode=append
log4perl.appender.WORKER.layout=PatternLayout
log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n
log4perl.appender.WORKER.utf8=1
3 - Restart all
4 - Edit misc/background_jobs_worker.pl
- my $job = Koha::BackgroundJobs->find($args->{job_id});
+ my $job;# = Koha::BackgroundJobs->find($args->{job_id});
5 - In another terminal: tail -f /var/log/koha/kohadev/koha-worker-error.log
6 - Force enqueue a job (that won't be found because of #4
perl -e 'use Koha::BackgroundJob::BatchUpdateItem; my $bg = Koha::BackgroundJob::BatchUpdateItem->new(); $bg->enqueue({ record_ids=>['888888']});'
7 - Note error in log like:
[2023/01/11 19:26:10] [WARN] No job found for id=2983 main:: /kohadevbox/koha/misc/background_jobs_worker.pl (111)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> 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 3b1f2c57eaed978845eef3824c7311da06099bc5) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 872d03963e09633c50dabf3ac3be92bdb9cab391)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch fixes a duplicate attribute code for Author-in-order in the
biblios definition.
The picked code matches what was already in ccl.properties.
Also Chronological-term for authorities gets fixed.
To test:
1. Apply the regression tests
2. Run:
k$ prove xt/verify_bib1.att.t
=> FAIL: Some failiures
3. Apply this patch
4. Repeat 1
=> SUCCESS: Tests now pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a4999a289563281c2b6956edb94fc6e1b20ad54e) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit c59571cbf0ff3aa0aee4234c1672d8089d9045ed)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74513307292745add212d39d5564309188159dea) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a37207a192cefeaeddf591fc76728c962f461e55)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 32409: Fix cashup searching with non latin-1 chars
This patch fixes a problem with the way queries are passed to the API so
cashups are searchable with non-laint1 chars.
To test:
1. Have two superlibrarian users, one with non-latin1 chars on the name
(e.g. خمسة)
2. Setup a debit type that can be sold.
3. Use the POS module to have some activity, using both your regular
user and the other one.
4. Go to the register you used, and choose 'Transaction history'
5. Perform a couple cashups with each user ('Record cashup').
6. Look at the 'Cashup history' table
=> SUCCESS: You see cashups for both users
7. Use the 'Search' filter with latin chars
=> SUCCESS: Your user with only latin1 chars is displayed on the table
8. Repeat, using some non-latin1 char found on the other user
=> FAIL: Table is not refreshed or filtered!
9. Apply this patch
10. Reload the page
11. Repeat 8
=> SUCCESS: Filtering works now!
12. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 96cba5503c896b01bb4eb7eab326d2fa8c4b96dc) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 270170cd0e37ed016bec0ba845ce887f1b2414d0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Mon, 5 Dec 2022 22:50:23 +0000 (22:50 +0000)]
Bug 32406: Switch acq datatable from headers to query param
This patch changes the pending orders datatable from using the
x-koha-query header to the "q" query parameter, so that it is
able to support UTF-8 encoded scripts rather than just Latin-1
scripts.
Test plan:
1. Apply patch
2. Go to
http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
3. Change title from "Gairm" to "五" (alternatively use "cœur" or Arabic title)
4. Create a basket containing multiple records including bib 29 五
5. Close the basket
6. Receive shipment
7. You should be on a page like the following:
http://localhost:8081/cgi-bin/koha/acqui/parcel.pl?invoiceid=3
8. In the search box, type in 五
9. Note that you see a "Processing..." box and then the
results are filtered to just show the order for 五
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
tcohen amend: removed the line instead as we are probably phasing out
that DT configuration option anyway.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9248a0ef1f49677d52fb47aa5556215793bf218c) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit b40ebaae3cc7ec8e6de6259f6b275ade8a6f0891)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Emmi Takkinen [Wed, 30 Nov 2022 10:33:19 +0000 (12:33 +0200)]
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl
Calling GetBudgetHierarchy from acqui/histsearch.pl
is slow if param skiptotals is not used.
To test:
1. Open browsers Console -> Network (F12).
2. Navigate to Order search page and perform search.
=> Take a note how long it takes to load the Search results page.
3. Apply this patch.
4. Repeat step 2.
=> Page should now load faster.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f5daaa553bc63bd2c08212ee8db3d56c52781e9) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 6b5cf15102235daa38a1f5a70e6ee7bea306abe5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Fri, 20 Jan 2023 11:56:55 +0000 (11:56 +0000)]
Bug 32688: Convert recalls awaiting pickup tabs to Bootstrap
This patch updates the recalls awaiting pickup template
(recalls_waiting.tt) to replace a set of jQueryUI tabs. They are
converted to Bootstrap in order to complete Bug 29226.
To test, apply the patch and make sure the "UseRecalls" system
preference is enabled.
- Go to Circulation -> Recalls awaiting pickup.
- You should see two tabs, "Recalls waiting" and "Recalls waiting over X
days."
- The tabs should look correct and work correctly.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4877666fb5fed6fcab03063603a4d00cdbb7d1e0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 8d8f40ddddc8e2d899c557e35ffd6df338446b76)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Thu, 26 Jan 2023 21:46:51 +0000 (21:46 +0000)]
Bug 26628: Fix access to clubs when user only has clubs permission
If a user only has the clubs and no permission from the tools section,
they can't access the patron clubs page by navigation. This patch
extends the permission checks for tools to include the clubs, that
live on the tools page, but have a top level permission.
To test:
- create a patron with only the catalogue and clubs permissions
- log in to the staff client as that patron
- navigate to a patron record, confirm you can see the Clubs tab in the patron account, can add patrons to and remove patrons from clubs
- confirm you don't have a link to the Tools module either on the Koha homepage or in the More menu
- enter the clubs URL manually (/cgi-bin/koha/clubs/clubs.pl), confirm you are allowed to open the page
- Apply patch
- The only changes should be:
- You can now see the Tools entry in the More navigation menu
- You can now see the Tools module link on the start page
- Both take you to the tools page, only visible tools is 'Patron clubs'
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50927bb9b530f7a9c092dfe99bd2dddc69202432) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit ecdd1d2b420f646279c69f61be30e46a33e8739e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 1 Feb 2018 17:32:54 +0000 (14:32 -0300)]
Bug 19188: Use the Price template plugin with_symbol => 1
To make it displayed correctly depending on the configuration of the
currency
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 c6366c6d6869be719e48e73b40827efd574a13c6) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit ae4e269b7b12975d7e0d5504d0b2b504fa41a4ce)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jenny Way [Tue, 16 Jan 2018 22:05:39 +0000 (22:05 +0000)]
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 5eab08cc2edd897f9afdfeb46caf5e409476946f) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 13f7ee3e938b41f66d3d057001660c347b3dc08c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Wed, 4 Jan 2023 23:03:42 +0000 (23:03 +0000)]
Bug 32570: Display patron.state correctly
To test:
1. Have a patron with both a city and state in their Main address.
2. Do a patron search that will return that patron among others.
3. Notice the patroncity will say something like Centerville, Centerville: repeating the city but no state.
4. Apply patch
5. Try step 2 again, this time the city, state should display correctly.
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 5acc976dec573ddd679219a0e920871a10622ac3) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 74957821f951ec15b67e4707d562261724145805)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 0fe829e5b2a67a8af2b026af02dcb23ec55af195) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 807b3f669544fc380e8f4e4c868146a133c9d156)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 20 Jan 2023 20:18:27 +0000 (20:18 +0000)]
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 9531a82e97661ce7013a8e9a64b8d5c4d2fa3635) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 6f0bbc2afc4a592dc3d1cefb73b24a6cac4ea8ae)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 11 May 2022 14:47:58 +0000 (15:47 +0100)]
Bug 29021: RenewAccruingItemWhenPaid renewals are not seen
This patch updates the call to AddRewewal from Koha::Accounts to makr
the renewal as unseen.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 5b87d7a473328cfcf772b7faa31871be068d2a05) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 2c9ad0a59bfbcc41a1d5bd7b473e0bb6cc375008)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Alex Buckley [Mon, 8 Aug 2022 23:59:20 +0000 (23:59 +0000)]
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 5e863f93c06e1e67ddbf0c705657ca7d024006f6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit b57ce0e15b6cae5933c3836697be9ec5a607f14d)
Nick Clemens [Wed, 7 Dec 2022 13:02:33 +0000 (13:02 +0000)]
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 e88f31d8a28566cef2275c3d9e62f3432b1f54f2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ab0a00dcb90f07b6b115a76b916553eeabb9ee71)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 7 Dec 2022 12:56:02 +0000 (12:56 +0000)]
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 e6efa820993c0b04fd848caf84658620b7ef337d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 54f0873019d9e0f1db9d750a19ae25e52396aeb0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 11 Jan 2023 11:36:42 +0000 (12:36 +0100)]
Bug 32393: Split into 2 try catch blocks
Signed-off-by: Nick Clemens <nick@bywatersolutions.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 8df96262c145fc0ee26c019601b6a86de9396915) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 5fc37e57062fb16bd65e682bbca853151382834b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 2 Dec 2022 13:23:38 +0000 (14:23 +0100)]
Bug 32393: Prevent invalid job to block the job queue
I have faced a problem when testing an incorrect version of bug 32370.
The frame sent to the message broker was not a correct JSON encoded
string, and its decoding was obviously failing, exploding the worker
script.
Additionally, as we don't send a ack for this frame, the next pull will
result in processing the same message, and so in the same explosion.
No more messages can be processed!
This patch is logging the error and ack the message to the broker, in
order to not get stuck.
Test plan:
0. Dont' apply this patch
1. Enqueue a bad message
a. Apply 32370
b. Comment the following line in Koha::BackgroundJob::enqueue
$self->set_encoded_json_field( { data => $job_args, field => 'data' } );
c. restart_all
d. Use the batch item modification tool to enqueue a new job
=> Notice the error in the log
=> Note that the status of the job is "new"
=> Inspect rabbitmq queue:
% rabbitmq-plugins enable rabbitmq_management
% rabbitmqadmin get queue=koha_kohadev-long_tasks
You will notice there is a message in the "long_tasks" queue
2. Enqueue a good message
a. Remove the change from 1.b
b. restart_all
c. Enqueue another job
=> Same error in the log
=> Both jobs are new
=> Inspect rabbitmq, there are 2 messages
3. Apply this patch
4. restart_all
=> Second (good) job is finished
=> rabbitmq long_tasks queue is empty
We cannot mark the first job as done, we have no idea which job it was!
QA: Note that this patch is dealing with another problem, not tested in
this test plan. If an exception is not correctly caught by the ->process
method of the job, we won't crash the worker. The job will be marked as
failed.
Signed-off-by: Nick Clemens <nick@bywatersolutions.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 ca9a5981839a444fce109540035f26cac2780611) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 2 Dec 2022 13:43:27 +0000 (14:43 +0100)]
Bug 32394: [22.05.x] Restore long tasks queue
We are sending "queue" as parameter, but "job_queue" is retrieved in
Koha::BackgroundJob->enqueue...
Test plan:
Read code and confirm the above.
More fun for test plan will be found on bug 32393
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 4 Jan 2023 09:08:06 +0000 (10:08 +0100)]
Bug 32561: Prevent worker to run with unecessary modules in memory
Regression of bug 28413, bug 30410 added a "use Koha::Plugins" statement at the top of Koha::BackgroundJob, and so all Koha module are loaded by the worker on startup.
See bug 28413 for more info
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 a85a6bc4d4a1c15a065dc8b188d6de0c23f99271) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 16ecdc2f8edfcdc77214751caa049e46b237184c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 22 Nov 2022 14:05:08 +0000 (14:05 +0000)]
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 7818717f3c69bcaf5953d6139f6a104dfb1c4ee7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 8a28f6e2595997604e11355b49bffb5b90979113)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Nind [Fri, 20 Jan 2023 18:42:01 +0000 (18:42 +0000)]
Bug 32692: Terminology - use staff interface for MARC framework subfield editor
For the visibility options in the advanced constraints section of the
MARC framework subfield editor, use 'Staff interface' instead
of 'Intranet'.
This makes it consistent with the terminology list (see
https://wiki.koha-community.org/wiki/Terminology#I).
Test plan:
1. Go to Administration > Catalog > MARC bibliographic framework.
2. Select Actions > MARC structure for any framework.
3. For any tag select Actions > Edit subfields.
4. Note that in the advanced constraints section for the visibility
field that 'Intranet' is used as an option.
5. Apply the patch.
6. Refresh the page and note that 'Staff interface' is now used, which
is consistent with the terminology list (see
https://wiki.koha-community.org/wiki/Terminology#I).
7. Sign off D:
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Amaury GAU <amaury.gau@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab48b53d96bd33a37181b13bbb517500eae61fc2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 2dbd065065feff6a3d59c84c2f1cd742f31a3da3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Thu, 5 Jan 2023 16:35:42 +0000 (11:35 -0500)]
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
To test:
0 - Apply patch
1 - Place some holds for a patron
2 - From patron page, confirm you can suspend all
3 - confirm you can delete marked holds
4 - Edit a course in course-reserves
5 - Make a chaneg to personal details via OPAC
6 - Confirm change can be approved on staff side
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fc650b3e871e1d558ca1ff9f0dcb2f1fa0ad5db2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c1a5442a2286afbcd1bb6a429adab6f5a009ca07)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Matt Blenkinsop [Mon, 28 Nov 2022 14:35:37 +0000 (14:35 +0000)]
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 9608b16a6ba9d877dddc75beb1e1eef691f7b21a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 7a143c19ad570adf8ab6cdf6f65a5456f7357ad3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Tue, 17 Jan 2023 17:18:00 +0000 (12:18 -0500)]
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 790f00781ab6c98017529ebf226d52c36c36cd68) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 03a9b139587aea26a9abde4f45a7c4f99532353c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 8 Apr 2022 18:52:09 +0000 (18:52 +0000)]
Bug 22042: [22.05.x] 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>
Lucas Gass [Mon, 9 Jan 2023 18:12:33 +0000 (18:12 +0000)]
Bug 32597: Fix table display of OPAC article requests
To test:
1. Enable ArticleRequests
2. Make some requests (two or more) on the OPAC and go to the user
summary.
3. The table rows display horizontally.
4. Apply patch
5. Try step 2 again, the table should display correctly.
Note: I made some whitespace changes to make the markup look correct.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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 2ad22b26af3a32bf249395831c23d1e87e5db145) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 458d91fcf207df7e6f98b65af257365d0eb5c87b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 14 Dec 2022 15:44:28 +0000 (15:44 +0000)]
Bug 32465: Add 'queue' to koha-worker help documentation
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 486d78f544f1fe074d4f474206155c4bcb02ea2a) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 8d0443f44a1d22afb3ba5fb70a417727029a5713)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 9 Jan 2023 14:09:29 +0000 (14:09 +0000)]
Bug 32596: Filter jobs by enqueued on, not started on
To test:
1 - Do a bunch of stuff in the staff interface the will generate background jobs
2 - Wait a bit to make sure all the jobs are done
3 - Visit Admin->Jobs
4 - Note there is nothing shown
5 - uncheck 'Current jobs only' and 'Only include jobs started in the last hour'
6 - Note that nothing is shown, but header says '(filtered from X jobs)'
7 - Apply patch
8 - Reload table
9 - Confirm you can see the finished jobs now
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b1488f251eedbeafc6c7eb817984a0ce523b6ad) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit b7ecfa0138d08e19c1aaf0a807ffdd42720944f4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 5 Jan 2023 08:23:45 +0000 (09:23 +0100)]
Bug 32491: Split patron search terms on comma
Previous behaviour allowed search 'surname, firstname'. We should remove
the comma from the search terms.
Test plan:
On the main patron search, search for "surname, firstname" and confirm
that with this patch applied the search returns the expected results.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3333da49675daca9fc9d2147d31a446d20ac8ef) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit dfbc6afe1b18403bf69d05cd154dec616ad96798)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Thu, 22 Dec 2022 22:17:04 +0000 (22:17 +0000)]
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 cd89c383219eb9355b225b51219007a08b5e339e) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 6238ce057e2b2784d6c4a178728cb92d515ac454)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 25 Nov 2022 08:07:34 +0000 (09:07 +0100)]
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 0adc264edb3172f7d2dca771efbe19d15f240d8f) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a375a94225a843fbbeef94a4caf58a1ab09e78b0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Wed, 23 Nov 2022 06:49:02 +0000 (20:49 -1000)]
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 8755f775990bba513480a3b54372d76395ab2fbe) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f2ec246fd6f16224a556e073e28479ca5104949e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 2 Jan 2023 16:12:40 +0000 (17:12 +0100)]
Bug 32505: Restore patron search by formatted dob
Prior to the rewrite of the patron searches (bug 30063 and friends) it
was possible to search for a patron using their date of birth, formatted
following the dateformat syspref.
Now it only works if the date is iso formatted.
This patch is providing a fix to restore the behaviour, but does not
make it consistent. Only searching patrons by date of birth is fixed
here, when we actually want to fix the problem for the REST API DT
wrapper instead.
Test plan:
Search for patrons given their date of birth. You need to select "date
of birth" in the "Search field" dropdown, or set it in
DefaultPatronSearchFields.
Note that the column filtering is still not working, but I guess it was
the case already in older versions. Ideally we will need to have a
"datatype" attribute passed to the the 'th' and retrieved from
datatables.js to add this same trick and build the query appropriately.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aa1f97c2ea4376f5c3232846038c224c927dddc8) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 6e7f7c926f991c641e034f19cd493830c46fd95f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Fri, 13 Jan 2023 19:01:55 +0000 (19:01 +0000)]
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 f0e6f25428a997076d29dd3daeb905befed254f8) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 11d88ba12ff14a41a1d998d0286b258e356dd64a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Géraud Frappier [Thu, 17 Nov 2022 21:11:11 +0000 (16:11 -0500)]
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
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 bc974ef361926209b417502d86dbbacdb371f35a) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit e99f339be5a2b5a192b52a25e4240a8ea605f5d9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 13 Dec 2022 14:24:13 +0000 (14:24 +0000)]
Bug 32456: Preserve date accessioned if a date is not explicitly passed
To test:
1 - Edit an item record to have a blank date accessioned
2 - Save the record as marcxml from the detail page
3 - Edit the item to have an accession date
4 - Stage and import the file - matching in KohaBiblio and replacing items
5 - Import the file
6 - Confirm the date accessioned is cleared
7 - Apply patch
8 - Provide an accession date for the item
9 - Stage and import the file again
10 - Confirm the date remained
11 - Edit the item to remove the date
12 - Confirm you can manually blank the field
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2255d42abdb45955e82634a7b6fe1e1af0242361) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 655cd366e0fdc33512cfc546301854cc67a6a03a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Fri, 25 Nov 2022 07:57:40 +0000 (21:57 -1000)]
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 22865246926bf032cc3aa4a918a68bf467896dd7) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a7f471c548c2218cffd9c05ccb09fe8f20ce9597)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Emmi Takkinen [Tue, 15 Nov 2022 07:31:13 +0000 (09:31 +0200)]
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 91fc31c32ba14817d989bcd34854ebc8e41fa936) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 63fd9be98befc0be358b0074b94253befa929f48)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Wed, 14 Dec 2022 05:17:02 +0000 (05:17 +0000)]
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 76d676a868be048ec57c8eb178bf813a12823c6e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5921e1c523a9673b8770a9ea2ceb8ec3223ef5de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Wed, 14 Dec 2022 04:58:41 +0000 (04:58 +0000)]
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 b2a23149bdfdd27b1ccf5ec2106e92da4dbe05a4) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9a319b8169170d4ffa1cd4e3ad9b963fc3531fac)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 17 Nov 2022 13:38:58 +0000 (13:38 +0000)]
Bug 32247: Exit holds queue builder if there are no holds on the biblio
update_queue_for_biblio currently
1 - gets the holds on a bib
2 - gets the items available to fill any holds
3 - combines these to build the queue, exiting if there are no holds or items
If there are no holds at step 1, we don't need to do step 2 or 3
This patch simply deletes the queue for this biblio, then exits if there are no holds
Mona Panchaud [Sat, 5 Nov 2022 18:25:43 +0000 (19:25 +0100)]
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 46cad29c5a57546b594182bd2f86ad50d021b614) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c47336e24c9268b1fbea34d0e3770a07634eb6d0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Fri, 15 Jul 2022 18:10:37 +0000 (14:10 -0400)]
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 0622e118dbdd1687127c0734386e07ca268fd90d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 79320274961c3f9a59eb7815eca8de66302ffef9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Nind [Wed, 30 Nov 2022 23:48:25 +0000 (23:48 +0000)]
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 69ddb83f41cfc5c9eb6b4e483bca9316bac98db8) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d2cc5f116cbc8a2a4b00e44d1c59929a39b909a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Wed, 30 Nov 2022 22:52:55 +0000 (09:52 +1100)]
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 44366c09858364ac56fd37b5434bc77e7e48fe94) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 45a53a3d5e12ac9fb2ce016a90cd80895763298b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Didier Gautheron [Mon, 28 Nov 2022 07:29:47 +0000 (08:29 +0100)]
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 af794a6cfa85d8f3160ddb4c4f626e85063a844c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5bd6dfcc59e5daaf43735f8b3f611bd18a90bd23)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Thu, 1 Dec 2022 17:40:30 +0000 (17:40 +0000)]
Bug 32389: Fix Syndetics link on staff results page
To test:
1. Have SyndeticsCoverImages on and Syndetics setup.
2. Do a search that will return some results with Syndetics images
3. Click on the image link and you will get a 404
4. Apply patch
5. Link works!
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 2fec6d32b8de403b66b0c06b331528c6946025ed) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 852b0060cc84bccd0bd0517959fba78f66040429)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The Minh Luong [Tue, 25 Jan 2022 17:20:38 +0000 (12:20 -0500)]
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.
Jonathan Druart [Wed, 23 Nov 2022 09:08:26 +0000 (10:08 +0100)]
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 4f8b742cbe0c41a389290a821c0ca478bb108e26) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit e1114304618f88a40a6454be1df75bf8199141cc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Tue, 21 Sep 2021 11:08:44 +0000 (07:08 -0400)]
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 56ecfc55fc9850cd3bbfbae0e850f864c5a78fe3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 28 Oct 2022 14:43:10 +0000 (14:43 +0000)]
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 03c8725b4e253faf87ca3aeda71ce8b59d4efdb0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Thu, 20 Oct 2022 00:18:20 +0000 (14:18 -1000)]
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 535936ea9c23ad022972150fc0f396b450d3cd2f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Thibaud Guillot [Thu, 27 Oct 2022 12:15:19 +0000 (14:15 +0200)]
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 a054207896610e02ab26a2c6447509d64685094a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 13 Jan 2023 11:15:15 +0000 (12:15 +0100)]
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: https://github.com/geofffranks/test-mockmodule/commit/fef9e742e45e2437e3449eea9970d70555d44bff
We should remove the chaining here.
Test plan:
Confirm that Auth.t still pass, and is fixed on D10
Marcel de Rooy [Wed, 19 Oct 2022 13:48:18 +0000 (13:48 +0000)]
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 7d8a35585b4d2047e404fb4a1ce19596737d68ab)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Tue, 15 Nov 2022 13:55:18 +0000 (13:55 +0000)]
Bug 32208: Adjust Auth.pm for relogin without perms
If a second login on top of a current session fails on
permissions, we should not grant access without context.
Test plan:
[1] Run t/db../Auth.t, it should pass now.
[2] Test interface with/without this patch:
Pick two users: A has perms, B has not.
Put two staff login forms in two tabs.
Login as A in tab1. Login as B in tab2.
Without this patch, B gets in and crashes.
With this patch, B does not get in ('no perms').
Bonus: Go to opac if on same domain. You are still
logged in as B.
NOTE: I added a FIXME here, since you could argue about filling
the session info or otoh deleting the session. We present an
authorization failure; people may not realize that they are
still logged in (see test plan - bonus).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Tue, 15 Nov 2022 13:53:17 +0000 (13:53 +0000)]
Bug 32208: Extend Auth.t
Test plan:
Without follow-up patch, Auth.t should fail:
not ok 5 - No permission response
not ok 6 - checkauth returned failure
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Tue, 8 Nov 2022 13:40:17 +0000 (13:40 +0000)]
Bug 31908: Resolve second login with another userid
Somewhere the line undef $userid got removed.
We need it to resolve the second login situation.
Test plan:
Login in staff with user missing privileges.
On the login form login again with another staff user.
Note that you do no longer crash.
Run t/db../Auth.t
Run t/db../Koha/Auth/TwoFactorAuth.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Mon, 14 Nov 2022 11:07:09 +0000 (11:07 +0000)]
Bug 31908: Add a test to show issue
Test plan:
Without next patch, run Auth.t.
Should fail now before next patch resolves problem:
not ok 2 - Login of patron2 approved
ok 3 - Did not return previous session ID
not ok 4 - New session ID not empty
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Mon, 14 Nov 2022 11:09:43 +0000 (11:09 +0000)]
Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314
No change in user experience. But since we can mock safe_exit,
we can enhance test results.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Mon, 17 Oct 2022 13:08:33 +0000 (13:08 +0000)]
Bug 27265: (QA follow-up) Typo on L99 cron script
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ae986b992dfc2299ec58f4d1c0079fbac1ec4a03)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>