Jonathan Druart [Wed, 11 Nov 2020 13:22:50 +0000 (14:22 +0100)]
Bug 26997: Fix upgrade process under MySQL 8
If you are coming from an old version of Koha, you may face an upgrade
error for the SQL query using 0000-00-00.
The idea was to fix it, but actually the DBMS will raise an error (not
blocking the upgrade process however).
We can hide them to not cause confusion
Errors are like:
DBD::mysql::db do failed: Incorrect date value: '0000-00-00' for column 'suggesteddate' at row 1 [for Statement "UPDATE suggestions SET suggesteddate = '1970-01-01' WHERE suggesteddate = '0000-00-00';"] at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 23312.
Test plan:
Checkout an old version of Koha (3.20, not older)
Insert a dump, install Koha
Checkout a recent version of Koha, apply the patch (or use master)
Execute the upgrade process
You should not see the errors
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3c087bc216eeab8fe0d68a2d33407b554bc57074) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 3 Feb 2021 15:48:29 +0000 (15:48 +0000)]
Bug 18506: (QA follow-up) Indentation and more conditionals
Indentation fixes for readability
Cleaned up a few places where the ability to login otherwise was leakign through
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: Remove trailing spaces
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a5e8a2d0adcfeecc2ee0b62fb53ae0c7e1488626) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b5ab335d1b312791b6353379ddd34cbd162a6529) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Wed, 26 Apr 2017 11:39:15 +0000 (12:39 +0100)]
Bug 18506: Add xShibOnly preference for Shibboleth authentication
This patch adds two system preferences to Koha, opacShibOnly and
staffShibOnly, allowing users to restrict authentication to just
one method, Shibboleth.
We do however, allow for local fallback for the SCO/SCI logins.
A system preference was chosen over a configuration file update to
allow for local override at the virtualhost level. In this way a
hosting provider can setup a 'backdoor opac' for example to allow
fallback to local logins for support operations.
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1a81264ac1fff96d6a678ec7abe730e1ac2c9dbc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fd272244157ad0dc5e83a0cfb6430bbf1d3b90c8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27330: (follow-up) Cleanup missed on bug 23843
This patch makes some cleanup missed on bug 23843. The catch condition
on the controller was copied and pasted from other controller and should
be avoided unless there's a known case that needs special handling.
Otherwise it will be catched by the $c->unhandled_exception call.
All the old mappings were inadvertedly kept in the controller as well as
the (unused) _to_api method.
The base class is also cleaned from unnecessary mappings. Only mapped
things need to be added.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/clubs_holds.t \
t/db_dependent/Koha/Club/Hold.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f2593558952909f6c8df5d2ed8c6fea60cf7dcb9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch puts the tests in line with the current codebase. Some bits
are passed through perltidy to aid readability...
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/clubs_holds.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
=> SUCCESS: Tests look more like the rest of the API tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 94d966ecec327c5dbde22abc5259d380a3610d24) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 5 Feb 2021 17:29:54 +0000 (17:29 +0000)]
Bug 27604: (QA follow-up) Limit the libraries during the query
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 60a749ff5a6ab1e7bbbcc28d7db69bdca51b2eed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 3 Feb 2021 15:14:12 +0000 (16:14 +0100)]
Bug 27604: Make sure PatronSelfRegistrationLibraryList is used
The value of PatronSelfRegistrationLibraryList is used to display the dropdown
list of the libraries, but not after the form is submitted.
Test plan:
1. Empty PatronSelfRegistrationLibraryList
2. Self register a new patron
=> Confirm the dropdown list with the libraries contain all the
libraries
3. Fill in PatronSelfRegistrationLibraryList with branchcodes (eg. "CPL|MPL")
4. Self register a new patron
5. Edit the HTML form and replace the option's value with another
branchcode (FPL)
6. Save
=> Without this patch the branchcode FPL is used
=> With this patch applied an ugly 500 is returned
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 376bf9b980b877a38acc6680445ad5aa0078620c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Joonas Kylmälä [Fri, 19 Feb 2021 12:18:15 +0000 (14:18 +0200)]
Bug 27715: Use $dbh->quote_identifier to quote untrusted input
The sanitization using regex and \w class of characters might be
enough but given the vast number of unicode characters in \w and
possibility of in the future the database engines interpreting some of
those characters with special meaning it is better to wrap the column
identifier to quotes using $dbh->quote_identifier so it is only
interpreted as identifier and nothing else.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 18 Feb 2021 14:49:40 +0000 (15:49 +0100)]
Bug 27715: Sanitize order by DT params
We are not on the safe side when we build the ORDER BY clause from the
DataTables parameters.
I've started to limit the columns by using Koha::Objects->columns, but
for instance for the patron search we need (at least) the columns from
the branches, categories and members tables.
It seems easier, and still safe, to use a regex.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 12 Feb 2020 15:22:02 +0000 (16:22 +0100)]
Bug 24469: Record biblionumber in import_biblio when adding to basket via file
The column import_biblios.matched_biblionumber was not populated when an
order is created from a staged file.
Test plan:
A/ Create a new order from a stage file.
Use the "Save" button at the bottom of the "Add orders from" page
Then note the matched_biblionumber value. It should be populated correctly
B/ Import again the same record, this time you will have to use the "Add
order" link in the list of order (ie. not the "Save" button)
Note the matched_biblionumber value. It should be populated correctly
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Sarah Daviau <sdaviau@arlingtonva.us> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7bc460e00501a5161a5ac1700dc8d1ce7b76730c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 1 Feb 2021 13:50:52 +0000 (14:50 +0100)]
Bug 27569: Fix CSV export for biblio frameworks
The CSV import of the biblio frameworks is broken.
A change in LibreOffice resulted in CSV not formatted how the
C4::ImportExportFramework code is expected.
This code is quite broken, it expects all the CSV cells to be quoted.
The "add tests" patch shows the different between what we expected
before this patch, and what is the new version generated by LibreOffice.
Test plan:
Export a biblio framework in CSV
Open it with LibreOffice and save it undef a different name
Create a new biblio framework and use the new file to construct it
Compare the 2 frameworks and make sure they are identical
Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ad5de74cbc43e500c34ae6fa50958c6848d1586f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 29 Jan 2021 12:39:21 +0000 (12:39 +0000)]
Bug 12966: Add edition field to Card view
To test:
1 - Search Z3950 to add a record
2 - Find a record with an edition statement
3 - It shows in the table of results
4 - Check the card view
5 - No edition
6 - Apply patch
7 - Repeat
8 - Edition shows in card view
Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d9a97d4802716dab50ba90272d93d3dcf5ea98c8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 16 Dec 2020 14:28:50 +0000 (15:28 +0100)]
Bug 8287: Improve "show checked out items" filter on the overdues report
The "Show any items currently checked out" was confusing, especially if
the "From" and "To" due date filters were passed.
This patch moves the checkbox close to the 2 other filters and show/hide
the due date filters when needed.
Test plan:
0. Have some overdue
1. Search for overdues
2. Confirm that the filters are shown/hidden depending on the status of
the checkbox
3. Fill "To" with a date, tick the checkbox, submit the form
=> Confirm that the date was not taken into account
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 35994c1da5f5a7d29a192310822bf41a978d0a1f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 9 Feb 2021 19:31:33 +0000 (19:31 +0000)]
Bug 27653: Use div instead of caption for controls
The funds and acquisitions home page tables use captions for additional
table controls. These are more appropriate as "toolbar" divs.
This patch converts the <caption> to <div class="toolbar btn-toolbar">
and moves it just above <table> in the markup to keep it valid.
To test:
1 - View the tables on acquisitions home and budgets views
2 - Note the 'Expand all...' control row
3 - Apply patch
4 - The row remains, but is below the table controls
5 - The row is not included when printing or copying the table
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a63748e241ccfc2ae4dc4487c5c6cb87b1b54b84) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 5 Feb 2021 19:38:03 +0000 (19:38 +0000)]
Bug 27646: Allow export of Acquisition home and Funds tables
This patch swtiches these tables ot use KohaTables with exporting enabled
To test:
1 - Apply patch
2 - Confirm acquisitions home and funds tables display correctly
3 - Confirm you can export the tables
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1acbe07f0b0b8b3fa8af604054027c7dfe7cf64a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 8 Sep 2020 13:21:24 +0000 (15:21 +0200)]
Bug 26406: Fix suggestions filter at the OPAC
There is an input filter but it does nothing
Test plan:
You need 2 differents users, U1 and U2
Create several (at least one) suggestions for each of them
Test the following with and without OPACViewOthersSuggestions:
With U1 logged in, go to the suggestions tab and use the input to filter
the suggestions.
It should work correctly.
Also play with the "Suggested by" options
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ee0384184630b6c1b4c74e7a250e1cbc71c3e17f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 10 Feb 2021 10:30:45 +0000 (11:30 +0100)]
Bug 27669: Fix 'importing' and 'reverting' statuses when importing/reverting a batch
SetImportBatchStatus is not called with $batch_id
It has been caught by bug 25026, and www/search_utf8.t fails with
t/db_dependent/www/search_utf8.t .. 14/87 Error POSTing http://koha:8081/cgi-bin/koha/tools/manage-marc-import.pl: Internal Server Error at t/db_dependent/www/search_utf8.t line 240.
And, from logs:
manage-marc-import.pl: C4::ImportBatch::SetImportBatchStatus(): DBI Exception: DBD::mysql::st execute failed: Truncated incorrect DOUBLE value: 'importing' [for Statement "UPDATE import_batches SET import_status = ? WHERE import_batch_id = ?" with ParamValues: 0=undef, 1='importing'] at /kohadevbox/koh
a/C4/ImportBatch.pm line 579: /kohadevbox/koha/tools/manage-marc-import.pl, referer: http://koha:8081/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=2
Test plan:
Read the changes and confirm it does make sense.
Import and revert a batch
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a86242c2ea6ecdc2e9cf26dd7343c09926f68287) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 12 Feb 2021 11:11:54 +0000 (12:11 +0100)]
Bug 27068: Perltidy _checkHoldPolicy
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 40ccb7f37138e0bf31345608459eb7a9ba666027) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 12 Feb 2021 11:10:31 +0000 (12:10 +0100)]
Bug 27068: Don't 'cache' Koha::Libraries
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 20c97bca2dc1b742dff5d8828cf83a5543571e91) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 3 Dec 2020 11:48:13 +0000 (06:48 -0500)]
Bug 27068: Fetch libraries once for speed
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fba0bda9a9899dd7efa157ea11ee68ef836a5159) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 3 Dec 2020 11:34:33 +0000 (06:34 -0500)]
Bug 27068: Fix errors in _checkHoldPolicy
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f71452b934ef83c57ac2f74c0c7b0ea2b39e2cd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Agustin Moyano [Wed, 2 Dec 2020 23:04:51 +0000 (20:04 -0300)]
Bug 27068: Control hold group logic in HoldsQueue
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e82091f40a5193ff3fb47073ddb9b11f94645276) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 6 Nov 2020 16:18:07 +0000 (16:18 +0000)]
Bug 26958: Move Elasticsearch mapping template JS to the footer
This patch moves inclusion of JavaScript to the footer of the
Elasticsearch mapping template. It also moves the JS into a separate
file.
To test you should have SearchEngine system preference set to
"Elasticsearch."
- Apply the patch and go to Administration -> Search engine
configuration (Elasticsearch).
- Confirm that JavaScript dependent interactions work correctly:
- Tabs
- Under the bibliographic records and authorities tabs, table row
drag-and-drop
- Under the bibliographic records and authorities tabs, test the
"Add" line at the bottom of the table.
- Under the bibliographic records and authorities tabs, test the
"Delete" button.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3cfa9b1e993481defd6e7ec796031ec31279bf71) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Petro Vashchuk [Mon, 8 Feb 2021 14:04:48 +0000 (16:04 +0200)]
Bug 27654: Sort module.keys hash when render columns_settings.tt
On the "Administration -> Table settings" page, the order of
"tables related to pages" sections is different with each page refresh.
Cause of that is that Perl gives random order for hash keys where
those elements are stored on template render. To avoid that we
add a "sort" method where getting keys similarly how it was done
previously to display tables always in the same order.
To reproduce:
1) Head over to /cgi-bin/koha/admin/columns_settings.pl
2) Open any collapsed module settings, for example
"Acquisition tables". Check the order of pages.
3) Reload the page. Check the order of the same elements again.
They always come in random order, it's easily distinguishable.
4) Apply the patch.
5) Repeat steps 1-3 again and ensure that the order of pages
stays the same no matter how many times you reload the page.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f58c271b4255e85b3b6ddf90a9e802249954cc13) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 9 Feb 2021 15:01:59 +0000 (16:01 +0100)]
Bug 27645: Prevent "is on hold" warning to be displayed twice
During a batch checkout we display the "item is on hold" message
depending on different conditions.
However it can happen the message is displayed twice.
If the checkout is not impossible then we see:
This item is on hold for another patron.
This item is on hold for another patron. The hold will be overridden, but not cancelled.
We should only display the second one.
Test plan:
With a default ktd setup you can simply place an item on hold and use the
batch checkout tool to check it out
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4bb20fdb30202018f1519c6bd336e33fa6732d9e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch disables AllowHoldPolicyOverride by default in /holds. It
also adds a header that can be used to request the override explicitly.
Tests are added for this behaviour
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail because the behaviour is not implemented
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 15fcd755a24b07fc959210d2cb812d571bea3faf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 758732c052bc56f0f24213d95febfe5736baa1f0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 3 Feb 2021 14:48:37 +0000 (14:48 +0000)]
Bug 23767: Total children only if parents not visible
This patch changes the way to calculate the footer. It adds the budget and parent ids to the cell
as custom data elements. When totaling we grab a list of all the rows we are showing - if a
row has a parent and the parent is showing then we skip adding its value to the total.
As the function is used on both acqui-home and aqbudgets I adjusted both templates
To test:
1 - Follow the test plan on previous patch
2 - Try filtering the table so you see only the child funds
3 - Confirm the totals show the child alone when it is visible
4 - Confirm the child total is excluded when the parent is visible
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1f3152d453c8b5f2a366b916b50d3265d3ef135b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 7 Oct 2019 17:19:27 +0000 (17:19 +0000)]
Bug 23767: Include child funds in total spent and ordered on acqui-home
To test:
1 - Have three funds, two parents and one child
2 - Open a basket and add an order to each fund
3 - View acqui-home.pl
4 - Note that ordered values are only added from the two parent funds
5 - Complete these orders (close basket, receive)
6 - Note the spent only includes parent funds
7 - Place three more orders, one from each fund
8 - Now you can see both spent and ordered are incorrect
9 - Apply patch
10 - Reload, all should add correctly
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 07150a0a850845e8ff16bee6f85fdc74d510ec5e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 24 Jul 2020 16:18:44 +0000 (12:18 -0400)]
Bug 26059: Create guarantor/guarantee links on patron import
The change to allow multiple guarantors was meant to maintain the
ability to import patrons with a Koha patron guarantor, but is not
working as intended.
A) Adding the guarantor simply doesn't work
B) We have two columns named 'relationship', one for the borrowers
table, and one for the guarantor relationships table. This clearly
doesn't work and will cause confusion. The one for the guarantor
relationships table should be renamed.
C) guarantor_firstname and guarantor_surname in the CSV file do nothing
and should be removed.
This patch also fixes a minor issue that causes warnings like:
CGI::param called in list context from
/kohadevbox/koha/tools/import_borrowers.pl line 124
Test Plan:
1) Create a CSV with contents like:
cardnumber,surname,firstname,branchcode,categorycode,guarantor_relationship,guarantor_id
bloop,gloop,froop,MPL,J,father,48
brim,flim,zim,MPL,J,father,48
2) Attempt to upload this file, ensure you have a borrowernumber 48 that
can have guarantors
3) Note the accounts are not linked
4) Apply this patch
5) Restart all the things!
6) Upload the file again
7) The patrons should now be linked!
8) Download the starter CSV file
9) Note the second relationship column is now guarantor_relationship
10) Note the columns guarantor_firstname and guarantor_surname are no longer present
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5cd08373b1eca33ba1b8bd867b6de5d40c0d7242) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7166fabeeb03e2d4e803fab9a9e6f1181318a42d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 16 Feb 2021 08:06:03 +0000 (09:06 +0100)]
Bug 27707: (bug 26639 follow-up) Fix renewals when RenewalSendNotice is set
Since bug 26639 we have auto savepoint enabled and the LOCK TABLE query
in C4::Circulation::SendCirculationAlert is not correctly handled.
From the MySQL doc that is copied few lines before, "LOCK TABLE will
commit any transactions", but here we don't have a savepoint and the
release for a non-existent savepoint will throw a DBI exception.
This patch removes the unecessary transaction and prevent the following
error when a renewal is done:
> DBIx::Class::Storage::DBI::mysql::_exec_svp_release(): DBI Exception: DBD::mysql::db do failed: SAVEPOINT savepoint_0 does not exist [for Statement "RELEASE SAVEPOINT savepoint_0"] at /usr/share/koha/lib/C4/Circulation.pm line 3590
Test plan:
1. Enable RenewalSendNotice
2. Add some email address to patron and select the email box from the message preference "Item checkout and renewal" in order to receive renewal emails.
3. Check 1 item out to a patron
4. Renew it
Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 76c38d10d06dfcc377ab82cd312b12b8457a2dc8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 11 Feb 2021 10:21:43 +0000 (11:21 +0100)]
Bug 27676: Correct finesMode ne off condition
finesMode is 'off' by default (sysprefs.sql), but if you modify its value from
the UI and set it to 'production' then back to 'off', the DB value becomes an
empty string '', because of $YAML::Syck::ImplicitTyping
This has been found when working on on removing YAML::Syck (bug 22824),
so it's not perfect but the situation will be cleared in the follow-up
bug report.
Test plan:
0. Don't apply the patch
1. reset_all
=> finesMode eq 'off' in DB
2. Set the pref's value to production
3. Switch it back to 'off'
4. Value is '' in DB
5. Check an item in that should generate overdue charges
=> Charges are not generated
6. Apply the patch
7. Check an item in that should generate overdue charges
=> Charges are generated
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f831130525c62f799c831dd7eb1b36065b60c172) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Petro Vashchuk [Mon, 8 Feb 2021 14:11:04 +0000 (16:11 +0200)]
Bug 27655: Add barcode "columnname" to "column_settings.yml"
Preferences of the "Holds to pull" table missing the "Barcode" column.
This patch appends that column name to the "column_settings.yml"
in correct order. This also led to checked out columns in this settings
page that were not those which were hidden when the table displayed
(i.e. columns were shifted).
To reproduce:
1) Head over to /cgi-bin/koha/admin/columns_settings.pl
2) Open the collapsed "Circulation" list, go to the "Holds" page
and find preferences of the "Holds to pull" table there.
3) Check that the "Barcodes" column is missing from it.
4) Mark the last few columns for not to be
displayed (for example, three) and save the preferences.
Remember the column names you checked out.
5) Open the circulations section, then open "Holds to pull" report
when you have there some elements displayed, you should notice that
hidden columns shifted by one, as well if you press "gear" icon to
quickly enable/disable the columns, you will see those unchecked in
list last three will be not those you marked out.
6) Apply the patch.
7) Reload the "table settings" page, check that the "Barcodes"
column is present.
8) Check that on the "Circulation -> Holds to Pull" page all
columns hidden accordingly and properly (as explained in step 5.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 175a1eddd1efdf70a60b5fb0fb8dc52a9211c65f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch hardcodes HTTPS as the protocol to use when generating
YouTube content embedding. It is the supported protocol and without this
patch it falls back to 'http', or it can be 'ftp' depending on the first
indicator of the 856 field. They are all not supported so hardcoding it.
To test:
1. Have a record with 856 $uhttps://youtu.be/sMNkDPFycNU
2. Enable the HTML5MediaYouTube and HTML5Media sysprefs
3. Open the OPAC detailed view of the record
4. Open the Multimedia tab
=> FAIL: There's no embedded video
5. Apply this patch
6. Restart all
7. Repeat 4
=> SUCCESS: There's a live performance of Heroes del Silencio!
8. Sign off :-D
Sponsored-by: Banco Central de la República Argentina Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ca5efc9aa45c3c7893a09cf0067718fdaab63507) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Mon, 1 Feb 2021 12:13:03 +0000 (12:13 +0000)]
Bug 27582: Fix breadcrumb for POS > Library details page
This patch adds a link back to the top level 'Point of sale' page in the
breadcrumb for the 'Library details' summary page.
Test plan
1/ Enable 'UseCashRegisters' and 'EnablePointOfSale'
2/ Navigate to 'Point of sale' > 'Library details'
3/ Note the breadcrumb now includes the unlinked' Library details' page
title and a linked 'Point of sale' in the list.
4/ Signoff
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 05bfbe629f9e34b75fac641a461cf93574c1964d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Tue, 10 Nov 2020 21:21:17 +0000 (21:21 +0000)]
Bug 26943: Add notforloan statuses to catalog search
- create a positive value and a description of "Positive"
- set an item to your "Positive" value
- pull up the related bib in a cataloging search
- confirm it shows "Not for loan" in the Location column
- create a negative value and a description of "Negative"
- set an item to your "Negative" value
- pull up the related bib in a cataloging search
- confirm it shows "On order" in the Location column
- Apply patch
- re-do the cataloing search, instead of 'Not for loan' or 'On order' you should instead see the actual nfl description
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Telishia Mickens <tmickens@gc.edu> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6932e05569aa6be0ed165a28ddc2a4213a3a263e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Mon, 18 Jan 2021 10:21:28 +0000 (10:21 +0000)]
Bug 27454: Add sorting of patron attributes
This patch adds sorting on class code for the patrons attributes forms
on the memberentry page.
Test plan
1) Create a couple of different patron attributes
2) Go to the patron add page
3) Note the order in which the patron attributes load at the bottom of
the page.
4) Reload the page and note the order of those attribues may change (if
it doesn't, try reloading again.. it's random)
5) Apply the patch
6) Reload the page a few times and confirm the attributes are now
ordered.
7) Signoff
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0821a5890d98d17b58ffecaebbb02d673a864714) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
ava li [Wed, 20 Jan 2021 22:37:36 +0000 (22:37 +0000)]
Bug 27398: Made values in number patterns subscription length translatable
TEST PLAN:
Check that the subscription length options when editing or adding a
numbering pattern in the serials module are translatable. check that
the hard coded values are gone.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a9df4daab1f780f14fed1fba9f4afad8c4c73d30) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Blou [Wed, 3 Feb 2021 16:46:33 +0000 (11:46 -0500)]
Bug 27608: Corrects 'accepted by' inconsistency in suggestion.tt
When looking at an accepted suggestion in suggestion.pl, under 'Suggestion management', the displayed cardnumber in parenthesis is the wrong one. It displays the "suggestedby"'s cardnumber instead of the acceptedby.
Test:
- create a suggestion in OPAC or staff client with user A.
- In staff client, go to accept it with User B.
- Click Edit
- Under section "Suggestion management", you have a "Accepted on".
- In the By column, the cardnumber in parenthsis is not the B one.
- Apply patch, refresh.
Looking at the code patch is self-explanatory.
Sponsored-by: Collecto Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD Amended patch: Add sponsor line
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bb692e83ea97a32eb16eb1b1336a67f41c66d0de) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 4 Feb 2021 17:40:24 +0000 (17:40 +0000)]
Bug 27628: Fix minor HTML markup errors in OPAC search results templates
This patch makes a couple of minor corrections to templates related to
OPAC search results: An errant quote, and invalidly repeating ids.
The #login4tags id is changed to a class, and CSS related to this id
(which was not used) is removed. For consistency, the id is changed to a
class on the detail page as well.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Perform a search in the OPAC. Confirm that the "Log in to add tags"
link still looks correct at various browser widths.
- Confirm that it works to trigger the login modal.
- Validate the source of the page. There should be no errors.
- View the detail page for a bibliographic record.
- The "Log in to add tags" link should look correct and work correctly.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 15c3be55afbcff1d5f149f53273bfb25009582a7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Mon, 21 Dec 2020 16:25:47 +0000 (16:25 +0000)]
Bug 27290: Clean up validation
It seems we had the validator instantiated twice and we used a mix of
validation of required at form element level and in JS instantiator.
This patch moves the rules to consistently apply at the instantiation
and removes the duplicate lines.
To test:
1 - Enable 'useCashRegisters' and 'EnablePointofSale'
2 - Add a cash register
3 - Add a debit type that can be sold
4 - Go to point of sale and sell the item multiple times
5 - Enter 'Amount tendered' less than amount being paid
6 - Click confirm
7 - Transaction is processed as if full funds received
8 - Try with a negative number - goes through again
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 01fc41ca593ee030a77c2462acda0dc59dfe7ec0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Mon, 21 Dec 2020 13:22:15 +0000 (13:22 +0000)]
Bug 27289: Template tweaks for point of sale page
This patch makes a couple of minor changes to the point of sale page in
order to make it consistent with other pages in the staff interface:
- Buttons inside table cells should have the "btn-xs" class.
- Required fields should have a "required" class and should have a
"Required" label.
Also changed: Replaced <input type="number"> according to coding
guidelines.
To test, apply the patch and enable the EnablePointOfSale and
UseCashRegisters system preferences if necessary.
- On the Point of Sale page, add some items to purchase. Confirm that
the "Add" buttons in the "Items for purchase" table and the "Remove"
buttons in the "This sale" table are correctly sized.
- In the "Collect payment" form, confirm that "Amount tendered" and
"Cash register" fields are styled red with "Required" text after them.
- Confirm that the "Amount tendered" field will only accept numeric
input.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f27e91f1ad4a0048e360e67e6bd0c6723a981577) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 5 Feb 2021 11:01:38 +0000 (12:01 +0100)]
Bug 27154: Remove Koha::Util::SystemPreferences
On bug 15494, the same method "get_yaml_pref_hash" has been added to two modules,
Koha/Config/SysPref.pm and Koha/Util/SystemPreferences.pm
We only need the one from Koha::Config::SysPref and remove the whole
Koha::Util::SystemPreferences module.
Test plan:
prove t/db_dependent/Circulation/issue.t
must return green
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac11405321ae3e5fdd72701ddb41b62675e42c97) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On letter.tt we had nosort and set things via settings that are default in KohaTable so removed
those from letter.js. Also made the last updated column exportable
On upload.tt the noExport didn't do anything, because we couldn't export, so moved to used KohaTable
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6118d24904297c3b4bc44bf13e5e354b60feb33d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 18 Jan 2021 10:26:22 +0000 (11:26 +0100)]
Bug 26602: Don't export "actions" column
This patch add the noExport class to all "Actions" columns in the
codebase.
It's a stupid search and replace, maybe the class is added to table
where there is no export button.
Test plan:
Search tables where the export button is available. Confirm that the
"Actions" columns is not exported.
Example: /admin/branches.pl, /admin/cities.pl
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 655f11fd60ddf2a7ae690de340ed9945070ef3e2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 4 Feb 2021 12:00:10 +0000 (12:00 +0000)]
Bug 27589: Access item fields as hash
SIP item stores the item unblessed so field must be accessed as a hashref
This patch changes the code in handle_item_information to match the code in
handle_checkin
To test:
1 - In sip config set the cr_item_field='itype' for a sip account
2 - Restart SIP
3 - Attempt an item information requests using the sip_cli_emulator
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m item_information --item 39999000011791
4 - It fails!
5 - Apply patch and restart
6 - It succeeds!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 18368d6a0c6b35d91ad80a832435e57144d32b6d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 4 Feb 2021 11:59:11 +0000 (11:59 +0000)]
Bug 27589: Unit test
Previous tests only covered CHECKIN, this adds a test for ITEM_INFORMATION
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48e306f5d2bc4c49329e082823cbf85c67089a0d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Mon, 1 Feb 2021 18:22:58 +0000 (13:22 -0500)]
Bug 27586: Import patrons script has a confirm switch that doesn't nothing!
If the script misc/import_patrons.pl is run without "--confirm" it reports
that it is "running in dry-run mode" but it is not!
Test Plan:
1) Import a CSV of patrons using import_patrons.pm *without* the --confirm parameter
2) Note that it does actually import the patrons
3) Apply this patch
4) Note that this time the patrons are not actually imported
5) Import again with --confirm
6) Note that the patrons were actually imported this time!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d3005a2a4c493c624ffd6204f6fccc83ea350361) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 20 Jan 2021 10:16:48 +0000 (11:16 +0100)]
Bug 27466: Don't use set_preference from updatedatabase.pl
We must never use subroutines or methods from updatedatabase.pl!
Having it using C4::Context->set_preference will call
Koha::Config::Syspref->store then C4::Log::logaction and finally
Koha::Logger->get which will need the log4perl configured correctly
(which is not necessary the case when you upgrade).
Test plan:
git checkout ed3e4540d73c1c3009375ad339e09a2e676fa1bd (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 0
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is an empty string
git checkout ed3e4540d73c1c3009375ad339e09a2e676fa1bd (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 1
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is set to "opac"
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bab6a08ac98c1e6a72b346d554f020c0943e243d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Eden Bacani [Tue, 19 Jan 2021 21:21:51 +0000 (21:21 +0000)]
Bug 27395: Add a warning to PatronSelfRegistrationDefaultCategory
This patch adds a warning to the PatronSelfRegistrationDefaultCategory system
preference to not use a regular patron category for self registration.
If a regular patron category code is used and the cleanup_database cronjob is setup
to delete unverified and unfinished OPAC self registrations, it permanently and
and unrecoverably deletes all patrons that have registered more than
PatronSelfRegistrationExpireTemporaryAccountsDelay days ago.
It also removes unnecessary apostrophes at the end of two self registration
and modification system preference descriptions.
Test plan:
1. Apply the patch.
2. Check that the warning message for the PatronSelfRegistrationDefaultCategory
system preference is clear and makes sense.
3. Sign off!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 065c955cc67b6f113c9fb5d5ed918ba1400b5af9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 20 May 2020 13:30:45 +0000 (09:30 -0400)]
Bug 25552: Add missing Claims Returned option to MarkLostItemsAsReturned
Marking an item as a return claim checks MarkLostItemsAsReturned to see if claim_returned is a value in MarkLostItemsAsReturned.
However, this option was never added to MarkLostItemsAsReturned so an a return claim can never be automatically removed from the patron record, even if they wanted such behavior.
Test Plan:
1) Apply this patch
2) Restart all the things
3) Note the new return claims option on MarkLostItemsAsReturned in the system preferences
Signed-off-by: Marti Fyerst <mfuerst@hmcpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e53d559f4212fa4b25412fdd6325ae469328f26a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Petro Vashchuk [Mon, 25 Jan 2021 15:37:37 +0000 (17:37 +0200)]
Bug 27549: "use of uninitialized value" warning on renew.pl
On the beginning we have empty "barcode" parameter for this form, but that not taken into account in regular expression warning emitted: "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47." in renew.pl
Fixed by making $barcode to become an empty string by default.
To reproduce:
1) Head over to the "Circulation -> Renew" page.
2) Check intranet-error.log there will be a warning "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47".
3) Apply the patch, refresh the "Renew" page.
4) Ensure that the new "use of uninitialized value" warnings didn't appear in the console.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1af07787032275813e1e458cfed8504b482cd1c6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Petro Vashchuk [Mon, 25 Jan 2021 15:35:18 +0000 (17:35 +0200)]
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl
On the beginning we have empty "location" parameter for this form,
but that not taken into account in comparison and undef warning emitted:
"Use of uninitialized value $location in string eq at
/usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72" in branchoverdues.pl
Fixed by adding pre-check for $location.
To reproduce:
1) Head over to "Circulation ->Overdues with fines" page. Check
intranet-error.log where there will be many warnings
"Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72".
2) Apply the patch, refresh the "Overdues with fines" page.
3) Ensure that the new "use of uninitialized value" warnings didn't appear in the console.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c3d22687568640930bad9ffbb426033423e7efe9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Petro Vashchuk [Sun, 24 Jan 2021 19:42:10 +0000 (21:42 +0200)]
Bug 27538: fix correlation of fields in Holds to Pull table
Bottom filtering row of "Holds to pull" table do not correlate to other
ones, columns diverged from "Call numbers" cell: it should be under
"Available call numbers" while it's under "Available barcodes", and so
on to the last cell (while number of cells still adjusted).
To reproduce:
1) Head to the Holds to Pull page, check that bottom filtering row
shifted to the left by one, starting from the "Call number"
column and don't correlate to the upper table (for example, "Call
numbers" cell should be under "Available call numbers" while it's
under "Available barcodes"), and so on for all cells till the end
of the filtering row.
2) Apply patch.
3) Refresh Holds to Pull page and ensure that all filtering row
columns correlate to other rows columns correctly.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 65d09dc52097a6630d54ae45e3df1086b55a59ae) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 29 Jan 2021 11:06:34 +0000 (11:06 +0000)]
Bug 27576: Don't show import recordds table after cleaning a batch
Currently if you clean a batch from the manage marc records page, the import records table appears with no items at the bottom of the screen
This is because we test for import_batch_id, we should also make sure we didn't just clean a batch
To recreate:
1 - Stage a batch for import
2 - Go to 'Manage staged records'
3 - 'Clean' the batch you just imported
4 - Note the empty table that appears at the bottom of the page
5 - Apply patch
6 - Repeat 1-3
7 - Note the table no longer appears
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dc072ee4ba9361d35d92efd46b2935ff1b608b0d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>