Owen Leonard [Thu, 25 Feb 2021 14:03:43 +0000 (14:03 +0000)]
Bug 27794: Add link to biblio in lateorders page
This patch modifies the late orders page so that the late order title
uses the "biblio-title" include to display a standard title with a link
to the bibliographic detail page.
To test, apply the patch and go to Acquisitions -> Late orders.
In the table of late orders, confirm that the title display correctly
and links to the correct bibliographic record.
Signed-off-by: Severine QUEUNE <severine.queune@bulac.fr> 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 12d50cb5d8529d993ef5abccd84535540c938bee) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 25 Feb 2021 12:15:02 +0000 (12:15 +0000)]
Bug 27792: Improve jEditable configuration for point of sale fields
This patch alters the configuration of the "cost" and "quantity"
editable fields in the "This sale" table on the Point of Sale page:
- Reduce field with to reduce jumpy table re-draws.
- Replace "numeric" input type with "text"
- Add pattern attribute for enforcing currency/number entry
To test you must have EnablePointOfSale and UseCashRegisters enabled and
configured.
- Apply the patch and go to the Point of Sale page.
- Add some items for purchase.
- In the "This sale" table, click the values in the "cost" and
"quantity" columns and try editing their values.
- The form field which appears should not fill the width of the table
column.
- The fields should enforce the correct input: Currency for the "cost"
column, digits for the "quantity" column.
- The fields should update when you click out of them and the correct
values should appear in the "Collect payment" area.
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 50c4efb18dc4e666d60e57f8412d6553eccbfe72) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 26591: SIP option prevcheckout_block_checkout to block checkout of previously checked-out documents
This patchs adds a new SIP option to block checkout of previously
checked-out documents: prevcheckout_block_checkout
See the CheckPrevCheckout system preference to enable previously
checked-out verification in Koha.
Test plan:
1) Apply this patch
2) Enable the CheckPrevCheckout syspref (on "Do" for instance)
3) Enable prevcheckout_block_checkout in the SIP server config file
4) Checkout and checkin an item for a user
5) Checkout the item again with the SIP CLI tool
6) Check that the SIP message is "This item was previously checked out by you"
and that the item was not checked out
7) Disable prevcheckout_block_checkout in the SIP server config file
8) Checkout the item again with the SIP CLI tool
9) Check that the SIP message is "This item was previously checked out by you"
and that the item was checked out.
10) Prove t/db_dependent/SIP/Message.t
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 86918091118d1e2ead99a943dfe783c7f1740789) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 7 Jan 2021 20:14:33 +0000 (20:14 +0000)]
Bug 27316: Convert 'undef' for sort to Yes and use Yes/No instead of 0/1
This patch changes the interface to remove the undef option
We also update existing mappings and set default of 1
Comment previously indicated undef was treated differently, but in the code we treat undef as 1
That code is untoched to avoid creating problems for older mappings that may be reloaded
To test:
1 - View the ES mappings, note you can set columns to Undef, 0, 1
2 - Set some to undef
3 - Apply patches
4 - Update database
5 - Undef now show as 'Yes'
6 - Confirm you can set columns as Yes/no
7 - Confirm that mandatory columns display correct value when readonly (see issues field)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 9dd997e2d38a0ec07411166e5e497d48d95f9437) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 2 Mar 2021 08:56:14 +0000 (08:56 +0000)]
Bug 27680: (QA follow-up) Update test for dbic_merge_sorting
The order_by handling will now always return an arrayref of ordering
hashrefs even when only one ordering hash is present. This is
interpreted by dbic as equivilent so I just update the test to pass
here.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 96aa6877ae39c987214e46d00c70c76591da0174) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
While not that common nowadays, it is the syntax PHP uses, and
DataTables also generates such thing in 'traditional' mode. We should
support it as well.
This patch adds support for that. It does so by adding _order_by[] to
the reserved param names, and proper handling on the dbic_merge_sorting
helper.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 27680: (QA follow-up) Minor perlcritic issue
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 79064a88639ba725cc898cb940c85ff3fb1d4bee) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 12 Feb 2021 19:25:10 +0000 (19:25 +0000)]
Bug 27680: Allow traditional multi-params to work
This patch allows the preceeding test to pass. Strictly, we want a comma
delimited string for our _order_by parameter, but we cannot easily block
a traditional multi-passed parameter. As such the 'nice' thing to do is
handle it when such a thing is passed as it will pass through validation
regardless.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bc23981b46e67a6d9ee91a2065293ac472341bed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 12 Feb 2021 14:05:13 +0000 (14:05 +0000)]
Bug 27680: Add tests for various ways of passing multi-params
This patch adds unit test to increase the coverage of parameter that
accept multiple values. There are a number of different ways end users
can send such parameters and we should test to ensure we are recieving
the correct option.
Options
`?param1=this¶m1=that` - traditional multiple pass params
`?param1[]=this¶m1[]=that` - php multiple pass params
`?param1=this,that` - comma delimited list param
`?param1=this|that` - pipe delimited list param
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d2a43a77aabd9cf885d6dc9b72458a00bbc28ac9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 12 Feb 2021 13:14:16 +0000 (13:14 +0000)]
Bug 27680: Add support for sorting fields with multiple data points
This patch adds proper handling for sorting a single column that is
constructed of multiple data entities.. i.e `"data": "string1:string2"`
It does NOT add support for filtering on multiple columns yet.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fa1671aba529e55f124eb759f3b09e237a7282fe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 12 Feb 2021 09:53:27 +0000 (10:53 +0100)]
Bug 27680: Take first order column for ordering
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ba7f51f3d12fe2a66b8094d9a10a234a3f4e7c4d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Mon, 22 Feb 2021 17:51:16 +0000 (17:51 +0000)]
Bug 27754: Correct eslint errors in basket.js
This patch makes minor changes to basket.js in the staff interface
templates in order to quiet warnings from ESLint. Besides whitespace,
most changes are to correct undeclared or unnecessarily declared
variables.
To test, apply the patch and verify that the cart still works
correctly.
- Perform a catalog search in the staff interface.
- Test adding single or multiple items to the cart from the search
results page.
- Testing adding and removing titles to the cart from the bibliographic
detail page.
- Open the cart and test the various controls in the toolbar to confirm
that they still work correctly.
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 ae62da0ff6a3fa5df3e01fce656fccc02ce6a55e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 29 Jan 2021 13:47:22 +0000 (13:47 +0000)]
Bug 27578: Initialize searchid as blank when not populated
This patch simply sets the searchid to a blank string if not passed in
To test:
1 - Add a new biblio and save it
2 - Check the logs: /var/log/koha/kohadev/plack-intranet-error.log (or similar)
3 - Note warn about uninitialized value
4 - Apply patch
5 - Add a new biblio
6 - No warn
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.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 7f0b0e0556127c9ed191b1b741c4cf466b28e1d6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
David Cook [Wed, 17 Jun 2020 04:34:02 +0000 (04:34 +0000)]
Bug 25777: Disable misleading datatables table information display z3950
This patch disables the table information display on z3950_search.pl,
since it only includes search result counts for that page, which is
misleading to end users.
To test:
1) Do not apply the patch
2) Do a Z39.50 search from cataloguing for "test" against Library of
Congress.
3) Note the bottom of the page says "Show 1 to 20 of 20" and
"Showing page 1 of 501"
4) Do a Z39.50 search from Acquisitions for "test" against Library of
Congress (Acquisitions -> Vendor -> Basket -> Add to basket -> From
external source).
5) Apply the patch and restart Plack
6) Repeat Step #2
7) Note the bottom of the page now only says "Showing page 1 of 501"
8) Note the search bar is gone
9) Repeat step #4
10) Note the bottom of the page now only says "Showing page 1 of 501"
11) Note the search bar is gone
Squashed and mixed authorship added below Co-authored-by: Owen Leonard <oleonard@myacpl.org> Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Cook <dcook@prosentient.com.au> 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 2a2a04a641289f6043971dd98037e02fbb30f64f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 25 Feb 2021 18:33:31 +0000 (13:33 -0500)]
Bug 27798: Add warning to IndependentBranches system preference
Test Plan:
1) Apply this patch
2) Search system preferences for IndependentBranches
3) Note the warning about changing the setting on a production system
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD Amended patch:
* Fix commit title
* Don't split the syspref's description, otherwise the sentence will be
split in the POs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fa8a60ddc8ac45404b6159fde5c758e4b0dad60b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
David Cook [Tue, 6 Oct 2020 06:33:05 +0000 (06:33 +0000)]
Bug 26363: Provide a systemd unit file for koha-worker in package installs
While the packages already have a koha-zebra script that creates a service
using the 'daemon' utility, this unit file template provides an alternative.
Note that currently you'd have to start the service using the following:
```systemctl start koha-worker@NAME.service```
Where NAME is the name of your Koha instance.
The systemctl enable/start commands could be automated more with helper
scripts in debian/scripts, but this is a first step.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> 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 6e21b86f66938c12ddc62b06ac08c9e510ef2e8e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
David Cook [Tue, 6 Oct 2020 06:30:56 +0000 (06:30 +0000)]
Bug 26363: Provide a systemd unit file for koha-worker for source installs
This patch adds a systemd unit file which gets rewritten according to
the configuration specified by Makefile.PL. This can be linked or
copied to systemd directories for running a systemd service for
background_jobs_worker.pl
Test plan:
1. perl Makefile.PL
1a. Choose "single" installation
1b. Choose "/opt/koha" for a file path
2. make
3. vi blib/KOHA_CONF_DIR/koha-worker.service
4. Verify that PERL5LIB, KOHA_CONF, ExecStart, and SyslogIdentifier
all appear to be correctly filled in
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> 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 21a850a3dccc07bd5b6423bc8c9a902aba7958fc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Fri, 26 Feb 2021 10:26:27 +0000 (10:26 +0000)]
Bug 26457: (QA follow-up) Switch to PK index in UPDATE on issues
The deadlock reports tell us that multiple transactions are
waiting for a X lock on a record but using a secondary index
on borrowernumber and itemnumber. Since we have the issue_id
at hand already, we should use that and benefit from the clustered
index (on PK) instead of using a secondary index.
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 3beeb020ef7d8ef733f34ffef5202bb328a8b867) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 4 Dec 2020 12:03:52 +0000 (12:03 +0000)]
Bug 26457: Throw exception if update of issues table fails
While this won't prevent the deadlock, it should catch the case where
a deadlock causes the DB update to fail and provide feedback to the user
and rollback the transaction
I don't know how to trigger the deadlock, I can only confirm that we see it, and
that this should catch it.
To test:
1 - Apply patches
2 - Checkout several items to a patron
3 - Confirm that 'Renew all' feature continues to work as expected and all items are renewed
Signed-off-by: David Nind <david@davidnind.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 4062116352e6136e846f8a1c0567323c2c122213) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch gets rid of a loop on the librarary's groups siblings, and
acknowledges ->get_hold_libraries returns a proper Koha::Libraries
iterator that can be chained with a new query on the passed branchcode.
This way we only fetch a count from the DB and no loop needs to take
place on the code.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Libraries.t
=> SUCCESS: Tests pass!
3. 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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3495a7e9af70706e3ebba60e3fac7aa3845d1d78) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27071: (follow-up) Provide a more meaningful error message
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e8e15cc64a8b09fc9575af4b9fcbae437293715) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27071: Use GetReservesControlBranch to pick the branch
Pretty much like the opac-reserve.pl does, this patch makes the staff
request.pl script get the branch from the specialized routine from
C4::Reserves instead of falling back to userenv.
To test:
1. Follow the original test plan:
- Create two local hold groups containing distinct lists of libraries.
- In default rules for all libraries, set Hold Policy = "From local hold group" and Hold pickup library match to "Patron's hold group"
- Make sure AllowHoldPolicyOverride is set to Don't Allow
- Make sure you're logged in at a library in Group 1
- Find a bib with only 1 item from Group 1. Confirm you can place a hold on this title for a patron in Group 1 (correct), but not for a patron in Group 2 (correct).
- Find a bib with only 1 item from Group 2. Confirm you cannot place a hold for a patron from Group 1 (correct), BUT you also cannot place a hold for a patron from Group 2 (incorrect) -- Koha gives the erroneous message "pickupNotInHoldGroup"
- Change your library to a something in Group 2
- Find a bib with only 1 item from Group 1. Confirm you cannot place a hold on this title for a patron in Group 1 (incorrect), and not for a patron in Group 2 (correct).
- Find a bib with only 1 item from Group 2. Confirm you cannot place a hold for a patron from Group 1 (correct), but you can place a hold for a patron from Group 2 (correct)
=> FAIL: Things expected to fail on the plan, fail.
2. Apply this patches
3. Repeat 1
=> SUCCESS: It now works!
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit aa221e0c8bcf0fa0377d6c2154bad0ef61c97a2b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27071: More tests for Koha::Library->validate_hold_sibling
This patch adds tests for more than one non-same sibling libraries in
the hold group. Tests pass which means it is working as expected.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Libraries.t
=> SUCCESS: Tests pass
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1de7ec0697c75c3161d950b9f6f6c8d99640b607) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 23 Nov 2020 14:52:56 +0000 (15:52 +0100)]
Bug 27071: Code simplification
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c6606d4a6567a00f2defd72a32ff466c01a54e96) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 23 Nov 2020 14:49:35 +0000 (15:49 +0100)]
Bug 27071: Fix Hold pickup library when using hold groups
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b445425ebaffe4ec4aab3c45cb4ae4f2d4bf172) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 3 Dec 2020 19:13:15 +0000 (19:13 +0000)]
Bug 26208: Perform batch checkin/renewals serially rather than asynchronously
The issue here seems to be that when multiple requests hit at once they may not register that the renewal
performed by the request should lift restrictions on the account.
To mitigate this we can simply perform the renewals one after the other.
To test:
1 - have multiple overdue items on one patron
2 - run overdues.pl with triggers set to generate a restriction
3 - renew all overdues with the Renew All button
4 - restriction is not removed even though patron no longer has overdue items
5 - Apply patch
6 - Make all items overdue again
7 - Click Renew All
8 - Items are renewed and restriction removed
9 - Checkout items to patron again (overdue or not)
10 - Click 'Select all' in checkin column
11 - Click 'Renew/Checkin selected items'
12 - Confirm checkin succeeds as before patches
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 26208: (follow-up) Remove debugging statements
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 a825c729386e7f528846445937e00eda92f01f68) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27593: Consistent behavior for club holds route
This patch:
- Fixes a malformed response when biblio_id is invalid
- Fixes the return status (400 => 404) when biblio_id is invalid
- Adapts the error strings to be consistent with the Cities.pm file
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/clubs_holds.t
=> FAIL: Tests fail
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: David Nind <david@davidnind.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 2387ac731c03ecfa6cd20e7e71037bbd3c3ac046) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch introduces tests for the behaviour change (400 => 404) and
also adds tests for untested (error) behaviours. Notably, the 'Biblio
not found' problematic return value couldn't be triggered, because the
OpenAPI plugin returns a 500 because the response was malformed
(expected { error => 'message' } and it was returning a string).
For the above reason, running the regression tests will show a 500...
instead of the expected 400.
I covered the rest of the codepaths that trigger errors to have full
coverage.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/clubs_holds.t
=> FAIL: Tests fail loudly
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 024a32ca807bb69b3d46136421dce871ba0bddbf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 16 Feb 2021 13:48:04 +0000 (13:48 +0000)]
Bug 27713: Duplicate search field IDs in MARC framework administration template
This patch makes a minor change to the MARC framework administration
template so that the ID of a form field on the page isn't a duplicate of
one in the header search form.
To test, apply the patch and go to Administration -> MARC bibliographic
framework -> MARC structure.
- Test the "Search for tag" form field to confirm that it works
correctly.
- Validate the HTML of the page to confirm that there are no "Duplicate
ID" errors.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.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 ebb70e4d16df961698e379c8208984809ad340be) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Thu, 18 Feb 2021 16:56:21 +0000 (16:56 +0000)]
Bug 27661: (QA follow-up) Use bootstrap classes
This patch removes the local status_* css rules in favour of using the
bg-* rules that are shipped with the bootstrap version we are using and
then updates the relevant lines in the template to use those classes.
We also update the default table styling which adds background color to
the odd table rows so that our local classes take precidence.
Signed-off-by: Owen Leonard <oleonard@myacpl.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 ab23dfa3a14fd7d1ecdd78d755476f8afcd69efa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 9 Feb 2021 13:53:55 +0000 (13:53 +0000)]
Bug 27661: Update about for message broker status
This patch updates the about page with regards to the message broker
status and adds some small formatting improvements for displaying the
status.
Test plan
1/ Run through the yarn build process to update the CSS file.
2/ View the about page without RabbitMQ installed
3/ View the about page with RabbitMQ installed
4/ Note the formatting and message change and signoff
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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 7ed120dfb587e7c82ebda391abbfe9806d15dc81) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Fri, 19 Feb 2021 10:17:26 +0000 (10:17 +0000)]
Bug 27729: Fix use of grep and split in CheckReserves
A few lines of code were added to CheckReserves containing the wrong
use of two perl functions: grep and split on bug 25232.
A test was added even making these things pass.
Test plan:
Run t/db../Holds.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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 c4c3d1e93c337d93679e50f2354c8b060e50bcd9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 13 Nov 2020 13:24:43 +0000 (08:24 -0500)]
Bug 27014: Enable C4::SIP::ILS::Patron::new to accept a hash
Caused by bug 23403 - when performing a checkin we lookup the SIP patron
using the borrowernumber, however, SIP only knows how to find a patron
via cardnumber or userid
The change on 23403 was to avoid using an 'id' that didn't always exist
(as some users don't have a userid or cardnumber
When checking in, however, we are not passed a user cardnumber or
borrowernumber, so we don't have those on hand to get the patron.
Test Plan:
1) Check in an item via SIP, note patron is not found
2) Apply this patch
3) Restart all the things!
4) Check in an item via SIP, patron should be found!
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 05e16389efa6e66476484ee12c3a5c5fdd48757b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 8 Feb 2021 10:52:17 +0000 (11:52 +0100)]
Bug 23675: Add leader and default value for ACQ
When UseACQFrameworkForBiblioRecords is set, the ACQ framework will be
use when ordering.
But the leader is not defined for this framework and then we will face
encoding issues (I haven't go far investigating this as the suggested
solution worked correctly).
The idea is to define a 000 and default to ' nam a22 7a 4500'
(which is what returns the marc21_leader.pl plugin) for ACQ.
Test plan:
0. Apply this patch and reset_all
1. Create a new basket and place a new order
2. Note that the leader is now displayed on top of the other ACQ
subfields
3. Fill in 245 with "❤️", "ö" or other UTF-8 characters you like
4. Save
5. Notice that 245$a in biblio_metadata is correctly filled with the
title you entered
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 a6527b105897e4611dd702ffbe627ca579baff77) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 8 Jan 2021 13:14:42 +0000 (13:14 +0000)]
Bug 26051: We should sort callnumber based on cn-sort
In zebra we sort by callnumber using 8007 cn-sort
We should do the same in elasticsearch
To test:
1 - Have Koha using Elasticsearch
2 - Perform a search
3 - Attempt to sort by callnumber
4 - Error in logs: No mapping found for [local-classification__sort]
5 - Apply patch
6 - Restart all
7 - Perform a search and sort by callnumber
8 - Success!
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: David Nind <david@davidnind.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 a52a0f80b890d70bb51c8629afbf4d81c2901491) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Blou [Tue, 26 Jan 2021 20:36:31 +0000 (15:36 -0500)]
Bug 23929: Invoice adjustments should filter inactive funds
Looking at invoice details, this makes the Adjustments Fund dropdown act
exactly like the Shipping Fund dropdown above, with a Show inactive
checkbox to help filter (by default) the inactive funds out of the list.
Test plan:
0) requires a database with inactive (old) funds along with active ones.
1) Go to invoice details page
2) Click "Add adjustment"
3) Open the drop down beside the Fund label, you should see EVERY fund in database.
4) Compare with behavior of Shipping fund dropdown above. Not every fund is listed there
5) Apply patch
6) Now behavior is the same, only active fund are listed by default.
7) click "Show inactive" checkbox and see all the funds in the dropdown.
Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr> 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 bdfb78a69a1f78488b800bd38392c60812717cc7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 4 Feb 2021 16:37:26 +0000 (17:37 +0100)]
Bug 27626: Fix self registration if categorycode is hidden and PatronSelfRegistrationVerifyByEmail
If categorycode is selected in
PatronSelfRegistrationBorrowerUnwantedField and
PatronSelfRegistrationVerifyByEmail is turned on, the patron self registration
fails with
[You must provide a patron's category to validate password's strength
and length] at /usr/share/perl5/Exception/Class/Base.pm line 88
Test plan:
0. Select categorycode in PatronSelfRegistrationBorrowerUnwantedField
and turn on PatronSelfRegistrationVerifyByEmail
1. Self register a patron
2. Confirm that it works as expected with this patch applied.
Signed-off-by: Owen Leonard <oleonard@myacpl.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 74ae74d5faec9a4ba4fbf573b4a81b1274402773) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 27 Jan 2021 08:43:02 +0000 (09:43 +0100)]
Bug 27534: Add missing ON UPDATE/DELETE clause to message_transport_type_fk
Bug 9016 (3.15.00.039) added message_transport_type_fk but the ON DELETE
CASCADE ON UPDATE CASCADE clause was missing from the updatedatabase
entry.
If we are upgrading from an old version, 20.06.00.058 will fail on
updating the message_transport_type, with
"Cannot delete or update a parent row: a foreign key constraint fails".
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 57a15eb474b5a8a6a199df1d324c30b7df0544d7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 19 Feb 2021 09:52:45 +0000 (10:52 +0100)]
Bug 26997: CAST AS CHAR to prevent the error
To prevent the DBMS to fail on 0000-00-00 we can cast it as a char and
compare.
This patch also moves to a subroutine, in case we need to adjust (or
reuse) it later.
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 0a40b4bb509c306794930ef734513a982e418af5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>