Owen Leonard [Sun, 19 Aug 2018 19:19:49 +0000 (15:19 -0400)]
Bug 21216: Add filter/search options to notices table
This patch adds a DataTables toolbar to the Notices & slips table,
including a filter field, column visibility, and data export options.
To test, apply the patch and clear your browser cache if necessary.
- Go to Tools -> Notices & slips
- Confirm that there is a table toolbar with a filter, a "Column
visibility" button, and "Excel," "CSV," "Copy," and "Print" buttons.
- Confirm that showing and hiding columns via the button is working
correctly.
- Confirm that only the first four columns are sortable.
Go to Administration -> Columns settings.
- Expand the "Tools" section.
- Find "id=lettert."
- Make some selections to configure default settings of the reports
table.
- Return to reports and confirm that these defaults are applied.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
While it doesn't have a practical effect (the variable is reset several
lines below) I agree this should be explicitly set to its default.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 15486: Make circ rules UI handle holds_per_day
This patch makes the staff UI correctly handle the holds_per_day
configuration.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 15486: Modify request.tt to handle the new error string
This patch makes reserve/request.pl display a convenient error
description when a hold cannot be placed due to the new daily limit
configuration.
To test:
- Apply this patchset
- Upgrade
- Configure your circulation rules so there's a daily limit for holds
- Place holds so the patron reaches the maximum
- Place one more hold
- Notice the hold cannot be placed and a convenient error message is
displayed.
- Sign off :-D
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 15486: Extend CanItemBeReserved so it handles daily holds limits
This patch implements the required changes in
C4::Reserves::CanItemBeReserved so it implements a daily limit on holds.
It returns the 'tooManyReservesToday' string if the policy doesn't allow
placing the hold. It returns 'OK' (current behaviour) otherwise.
To test:
- Run:
$ sudo koha-shell kohadev
k$ cd kohaclone
k$ prove t/db_dependent/Holds.t
=> FAIL: Tests fail because the error condition is not making
CanItemBeReserved return the desired error code.
- Apply this patch
- Run:
k$ prove t/db_dependent/Holds.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch introduces unit tests for the new circulation rules option
that allows setting a max holds per day limit.
To test:
- Apply the patch
- Run:
$ sudo koha-shell kohadev
k$ cd kohaclone
k$ prove t/db_dependent/Holds.t
=> FAIL: CanItemBeReserved doesn't check the amount of holds per day
and the introduced error code is not returned. OK is returned
instead.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds a new column __max_holds_per_day__ to the issuingrules table.
It's going to be used to set a daily limit for holds.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 3 Aug 2018 14:37:09 +0000 (14:37 +0000)]
Bug 20044: (follow-up) Add min-width to .input_marceditor
This patch adds a min-width property to the first .input_marceditor rule
in order to prevent <selects> styled by Select2 from collapsing at
narrower browser widths.
To reproduce the bug, apply all patches on Bug 20044 except this one.
Open the MARC editor and narrow the browser width to below 768 pixels.
Reload the page and view a tab which contains a <select> styled by
Select2 (942c is often an example). The <select> will have narrowed to
be almost invisible.
Apply the patch and reproduce the steps above. The <select>s should be
fully visible.
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>
Jonathan Druart [Wed, 1 Aug 2018 19:18:04 +0000 (16:18 -0300)]
Bug 20044: Fix input_marceditor selectors
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I can't reproduce the problem this patch is intended to fix, but the
changes are sensible either way.
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>
Owen Leonard [Tue, 13 Mar 2018 09:02:51 +0000 (09:02 +0000)]
Bug 20044: (follow-up) Improve responsive behavior of MARC editor
This patch makes some changes to addbiblio.css in order to improve
responsive changes to the MARC editor.
Note: This patch does not make changes affecting narrow browser widths.
The changes are focused on adapting to larger layouts affected by the
switch to the Bootstrap grid.
To test, apply the patch and clear your cache if necessary. Open an
existing record for editing in the standard MARC editor. View the page
at various browser widths and confirm that it looks correct.
Note: Because of the way the floating toolbar is displayed it does not
dynamically resize when you resize the browser. Reload the page after
resizing the browser window to confirm that the toolbar adapts at
different widths.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> 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>
Owen Leonard [Fri, 19 Jan 2018 15:10:18 +0000 (15:10 +0000)]
Bug 20044: Switch single-column templates to Bootstrap grid: Cataloging
This patch updates several cataloging module templates to use the
Bootstrap grid.
- cataloguing/addbooks.tt - Cataloging - The main page and the
cataloging search results page should look correct.
- cataloguing/addbiblio.tt - Cataloging -> New record - The record edit
page should look correct.
- cataloguing/merge.tt - Cataloging -> Search -> Select two records to
merge. The merge reference selection page should look correct, as well
as the source/destination selection page.
- cataloguing/moveitem.tt - Catalog -> Search -> View record -> Edit ->
Attach item. The barcode submit form and confirmation screens should
look correct.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> 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>
Owen Leonard [Wed, 10 Oct 2018 13:32:29 +0000 (13:32 +0000)]
Bug 21492: Show subscriptions count in the sidebar menu
This patch modifies the include file for the sidebar menu of
bibliographic views so that a count of subscriptions is shown on the
subscriptions tab.
To test you should have bibliographic record with one or more
subscriptions. View that bibliographic record and confirm that the
sidebar menu tab shows the count of subscriptions.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21291
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Sun, 21 Oct 2018 02:34:25 +0000 (02:34 +0000)]
Bug 21625: Fix wording and typo in SMSSendDriver system preference description
SMSSendDriver was missing an S.
Koha is sending not receiving messages, so I think switching
that will be a little more clear.
To test:
Verify that the system preference description reads correctly.
Signed-off-by: Andreas Roussos <arouss1980@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 2696 introduced account_offset_type.inc but 'Lost Item Return' doesn't match what is added on the database. Moreover, bug 20978 added references to this wrong value too in Koha::Account
This patch performs a trivial fix for this.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Patch matches what was outlined in test plan, also passes qa test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 19 Oct 2018 11:50:06 +0000 (11:50 +0000)]
Bug 21614: Search bar on Stock rotation page displays both [-] and [+] simultaneously
This patch modifies the stock rotation template so that it include the
catalog search bar include instead of the patrons one.
To test, apply the patch and enable the StockRotation system preference.
- Go to Tools -> Stock rotation.
- Confirm that the search boxes at top are 'Check out,' 'Check in,'
'Renew,' and 'Search the catalog.' 'Search the catalog' should be
selected.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 17 Oct 2018 15:32:11 +0000 (12:32 -0300)]
Bug 21486: Only fetch the items' barcodes
and avoid unecessary processing
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Tested and found correct AU data is returned, and passes QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 12 Oct 2018 15:47:04 +0000 (12:47 -0300)]
Bug 21486: Fix 'AU' for SIP
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21607: Make Koha::Account::Line->apply store credits as negative amounts
This is a trivial patch, that makes offsets have 'amount' stored as
negative values for applied credits.
The behaviour is changed on the tests and adjusted in the code. To test:
- Run
$ kshell
k$ prove t/db_dependent/Koha/Account/Lines.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 20 Apr 2018 17:08:21 +0000 (17:08 +0000)]
Bug 20554: (follow-up) Add local font files and add method for loading them
This patch adds local copies of the font files specified in the original
patch. A new JavaScript file has been added, fontfaceobserver.min.js,
which helps gracefully load font assets.
https://github.com/bramstein/fontfaceobserver
Information about the new assets has been added to the about page.
When using web fonts, there can be a delay, while the browser loads the
font files, between the time the page loads and the time the fonts
render. Font Face Observer allows us to specify a default font for the
initial page render, and then apply the web font after it has loaded.
To test, apply the patch and regenerate the OPAC css. View any page in
the OPAC and confirm that the custom font renders properly.
View the About page in the staff client and confirm that the new license
information looks correct.
Patch applies and OPAC and license look good. Looking forward to this. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 2 Dec 2015 15:46:41 +0000 (15:46 +0000)]
Bug 15282: Switch default CHECKIN notice to Template Toolkit
Test Plan:
1) Ensure dependancies are applied
2) Apply this patch
3) Update your CHECKIN notice to match the following:
The following items have been checked in:
----
[% biblio.title %]
----
Thank you.
3) Generate a CHECKIN notice for a patron
4) Note there is no change to the generated notice
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 2 Dec 2015 15:21:11 +0000 (15:21 +0000)]
Bug 15280: Switch default CHECKOUT notice to Template Toolkit
Test Plan:
1) Ensure dependancies are applied
2) Apply this patch
3) Update your CHECKOUT notice to match the following:
The following items have been checked out:
----
[% biblio.title %]
----
Thank you for visiting [% branch.branchname %].
3) Generate a CHECKOUT notice for a patron
4) Note there is not change to the generated notice
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 9 Oct 2018 18:05:04 +0000 (18:05 +0000)]
Bug 21505: Box around 'Additional fields' does not contain the fields
This patch modifies the subscription detail page markup to eliminate a
confusing bordered <legend> tag. It is replaced with an <hr> to
delineate the sections and an <h3> tag to serve as the heading.
To test, apply the patch and regenerate the staff client CSS.
- Configure one or more additional subscription fields.
- View the detail page for a subscription and confirm that the
"Additional fields" section is clearly labeled.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 10 Oct 2018 12:10:45 +0000 (12:10 +0000)]
Bug 21531: Subscription "New fields" button should read "New field"
This patch changes the label of the "New fields" button on the
subscription add fields page to read "New field," making it consistent
with similar buttons in the staff client.
Also changed:
- Add missing id to <select> to make label clickable.
- Remove custom DataTables configuration in favor of defaults.
To test, apply the patch and go to Serials -> Add subscription fields.
- The button in the toolbar should read "New field."
- The DataTables' functionality of the table of existing custom fields
should be correct.
- Click the "New field" button.
- Cliking the "Authorised value category" label should put the focus
on the dropdown.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 9 Oct 2018 16:41:55 +0000 (16:41 +0000)]
Bug 21523: Update two-column templates with Bootstrap grid: Serials part 2
This patch modifies several serials templates to use the
Bootstrap grid instead of YUI.
This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.
To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:
- Serials home page
- Subscription search
- Subscription details
- Edit history (under the "Planning" tab. Manual history must be
enabled for that subscription).
- Subscribers
- Serials -> Manage frequencies
- Serials -> Manage numbering patterns
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 9 Oct 2018 13:41:39 +0000 (13:41 +0000)]
Bug 21519: Update two-column templates with Bootstrap grid: Serials part 1
This patch modifies several serials templates to use the
Bootstrap grid instead of YUI.
This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.
To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:
- Serials -> Add subscription fields
- Add or edit subscription fields
- Serials -> Check expiration
- Serials -> Claims
- Serials -> Subscription
-> Serial collection
-> Edit serials
-> Routing list
- Save and preview routing list
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21590: change virtual shelf to list in send list email.
To test
1) Choose a public list from the 'lists' menu in the OPAC.
2) Click 'Send list'
3) Log in as necessary
4) Fill in your own email address
5) Click 'send'
6) Check your email, the sent email will contain the text
"sent you from our online catalog, the virtual shelf called".
Apply patch, re-test. The email will now contain
"sent you from our online catalog, the list called".
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
David Cook [Fri, 10 Aug 2018 08:08:13 +0000 (18:08 +1000)]
Bug 21005: Missing row/column defaults cause unexpected results in report wizards
Some report wizards are missing row/column defaults, which sometimes return blank
pages (borrowers_stats.pl) or results always equalling 0, which a non-discerning
user may interpret incorrectly.
If the DEBUG environmental variable is enabled, missing row/column choices will
actually cause fatal software errors as well, which is also undesirable for users.
This patch adds default choices for row and column on
report wizards that had no radio buttons selected, so that a user
can't submit the form without choosing a row and column. This
prevents errors.
To test:
1) Apply patch
2) Visit /cgi-bin/koha/reports/issues_avg_stats.pl
3) Visit /cgi-bin/koha/reports/borrowers_stats.pl
4) Visit /cgi-bin/koha/reports/catalogue_stats.pl
5) Visit /cgi-bin/koha/reports/issues_stats.pl
6) Observe that default choices for row/column are there
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Tue, 17 Apr 2018 23:59:58 +0000 (23:59 +0000)]
Bug 20592: Return early in ModItem if nothing to update
Two lines of code and move them earlier.
Add a check to make sure there are changes.
Followed the test plan, both the _BEFORE_ and after do as described.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 24 Apr 2018 18:53:02 +0000 (15:53 -0300)]
Bug 20592: Add tests
NOTE: It isn't really a test, but it does trigger
the return line which was added to ModItem.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 19 Oct 2018 08:51:05 +0000 (10:51 +0200)]
Bug 21617: statistics.ccode is not long enough (see also DBRev 18.06.00.032)
Warn from a test:
DBD::mysql::st execute failed: Data too long for column 'ccode' at row 1 [for Statement "INSERT INTO statistics
(datetime,
branch, type, value,
other, itemnumber, itemtype, location,
borrowernumber, proccode, ccode)
VALUES (now(),?,?,?,?,?,?,?,?,?,?)" with ParamValues: 0="z8LIyIV", 1='issue', 2=undef, 3='', 4='2584', 5='E_QkzaV5Ay', 6='oDnFRZyog2CS2_XoUB_MB2sBxyI3elbFPC_AekxLPrduGTXKnlNoLKEdQrXzpAw5zD1pGbZshV9ydZup', 7='2000005168', 8='', 9='j9ZDn74omZAoZrTOdC4a05SpWRSHPR2apfss7y5V6QJuQnBEk32XWXCfMp7'] at C4/Stats.pm line 138.
The dbrev 18.06.00.032 did not change it from 10 to 80 as in other tables.
We should either truncate to 10 chars in Stats.pm or increase to varchar(80). Since it is varchar and not char, we should not be afraid about size. I choose for the latter here.
Test plan:
Run db rev.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 5 Oct 2018 12:50:26 +0000 (12:50 +0000)]
Bug 21497: Correctly format dates for ILL requests in OPAC
This patch updates the opac ILL template to use the $KohaDates plugin
for displaying dates. Also updated:
- Added "title-string" sorting to allow for correct sorting of dates in
the table of requests.
- Corrected capitalization as per our capitalization rules.
- Added self-closing / to inputs as per coding guidelines.
To test, apply the patch and log in to the OPAC as a user who has
multiple outstanding ILL requests.
- In the table of ILL requests, the "Request placed" and "Last updated"
dates should be formatted according to your system's dateformat
preference.
- Sorting of those columns should work correctly.
- View a request and confirm that "Request placed" and "Last updated"
dates in this view are also formatted correctly.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 18959: Skip xt/author/Text_CSV_Various.t if Text::CSV::Unicode missing
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 18 Oct 2018 19:36:45 +0000 (16:36 -0300)]
Bug 21600: Use str param instead of dt for output_pref
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21600: /patrons should have timestamp/datetime values converted from rfc3339 into valid MySQL values
Bug 21597 enabled the option so set strict SQL modes in koha-conf.xml to
be able to improve Koha's comformance to current standards on DB
engines.
This causes lots of parts of Koha to fail because they rely on MySQL
fallbacks that are no longer default behaviours.
While we can workaround this by setting SQL modes on runtime, the
decision has been that this needs fixing.
This patch deals with the /patrons API failing to correctly convert
datetimes into valid SQL timestamps.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass
- Add <strict_sql_modes>1</strict_sql_modes> on your koha-conf.xml
$ sudo vim /etc/koha/sites/kohadev/koha-conf.xml
- Restart memcached and Plack:
$ restart_all
- Run:
k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests fail due to updated_on and/or lastseen fields wrong
format (MySQL error)
- Apply this patch
- Run:
k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass! It all makes sense!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 12 Oct 2018 14:27:27 +0000 (11:27 -0300)]
Bug 21554: Add missing use statement in subscription-batchedit
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Mon, 15 Oct 2018 12:01:14 +0000 (14:01 +0200)]
Bug 21475: Fix crash on missing default itemtype
Test plan:
Enable ArticleRequests.
Find book without itemtype (942c). Maybe you need this:
update biblioitems set itemtype=NULL where biblionumber=[...]
Goto opac detail for that book. No crash anymore?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 17 Oct 2018 23:24:09 +0000 (20:24 -0300)]
Bug 21597: Incorrect decimal value: 't_value_bib639' for column 'price'
Fix t/db_dependent/selenium/basic_workflow.t
We want to send specific values depending on the data type in DB
For instance integer, or varchar(10)
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>
Jonathan Druart [Wed, 17 Oct 2018 22:26:32 +0000 (19:26 -0300)]
Bug 21597: Field 'description' doesn't have a default value
Nick proposed another fix, see bug 21594.
The interface does not explode so I do not think we should make a DB
update in a rush.
Fix t/db_dependent/Koha/Object.t and t/db_dependent/Koha/ApiKeys.t
api_keys.description and api_keys.secret:
`secret` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
# Failed test 'Exception is thrown correctly'
# at t/db_dependent/Koha/Object.t line 262.
# expecting: Koha::Exceptions::Object::FKConstraint
# found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): Field 'description' doesn't have a default value at /home/vagrant/kohaclone/Koha/Object.pm line 125
# )
# Looks like you planned 7 tests but ran 1.
# Looks like you failed 1 test of 1 run.
and later, but not related:
Can't locate object method "message" via package
"DBIx::Class::Exception" at t/db_dependent/Koha/Object.t line 264.
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>
DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect date value: '0' for
column 'onloan' at row 1 at /home/vagrant/kohaclone/t/lib/TestBuilder.pm
line 288
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>
DBIx::Class::Storage::DBI::_dbh_execute(): Data too long for column
'invitekey' at row 1 at /home/vagrant/kohaclone/Koha/Object.pm line 125
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>
Jonathan Druart [Wed, 17 Oct 2018 22:11:29 +0000 (19:11 -0300)]
Bug 21597: Field 'amount' doesn't have a default value
Fix t/db_dependent/Accounts.t
Default value could be 0, or left as it.
It seems that the different initialisation we have in the code pass a
value for 'amount'
account_offsets.amount
`amount` decimal(26,6) NOT NULL,
DBIx::Class::Storage::DBI::_dbh_execute(): Field 'amount' doesn't
have a default value at /home/vagrant/kohaclone/Koha/Object.pm line 125
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>
Jonathan Druart [Wed, 17 Oct 2018 22:07:20 +0000 (19:07 -0300)]
Bug 21597: Column 'notforloan' cannot be null
Fix t/db_dependent/Circulation.t
items.notforloan:
`notforloan` tinyint(1) NOT NULL DEFAULT '0',
t/db_dependent/Circulation.t .. 115/119 DBD::mysql::st execute failed: Column 'notforloan' cannot be null [for Statement "UPDATE `items` SET `notforloan` = ? WHERE ( `itemnumber` = ? )" with ParamValues: 0=undef, 1='1046'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
# No tests run!
# Failed test 'No tests run for subtest "item-level_itypes = 0"'
# at t/db_dependent/Circulation.t line 2356.
# Looks like you failed 1 test of 2.
# Failed test 'CanBookBeIssued | notforloan'
# at t/db_dependent/Circulation.t line 2359.
Can't locate object method "rethrow" via package "DBD::mysql::st execute failed: Column 'notforloan' cannot be null [for Statement "UPDATE `items` SET `notforloan` = ? WHERE ( `itemnumber` = ? )" with ParamValues: 0=undef, 1='1046'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
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: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 17 Oct 2018 23:02:12 +0000 (20:02 -0300)]
Bug 21596: Handle empty string for lost when storing a patron
lost - should default to 0 at DB level, not null
But let fix it as it for now
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: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 17 Oct 2018 22:53:47 +0000 (19:53 -0300)]
Bug 21596: Handle empty string for flags when storing a patron
Incorrect integer value: '' for column 'flags'
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>
Jonathan Druart [Wed, 17 Oct 2018 22:51:50 +0000 (19:51 -0300)]
Bug 21596: Handle empty string for date_renewed when storing a patron
Incorrect date value: '' for column 'date_renewed'
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>
Nick Clemens [Thu, 18 Oct 2018 10:05:38 +0000 (10:05 +0000)]
Bug 21593: Remove GROUP BY from GetAuthValueDropbox
With new MYSQL modes we are permitted only full group by.
In this case I don't think we need a GROUP BY at all
To test:
1 - Try to pay a fine or create a borrower
2 - Internal server error
3 - Apply patch
4 - Page should load
5 - Test various authorised values ot ensure they work
e.g. Set bsort1 and bsort2 to have some authorised values with and
without branch limits
set PAYMENT_TYPE to have some values with and without branch limits
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Tue, 26 Jun 2018 10:36:33 +0000 (11:36 +0100)]
Bug 20995: Add Request ID to table and request view
This patch adds the display of Request ID to the OPAC views of all a
user's requests and the individual request.
To test:
1) Ensure you have ILL enabled
2) Log into the OPAC as a user with at least one request
3) Go to the "your interlibrary loan requests" page
4) TEST: Ensure that Request ID is displayed as the first column in the
table
5) Click the "View" button on a request
6) TEST: Ensure that Request ID is displayed along with all the other
request information
Signed-off-by: mmg@interleaf.ie Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 20995: (QA follow-up) Add html filters and fix doubled up columns from merge
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 9 Oct 2018 16:38:34 +0000 (13:38 -0300)]
Bug 21174: (follow-up) Removed MSG_IN_YOUR_CART and its usage in OPAC JS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Buckley [Sun, 30 Sep 2018 16:22:10 +0000 (16:22 +0000)]
Bug 21174: Removed MSG_IN_YOUR_CART and its usage in OPAC JS
The 'Items in your cart' message is obsolete with the cart dropdown
box being removed.
Therefore the assignment of this text into the
MSG_IN_YOUR_CART variable (which is done in the opac-bottom.inc), and
the use of the MSG_IN_YOUR_CART variable in the updateBasket() function
(in the OPAC's basket.js) has been removed.
Sponsored-By: Toi Ohomai Institute of Technology, New Zealand Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Buckley [Sat, 29 Sep 2018 05:24:22 +0000 (05:24 +0000)]
Bug 21174: Open the OPAC cart with one click by default
Feedback from the Koha mailing list in Aug 2018 showed there was
widespread concensus for making the default behaviour of the OPAC cart
to be to open with one click, rather than clicking on the cart icon then
on the dropdown box to load the cart popup.
This commit is a combination of Owen Leonard's alternative patch
(slightly changing the markup in masthead.inc) and my
work to remove the dropdown elements from the template and basket.js
Test plan:
1. In Koha OPAC click on the cart icon (making sure to have items in the
cart and the dropdown box 'Items in your cart:..' appears.
2. Click this dropdown and the cart popup appears.
3. Confirm you can successfully remove items from and empty the
cart
4. Apply patch
5. Restart memcached, and plack
6. Click on the cart icon (making sure to have items in the cart) and
notice no 'Items in your: ..' dropdown appears
instead the cart popup loads straight away.
7. Confirm the items in your cart are displayed by the cart popup
8. Confirm you can remove items from/empty the cart, and that as you do
this the number of cart items shown by the number to the right of the
cart icon changes accordingly
Sponsored-By: Toi Ohomai Institute of Technology, New Zealand Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 8 May 2018 17:25:57 +0000 (14:25 -0300)]
Bug 20351: Shortcut serials scripts if a blocking error appeared
The idea of output_and_exit_if_error (added by bug 18403) is to make sure
parameters are valid before executing the script.
If not (old or broken URLs), we shortcut everything coming next to display a
generic error ("object does not exist", "you do not have permission to do that", etc.)
This bug report fixes the scripts under serials/*.
Test plan:
Hit the script under the serials directory with an invalid subscriptionid parameter
and confirm you get an error instead of the normal view with empty values.
The goal is not to be exhaustive during the first iteration, but at least to fix
the most common views.
For instance:
/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=XXX
/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=XXX
/cgi-bin/koha/serials/routing.pl?subscriptionid=XXX&op=new
/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=XXx
/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=XXX
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 4 Apr 2018 19:28:53 +0000 (16:28 -0300)]
Bug 20521: Enable problematic SQL modes for dev installs
So far we have bug 17258 (omnibus to list the issue we have with the new
default SQL modes), bug 20144 (which fixed our test suite with these
modes) and bug 20229.
This last one forces the SQL modes to avoid to modify the DBMS
configuration and define the SQL modes we support.
We should let developers catch the issues and report/fix them.
Also Jenkins must alert us if there is a regression with the test suite.
I suggest to enable the problematic SQL modes on dev installs.
=> If you have dev_install defined in your Koha config file, the test
will fail with "Field 'datecreated' doesn't have a default value"
=> If you do not have dev_install, the tests will pass
NOTE: The commit number was wrong. Using
git log -- t/db_dependent/Koha/Biblios.t
This showed bug 20176 which was 524eab678833b2719187e67128ee4f83a2a48ba4
Also dev_install was in koha_conf.xml already, so I just had to
toggle 0 and 1.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andreas Roussos [Sun, 7 Oct 2018 18:00:09 +0000 (21:00 +0300)]
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button
The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.
This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page
Test plan:
1) Go to Home > Authorities and launch the authority editor by
clicking on 'New authority'. Notice how the editor doesn't
have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
should be taken back to Home > Authorities (this behaviour
is mimicking the bibliographic editor: when duplicating a
biblio the 'Cancel' button will take you back to Home >
Cataloging).
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Sun, 12 Aug 2018 15:08:57 +0000 (17:08 +0200)]
Bug 14786: Use MARC istead of ISO2709 everywhere
This patch changes the term ISO2709 in the templates to use
MARC instead.
Test plan:
- The term was changed on the following pages in staff:
- Advanced catalouging editor > Save to catalog
- Patron account > Check out (Activate ExportCircHistory) > Format
- Patron account > Check out > Help page
- Lists > Download list
- Acquisitions > Add order to basket > From a staged file (breadcrumbs)
- Administration > System preferences > ExportRemoveFields
- Cart > Download
- Tools > Export data > Output format
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andreas Roussos [Sun, 30 Sep 2018 10:06:28 +0000 (13:06 +0300)]
Bug 21456: The 'New authority' button lists authority types inconsistently
The 'New authority' button does not always list the available
authority types in A-Z order based on their description.
This patch fixes that.
Test plan:
1) Go to Home > Authorities in the staff client; notice how the
'New authority' button lists auth types sorted by description.
2) Go to an authority's detail page; notice how the same 'New
authority' button will list auth types sorted by their code.
3) Apply the patch.
4) In an authority's detail page, the 'New authority' button will
now list the available authority types sorted by description.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch changes the 'Order' term in neworderbiblio.tt,
newordersubscription.tt, newordersuggestion.tt, and
z3950_search.tt for 'Place order'.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch changes the 'Order' term in marc_modification_template.tt
for 'Rank'.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 16 Jun 2016 13:28:01 +0000 (09:28 -0400)]
Bug 16754: Use validation plugin in budgets, planning, and contracts
This patch removes the custom javascript form validation from three
templates: Budgets, budget planning, and contracts. Validation via the
validation plugin is done instead.
This patch also removes use of event attributes like onclick and
onchange. Also changed: I added the "Required" text next to required
fields as necessary.
To test, apply the patch and go to Administration -> Budgets.
- Test the budget creation process for adding, editing, and duplicating
budgets. In all cases:
- The start date and end date should be required
- You should be warned if you enter an end date which falls before the
start date.
- The description should be required
- The budget amount should be required to be a number
To test the budget planning page:
Note that much of the JS removed from this template was unused. It
looked for inputs by the name 'est_total' which don't exist.
- When viewing the table of funds for a budget, select a choice from the
'planning' toolbar menu.
- Verify that after entering a numeric value in any cell, the
'remaning' value at the end of the row is correctly updated.
- Verify that after entering non-numeric data an error is displayed.
- Verify that clicking the 'auto-fill' button at the end of the row
works to fill any empty or zero-value fields with the remaning funds
available.
To test the vendor contracts page:
- Go to Acquisitions -> Vendor -> Contracts
- Add or edit a contract
- Confirm that name, start date, and end date are required.
- Confirm that you are warned if you enter an end date which falls
before the start date.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 16 Oct 2018 17:09:29 +0000 (17:09 +0000)]
Bug 21583: Don't use Asset.js for external script files
To test:
1 - Enable Novelist in staff client:
NovelistSelectStaffEnabled: Add
NovelistSelectStaffProfile: anything
NovelistSelectPassword: anything
( these don't need to be valid, just not blank )
2 - Pull up a record detail page in staff client
3 - View page source - search for ns2init.js
4 - You won't find it
5 - Apply patch
6 - Reload details
7 - Search page source for ns2init.js
8 - It loaded! Huzzah!
Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 16 Oct 2018 14:00:59 +0000 (14:00 +0000)]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios
To test:
1 - Have or make some authority records
2 - Have or make an authority matching rule
3 - Export your authrotities
4 - Import them using the matching rule
5 - On the 'Manage staged records' page view some diffs
6 - The import record is correct, but the existing records pull form
bibs
7 - Apply patch
8 - Repeat
9 - Confirm you see the expected authority matches
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 16 Oct 2018 13:27:37 +0000 (10:27 -0300)]
Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly
# Failed test 'The date_due should have been set depending on the circ
rules when the on-site checkout has been switched'
# at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 126.
# got: '2018-10-16T23:59:00'
# expected: '2018-10-21T23:59:00'
TestBuilder set date to today, so issuingrules.harduedate will be set to
today.
issuingrules.hardduedatecompare will be set to an integer.
If set to 0, $datedue will be reset to the hard due date
The call stack is: AddIssue > CalcDateDue > GetHardDueDate
In GetHardDueDate:
3509 if ( $hardduedatecompare == 0 || $hardduedatecompare == $cmp ) {
3510 $datedue = $hardduedate->clone;
3511 }
To fix this random failure we need to set issuingrules.harduedate to undef.
Test plan:
0. Do not apply this patch
1. Modify the test to set hardduedatecompare to 0 (search 'my $issuingrule = ')
2. Execute the test and confirm the failure
3. Apply this patch
4. Execute the test and confirm the it is no longer failing
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Tue, 9 Oct 2018 12:22:35 +0000 (12:22 +0000)]
Bug 21552: Use raw filter for displaying RoutingListNote
The RoutingListNote system preference works like other prefs
allowing you to insert your own content on the routling list
template using HTML. The default text even uses HTML, so it
looks broken without this patch.
To test:
- Add a subscription
- Add a new routing list to it
- Add some patrons to it
- Save
- preview routing list
- Verify that the note shows and is formatted correctly.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 10 Oct 2018 15:53:13 +0000 (15:53 +0000)]
Bug 21542: Use modal and password field for overdrive password
To test:
1 - Enabled Overdrive and fill all preferences
2 - Make sure OverDrivePasswordRequired is true
3 - Go to opac account
4 - Log in to overdrive
5 - Note the input is shown
6 - Apply patch
7 - Repeat
8 - Note popup is now a modal
9 - Note password is now hidden
10 - Confirm overdrive integration works as before
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Mon, 13 Aug 2018 13:55:31 +0000 (13:55 +0000)]
Bug 18480: Get rid of unwanted / distracting link in patron search for fund owner
This patch modifies templates where a pop-up window is used to display
patron search results. A link has been added to the patron name which
triggers a modal window displaying more details about that patron. With
each page in the test plan, check that clicking linked names in search
results triggers a modal with the correct data.
- Acquisitions -> Vendor -> View basket -> Add user
- Acquisitions -> Vendor -> Add to basket -> From a new (empty) record
-> Add user
- Acquisitions -> Funds -> Edit fund -> Select owner
- Tools -> Patron card creator -> Manage -> Card batches -> Edit -> Add
patrons
- Serials -> Subscription -> Edit routing list -> Add recipients
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Mon, 1 Oct 2018 07:52:21 +0000 (09:52 +0200)]
Bug 21337: (QA follow-up) Rollback for partial delete
Puts delete loop in a txn_do.
Raises Koha::Exceptions::Patron::Delete when Patron->delete does not return
true (like 0 or -1).
Unit test adjusted accordingly.
Note: A follow-up report for raising exceptions in Object->delete could well
be considered. Not here please.
Test plan:
Run t/db_dependent/Koha/Patrons.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21337: (follow-up) Add parameter for move_to_deleted action
For consistency, it would be better to make the move optional.
Test plan:
Run again t/db_dependent/Koha/Patrons.t.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Adds Koha::Patrons->delete as wrapper around Koha::Patron->delete. We do
not want to bypass Koha::Patron and let DBIx do the job without further
housekeeping. A call to move_to_deleted is included now, but could be
made optional with a parameter if needed.
Test plan:
Run t/db_dependent/Koha/Patrons.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 25 Sep 2018 18:40:28 +0000 (18:40 +0000)]
Bug 21409: Add column configuration to course reserves
This patch adds columns configuration and print/export options to two
tables: The table listing courses and the table listing titles reserved
for a course.
To test you should have more than one course and multiple title reserved
for at least one course.
- Apply the patch and go to Course reserves
- In the table of courses, confirm that all DataTables controls work
correctly: paging, filter, column visibility, export, etc.
- View a course with multiple titles reserved. Test all DataTables
controls on this table too.
- Go to Administration -> Columns settings
- Change the settings for the courses and reserves table and confirm
that these changes are applied correctly.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Sat, 11 Aug 2018 18:47:23 +0000 (18:47 +0000)]
Bug 15139: Add non-public item notes to overdue report
Sometimes libraries want to see internal notes on the overdue
reports page, this patch adds the notes.
Additional fixes:
- Library column was always empty, now library displays
- Replacement price was not formatted according to CurrencyFormat
To test:
- Make sure you have some overdue issues in your system
- Circulation > Overdues report
- Make sure everything displays as it should
- Verify internal item note shows
- Verify price is correctly formatted (syspref CurrencyFormat)
- Library shows
- Download list of overdues
- Verify the new column displays
Signed-off-by: Spencer <ssmith3@mckinneytexas.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove the branchcode line, added on its own bug report,
see bug 21463
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 11 Oct 2018 15:59:13 +0000 (15:59 +0000)]
Bug 21550: DataTables four button pagination uses the wrong icon for disabled buttons
This patch modifies the DataTables CSS which styles "full_nubmers"
controls which are disabled: First and Previous buttons on the first
page of results, Next and Last buttons on the last page of results.
These buttons should have gray icons instead of blue.
To test, apply the patch and clear your browser cache if necessary. View
a page which uses a "full_numbers" DataTables configuration, e.g.
- Administration -> Cities
- ILL requests -> List requests
- Circulation -> Holds to pull
Confirm that buttons in their disabled state have a gray icon and text
instead of blue.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21115: Add multi_param call and add divider in cache key in svc/report and opac counterpart
Resolve things like:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_prodclone_opac_svc_report line 42, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.
The cache key in both script looks like:
opac:report:id:602018
but should for consistency be:
opac:report:id:60:2018
Note: The 2018 here is part of the sql_params and should not be
concatenated to the report id.
Test plan:
Do not yet apply this patch.
Make a report public, set cache to 300 secs.
Check its output with opac/svc/report.
Check for the warn in your log.
Apply the patch, restart Plack and flush cache.
Check opac/svc/report.
Modify your report; e.g. add a simple string to the SELECT.
Check opac/svc/report. You should still see cached output.
Flush the cache.
Check opac/svc/report. You should now see the added text.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested also by clearing individual keys with $cache->clear_from_cache.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Blou [Thu, 4 Oct 2018 17:00:08 +0000 (13:00 -0400)]
Bug 21291: (follow-up) Pass subscriptionsnumber to all tools in staff detail's sidebar
The subscriptionsnumber is required in biblio-view-menu.inc to display
the Subscription(s) tab. In detail.pl, if you click any of
Labeled MARC (you need to set the syspref viewLabeledMARC)
Hold(s)
Article requests
Checkout history
Modification log
Rota (you need to set the syspref StockRotation)
you lose the Subscription(s) tab.
This patch fixes the display by having each feature script generate that
value to be passed to the UI. I keep this separated from the first patch
since it's not exactly the same issue, and the solution might not
please.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Blou [Thu, 30 Aug 2018 14:33:44 +0000 (10:33 -0400)]
Bug 21291: request-article.pl doesn't show MARC, LabeledMARC and ISBD in sidebar
When on a detailed record in the intranet, any click on the sidebar
will lead you to another page with the same sidebar EXCEPT for "Article
requests".
When clicking on article requests, you get a new sidebar without
MARC
Labeled MARC
ISBD
This fix adds the required C4::Biblio::enabled_staff_search_views that
loads the required hash with the permissions.
TEST
0) login with a user having all rights
1) go to any detailed notices, notice the sidebar on the left
2) click on MARC
3) notice the sidebar is the same in the new page
4) click on Request articles
5) notice the missing labels on the sidebar
6) apply patch, redo steps
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
In inventory, optional filters are build from authorize values categories used for items.notforloan, items.itemlost, items.withdrawn and items.damaged.
The bug is that description of value 0 is always "For loan".
This seems to be only for "notforloan".
Second bug is that if a description exists for "notforloan" value 0, it is not used.
This patch corrects by adding "For loan" only for "notforloan" authorized values and if there is no 0 value.
It changes the description added by code from "ignore" to a more unlikly user defined "__IGNORE__".
Test plan:
1) Make sure you have authorized values defined on items.notforloan, say "NFL" category, with at least a value and description but no 0 value
2) Make sure you have authorized values defined on items.itemlost, say "LOST" category, with 0 = "Not lost" and 1 = "Lost"
3) Go to inventory /cgi-bin/koha/tools/inventory.pl
4) Without patch you see "For loan" on both items.notforloan and items.itemlost
5) With patch you see "For loan" only in items.notforloan, you see for items.itemlost : "Not lost" and "Lost"
6) Create in authorized values category "NFL" a value 0 with description "Available"
7) Go to inventory /cgi-bin/koha/tools/inventory.pl
8) Without patch you see "For loan" in items.notforloan for value 0
9) With patch you see "Available" in items.notforloan for value 0
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 18655: Correct the choose link in unimarc_field_210c value builder
- Link 'choose' is now a button.
- It doesn't call directly javascript anymore (use of listener).
- field to load stored in html on the page (less escaping needed).
Test plan :
1) Use UNIMARC catalog
2) Define unimarc_field_210c value builder on 210$c
3) Define an autority type EDITORS with heading on 200$b
4) Create an autority of this type with a single quote in heading, ie : l'avenir
5) Index this new autority
6) Edit a biblio record and launch 210$c value builder
7) Search for new autority
8) Click on 'Choose'
=> Heading should be pasted in 210$c
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Mon, 8 Oct 2018 10:47:15 +0000 (11:47 +0100)]
Bug 21113: Corrections to patron merge confirmation prompt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Margaret Hade [Fri, 21 Sep 2018 19:41:52 +0000 (12:41 -0700)]
Bug 21351: Rename the Taiwanese language pack to use correct file name
The words "Han (Simplified variant)" is appearing in the language name because the file is titled "zh-Hans-TW" when it should be titled "zh-Hant-TW". The database is set up to use "Hant" but it just incorrectly named.
Test plan
1. Apply patch.
2. Install zh-Hant-TW on your Koha server.
3. Navagate to I18N/L10N preferences and confirm that the english text description states (Traditional variant).
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Files on translate.kc.org have already been fixed by Bernardo. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 10 Oct 2018 15:02:14 +0000 (15:02 +0000)]
Bug 21537: Fix typo for options_for_item_types
To test:
0 - Set UseACQFrameworkForBiblioRecords to 'Use'
1 - Define a subfield in the ACQ framework linked to authorised value
'itemtypes'
2 - Make sure that field is visible
3 - Create a purchase suggestion
4 - Accept it
5 - Go to Acquisitions
6 - Find a vendor with an open basket, or create one
7 - Add to the basket using a suggestion
8 - Choose the suggestion
9 - Internal server error
10 - Apply patch
11 - Place order form a suggestion again
12 - Confirm that the field linked to itemtypes shows correctly
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Ere Maijala [Sun, 16 Sep 2018 22:13:55 +0000 (01:13 +0300)]
Bug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio
This makes e.g. the advanced MARC editor, and anything that uses AddBiblio or
ModBiblio honor BiblioAddsAuthorities.
To test:
1. Make sure BiblioAddsAuthorities and AutoCreateAuthorities preferences are enabled.
2. Add a new record using advanced editor (enable EnableAdvancedCatalogingEditor to
use it), include a previously non-existing author.
3. Save the record and observe the author get an authority number.
4. Add another author, save the record and make sure it also gets an authority number.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Wed, 10 Oct 2018 11:43:40 +0000 (13:43 +0200)]
Bug 21279: Fix in transport cost matrix
Test plan:
On Home › Administration › Transport cost matrix you should no longer
see " ".
Fill some values and save, you should see the correct values.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>