Mirko Tietgen [Wed, 3 May 2017 19:13:49 +0000 (21:13 +0200)]
Bug 18547: On shelf holds allowed > "If all unavailable" ignores default hold policy
If in the circ rules matrix you set "On shelf holds allowed" to "If all unavailable",
default hold policy "From home library" is ignored.
Test plan:
- Have a test user from one branch (eg Centerville)
- Set "On shelf holds allowed" to "If all unavailable" for your patron and item
category (or everyone and everything)
- For "Default checkout, hold and return policy", set hold policy to "From home library"
-> make sure there is no "Default holds policy by item type" to override the setting
- Have two items for a record.
1. An item with home branch same as test user (eg Centerville)
-> check this item out to somebody else
2. an item with a different home branch (eg Fairfield)
-> available, not checked out
- Try to place a hold for your test user. Does not work.
- Apply the patch
- Try to place a hold. Should work now.
Followed test plan, worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Followed test plan in the intranet and OPAC, worked as intended.
With few assumptions made:
- when the hold works, should be on the item 1 (Centerville)
item 2 is only there to trigger the bug
- the circ rules were identically setup on each branch and in "Standard rules for all libraries" Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 9 Nov 2017 16:25:13 +0000 (13:25 -0300)]
Bug 7317: Display all the libraries, not only one
Before this patch only the first library defined in the system where
displayed.
TODO: Make sure we want to display all the libraries and not a
"filtered" list
see `git grep PROCESS options_for_libraries libraries|grep unfiltered`
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 9 Nov 2017 15:04:29 +0000 (12:04 -0300)]
Bug 7317: Simplify column headers
It will help translators (remove TT tags from po files) and simplify the
code. We do not need this translate_column that is used only once.
It also removes sorting option on the last column (actions)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
5/ This patch makes Koha::Illrequest->load_backend raise an exception
if the passed backend is invalid. This way we will catch more errors introduced.
The patch also disables the 'New Ill request' when no backends are available. Gets
rid of a related warnings.
Both OPAC and Intranet now display a warning message when no backends
are available.
Tests are added for the load_backend changes.
4/ This patch fixes the path for the checkboxes jquery plugin, and removes the include
for tablesorter, as this implementation uses Datatables. This is obviously code for older
Koha, ported to master.
TODO: There's something wrong on the styling. My idea is to get rid
of the custom column visualization tool, and have it display as regular
DataTables. We can then introduce the use of colvis on a separate bug
report.
Note: POD coverage for the exceptions file is wrongly tested. It is a false positive.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Magnus Enger [Wed, 25 Oct 2017 09:52:26 +0000 (11:52 +0200)]
Bug 7317: (followup) Fix id and class on body tag
The HTML body tag looked like this:
<body id="acq_suggestion" class="acq">
Probably an overlooked copypasta. This patch changes it to:
<body id="illrequests" class="ill">
This should not have any visual side effects.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Magnus Enger <magnus@libriotech.no>
Original sign off message:
It's impossible to give a test plan for this...
I have implemented a "plugin" for Norwegian ILL (based on NCIP):
https://github.com/Libriotech/koha-illbackend-nncipp
Several issues have been discovered while writing the plugin, and
Alex has fixed them along the way. Currently I do not know about
any funcional issues, and I am happy to sign off.
Update:
I have applied the new patchset and done some exploratory testing,
using the Dummy backend. Everything seems to be fine after the
patches were re-arranged and with the followups from Tomas.
All tests pass. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch moves the current endpoint implementation from Swagger2 to
the OpenAPI plugin.
It also takes advantage of the overloaded Koha::Illrequest::TO_JSON method
which has now the option to embed what's needed for the REST api.
The path spec is adjusted to fit OpenAPI, and some minor fixes are
applied:
- Missing 'metadata' query param
- 'ill' permissions should be required instead of 'borrowers'
- Full test coverage
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/illrequests.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch implements an overloaded TO_JSON method, that introduces
the option to (selectively) embed information required on the REST
api.
Tests are included for the new method.
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/Illrequests.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 7317: (QA folowup) 404 if module is disabled (intranet)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This Commit is at the heart of adding an interlibrary loans framework
for Koha. The framework does not prescribe a particular workflow.
Instead it provides a general framework that can be extended &
implemented by individual backends whose responsibility it is to
implement a specific workflow.
The module is largely self-sufficient: it adds new tables to the Koha
database and touches only a few files in the Koha source tree.
Primarily, we add our files to the Makefile and the koha-conf.xml,
define ill paths for the REST API, and introduce links from the main
intranet, opac pages & user permissions.
Outside of this we simply add new files & functionality.
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 5 Jul 2017 14:33:16 +0000 (10:33 -0400)]
Bug 18894: Add ability to limit the number of messages sent by process_message_queue.pl at a time
Having the ability to limit the number of messages sent by process_message_queue.pl on a single run would be very useful for controlling home many messages are sent at a given time. This can help prevent too many messages being sent out at once and getting flagged as a spammer.
Test Plan:
1) Apply this patch
2) Generate some number of messages in the message queue
3) Run process_message_queue.pl with the new --limit option,
set limit to a number smaller than the number of pending messages
4) After the script has run, check the database and note that only
a number of pending messages were sent, and that the remaining amount
of pending messages is the original amount less the number specified
as the limit
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 27 Oct 2017 10:43:03 +0000 (10:43 +0000)]
Bug 19537: Correct addition of source subfield from authorities
To test:
1 - Find or create a subject authority
2 - Define 008/11 as 's' or 'r'
3 - Add 2nd indicator '7' to main heading
4 - Open or create a bibliographic record
5 - Link to the authority created above
6 - Subfield $2 is not set
7 - Apply patch
8 - Repeat linking, subfield $2 should be set
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>
Kyle M Hall [Fri, 30 Jun 2017 14:37:14 +0000 (10:37 -0400)]
Bug 18882: (QA follow-up) Ensure stats with no or undef location are set to NULL in db
Confirm that only NULL or a string are in the location field of the
statistics table. Test with two items, one with shelving location set,
and one without it set.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 29 Jun 2017 15:10:18 +0000 (11:10 -0400)]
Bug 18882: Add location code to statistics table for checkouts and renewals
Some libraries wish to track what the current location of items was at the time they were checked out. This will help libraries track which physical locations in the library patrons are more likely to check out a given book from.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Check out an item that has a location set
4) Renew that item
5) View the checkout and renewal in the statistics table,
verify each has the location column populated correctly
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 6 Nov 2017 10:28:46 +0000 (11:28 +0100)]
Bug 19420: (QA Follow-up) Change in error reporting affects upload.pl
The change from the first patch requires a similar change in upload.pl
when a few error codes are passed to the template.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by deleting a temporary file manually and downloading or deleting
the file from the upload search results.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Thu, 19 Oct 2017 10:39:23 +0000 (10:39 +0000)]
Bug 19420: Improve display of errors from failure of uploading file during stage import
To test:
1 - sudo chown www-data:www-data /tmp/koha_kohadev_upload/ (or your
relevant dir and user)
2 - Attempt to stage a file
3 - Error message is: Upload status: Failed
4 - Apply patch
5 - Repeat upload
6 - Error is now: Failed - Directory is not writeable:
/tmp/koha_kohadev_upload
7 - Trigger the other errors if you can and note better responses
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 4 Oct 2017 23:54:24 +0000 (20:54 -0300)]
Bug 10748: Add the ability to block return of lost items
Mimicking what does BlockReturnOfWithdrawnItems we can easily add a new
syspref to block return of lost items.
This patch adds BlockReturnOfLostItems, if set to 'Block' a item marked
as lost cannot be checked in.
Test plan:
1/ Set BlockReturnOfLostItems to 'Do not block'
2/ Check an item out to a patron
3/ Edit the item and mark it as lost (*)
4/ Check the item in
=> The item is checked in
5/ Edit the item and remove the lost status
6/ Check the item out again
7/ Edit the item and mark it as lost (*)
8/ Check the item in
=> The item is not checked in
(*) There are 2 ways to mark an item lost:
- From the item list view (/catalogue/moredetail.pl?biblionumber=42)
If you set the lost status from this form, the issue will be returned
Maybe this should be optional (?)
- From the edit items form (/cataloguing/additem.pl?biblionumber=42)
It is the form you must use to not mark the issue returned.
Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Dominic Pichette <dominic@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 27 Oct 2017 05:49:51 +0000 (07:49 +0200)]
Bug 17989: (QA follow-up) Replace bad dots in SuggestionEngine_ExplodedTerms.t
SuggestionEngine_ExplodedTerms.t uses paths like /../.. or /.. in order
to find a template in opac-tmpl.
Sub badtemplatecheck does not like these paths.
Using Cwd::abs_path to resolve the situation (rel2abs does not).
Test plan:
Run again t/db_dependent/SuggestionEngine_ExplodedTerms.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Wed, 25 Jan 2017 14:32:01 +0000 (15:32 +0100)]
Bug 17989: Final changes
[1] The template sco/printslip.tt is in the regular modules directory.
Should not be prefixed with a slash.
Test plan:
[1] Try to find another occurrence just like the one corrected in
sco/printslip.pl where an absolute path is passed to gettemplate or
get_template_and_user. I already tried several regex variations
while git grepping template_name, but you may still find one..
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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Removed the changes for svc/members/search. Not needed.
Commit message adjusted accordingly.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 17989: Resolve "verbatim paragraph in NAME section" warning in C4::Templates
*** WARNING: Verbatim paragraph in NAME section at line 28 in file C4/Templates.pm
Test plan:
Run podchecker on C4::Templates and verify that the warning is resolved.
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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Wed, 25 Jan 2017 09:22:13 +0000 (10:22 +0100)]
Bug 17989: Include full path logic in _get_template_file
Similar to the full path test in sub themelanguage, this patch makes a
change in _get_template_file. This allows you to pass a template
outside the modules directory to get_template_and_user. (Note: the sub
badtemplatecheck already blocks bad paths.)
Especially, this would be helpful for plugins using templates. As can be
seen in Templates.pm, a change was made earlier to overwrite the filename
for a plugin in sub gettemplate. This exception can now be removed.
Also note the small change in Koha/Plugin/Base.pm; mbf_path is already
absolute and if we pass a full path, we do not need it. This allows use of
a regular Koha template or a shared template between plugins (as long as
badtemplatecheck allows the path).
What are the side-effects of this change?
[1] We should not pass absolute paths if we mean relative ones.
A follow-up patch deals with one occurrence in the codebase.
No regressions for regular use.
[2] Plugins can call get_template_and_user directly or go via get_template
in Koha/Plugin/Base (absolute paths don't go via mbf_path).
Note: replaced two single quotes in Auth.pm to show template name in test
description.
Test plan:
[1] Open some page on OPAC or staff client to trigger a template.
[2] Run t/db_dependent/Auth.t to verify not allowing some bad templates.
[3] Run t/db_dependent/Templates.t to verify an absolute path.
[4] Run t/db_dependent/Plugins.t to verify using templates in a plugin.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 30 Jan 2017 08:24:22 +0000 (09:24 +0100)]
Bug 17989: Extend bad template check
The check is now extended by only allowing templates from the regular
Koha template directories and additional plugin directories as defined
in koha-conf.xml.
Note: In order to prevent an uninitialized warning on $theme from sub
themelanguage for a not-existing file, I added a trivial assignment. Will
get further attention in a follow-up.
Test plan:
[1] Run t/db_dependent/Auth.t
[2] Run t/db_dependent/Templates.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 30 Jan 2017 07:43:45 +0000 (08:43 +0100)]
Bug 17989: Centralize bad template check
The bad template check in get_template_and_user can be removed, since
this check has been added in gettemplate on bug 18010.
The check moves here to a new sub in C4::Templates. And will be extended
in a follow-up.
Removed unused variable $path in gettemplatefile.
Test plan:
[1] Run t/db_dependent/Auth.t (get_template_and_user bad calls).
[2] Run t/db_dependent/Templates.t (bad call to gettemplate).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 30 Oct 2017 14:14:53 +0000 (11:14 -0300)]
Bug 19539: (follow-up) Fix column index shift in cirulation rules
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 19539: Fix column index shift in cirulation rules
This patch fixes an index shift introduced by bug 18857 when it introduced
a new column.
To test:
- On the Circulation and fine rules page
- Empty the value of 'Current on-site checkouts allowed' and save
- Notice 'Unlimited' shows on the saved rule.
- Click edit
=> FAIL: the 'Unlimited' string displays instead of the empty string on the editing row.
- Apply this patch
- Re-open the circ rules page
- Click edit
=> SUCCESS: An empty string fills the 'Unlimited' fields
- Sign off :-D
Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Mon, 23 Oct 2017 22:29:24 +0000 (22:29 +0000)]
Bug 19176: followup - fix POD in t/lib/Dates.pm
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 23 Oct 2017 14:38:58 +0000 (11:38 -0300)]
Bug 19176: Reduce the number of seconds to 5
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 25 Aug 2017 20:56:52 +0000 (17:56 -0300)]
Bug 19176: Compare the number of seconds when comparing dates in tests
# Failed test 'borrowers.updated_on should have been set to now on creating'
# at t/db_dependent/Patrons.t line 74.
# got: '2017-08-10T20:53:03'
# expected: '2017-08-10T20:53:04'
# Looks like you failed 1 test of 17.
[20:53:15] t/db_dependent/Patrons.t .....................................
The plan here is to compare the number of seconds between two dates.
If < 60 the dates are consired as identicals.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Wed, 2 Aug 2017 08:35:49 +0000 (10:35 +0200)]
Bug 19021: Fix Inventory columns sorting
In inventory result page, items are shown in a JS DataTable.
For an inventory with barcode file second column is not sortable for no reason.
For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed.
This patch corrects by setting default sort order on callnumber column.
Test plan :
- perform inventory with barcode file
- look at result table
- table is sorted by callnumber
=> Without patch second column is not sortable
=> With patch all columns are sortable
- perform inventory without barcode file
- look at result table
=> Without patch first column show sort icon and table is not sorted by callnumber
=> With patch first column is not sortable and table is sorted by callnumber
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Colin Campbell [Mon, 10 Jul 2017 11:44:14 +0000 (12:44 +0100)]
Bug 18920: Save DB_USE_TLS and FONT_DIR to install log
Configuration values should be included in the koha-install-log
so that when running Makefile.PL with the --prev-install-log option
values can be read from there and reapplied rather than prompting
the user on each subsequent run.
This adds FONT_DIR and DB_USE_TLS (and its dependent options) to
koha-install-log so that the set values will be written by make
during a make install or make upgrade
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Sat, 7 Oct 2017 00:20:40 +0000 (00:20 +0000)]
Bug 19377: (follow-up) Remove charge for 'books' in all sample data
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Cook [Thu, 28 Sep 2017 03:00:27 +0000 (13:00 +1000)]
Bug 19377: Remove $5 charge from sample item types
Most of the sample item types come with a rental charge of $5.
This is really annoying when you're testing Koha with a fast catalogued
book, since you end up having to write off fines and change the item
type before you can actually get to the testing you want to do.
I left the rental charge on most other items so that you can test
rental charges easily by using a item type other than BOOK or REF.
_TEST PLAN_
Before applying
1) drop your test database
2) create your test database
3) install Koha via the web installer and install all sample data
4) do a checkout
5) note a $5 rental charge
After applying
1) drop your test database
2) create your test database
3) install Koha via the web installer and install all sample data
4) do a checkout
5) note no $5 rental charge
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Applied the patch and looked at the change to the SQL-file. Looks
good. That fine on books has surprised me one too many times! :-)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marc Véron [Thu, 7 Sep 2017 15:31:12 +0000 (17:31 +0200)]
Bug 19274: Translatability: Fix new splitting problems related to database warnings
The warnings about database problems introduce new translatability problems,
mostly related to sentence splitting by html tags.
To test:
- Verify that text changes make sense
- Apply patch, verify that messages properly.
Note: To force display you might want to add '1 ||' to the related
if statements, including line 134, e.g. [% IF 1 || has_ai_issues %]
- Bonus test: Go through an translation cicle and verify that fragemts as
mentioned in initial comment are gone.
(Amended to fix tiny typo)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Aleisha Amohia [Thu, 31 Aug 2017 22:02:05 +0000 (22:02 +0000)]
Bug 19231: Add number of attached items to confirm message when deleting course
To test:
1) Ensure UseCourseReserves is enabled
2) Go to Course Reserves and create 3 new courses
3) Add one item to a course, add two items to another course, and add no
items to the third course
4) Delete the course with no items. Confirm the error message shows up.
No need to say how many attached items there are here (because there are
none).
5) Delete the course with one item. Confirm the error message shows and
warns of the one attached item and makes grammatical sense
6) Delete the course with two items. Confirm the error message shows and
shows the correct number of attached items and makes grammatical sense
7) Confirm clicking 'Cancel' and 'OK' does what is expected
Sponsored-by: Catalyst IT Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Looks good!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Aleisha Amohia [Wed, 30 Aug 2017 23:35:57 +0000 (23:35 +0000)]
Bug 19212: Preventing warns when asking for discharge
To test:
1) Ensure the useDischarge syspref is enabled
2) Log in to OPAC
3) Go to 'ask for a discharge'
4) Notice warns
5) Apply patch and refresh page
6) Notice warns are gone
Sponsored-by: Catalyst IT
Warnings reproduced in plack-error.log, with patch they are gone. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Aleisha Amohia [Tue, 29 Aug 2017 03:03:45 +0000 (03:03 +0000)]
Bug 17039: Adding 'cancel' link and 'add new item' button to item edit form
To test:
1) Go the the detail page for a record on staff side
2) Edit an existing item and scroll down to Save button
3) Notice no easy way to add a new item or cancel out of the form
4) Apply patch and refresh page
5) You should now see a new button next to the Save button, 'Add a new
item', and a link 'Cancel'
6) Confirm clicking Cancel takes you back to the detail page for the
record
7) Go to edit an item again
8) Change some fields/add some info to the item
9) Click the 'Add a new item' button and a confirm box should pop up.
10) Confirm that clicking 'cancel' does NOT take you to a new page, and
your changes are still there
11) Click the button again, and this time click 'OK'
12) Confirm you are redirected to the 'add item' form
Sponsored-by: Catalyst IT Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Wed, 2 Aug 2017 08:43:44 +0000 (10:43 +0200)]
Bug 19022: inventory location and author display
In inventory result page :
Location is displayed after branch without any difference.
Author is displayed into a paragraph making row hight.
This patch adds for location a span with class like in catalogue detail page, and changes author to be on same line in order to have a more compact display for this table that may be huge.
Test plan :
- Perform inventory with a barcode file
- Look at result
=> you see localtion in a new line after library and in italic
=> you see author after title on same line with "by" separator
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marc Véron [Fri, 21 Apr 2017 15:50:45 +0000 (17:50 +0200)]
Bug 13796: OPAC: Display rental charge for renewing
This patch displays the rental fee that will be applied for
renewing (near "Renew" link on patron's summary page)
To test:
- Apply patch
- Enable system preference 'OpacRenewalAllowed'
- Verify that you have item types with and without rental fee
for testing
- Issue items with an without rental fee to a patron
- In OPAC, display patron's summary page
- Verify in table 'Checked out', items with rental charge display an information as
appropriate (near the link 'Renew')
Patch rewritten because of merge issues with previous patches. 2017-04-21 mv
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lari Taskula [Mon, 2 Oct 2017 16:06:23 +0000 (19:06 +0300)]
Bug 19400: Reminder to unset gone no address flag after patron makes a modification request
Our librarians requested a reminder to unset "gone no address" flag from patron's
record once the patron has made a modification request to update their address.
I propose adding a message box under patron modification request to notify
librarians about patrons that have gone no address flag on, and an option to
unset the flag without the need of having to navigate into patron's details.
To test:
1. Apply patch
2. Set "Gone no address" flag for your test patron. You can do this by going
to patron modification screen in staff client.
3. Go to OPAC with your test patron
4. Make a modification request for your personal details
5. Go to staff client and see pending modification requests
6. Open the request you just created
7. Observe a message dialog that says this patron has gone no address flag set
8. Check the checkbox to unset the flag and approve the modification request
9. Click Submit
10. Observe your test patron no longer has gone no address flag set
11. Repeat steps 2-7
12. Do not check the checkbox, but approve the modification request
13. Observe your test patron still has gone no address flag set
14. Remove the gone no address flag from your test patron
15. Repeat steps 3-6
16. Observe there is no message dialog for gone no address
Followed test plan, patch worked as described. Also ran QA test tools
and all modified files passed
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Thu, 12 Oct 2017 06:40:43 +0000 (08:40 +0200)]
Bug 14919: (followup) Show accurate status in holds history
This patch fixes the status showed in holds history table.
The determination of status is following:
1. "hold.found is 'F'" - Fullfilled - the hold was fullfilled by checking the
item to patron. If hold reaches this state, it can't changed status
anymore, or be cancelled, that's why this goes first
2. "hold.cancellationdate is filled" - When the hold is cancelled, its
eventually waiting or in transit status remains the same, only
cancellation dat is filled, so this has to go second
3. "hold.found is 'W'" - Hold is waiting
4. "hold.found is 'T'" - Hold is in transit to target library
Test plan:
0) Apply the patch
2) Read the status determination note in this commit message and confirm
it makes sense
1) Have patron/patrons with at least one hold in every status
2) Go to holds history page and confirm it show the right status
3) Try to break the status determination ;)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 7 Oct 2017 20:36:11 +0000 (22:36 +0200)]
Bug 14919: (follow-up) Fixing some typos and adding to pref description
- Adds 'holds' to pref description of intranetreadinghistory
- Fixes typo in link to holds history from patron account
- Changes reserve date to hold date in table heading
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 6 Oct 2017 13:35:46 +0000 (13:35 +0000)]
Bug 14919: Add holds history for patron
Test plan:
0) Have a patron with some current and old reserves
1) Go to patron circulation page
2) Notice, there is new item called "Holds history" in the left
circulation menu
3) Go to this page and confirm the data on this page are OK, and that
ui does behave as expected
4) Go to adminitration, columns setting, try to change the setting for
holdshistory table and confirm it is taken into account on holds history
page
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 6 Oct 2017 08:04:34 +0000 (08:04 +0000)]
Bug 14919: Add Koha::Patron->old_holds subroutine
Test plan:
Run t/db_dependent/Koha/Patrons.t
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 6 Oct 2017 08:03:56 +0000 (08:03 +0000)]
Bug 14919: Add test for Koha::Patron->old_holds subroutine
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a new command to be used for Elasticsearch-related
tasks.
The current implementation only offers the --rebuild action switch,
that allows reindexing Elasticsearch on a per-instance basis as we are
used to with the rest of the koha-* commands.
Other options could be added in a future: --status (ES server status
report, etc).
To test:
- Apply the whole patchset
- Have a suitable Koha+Elasticsearch setup [1]
- Run:
$ reset_all
- Run:
$ man koha-elasticsearch
=> SUCCESS: A pretty man page is displayed covering all options
- Run:
$ sudo koha-elasticsearch blah
=> SUCCESS: The script fails because blah is not a valid instance name
- Run:
$ sudo koha-elasticsearch -v kohadev
=> SUCCESS: Reindex happens!
- Try the -a, -b and -c option switches
- Sign off happily :-D
Sponsored-by: ByWater Solutions
[1] This is straightforward if you are using KohaDevBox and created the
box using: $ KOHA_ELASTICSEARCH=1 vagrant up
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This follow up should make it work. Perhaps there is a more
elegant way, but wanted to generate something that works.
Before this patch, the --restart stops Zebra, but does not
restart it. After, it does restart.
Before this patch, the --status gives nasty long help.
After this patch, reasonable output.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds tab-completion for bash, for the koha-zebra script.
To test:
- Run (on the vagrant user):
$ source kohaclone/debian/koha-common.bash-completion
- Run:
$ sudo koha-zebra -<TAB>
(<TAB> means press the tab key)
=> SUCCESS: Tab completion works as expected for the koha-zebra command.
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 17467: (follow-up) Make the install script install koha-zebra
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 17467: (follow-up) Make koha-zebra handle legacy script names
This patch adds the new koha-zebra script the ability to handle being
called by other script names, for backwards compatibility with the legacy
koha-*-zebra scripts.
It is intended to be used in conjunction with a patch that replaces the old
koha-*-zebra scripts for symbolic links, pointing to the new koha-zebra script.
To test:
- Apply this patch
- Create symbolic links to the new script:
vagrant@kohadevbox:~$ ln -s kohaclone/debian/scripts/koha-zebra koha-start-zebra
vagrant@kohadevbox:~$ ln -s kohaclone/debian/scripts/koha-zebra koha-stop-zebra
vagrant@kohadevbox:~$ ln -s kohaclone/debian/scripts/koha-zebra koha-restart-zebra
- Run:
$ sudo ./koha-start-zebra kohadev
=> SUCCESS: Same behaviour than the koha-start-zebra script
- Run:
sudo ./koha-stop-zebra kohadev
=> SUCCESS: Same behaviour than the koha-stop-zebra script
- Run:
sudo ./koha-restart-zebra kohadev
=> SUCCESS: Same behaviour than the koha-restart-zebra script
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 17467: Add koha-zebra script to handle Zebra daemons
This script is intended to replace the following currently used scripts
on packages setups:
- koha-start-zebra
- koha-stop-zebra
- koha-restart-zebra
It also introduces a --status option switch, for asking for daemon statuses
To test
- Apply the patch
- Run:
$ sudo debian/scripts/koha-zebra --start kohadev
=> SUCCESS: same behaviour than koha-start-zebra kohadev
- Run:
$ sudo debian/scripts/koha-zebra --stop kohadev
=> SUCCESS: same behaviour as koha-stop-zebra kohadev
- Run:
$ sudo debian/scripts/koha-zebra --restart kohadev
=> SUCCESS: same behaviour than koha-restart-zebra kohadev
- Run:
$ sudo debian/scripts/koha-zebra --status kohadev
=> SUCCESS: It correctly shows the status for the running (or not) process
Play with different combinations of this commands
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Mon, 11 Jul 2016 15:36:54 +0000 (15:36 +0000)]
Bug 16899: Add ability to disallow overpayments
Some SIP services ( such as Comprise ) require that an attempt at
over-paying a patron's account via SIP2 should fail, rather than create
a credit on the account. We should make this a configurable option on a
per-login basis in the SIP2 config file.
Test Plan:
1) Apply this patch
2) Enable the new parameter
disallow_overpayment="1"
for the login to be used in this test.
3) Restart your SIP server
4) Create or find a patron with fines
5) Attempt to send a payment via SIP for more than what the
patron's balance is
6) Note the response indicates a payment failure
7) Attempt to send a payment via SIP for the account balance or
less
8) Note the response indicates the payment has succeeded
9) Verify in Koha that the payment was processed
Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>