David Cook [Fri, 20 Jul 2018 08:13:49 +0000 (18:13 +1000)]
Bug 21097: Missing optgroup closing tag in orderreceive.tt
There is a missing optgroup closing tag in orderreceive.tt. It doesn't
actually cause any display issues (at least in modern browsers), but
it's invalid markup, so this patch fixes it.
_TEST PLAN_
0. Add a budget and add a fund
1. Add a vendor
2. Add a basket
3. Add an order to a basket
4. Close the basket
5. Receive the order
6. Make sure the budget and fund both display when selecting the fund
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 12e18f91be2a26501fba502d5f1106d66b06caee) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 23 Jul 2018 12:23:07 +0000 (12:23 +0000)]
Bug 20811: (RM follow-up) fix check for matching
Notice should only be triggered if both settings are false
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 12b505f2b797d77e800a17830f71a9c054cd076b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20811: (QA follow-up) Prevent calling AddItemBatchFromMarc and ModBiblioMarc without biblionumber
If you use -update but do not find matches (or did not want to match), you
should not call those routines. We should warn and skip this record.
Adding a warn at the start that the choice of options may not be smart.
Note that this needs further attention somewhere else. You could mix
-update with -insert for instance and still see some problems. (May depend
on items with unique barcode etc.)
Test plan:
Run -update without match or isbn.
Or run -update -isbn with a non-matching ISBN.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 15b865c6ee558ef278f911ba3693c38c024c7f11) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20811: (QA follow-up) Make the isbn check work
The following code was never reached, since $isbn was not filled.
if (!$biblionumber && $isbn_check && $isbn) {
$sth_isbn->execute($isbn);
($biblionumber,$biblioitemnumber) = $sth_isbn->fetchrow;
}
Solution: Fix the code with two $isbn declarations. Move the checkisbn
condition a level deeper.
Test plan:
Run misc/migration_tools/bulkmarcimport.pl -file bib726.utf8 --update -isbn
Since you do not match on biblionumber, the ISBN should match.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a49a7f08d6dbaf992d70420dae744c75c2ad8aae) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
AddBiblio call has been replaced with ModBiblio, but the return values
are different. We should not replace the value of $biblionumber with
what returns this subroutine.
Test plan:
If you are familiar with bulkmarcimport.pl you should know what to test,
I am not.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d15185025a146656a1ad0d7d5a8eb261581c0f1e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Perform a search in the OPAC to confirm that nothing broke.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad34ef74cdee0f204c03cdf88b1db775768a44fe) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 12 Jul 2018 10:18:10 +0000 (10:18 +0000)]
Bug 21064: Use undefined instead of undef
To test:
1 - Load the advanced cataloging editor
2 - Refresh the page several times
3 - Check the JS console, you shoudl see an error:
'undef is not defined'
4 - Apply patch
5 - Try again, should be no error
Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 367f47c416fa9164ccb8d9e5f50772e5a516d6b7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 11 Jul 2018 21:55:06 +0000 (18:55 -0300)]
Bug 21053: Encode URI characters in plugin 008
A # (or &) at any position in 008 field of a bib record causes
all subsequent data in field to be overwritten with default values when
record is saved.
These characters need to be correctly encoded before being passed as
parameters of the url
To reproduce:
1. Find and edit a bib record which has an 008 which differs from the
default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current
values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after #
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bfdf896111849454ade806bf49f48f1de5f626be) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 13 Jul 2018 17:49:14 +0000 (17:49 +0000)]
Bug 21076: Don't call autocomplete code after patron found
To test:
1 - Enable article requests
2 - Search on staff client
3 - Click 'Request article'
4 - Find a patron
5 - View error in console
6 - Apply patch
7 - Reload
8 - Not error is gone
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5a9bad787458411c790d26b3b115fe3e7e2e0ab2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sun, 15 Jul 2018 18:00:44 +0000 (20:00 +0200)]
Bug 16575: (follow-up) Compiled CSS
This patch contains the compiled CSS for the OPAC print stylesheet.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c02543baaab99841405ba9a47d894e54e7a8a27a) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 30 May 2018 14:15:19 +0000 (14:15 +0000)]
Bug 16575: Irregular behaviour using window.print() followed by window.location.href
This patch updates the OPAC and staff client carts to use CSS to
control print output, removing a print parameter which was passed to the
script.
Currently, when you click "Print" on the OPAC basket, it navigates to
a new page and initiates window.print() followed by a
window.location.href change again. Unfortunately, due to differences in
IE, Chrome, and FF, it will either show the print options, navigate away
without showing them, or refuse to navigate away after printing. By
changing to using print CSS, we don't navigate away from the basket in
the first place, so we prevent this irregular behavior.
TEST PLAN
1) Apply the patch
2) Create an OPAC basket by clicking "Add to cart" on multiple items
3) Using Chrome, IE, and Firefox (of any version), click the "Print"
button
4) You should see the relevant print menu without the OPAC basket
re-loading in any way.
5) After printing is complete, you should still be on the OPAC basket
pop-up
6) Perform the same tests in the staff client
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a9836864dcbe4c11d370c245511ee4b9d6bd33f3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 29 Jun 2018 20:36:51 +0000 (17:36 -0300)]
Bug 20806: Surround string by span tag to help translation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eac802b712bd60c8307da7b6f709d347ffa4ffe3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 29 Jun 2018 20:30:39 +0000 (17:30 -0300)]
Bug 20806: Do not rely on column position
It is not the first time we have this splice call, it seems safer to
rely on the column's name instead of the column's position
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2a369663fd37c41fb3ac810a8f42d84d69fa6f02) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Josef Moravec [Tue, 29 May 2018 09:15:09 +0000 (09:15 +0000)]
Bug 20806: Add item type description holds history page
Test plan:
0) Do not apply the patch
1) Set AllowHoldItemTypeSelection to Allow
2) Place some hold for a patron, some with specific item type and some
without item type
3) On holds history page you should see blank or item type code in item
type column
4) Apply the patch
5) Now you should see description in item type column
6) Set AllowHoldItemTypeSelection to Don't Allow
7) You shold not see the item type column, but column visibility
settings should continue working ;)
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0c1490ec7111fb6160458463d98ccda333f347b3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 23 Jan 2018 18:54:41 +0000 (15:54 -0300)]
Bug 20079: Display stack trace for development installations
"""The default value is development, which causes plackup to
load the middleware components: AccessLog, StackTrace, and Lint unless
--no-default-middleware is set."""
Test plan:
Confirm that the stack trace is displayed when something is wrong (die somewhere to test)
for dev installations (inside a devbox)
The -E flag must remain deployment for non-dev installs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8520d508a3154c6b30f1e710e518fe3b697a3194) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Mon, 16 Jul 2018 18:41:13 +0000 (18:41 +0000)]
Bug 21038: Reserves should be holds
This patch corrects the text of the warning about discharges cancelling
holds.
To test, apply the patch and view the discharge for a patron who has
holds:
- "Borrower" is changed to "patron"
- "reserves" is changed to "holds"
- "canceled" (18 instances in the templates) is changed to "cancelled"
(51 instances).
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8202f95ad7001a5046f9f40e6322406b253ba3ed) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20942: (QA follow-up) Use $lines->total_outstanding
This patch makes the controller code use $lines->total_outstanding
instead of expecting ->outstanding_debits and ->outstanding_credits
return the total.
Tests should pass as before. No behaviour change is expected.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> SUCCESS: Tests still pass, no behaviour change.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6672b26d16065d877d6d7300830fc3d619b09898) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This change is made to ease usage from the UI. Also because the
outstanding credits need to be applied to outstanding debits in order to
the balance value to make sense. So we still need to have each total.
Tests are added for this change, and the schema files are adjusted as
well.
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> SUCCESS: Tests pass!
- Sign off :-D
staff_id is changed into user_id as voted on the dev meeting the RFC got
approved.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bb7c908dc06697a4ebbf8633897d24e26798cb6d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20942: Add route to get patron's account balance
This patch implements the /patrons/{patron_id}/account endpoint. It can
be used to get the patron's balance information, including outstanding
lines.
To test:
- Apply this patchset
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> SUCCESS: tests pass!
- Make your favourite REST testing tool (RESTer on Firefox?) do:
GET /api/v1/patrons/{patron_id}/account
to a valid patron_id. Play with Koha's UI to add credits/payments and
notice the endpoint returns the right info following the voted RFC. [1]
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d079c80b05b36a177c80d8f585ae1515092e6ddb) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20942: Unit tests for /patrons/{patron_id}/account
This patch adds tests for the /patrons/{patron_id}/account endpoint.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> FAIL: Tests should fail because the endpoint is not implemented.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7cbff1bce1608016e8b8ceded7633678189b75cc) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20942: OpenAPI spec for /patrons/{patron_id}/account
This patch adds the OpenAPI spec for the following paths:
- /patrons/{patron_id}/account
It also adds object definitions for:
- balance
- account line
Account line is to be used on both /account/lines (when implemented)
and for embeding the outstanding lines in the balance endpoint
(/patrons/{patron_id}/account).
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d383b49987b8e5471cb9f30ed879e1311e762b26) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Josef Moravec [Mon, 18 Jun 2018 15:48:12 +0000 (15:48 +0000)]
Bug 20934: (QA follow-up) Fix showing number of records in checkout history
Test plan:
0) Do not apply this patch
1) Go to biblio checkout history page (issuehistory.pl)
2) You'll see something like "Checked out ARRAY(0xf830378) times"
3) Apply this patch
4) Now you should see number of checkout history records
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 64c596b13c82a2942792d975363a0d689182d627) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Josef Moravec [Mon, 18 Jun 2018 15:15:31 +0000 (15:15 +0000)]
Bug 20934: (QA follow-up) Fix pod in Koha::Old::Checkout
Test plan:
Run qa tools - it shouldn't complain about pod levels
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 97b2bb8e7385c6af4d07666ce51df68b3bda8875) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 13 Jun 2018 16:26:43 +0000 (13:26 -0300)]
Bug 20934: Fix display of old checkouts in the checkout history page
Again a regression caused by
commit fa54100dffe092e606f79b15692eedaf78f42e45
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]
GetBiblioIssues does a union all with issues and old_issues, so we
should old_issues as well.
To make the join on the items table we need to define the item and
patron methods. For consistency the relationships have been redefined
(item instead of itemnumber, borrower instead of borrowernumber) in the
DBIx::Class definition.
This is not perfect but I think the best way to provide an easy to
backport patch.
It highlights that we need improvements in this area.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
The patch works as expected.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 117e3a18f5b7c24e6c9fb7eabb78ab1b5320cd14) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21022: (follow-up) Move overloaded full_message method to subclass
We shouldn't have it overloaded on the base class, as it could get huge
and difficult to find things, and read.
This patch moves things to Koha::Exceptions::Object. We should overload
the full_message method on each exceptions class, as needed.
To test:
- Run:
$ kshell
k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests still pass!
- Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes 'full_message' use the passed exception message instead
of trying to build it from the parameters. This is particularly useful
for some situations in which we don't have all the information but would
like to keep using the same exception.
To test:
- Apply this patchset
- Run:
$ kshell
k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
- Sign off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 28 Jun 2018 14:00:57 +0000 (11:00 -0300)]
Bug 21008: Use Koha::Patron->is_child
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I removed the category parameter as it is not really used.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes borrower_add_additional_fields() in both pay.pl and
paycollect.pl use the right object to pick the category_type.
It also populates the extendedattributes template variable in pay.pl
which was missed by a change.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Thu, 24 May 2018 18:51:03 +0000 (18:51 +0000)]
Bug 20814: Display issue with 'Saved reports' tabs when memcached is off
This patch changes the configuration of the saved reports table so that
columns which were previously excluded from the table altogether are now
hidden. This prevents a JavaScript error when DataTables tries to
reference a missing column.
To test, apply the patch and go to Reports -> Use saved. You should have
at least one report category configured and assigned to reports in order
for the tabs display to be visible.
Test the table of saved reports under a variety of these circumstances:
- memcached disabled or enabled
- reports exist or don't exist which require update from the old
marcxml syntax
- cache_expiry and/or update columns are configured in Administration
-> Columns settings to be shown or hidden
The report category tabs and the table should render correctly under all
circumstances.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 23 May 2018 12:43:55 +0000 (12:43 +0000)]
Bug 20805: Update child to adult patron process broken on several patron-related pages
This patch fixes a problem with several patron-related pages, where the
"Update child to adult patron" menu item doesn't work. With some pages,
the right category information wasn't being passed from the script to
the template. With some, the right JavaScript variable weren't being
passed from the template to the included JavaScript file.
To test, apply the patch locate some patrons with "child" type patron
categories. With each patron, go to one of the following pages and test
the "update child" process in the toolbar's "More" menu.
- Circulation ->
- Batch check out
- Notices
- Statistics
- Files
- Housebound
- Delete (test from the deletion confirmation screen).
All test should be performed on a system with multiple adult patron
categories configured AND on a system with only a single adult patron
category.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 25 May 2018 09:32:58 +0000 (09:32 +0000)]
Bug 18822: Check if we have MARC::Record and convert if not when using ES
The new_record_from_zebra subroutine assumes that when using ES we
always get MARC::Record objects when using ES, but sometimes we get them as xml via Z39 or
internally. This adds a test to new_from_zebra to confirm we have a
record object and to convert it if not
To test:
1 - Perform an advanced search from the advanced editor, make sure to
select 'Local catalog' and a remote source
2 - Error 'Internal search error [Object object]'
3 - Apply patch
4 - Repeat search, success!
5 - Select and deselect various servers, search should still work
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 19 Jun 2017 15:21:41 +0000 (11:21 -0400)]
Bug 18822: Better error response
Apply this patch first to see a change in the error feedback - instead
of [Object object] you should get a text readable error
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
Run t/db_dependent/Labels/t_Batch.t (without CPL branch)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 8 Jun 2018 08:56:10 +0000 (10:56 +0200)]
Bug 20900: Add CPL test branch in rollingloans.t
Trivial fix.
Test plan:
Without this patch and a CPL library, run rollingsloans.t. See warns.
With this patch, no warns.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Charles Farmer [Fri, 29 Jun 2018 20:12:59 +0000 (16:12 -0400)]
Bug 21025: Add GetPreparedLetter to Koha::Patron::Discharge
Test plan (shamelessly ripped from Bug20953):
1) Set system preference 'useDischarge' to 'Allow'
2) Choose a patron without checkouts nor fines nor restrictions
3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl
4) Click on 'ask for a discharge' tab
=> You see /cgi-bin/koha/opac-discharge.pl
with text 'What is a discharge? ...'
5) Click on 'Ask for a discharge' link
=> You see /cgi-bin/koha/opac-discharge.pl?op=request
with text 'Your discharge request has been sent ...'
6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl
=> You see one discharge requets for the patron
=> Click on 'allow' on patron discharge request
7) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl
=> You see link 'Get your discharge'
8) Click on the link to get your generated PDF
=> An error message should appear informing you to contact your website's admin
9) Apply this patch
10) Click again on the link to get your generated PDF
=> This time, a download prompt should appear
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test, apply the patch and confirm that the file has been removed.
Confirm that no references to the template exist in the codebase.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pasi Kallinen [Mon, 5 Mar 2018 10:10:56 +0000 (12:10 +0200)]
Bug 20332: Allow translating some grouped opac results texts
The grouped OPAC results page has several untranslatable
javascript-added texts, including the selection modifiers "Clear all"
and "Select all" links, and the entries in the shelves/lists dropdown.
Compare to opac-results.tt
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Kuhn [Thu, 25 Jan 2018 17:27:19 +0000 (09:27 -0800)]
Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC
This patch adds a check for UPCs and well as ISBNs to the Novelist Select conditionals in opac-detail.tt
To test (note that you must subscribe to Novelist Select):
1. If your library does not use the raton ratings feature, activate it for the purposes of this test.
2. Display a record that does not have an ISBN in the 020 field, but has a upc (or other code) in the 024 field. The rating option will
display as 5 radio buttons and a "rate it" button.
3. Apply the patch.
4. Display the same record again. The radio buttons will be replaced with stars. This indicates that the scripts on the page completed.
Rather that using the patron ratings as in indicator, you can also use a web page inspector/debugger such as firebug or the built-in
inspectors in most newer browsers to check for script errors.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I couldn't check with Novelist Select, but read and checked changed made carefully.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21023: Remove warning in t/db_dependent/Circulation/Chargelostitem.t
To test:
- Run:
$ kshell
k$ prove t/db_dependent/Circulation/Chargelostitem.t
=> FAIL: Warning is displayed
- Apply this patch
- Run:
k$ prove t/db_dependent/Circulation/Chargelostitem.t
=> SUCCESS: Tests pass! No warning!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 14446: Workaround to resolve uninitialized value in goto warning
Forcing both GetTab calls to list context resolves the warning.
A workaround, not a real fix.
Test plan:
Search for something in the syspref text bar.
Without this patch, you will have a warn: Use of uninitialized value in goto
With this patch, you won't.
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 6 Jun 2018 14:54:58 +0000 (14:54 +0000)]
Bug 6647: Label item search should use standard pagination routine
This patch doesn't fix how pagination links are generated for the label
item search results, but it does modify the template so that the
pagination links are styled like they are on catalog search results.
To test, apply the patch and go to Tools -> Labels.
- Open or create a label batch.
- Click "Add items" to trigger the pop-up search window.
- Perform a search which would return multiple results.
- Confirm that the style of the pagination bar matches the one on the
catalog search results page.
- Confirm that current-page number highlighting works correctly.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 14 Jun 2018 14:31:02 +0000 (11:31 -0300)]
Bug 20919: Remove unecessary search calls on the biblio detail page
There is a countanalytics flag that is set for items used in analytical
biblio records. This flag is only used in the template when 'analyze'
has been passed to the script.
In order to avoid unecessary search calls (1 per item), $analyse must be
tested.
Test plan:
0. Do not apply the patch
1. tail -f /var/log/koha/kohadev/zebra-output.log
2. Hit a bibliographic record detail page with several items
3. Notice that the log has 1 line per item:
11:30:36-14/06 zebrasrv(32) [warn] ir_session (exception)
4. Apply the patch
5. Hit the page again
6. There is nothing in the zebra log file
If you are familiar with analytic records, confirm that you are not
allowed to remove an item that is used in analytical biblio records.
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Fridolin Somers [Mon, 18 Jun 2018 07:04:19 +0000 (09:04 +0200)]
Bug 20953: Prevent several discharge requests on OPAC
On OPAC, a user can requested a discharge even if one is already pending.
This generates several pending discharges in staff interface that can not be deleted.
This is because request operation leads to page 'opac-discharge.pl?op=request' and user can refresh this page performing a new request.
Perl code must check that operation is allowed.
Patch reoganised the code so that the following FIXME is obsolete :
'FIXME looks like $available is not needed'
Patch also replaces 'op' arg test to also check undef : input->param("op") // ''
Test plan :
1) Set system preference 'useDischarge' to 'Allow'
2) Choose a patron without checkouts nor fines nor restrictions
3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl
4) Click on 'ask for a discharge' tab
=> You see /cgi-bin/koha/opac-discharge.pl
with text 'What is a discharge? ...'
5) Click on 'Ask for a discharge' link
=> You see /cgi-bin/koha/opac-discharge.pl?op=request
with text 'Your discharge request has been sent ...'
6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl
=> You see one discharge requets for the patron
7) Come back to OPAC and refresh page
=> You see /cgi-bin/koha/opac-discharge.pl
with text 'Your discharge will be available on this page within a few days.'
8) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl
=> There is still one requets for the patron
9) Come back to OPAC and enter URL /cgi-bin/koha/opac-discharge.pl?op=get
=> You see /cgi-bin/koha/opac-discharge.pl
with text 'Your discharge will be available on this page within a few days.'
10) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl
=> There is still one requets for the patron
11) Click on 'allow' on patron discharge request
12) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl
=> You see link 'Get your discharge'
13) enter URL /cgi-bin/koha/opac-discharge.pl?op=request
=> You see same page and no new discharge requets is created
14) Come back to intranet on patron details page
15) Remove the discharge restriction
16) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl
=> You see text 'What is a discharge?...'
17) enter URL /cgi-bin/koha/opac-discharge.pl?op=get
=> You see same page and no new discharge requets is created
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Mirko Tietgen [Fri, 15 Jun 2018 10:34:51 +0000 (12:34 +0200)]
Bug 20949: (follow-up) debian/control
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Mirko Tietgen [Fri, 15 Jun 2018 10:10:19 +0000 (12:10 +0200)]
Bug 20949: Koha depends on Clone
Clone was not declared a dependency before. It used to be a dependency
of Hash::Merge but isn't in the recent version.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Mon, 13 Mar 2017 13:13:10 +0000 (14:13 +0100)]
Bug 18250: Force startup order in postinst script
This is a workaround meant to correct upgrading installs.
We force the order by disable/enable.
Test plan:
[1] When upgrading an existing install, check that the startup order
after the upgrade has been corrected in /etc/rcX.d (say X=5).
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Mon, 13 Mar 2017 12:53:49 +0000 (13:53 +0100)]
Bug 18250: Update LSB block of koha-common init script
Currently koha-common may start before memcached. We should prevent that.
If we add memcached to the LSB section of the koha-common init script,
Debian's insserv will know about this requirement.
Note: This patch is only a step in resolving the issue.
Test plan:
[1] Copy the updated koha-common script to /etc/init.d
[2] Look for S..koha-common and S..memcached in /etc/rcX.d (say X=5)
[3] Run sudo update-rc.d koha-common disable
[4] Run sudo update-rc.d koha-common enable
[5] Look again for S..koha-common in /etc/rcX.d (say X=5).
The number for koha-common should now be higher than for memcached.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Julian Maurice [Mon, 25 Jun 2018 12:14:43 +0000 (14:14 +0200)]
Bug 19502: Add POD for max_result_window
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Julian Maurice [Mon, 25 Jun 2018 12:14:32 +0000 (14:14 +0200)]
Bug 19502: Remove debug warn
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Julian Maurice [Tue, 5 Jun 2018 13:11:34 +0000 (15:11 +0200)]
Bug 19502: Retrieve index.max_result_window from ES
This avoid hardcoding '10000' in two different places and allow users to
adjust this setting.
Also, this patch fixes a bug when the search return less than 10000
results
Test plan:
1. Do a search that returns 10000+ records.
2. Note the warning above the pagination buttons
3. Go to the last page, no error
4. Change the ES setting:
curl -XPUT http://elasticsearch/koha_master_biblios/_settings -d \
'{"index": {"max_result_window": 20000}}'
5. Do another search that returns more than 10000 but less than 20000
6. Note that the warning does not show up
7. Go to the last page, still no error
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 16 Mar 2018 11:10:37 +0000 (11:10 +0000)]
Bug 19502: Limit pagination to first 10000 results when using ES
This patch is to avoid hitting an error page. We should eventually make the
max number returned configurable for ES.
To test:
1 - Have Koha running ES with 10,000+ records
2 - Search for '*'
3 - Click 'Last' to view last page of results
4 - 'Cannot perform search' error
5 - Apply patch
6 - Search again
7 - View 'Last' page
8 - No error, you go to the last of 10000
9 - Note the warning above the pagination buttons
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 29 Jun 2018 17:09:07 +0000 (14:09 -0300)]
Bug 21009: Fix max length of inputs on editing/adding items
There is a "max length" value you can define at framework level to
limit the size of the input. But it is not taken into account on the
add/edit item form.
Test plan:
- Define a maximum length for an item subfield
- Add or edit an item
=> Without this patch the maxlength attribute of the inputs are not
defined (maxlength="")
=> With this fix you will see the maxlength attributes correctly set
with the value you defined in the framework
Note:
We could/should set this value to the size of the DB column when mapped
For instance 952$u is mapped with items.uri, which is a varchar(255).
This length restriction should done at framework level
Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Victor Grousset [Thu, 25 Jan 2018 13:37:56 +0000 (14:37 +0100)]
Bug 20084: Fix Industrial2of5 and COOP2of5 patron card layouts
== Test plan ==
This is an oversimplification of a full patron card setup used in production.
1. Create a batch with 1 patron
2. Create a layout and set
the name
"Print card number as barcode"
"Barcode type:" to "Code 39"
3. Create a card template without filling anything
4. Export the batch using the layout and template
5. You should have a white page with a barcode
And no errors in the relevant log file
This show that this setup isn't completely bogus
(although Code 39 is the only type working...)
6. Layout: set "Barcode type:" to Industrial2of5
7. Export the batch
8. You should have a white page with no barcode
And errors in the relevant log file
"Invalid Characters"
This is the bug.
9. Layout: set "Barcode type:" to COOP2of5
10. Export the batch
11. You should have a white page with no barcode
And errors in the relevant log file
"Invalid Characters"
This is the bug.
12. Apply this patch
13. Retry with both non-working patches
1. You should have a white page with a barcode
2. And no errors in the relevant log file
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 9 Jul 2018 13:24:44 +0000 (13:24 +0000)]
Bug 21054: Remove extraneous </body> tag from sco-main.tt
To test:
1 - Enable sco and setup AutoSelfCheck
2 - Try to use self checkout and print receipt
3 - You shoudl be redirected to the login page
4 - Apply patch and restart all the things
5 - Try to use self checkout and print a receipt
6 - Success!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 21 Jun 2018 21:06:00 +0000 (18:06 -0300)]
Bug 20979: Fix confirm deletion popup when deleting a biblio
When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions. Prevents the
deletion of the bib record.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Alex Arnaud [Fri, 6 Jul 2018 13:40:53 +0000 (13:40 +0000)]
Bug 21046: Return the correct borrowernumber when there is empty cardnumber(s)
Test plan:
- Use a patron with an empty cardnumber to authenticate with ILSDI
AuthenticatePatron
(cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=userid&password=pass),
- make sure you have other patron(s) with empty cardnumber and there
borrowernumber is
smaller than the one you authenticate with,
- you should get a wrong borrowernumber,
- apply this patch,
- test again, you should get the right one
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1) Apply Bug 19835
2) Apply this patch
3) Reload marc21 bibliografic frameworks, check loads ok
4) Clean your browser cache
5) Edit a new bib record, fire 007 plugin,
for Map, 04 position, check new 'x'
for Map, 06 position, check renamed 'c'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Victor Grousset [Wed, 20 Dec 2017 16:13:40 +0000 (17:13 +0100)]
Bug 19849: Make a string translatable again after a rebase error
Bug 16621 reverted part of bug 12509
1. Log in the OPAC and staff interface
2. Restrict the user logged in the OPAC (restricting yourself works)
Staff interface → Patron page → Restrictions → Add manual restriction
Put this comment the "OVERDUES_PROCESS Give the books back or we're comming!"
3. Install the fr_FR locale and switch the interface to it
4. Go to OPAC: /cgi-bin/koha/opac-user.pl
5. Then you should see the ugly comment with "OVERDUES_PROCESS"
6. Apply this patch
7. Update the translation: ./translate update or equivalent
8. Open misc/translator/po/fr-FR-opac-bootstrap.po
9. Find the string containing "Restriction added by overdues process"
10. Remove the fuzzy flag
11. Install the language
12. Refresh the page in the OPAC
13. Then you should see the translation + the comment instead of "OVERDUES_PROCESS" + the comment
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Victor Grousset [Wed, 20 Dec 2017 14:15:49 +0000 (15:15 +0100)]
Bug 19849: Minor fixes & refactor of opac-reserve.tt & opac-user.tt
- make next patch easely reviewable.
- fix lone quote. (Replace by <strong>
- add forgotten condition for 9999-12-31
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Wed, 16 May 2018 02:25:38 +0000 (02:25 +0000)]
Bug 7136: Correct description of Grace period for subscriptions
The grace period is used with the serialsUpdate.pl cronjob. It will
generate the next issue and set the one before to 'Late' with
an optional note.
There is on trace of a 'waiting' status for serials.
To test:
- check help file on the subscription edit form for
the description of the 'Grace period'.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 26 Jun 2018 13:05:42 +0000 (13:05 +0000)]
Bug 20507: Shelf browser does not update image sources when paging
This patch updates the shelfbrowser include so that the system
preference check for Coce will function correctly.
To test, apply the patch and test the OPAC shelf browser with each of
the enhanced content options enabled: Coce, Amazon, Google. In each
case, page through the shelf browser to confirm that covers load
correctly.
Signed-off-by: Cab Vinton <bibliwho@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20946: (QA follow-up) make outstanding_debits return the account lines only
This patch was discussed with Jonathan on a QA conversation. It is
better to keep this simpler and more reusable. And is the right approach
in this case.
This patch makes Koha::Account::outstanding_debits return the account
lines, and a method is added to Koha::Account::Lines so the outstanding
amount is calculated on the resultset. This is done the dame way it was
done before, and the tests got adjusted.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 27 Jun 2018 03:53:27 +0000 (03:53 +0000)]
Bug 20946: (RM follow-up) Additional tests and fix addition to undef
Added a few tests with credit lines and found we got warnings, adjusted
the routine to avoid this
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Tue, 26 Jun 2018 13:08:36 +0000 (13:08 +0000)]
Bug 20946: Reduce number of db calls
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20946: Use K::Account->outstanding_debits in pay.pl and paycollect.pl
This patch changes the how account lines are fetched (using
Koha::Account->outstanding_debits) so credits are not picked.
To test:
- Add a $5 credit to a patron
- Add a $1 fine
- Go to the 'Pay fines' tab
=> FAIL: Credit is displayed
- Try to pay all fines
=> FAIL: You are told to enter a value less than or equal to -4.00
(Observe you cannot do that)
- Apply this patch
- Reload
=> SUCCESS: Credit is not displayed
=> SUCCESS: You are able to pay all fines
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a handy method that returns the total for outstanding
debits (i.e. those that haven't been canceled with credits), and the
corresponding Koha::Account::Line objects.
Unit tests are added.
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: tests pass!
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 4 Jul 2018 17:55:14 +0000 (14:55 -0300)]
Bug 21029: Make "Suspend until:" translatable
The label was part of the holds.js file. As .js files are never
translatable it needs to be moved to template level.
Test plan:
- Place a hold on an item
- Go to the patron account
- Click on the Suspend button on the holds tab
- View the modal, the label before the date field "Suspend until:" is
now translatable.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Since this commit AddReturn return a Koha::Issue object, not a hashref
with item's info.
Test plan:
1 - Enable SIP server on your test instance
For kohadevbox:
cp /etc/koha/SIPConfig.xml /etc/koha/sites/kohadev/
create patron with user/pass term1/term1 and grant circulation
privileges
2 - enable AutomaticItemReturn
3 - Checkin an item which will generate a transfer via SIP2:
perl /home/vagrant/kohaclone/misc/sip_cli_emulator.pl -a localhost -p
6001 -su term1 -sp term1 -l LPL --item {BARCODE} -m checkin -t
CR
4 - Note no CT field
5 - Apply patch
6 - Repeate checkin via SIP2
7 - Transfer destination is correctly returned in CT
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
- Verify SQL is correct and frameworks load without problem
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sat, 28 Apr 2018 20:54:14 +0000 (20:54 +0000)]
Bug 19835: (follow-up) Correct formatting in a few places
In some places - was used insted of --, changed for
consistency with existing descriptions.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This followup fixes all repeatability cases, from
updates 23+24+25 and a few older ones.
To test:
0) Apply both patches
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check repeatability...
Bibs and auth frameworks checked against LOC description.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields
Repeatability checks on followup
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Tue, 22 May 2018 16:29:09 +0000 (16:29 +0000)]
Bug 20793: (follow-up) Add style to the non-link hold count on detail page
This small follow-up changes the style on the bibliographic detail page
of the hold count so that it looks similar whether it's a link to holds
or not.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sun, 20 May 2018 00:42:28 +0000 (02:42 +0200)]
Bug 20793: Don't show a holds link in staff for users without permission
On the results list in staff the 'Holds (x)' link always shows
independent of the permissions of the staff user.
This patch tightens the permission checks on the result page
to explicitly check for the place_holds permission.
To test:
- Create a staff user with place_holds permission
- Check the result list, you should see 2 links to the
holds page:
- 'Place holds' on top of the results list
- 'Holds (x)' at the bottom of each entry in the results
list
- Verify both links work
- Create a staff user without place_holds_permission
- Without the patch you'll see the second link,
but it will lead to a permission error
- With the patch you'll still see the 'Holds (x)', but
it will no longer be a link.
- Go to the detail page of a record with an existing hold.
- Repeat test with both staff users.
- One time the Hold information in the bibliographic information
should show as a link, the other time as a simple text.
Displaying the information about existing holds still make sense
as this is the current beheviour.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Thu, 31 May 2018 13:29:33 +0000 (13:29 +0000)]
Bug 15360: Incorrect or mislabeled behavior on Authorities "New from Z39.50" Button
This patch makes a third stab at resolving this issue by reorganizing
the authorities toolbar buttons to more closely match the bibliographic
toolbar buttons:
- "New from Z39.50" has been added to the "New authority" dropdown.
- "Edit" is now a dropdown, like on the bibliographic detail page:
- Edit record
- Edit as new (duplicate)
- Replace record via Z39.50/SRU
- Delete record
To test, apply the patch and go to the authorities module. Testing with
existing Z39.50 authority sources configured:
- On the authorities home page and the authorities search results
page, the "New authority" menu should have a "New from Z39.50" link.
- View the details for an authority record. The menus should appear as
described above. Test each option.
Remove all Z39.50 authority servers and test again. The "New from
Z39.50" link should no longer appear.
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Mirko Tietgen [Fri, 29 Jun 2018 20:25:33 +0000 (22:25 +0200)]
Bug 20920: (follow-up) generated d/control
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jérôme Charaoui [Wed, 20 Jun 2018 18:25:20 +0000 (14:25 -0400)]
Bug 20920: Add missing dependency on CGI::Compile
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Mon, 25 Jun 2018 15:00:42 +0000 (15:00 +0000)]
Bug 20559: Compiled CSS
This patch contains the compiled OPAC CSS.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Mon, 25 Jun 2018 14:54:08 +0000 (14:54 +0000)]
Bug 20559: Occurrences of loading-small.gif still exist
This patch removes some leftover references to a file which no longer
exists. In the OPAC, loading-small.gif was included in CSS which was
never used. In the staff client, loading-small.gif should have been
corrected to spinner-small.gif.
To test, apply the patch and go to Tools -> Batch record modification.
- Submit a batch of records to modify
- In the table of titles which will be modified, click the 'Show MARC'
button.
- The modal preview window should show "Loading" and an animated
spinner before the MARC record is loaded.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 20 Jun 2018 17:16:16 +0000 (17:16 +0000)]
Bug 20931: JS error "ReferenceError: $ is not defined" when CircSidebar is turned on
This patch reorganizes the way sidebar menus get highlighted based on
the current page. A global function is added to handle most cases.
Individual menu-handling scripts have been modified to handle only the
edge cases which aren't covered by the global one.
A new class is added to the global CSS file so that highlighted menu
links can be custom-styled.
To test, apply the patch and clear your cache if necessary.
View various pages to confirm that current-page-highlighting in the
sidebar menu is working correctly and that there are no JS errors in the
browser console. For example:
And with CircSidebar turned on test various circulation pages, e.g.
- Circulation -> Set library
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Thu, 21 Jun 2018 15:11:54 +0000 (11:11 -0400)]
Bug 20977: Javascript vars used in confirm_deletion in catalog.js do not match strings in catalog-strings.inc
The naming mismatch can cause javascript errors.
Test Plan:
1) Confirm the string vars used in catalog.js match the ones in
catalog-strings.inc
Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 4 Apr 2018 17:50:48 +0000 (17:50 +0000)]
Bug 20520: Re-indent moremember.tt
This patch reindents the template for the patron detail page,
moremember.tt:
- Trailing spaces removed
- Indentation changed to a consistent 4 spaces
- Markup indentation made more consistent
To test, view the patron detail page. There should be no visible
difference before and after the applying the patch.
HTML validation before and after the patch should return the same
results.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 26 Jun 2018 16:04:01 +0000 (13:04 -0300)]
Bug 20991: Do not lost patron's category when editing a patron
If there is an error in the edit patron form the patron's category is
lost.
This seems to be a long standing bug.
Test plan:
- Edit an existing patron
- Change the patron category to a category that triggers the error that
the user is not in the right age range for that new category
- Save, error is triggered
=> Without this patch the patron category has been reset
You should also test different ways to edit/add a patron (quick add,
step 1)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Caitlin Goodger [Tue, 29 May 2018 17:32:12 +0000 (17:32 +0000)]
Bug 17886: Don't show option to add to existing list if there are no lists
This patch modifies the page for adding a title to a list so that the
"Add to existing list" option doesn't appear if there are no lists
defined.
TEST PLAN
---------
1) Make sure no lists exist at all.
2) Make there is at least one findable biblio record entered
3) Find that biblio record in the OPAC
4) Click 'Save to your lists'
-- Notice that the whole save to list section is there.
5) Apply this patch
6) Click 'Cancel'
7) Click 'Save to your lists'
-- Notice you can only add now, which makes sense.
8) Run koha qa test tools.
Perform the same tests in the staff client.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 14 Jun 2018 14:20:44 +0000 (14:20 +0000)]
Bug 20945: Escape SQL parameters when constructing download links
TO test:
1 - Create a report that takes a parameter
2 - Enter a parameter containing '%'
3 - Attempt to download report, note link is misconstructed
4 - Apply patch
5 - Reload
6 - Note URL is now correct
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
They come from C4::Items::GetAnalyticsCount called by catalogue/detail.pl.
This sub starts a Zebra search on index 'hi' (Host-Item-Number).
If you do not use this field at all (related to 773$9 in MARC21), Zebra
returns an Unsupported Use attribute error (114).
In making this change, I added one minor change:
[1] Remove the commented GetAnalyticsCount in additem.pl and correcting
indentation in that loop (removing tabs). So no change at all there.
NOTE: I will propose to bind the GetHostItemsInfo call in detail.pl and two
other scripts to this preference too on report 20702.
Test plan:
[1] If you use EasyAnalytics, verify that there is no change.
[2] If you do not, check the zebra-output.log. You should no longer see
searches for Host-Item-Number with 1=8911. (As well as ERROR 114 on
this index.)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>