Fridolin Somers [Mon, 5 Aug 2019 13:25:02 +0000 (15:25 +0200)]
Bug 23427: Better sorting of previous checkouts
In patron circulation or details page, previous checkouts are displayed sorted by due date.
Many checkouts may have same due date so it would be better to sort on timestamp as second sort criteria, like todays's checkouts.
Test plan :
1) Create for a patron two issues with same due date and a few seconds between them
2) Create another issue with a different due date
3) Come back a day later
4) Set preference previousIssuesDefaultSortOrder = "latest to earliest"
5) Go to patron circulation page and check sort order is OK : sorted by "Due date" then "Cheked out on"
6) Go to patron details page and check sort order is OK : sorted by "Due date" then "Cheked out on"
7) Set preference previousIssuesDefaultSortOrder = "earliest to latest"
8) Go to patron circulation page and check sort order is OK : sorted by "Due date" then "Cheked out on"
9) Go to patron details page and check sort order is OK : sorted by "Due date" then "Cheked out on"
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b4a6d79e4dbd6de90d453140f696cf8ba75a2159)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Mon, 5 Aug 2019 13:11:49 +0000 (15:11 +0200)]
Bug 23427: Fix previous checkouts sort order
In patron circulation or details page, previous checkouts are displayed sorted by due date.
Actual sort order is not honoring system preference "previousIssuesDefaultSortOrder". Todays's checkouts is correct thanks to Bug 13908.
Patch adds comments that refer to the text of system preferences "previousIssuesDefaultSortOrder" and "TodayIssuesDefaultSortOrder" :
latest to earliest = asc
earliest to latest = desc
Test plan :
1) Create for a patron two old issues with a few days between them
2) Set preference previousIssuesDefaultSortOrder = "latest to earliest"
3) Go to patron circulation page and check sort order is OK
4) Go to patron details page and check sort order is OK
5) Set preference previousIssuesDefaultSortOrder = "earliest to latest"
6) Go to patron circulation page and check sort order is OK
7) Go to patron details page and check sort order is OK
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b2d1093155c07e43522b0f926742698598d09ea)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 10 Dec 2019 10:22:59 +0000 (11:22 +0100)]
Bug 24199: (bug 23042 follow-up) Prevent t/Auth_with_shibboleth.t to fail randomly
CGI->url_param does not always return the parameters in the same order.
Test plan:
0/ Recreate the random failure, does not apply the patch and run
t/Auth_with_shibboleth.t several times.
You will notice that it fails inconsistenly
1/ Apply the patch and confirm that it now passes 100% of the time
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 569a098f7df62a00c42a924b3444230bb047b874)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Magnus Enger [Wed, 20 Nov 2019 14:15:15 +0000 (15:15 +0100)]
Bug 24072: Typos in advance_notices.pl causes DUEDGST not to be sent
There are two typos in advance_notics.pl that cause DUEDGST messages
not to be sent. See Bugzilla for full details.
If you think the typo is sufficiently obvious, you can just eyeball the
patch and sign off, methinks. Otherwise, testing can be done something
like this:
- Make sure you have enabled enhanced messaging preferences, and a
patron with "Email" and "Digests only" set for "Item due" messages
- Issue an item to this patron, with due date today
- Run something like this to generate advance notices:
$ sudo koha-shell -c "perl \
/home/vagrant/kohaclone/misc/cronjobs/advance_notices.pl -n -c" kohadev
- See that no notices are shown (-n means messages will go to stdout,
instead of into the message queue).
- Apply the patch and run advance_notices.pl again, as before. A DUEDGST
message should now be displayed.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1f3a9722e4f8d32c7a839137252fc935ad599f74)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Magnus Enger [Mon, 18 Nov 2019 20:41:45 +0000 (21:41 +0100)]
Bug 24064: DUEDGST typoed as DUEGST
Bug 20478 introduced a typo where the letter code DUEDGST was changed
to DUEGST. This patch fixes it.
To test:
- Run "grep -r DUEDGST *" on the Koha git repo. Notice that this letter
code is used in e.g. sample notices.
- Run "grep -r DUEGST *" and notice that this code only occurs twice,
in misc/cronjobs/advance_notices.pl.
- Aply this patch.
- Run "grep -r DUEGST *" again, and notice there are no more occurences
of this typo.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5df9c63eea6ecbd75079dbd62759db01927548dd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 30 Jul 2019 15:20:27 +0000 (15:20 +0000)]
Bug 23389: Add 'All' option to report dropdowns
This patch optionally adds an 'all' option to report dropdowns
Note you will need to use 'LIKE' instead of '=' to allow 'All' to work
To test:
1 - Write a report:
SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches>>
2 - Run it
3 - Select a branch
4 - You get one branch info
5 - Note you cannot select all
6 - Apply patch
7 - Run report
8 - No change
9 - Update report like:
SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches:all>>
10 - Run report
11 - Select 'All'
12 - You get all branches
13 - Select one branch
14 - You get one branch
15 - Test with other authorised categories (itemtypes, YES_NO, etc.)
16 - Confirm it works as expected
17 - Prove -v t/db_dependent/Reports/Guided.t
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c97f5263d474adc11688b9b7773c5b8705d10d3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 2 Dec 2019 16:50:40 +0000 (17:50 +0100)]
Bug 24145: (bug 22543 follow-up) Fix Auth.t
Auth.t is failing because of: 1. recent changes from bug 22543 and 2. wrong mocked CGI->param in tests
Without this patch we hit the exit statement that breaks the tests with the following error:
t/db_dependent/Auth.t .. 1/22 Un-mocked method 'url()' called at /kohadevbox/koha/C4/Auth.pm line 1223.
Un-mocked method 'redirect()' called at /kohadevbox/koha/C4/Auth.pm line 1227.
A context appears to have been destroyed without first calling release().
Based on $@ it does not look like an exception was thrown (this is not always
a reliable test)
This is a problem because the global error variables ($!, $@, and $?) will
not be restored. In addition some release callbacks will not work properly from
inside a DESTROY method.
Here are the context creation details, just in case a tool forgot to call
release():
File: t/db_dependent/Auth.t
Line: 74
Tool: Test::More::subtest
Cleaning up the CONTEXT stack...
# Looks like you planned 22 tests but ran 1.
t/db_dependent/Auth.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 21/22 subtests
Test Summary Report
-------------------
t/db_dependent/Auth.t (Wstat: 65280 Tests: 1 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 22 tests but ran 1.
Files=1, Tests=1, 2 wallclock secs ( 0.02 usr 0.00 sys + 1.54 cusr 0.24 csys = 1.80 CPU)
Result: FAIL
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 678b4bf4642852aba0d11af0ba826164ffdfd012)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 23836 changes the behavior for tracklinks.pl but did not adjust the
tests.
We must then expect 404 if the pref is turned off.
Also mock_preference cannot work (we are hitting the web server and so
need to set the value in DB and flush the L1 caches)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 9cade9186d6234e3ed816e5ab8c32b1060e03341)
Katrin Fischer [Sat, 2 Nov 2019 06:54:31 +0000 (06:54 +0000)]
Bug 21939: Fix permissions for holds history tab
The tab will show when the staff user has edit_borrowers
permission, but the page itself will not be accessible.
This patch fixes the page permissions to allow access
with the edit_borrowers permission as suggested by the
comments on the original bug report.
To test:
- Create a staff user with only "edit_borrowers" permission
from the borrowers module
- Try to access the holds history tab from any patron account
- Verify you are blocked
- Apply patch
- Try again and verify the page is accessible now
- Repeat with superlibrarian and full borrowers permission.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cd3ef03e76e1441675c90135c42d033bf99f73cd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Tue, 29 Oct 2019 17:40:47 +0000 (17:40 +0000)]
Bug 23506: Display correct icon in staff client and OPAC
When the leader6 is set to 'i' the MARC21slim2intranetDetail.xsl
attempts to display 'SO.png' which does not exist.
TEST PLAN:
1. Find or create a record with an 'i' as the 6th position in the 000 leader.
2. Do to the OPAC detail page and staff detail for an item in that record.
3. Notice the material type icon does not display because SO.png does not exist.
4. Apply patch and restart_all
5. Look at the opac detail and staff detail page again after clearning the browser cache.
6. The material type icon now displays (MU.png), this is the same icon used on the OPAC results page.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b53e068651c521a989bd13387cef7fef8975d1e7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 2 Nov 2019 11:30:58 +0000 (12:30 +0100)]
Bug 23751: Make staffaccess permission description more precise
The permission description was missing 'username' from the description.
To test:
- Look at the permissions of a patron
- Verify the staffaccess permission is labelled:
Allow staff members to modify permissions and passwords for other staff members
- Apply patch
- Check description again:
Allow staff members to modify permissions, usernames, and passwords for other staff members
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0b6fbc138f2ac93cf42ee9c6346bdc67f7268489)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 2 Nov 2019 01:58:00 +0000 (01:58 +0000)]
Bug 23952: Fix body tag on OPAC course details page
The id was not changed, when the page was added and
remained opac-main. The patch changes it to
opac-course-details so the page has its own unique id.
To test:
- Add a course reserve to your installation
- Go to the course reserves page in the OPAC
- Click on the course to see its details
- Look at the source code, the <body> tag should show:
Without patch: opac-main
with patch applied: opac-course-details
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ccf9eaf62fc05abe318fe4652025ac3979c50c19)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Tue, 8 Oct 2019 17:11:17 +0000 (17:11 +0000)]
Bug 13749: On loading holds in patron account 'processing' is not translatable
This patch updates the DataTables configuration for two tables: The
checkouts and holds lists shown on the checkout and patron details
screen.
The tables lacked the standard application of a custom set of
defaults defined in js/datatables.js. It is in this file that custom
language strings are defined for DataTable interface elements, pulling
in the translated values from datatables.inc.
Without our custom defaults applied, DataTables used its own defaults,
which are not translated.
To test, apply the patch and check out to a patron who has both
checkouts and holds. The more the better to give you more time to
observer the loading state of the tables.
- Checkouts: This table doesn't exhibit any visible problems because
page-specific text is defined for the table's "Loading" message.
However, it still makes sense to apply the defaults to the table for
consistency's sake. There should be no visible changes to the table.
- Holds: From the checkout or patron details page click the "Holds"
tab. While the table loads there should be a "Processing" message. If
you switch to another translation the message should appear in that
language.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9af572c7969f5372853d238ee35f530e4e9fc9f6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 7 Nov 2019 10:48:59 +0000 (11:48 +0100)]
Bug 23768: Adjust the test for invalid ISBN
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 342baeecbb37bc39245c5df5dccfb983f7f84e0f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 7 Oct 2019 17:46:30 +0000 (17:46 +0000)]
Bug 23768: Return invalid ISBN when searching with variations
To test:
1 - Enable SearchWithISBNVariations and IntranetCatalogSearchPulldown
2 - Refresh page and click on 'Search the catalog' tab
3 - Search for 'ISBN' 0385299209
4 - Note no results
5 - Note the search says if searched 'kw,wrdl: (nb=)'
6 - Apply patch, restart all the things
7 - Repeat search
8 - Search looks correctly formed
9 - Add the isbn above to a record, confirm it is returned by search
10 - Confirm searches for valid ISBNs still work as expected
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 050f43f73c4857b26996e15e3d8b8ad536b32763)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 13958: Use SuspensionsCalendar syspref for more granularity
This patch makes the calculation of suspension expiration configuration
detached from the finesCalendar syspref. This way libraries have more
flexibility when setting circ rules.
I wrote this path as a bugfix, because the recent change pushed by bug 19204
changed this behavior and libraries have been complaining since they got
upgraded.
It is a minor change, just adding the new syspref, and replacing the
single place in which it is used for debarment calculation for the new
one.
The tests are updated similarly, just adding the new mocked syspref as
it was with the old one.
To test:
- Apply this patches
- updatedatabase
- Run:
$ kshell
k$ prove t/db_dependent/Circulation.t
=> SUCCESS: Tests pass!
- Sign off :-D
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f59a34a9ca80c54159b976c6fb658a85dc3eef79)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Mon, 14 Oct 2019 20:28:45 +0000 (22:28 +0200)]
Bug 22677: Include hint to OAI page path on OAI-PMH preference
This copies the way we are doing it for othe rprefs (ILSDI and similar)
and adds a hint to the description to make it easier to find the
right path for the OAI server.
To test:
- Apply patch
- Verify that the system preference for OAI-PMH includes
now a hint to: /cgi-bin/koha/oai.pl?verb=Identify
- Verify the hint is correct (add OPAC base URL)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 626811814c3ab8b363d2c181e148910205e560f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sun, 3 Nov 2019 22:48:04 +0000 (22:48 +0000)]
Bug 23483: Show the description, not the patron's title when writing off an individual fine/fee
When writing off an individual fine, the description shown
was the patron's title, instead of the fine description.
Fixing it by changing it to the same template variable used for
paying individuals so they match up.
To test:
- Pick a patron and make sure salutation is set (Mr, Mrs, ...)
- Create a manual fine
- For the fine, compare the description shown when using the Writeoff
and Pay buttons next to the fine
- Verify the display is different and writeoff displays the salutation
- Apply patch
- Repeat, descriptions now should match up
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 89931b4bb02d6ca1796ece2647fc6104382c0b7d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 26 Nov 2019 14:12:01 +0000 (14:12 +0000)]
Bug 24120: (follow-up) input_name too
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 04fab26ccc25d70a3b94b3bd2ceea22752b8714e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 26 Nov 2019 13:19:28 +0000 (13:19 +0000)]
Bug 24120: URI filter search terms in sort dropdowns
To test:
1 - Search for C++
2 - Sort your results
3 - Note search is now for "C "
4 - Apply patch
5 - Search for C++
6 - Reorder results
7 - Still searching for C++
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 59ea9b3cc27c27d16880fc238f4a173a9e38b479)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Thu, 21 Nov 2019 11:34:11 +0000 (06:34 -0500)]
Bug 24075: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1ca7b6c40cfc78bbeaf0c9d5bebeeb2e3b5ce611) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 22 Nov 2019 12:31:09 +0000 (12:31 +0000)]
Bug 24075: Backdating a return to the exact due date and time results in the fine not being refunded
When you use the date picker or book drop mode and check in an item that is due on that date, a fine is assessed and not refunded.
For example: item 12345 is due on 11/19/2109 23:59. On 11/20/2019 I check the item in using date picker/book drop setting the check in date to 11/19/2019 23:59, the patron is charged a fine, and the fine is not cleared as would be expected, since the item is being checked in before it is overdue.
Test Plan:
1) Back date a checkout so it is overdue
2) Run fines.pl to generate the fine
3) Return the item, backdating to the same date/time is was due
4) Note the fine was not removed
5) Apply this patch
6) Repeat steps 1-3
7) Fine should be zeroed out now!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 39cc13d070e1613b4a903ec5e0e2513ebd561285) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 19 Jun 2019 17:12:15 +0000 (12:12 -0500)]
Bug 23042: Correct shib param escaping
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 13 Jun 2019 16:02:33 +0000 (17:02 +0100)]
Bug 23042: Only include GET params in return URL for Shibboleth
The shibboleth return target included POST parameters in the URL string,
this meant that a failed local login POST would include the username and
password used in the attemtped login in plaintext in the redirect URL
that is appended to the shibboleth login URL.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 19 Jun 2019 09:56:30 +0000 (10:56 +0100)]
Bug 23042: Add tests to catch POST params in return URL
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 30 Oct 2019 12:15:38 +0000 (13:15 +0100)]
Bug 23836: exit after output_error
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick [Thu, 17 Oct 2019 15:26:18 +0000 (15:26 +0000)]
Bug 23836: Don't forward form tracklinks if not tracking
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 15 Aug 2019 07:54:59 +0000 (08:54 +0100)]
Bug 23329: (RM follow-up) Restore DB after test
Test plan:
1) Dump your DB before the tests is run
2) Run the test
3) Dumper your DB again and compare to the first dump
Success if there are no differences (other than the timestamp of the
dump)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 14 Aug 2019 18:56:48 +0000 (14:56 -0400)]
Bug 23329: Fix tests
- www.google.com vs https://www.google.com
- Remove transaction otherwise data are not available from webserver
- Use new C4::Output::output_error to avoid 302 (redirect)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 14 Aug 2019 18:56:46 +0000 (14:56 -0400)]
Bug 23329: Move error page to its own subroutine
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 14 Aug 2019 10:34:47 +0000 (11:34 +0100)]
Bug 23329: (RM follow-up) Add regression tests
Test plan:
Run the new tests and they should all pass once we've caught all cases
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 9 Aug 2019 09:27:18 +0000 (09:27 +0000)]
Bug 23329: (QA follow-up) Resolve warning on wrong biblionumber
Passing a wrong biblionumber generates a warning:
GetMarcUrls called on undefined record at opac/tracklinks.pl line 58.
Test plan:
[1] Try it again with a wrong biblionumber and check the logs.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 9 Aug 2019 09:18:13 +0000 (09:18 +0000)]
Bug 23329: (follow-up) Allow item URI with a biblionumber parameter
If you pass a URI with a biblionumber without specifying the itemnumber,
tracklinks did not redirect an item URI.
Test plan:
[1] Add URI in an item.
[2] Pass this URI with the itemnumber to tracklinks. Should pass.
[3] Pass this URI with the biblionumber to tracklinks. Should pass now too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 17 Jul 2019 11:01:01 +0000 (11:01 +0000)]
Bug 23329: Only redirect tracklinks.pl to urls contained in records
Bug 19487 limited redirection to urls contained in a record/item if we were tracking.
We should probably limit forwarding if not tracking as well.
Additionally, if we don't have a soucre, let's not forward
To test:
0 - Set TrackClicks syspref to 'Don't track'
1 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com
2 - You get forwarded to google
3 - Set TrackClicks to 'Track anonymously'
4 - You get a 404
5 - Apply patch
6 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com
7 - You get a 404
8 - Set TrackClicks syspref to 'Don't track'
9 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com&biblionumber=1
Choose a biblionumber that exists
10 - You get a 404
11 - Add http://www.google.com to the 856$u of the record used above
12 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com&biblionumber=1
13 - You are redirected
14 - Confirm redirection and 404 as expected with other settings of TrackClicks
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 22 Nov 2019 10:09:42 +0000 (10:09 +0000)]
Bug 23451: Fix other similar wrong filterings
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 14 Aug 2019 17:31:53 +0000 (13:31 -0400)]
Bug 23451: Prevent XSS vulnerabilities in opac-imageviewer.pl
And certainly in other sripts as it is in opac-bottom.inc
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Magnus Enger [Fri, 6 Sep 2019 07:54:04 +0000 (09:54 +0200)]
Bug 22543: Prevent "back and refresh attack"
To reproduce and test:
- Log into the OPAC, you are taken to /cgi-bin/koha/opac-user.pl
- Log out, you are taken to /cgi-bin/koha/opac-main.pl?logout.x=1
- Click "Back", you are taken to /cgi-bin/koha/opac-user.pl
- Reload the page, you see an error like "Confirm new submission
of form"
- Reload the page again and confirm the submission of the form
- You are now logged in to the OPAC again!
- Log out again
- Apply this patch
- Log in to the OPAC, you are taken to /cgi-bin/koha/opac-user.pl
- Log out, you are taken to /cgi-bin/koha/opac-main.pl?logout.x=1
- Click back, you are taken to /cgi-bin/koha/opac-user.pl
- No matter how many times you reload /cgi-bin/koha/opac-user.pl,
you should not see anything other than the login form.
- Check that Self Check Out still works as it should, by making
sure you have a user with self_check permissions, then setting
WebBasedSelfCheck, AutoSelfCheckAllowed, AutoSelfCheckID and
AutoSelfCheckPass appropriately. Then visit
/cgi-bin/koha/sco/sco-main.pl and verify everything works as
expected.
The messages and errors pages you see related to resubmitting the
form might differ from the ones described here, depending on what
browser you use. I tested in Chromium 76.0.x.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 18 Nov 2019 16:19:02 +0000 (16:19 +0000)]
Bug 24060: Use patron object to load club tab
To recreate:
1 - Be using 19.05
2 - Create a club template and a club
3 - Go to a patron's checkout page
4 - Note the club tab will load
5 - Go to a patron's details page
6 - Note the club tab says 'Loading'
7 - Apply patch
8 - It loads!
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 16 Oct 2019 14:58:36 +0000 (15:58 +0100)]
Bug 23827: Correction for missed 'F' and 'FU' case
When replacing F and FU with 'OVERDUE' + status in bug 22521 I missed
the cases inside the cash_register_stats template. This patch should
correct that mistake.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 11 Nov 2019 11:35:30 +0000 (12:35 +0100)]
Bug 23822: Fix deletion of patrons with credit
There are bugs in both master and 19.05, but different.
Anyway we should have this check to make sure a negative value will have
the same behavior: trigger the confirmation message (instead of a blank
page).
If we want to reject the deletion of a patron with credit we should
handle it on a separate bug report (behavior change)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d23e50f0b239603a05ddbb62591e80657f5f6cae) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 7 Nov 2019 10:41:29 +0000 (11:41 +0100)]
Bug 23765: Do not display localized templates if TranslateNotices is off
To test:
1. Enable multi-languages
2. Set the preference 'TranslateNotices' on 'Allow'
3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual
email templates.
4. Set the preference TranslateNotices on 'Don't allow'.
5. Go to: tools==>Notices & slips==>Edit, the template shows several tab
for the same transport type.
6. Apply the patch.
7. Repeat the steps 4 and 5
8. Success. It only shows the default template when TranslateNotices is
'Dont allow'.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 86f999812e1fb281742d79757964227ea0f5d330) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 22 Oct 2019 09:10:59 +0000 (11:10 +0200)]
Bug 23854: Fix failure on dates when editing a suggestion
- Watch plack-error-log
- Change an accepted suggestion to 'No Status'
- Verify error in the logs (use strict mode, depending on DBMS version)
- Status changed was not saved
- Apply patch
- Verify the error is gone, change is saved now.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 73198bc4bdafa6817c916c777a51a73d937ba2aa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 17:00:02 +0000 (18:00 +0100)]
Bug 23985: (bug 21206 follow-up) Fix checkout list when "Hold pickup library match" not set
This patch restores the behavior prior to bug 21206.
If "Hold pickup library match" is "Not set", then
hold_fulfillment_policy equals an empty string.
Test plan:
1. Go to "Circulation and fines rules"
2. Under "Default checkout, hold and return policy", unset "Hold pickup
library match" and Save
3. Place a hold on one item for one patron
4. Try to checkout the same item with another patron
=> Without this patch you the checkout list do not show, and the logs
contain "The method Koha::Item-> is not covered by tests!"
=> With this patch applied you see the checkout list
QA will take care of comparing the statement with the one before bug 21206
and make sure they are equivalent
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17d221144605875b6efb1569093b76f412f8aea5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 17:18:23 +0000 (18:18 +0100)]
Bug 23846: Handle exception gracefully at the OPAC
I do not think we should have the same trick as the intranet, and
display a message. This should be enough.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cce358f9af5ee9761a875816f603344873838359) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 10:15:46 +0000 (11:15 +0100)]
Bug 23846: Add a check to the data inconsistencies script
This may be quite long for big catalogue, but I think it is a good one
to have.
Test plan:
Same as first patch, then execute search_for_data_inconsistencies.pl
Notice the error.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1e1c5d17a268c6d493c2c71d4b456da7749655c3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 10:04:42 +0000 (11:04 +0100)]
Bug 23846: Display degraded view when MARCXML is invalid (staff detail)
When an invalid bibliographic record is imported into the catalogue
there is not warning or error. However the bibliographic record detail
page will explode (Koha::Biblio::Metadata->record will raise an
exception).
This patch proposes to catch the exception on this view and display a
warning about the situation.
Note that editing/saving the record will fix the MARCXML data and so
removes the warning (some black magic we should get rid of I suspect).
Test plan:
- Import a bibliographic record with invalid XML, you can add non
printable characters, like 0x1F (CTRL-V 1F with vim)
- Go to the detail page
=> Without this patch you get a 500
=> With this patch applied you get a "degraded view" with a warning
message, telling you what the error is.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 068943f18d60edc231b59b6232fecabaf1c799ab) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 7 Nov 2019 19:38:24 +0000 (19:38 +0000)]
Bug 23986: Pass strings to Catmandu for deletion
The deletion subroutine expects to get a string, this is fine in most places, but when
we sort our records for batch deletion they are cast to numbers and the delete is not processed.
This patch quotes the biblionumbers as strings before passing them to Catmandu
To aid in detecting orphaned records you can use the patches on bug 22831
To test:
1 - Have or create a bib
2 - Go to Tools->Batch record deletion
3 - Click 'Enter a list of record numbers'
4 - Enter the biblionumber'
5 - Confirm deletion
6 - Search for the record, it still appears
7 - Apply patch, restart all the things
8 - Repeat 1-6
9 - This time the record is deleted
10 - Test other methods of record deletion to confirm the record is removed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cdea121ddb5c3e609ce698171a8dc319593a7780) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 22 Oct 2019 09:36:28 +0000 (11:36 +0200)]
Bug 23851: Add the homebranch prefix to the barcode when adding multiple copies of an items
See the comment in the code for more information.
Test plan:
- Set autoBarcode to hbyymmincr
- Create an item and click on the barcode field
- A barcode prefixed by the homebranch is generated
- Click the "Add multiple copies of this item" and enter 4
- Save
=> Without this patch only the first item has the homebranch prefix
=> With this patch applied they all have a barcode in the same format
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aae3dfe1232d8df452c7e677c6fa443017fb0417) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 5 Nov 2019 10:23:04 +0000 (11:23 +0100)]
Bug 22857: Sync koha-conf.xml files
Missing entries are added to those files.
Test plan:
Search for typos
Compare the two files and comfirm the entries are the same in both.
Exception: supportdir exists in etc/koha-conf.xml only, but I think it's
obsolete.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit eaf4b79c32a6f173db8177b8ee365ec10f4532a6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 70a59fc694866154fce74eeaf08ee2126f34947f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Andrew Isherwood [Thu, 24 Oct 2019 11:26:44 +0000 (12:26 +0100)]
Bug 23529: (follow-up) Fix syntax error
As mentioned by Magnus in comment #8
Sorry Magnus, definitely fixed this time!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 370ee3203e2325f6f5db6771775ac4b55d82c874) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Whilst working on something else, it came to light that the previous fix
in bug 23229 was waaaaay too heavy handed and basically kills all ILL
related JS :( This is obviously a big problem, this patch fixes that.
The main problem is that all the ILL related JS is in a single file,
which isn't ideal as bits of it are used on different pages. Ideally,
we'd refactor it out into more manageable chunks which can be included
as required. Until such a time, this patch will do, it just prevents the
"get all requests" AJAX request unless you're on the ILL list page.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 04e9885c0f18fda2363818d4b0f2453a3aff4923) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Mon, 4 Nov 2019 13:25:19 +0000 (13:25 +0000)]
Bug 23963: Revert bug 21987 to restore image quality
Bug 21987 had unexpected effects upon image quality for thumbnails.
Currently, we are working to resolve those issues but have not managed
to correct them inside the release window for this cycle. As such, I
have chosen to revert the original bug whilst we work on a resolution.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35670b0495e0333f57773b0375ea7aa1122d5372) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lari Taskula [Mon, 4 Nov 2019 16:32:58 +0000 (16:32 +0000)]
Bug 23774: Server-side confirmation for hold pickup location in OPAC
While placing a hold on a book, if a user opens up Inspect Element on the
Pick up location drop down box they can change the pick up location in
the code to a library that is not listed as a pick up location.
How to replicate:
Search for a book
Select book
Click Place Hold
On the screen Home > Placing a hold
Right click on Pick up location
Select 'Inspect Element'
Under
<!-- HOLDABLE -->
<li class="Branch">
<select name="Branch ******"> Pick Up location:</label>=$0
Option values are listed that relate to the pick up location, this value
can be changed to another new location and when the hold is placed
the hold will be placed for this new location instead of the listed options
in the Pick up location drop down list.
To test:
1. Apply patch
2. Repeat "How to replicate"
3. Observe it is no longer possible to place holds on libraries not defined
as pickup location by changing option value via Inspect Element tool
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 45a89f47090e783513841a087256c76fff84b29f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 16 Oct 2019 08:47:28 +0000 (10:47 +0200)]
Bug 17359: Correct encoding when displaying patron import summary
There is an encoding issue when the patron import summry, the string
must be UTF8 decoded before being sent to the template.
Test plan:
- Create a patron import CSV file with import issues. Use UTF8 characters.
See file attached to the bug report 'patron_import.csv'
=> The screen should display the line correctly
- Correct the import issue (add a surname for Chloé)
=> The imported patrons should contain the correct values.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5b03d4be39497be0dbdce17ef26867ca80affec1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 24 Oct 2019 10:29:23 +0000 (12:29 +0200)]
Bug 23234: Mock DateTime->now using the time zone
The timezone of the two dt was different, one was UTC, the other one was
my local one.
When we mocked DateTime->now we did not use the time zone, we must use
dt_from_string instead
Test plan:
Make sure your environment has a different time zone than UTC
`prove t/db_dependent/Circulation.t` should fail without this patch
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 549a09c52178937af28cc11c5bfa7f00cbced1b5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 21 Jun 2019 12:51:15 +0000 (08:51 -0400)]
Bug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.
Test Plan:
0) Activate UseEmailReceipts
1) Attempt to use [% branch.branchname %] in the ACCOUNT_PAYMENT notice
2) Note it produces no output
3) Apply this patch
4) Make another payment
5) You should now see the branche's name!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Also requires UseEmailReceipts to be activated.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c4466e7d714d32808ee2e553320431005ec7cc69) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
See bug 22847. We should never call ->Get in this template, we want
to display the values in the DB, not the calculated ones
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c4ca7bff689a37debc7aa850fdd42bfc5a19386e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4ad2bedb97712b4d574d6779ceff9753558c1db0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Wed, 2 Oct 2019 07:41:45 +0000 (07:41 +0000)]
Bug 23713: (follow-up) Add missing semicolon
Adds a missing semicolon to one of the lines with translated
messages.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 660a5b6ebc4eb35bfcca54ef3bde5e00c304c446) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 1 Oct 2019 15:55:19 +0000 (15:55 +0000)]
Bug 23713: Subscription add form broken for translations
This patch makes a change to the subscription entry template as a
workaround to a translation bug which is causing JavaScript errors when
using translated templates.
To test, apply the patch and update and install the de-DE template:
- Go to Administration -> System preferences and enable the "Deutsch
(de-DE)" language under I18N/L10N preferences -> language.
- Switch to the "Deutsch" translation.
- Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription)
and open the browser console. There should be no errors.
- Links which trigger JavaScript events should work correctly:
"Lieferant suchen," "Nach Datensatz suchen," etc.
Reported-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Thanks-to: Michael Hoffert and Alexander Arlt from koha-de for reporting
it initially and figuring out the root of the issue Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0dd2d6883d1e98bed92b25c321110b37da739e88) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 24 Oct 2019 16:21:04 +0000 (18:21 +0200)]
Bug 23398: Disable the XML import/export format for biblio framework
It gives incomplete results and not sure it ever worked.
To prevent data loss it is better to remove this option.
Note that the code in C4/ImportExportFramework.pm is too complex to
attach with this patch to deletion of the code related to the XML
import/export. Safer to keep it for a separate bug report.
Test plan:
Import/export biblio frameworks and confirm that there is no more
reference to the xml format.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ed45a4f333fb9f6569d150410ef99d8ffe13f54c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 22 Oct 2019 10:42:09 +0000 (12:42 +0200)]
Bug 23813: (bug 18925 follow-up) Remove invalid circ rules to avoid FK constraints to fail
There is not FK constraints on the itemtype, categorycode and branchcode
columns of the issuingrules table, because of the '*' value we use for
default.
We created the new table circulation_rules with those constraints, and
when we moved the rules for maxissueqty, the INSERT failed.
To avoid the FK constraints to fail we are going to delete the invalid
rows before.
It could lead to data lost, but this situation certainly comes from a
bad data manipulation at some point of the history of the installation.
insert into branches(branchcode, branchname) values('rmme', 'rmme');
insert into categories (categorycode, description) values ('rmme', 'rmme');
insert into itemtypes (itemtype, description) values('rmme', 'rmme');
Go to http://pro.kohadev.org/cgi-bin/koha/admin/smart-rules.pl
Create a new rule for the patron category
Create a new rule for the item type
Copy all the default rule to the new library
Create other rules for "Default checkout, hold policy by patron category" and "Default holds policy by item type" using this patron's category and itemtype.
Same for patrons' categories and itemtypes you will not delete.
delete from branches where branchcode="rmme";
delete from categories where categorycode="rmme";
delete from itemtypes where itemtype="rmme";
git checkout master
and execute the DB process.
=> With this patch applied you will not get the error and the rules will
be moved correctly.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff3d7b9f8e27a1c8547012f062daccc33b12dc27) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Magnus Enger [Tue, 1 Oct 2019 08:54:41 +0000 (10:54 +0200)]
Bug 22280: Add a unit test
This patch adds a unit test to t/db_dependent/Illrequests.t, where
a new node without any next_actions or prev_actions is added to the
core status graph.
Running the tests show a lot of warnings about "no query in
themelanguage", but that should not be related to the current bug.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 291bb7bacfdf68e6bc8e99d5c1e258fbcbf2344b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 633800120840384374fef3da091800a6d989e723) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
David Gustafsson [Thu, 26 Sep 2019 09:50:14 +0000 (11:50 +0200)]
Bug 23680: Incorrect conversion of Perl boolean to js
A Perl boolean value is on the server side converted
to a JS string (resulting in the values '0' or '1).
Since the string '0' is a truthy value in JS this
incorrectly triggers window.close() on the client
in many instances, for example when adding a new item.
To test:
1. Go to a bibliographic record in the staff client.
2. Expand the "New" menu and open "New item" in new tab.
3. The new tab will immediately close.
4. Apply the patch.
5. Perform steps 1-2 again.
6. The tab should now remain open.
Sponsored-by: Gothenburg University Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b488527ebeb3b335854f2290aa1c6cf80f464eb0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 31 Oct 2019 19:03:59 +0000 (19:03 +0000)]
Bug 23938: Restore title display in last checked out box
To test:
1 - Check out to a patron
2 - Note the display under the checkotu box does not have title
3 - Apply patch
4 - Checkout another item
5 - Note the title displays
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dfdf3a74454d3844b6ed82f549d67f25c7001ded) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 23630: Do not remove field 999 in Elasticsearch indexing
Elasticsearch indexing uses 999$c to store record id by deleting the all field first !
So you can not store anything in field 999, even in UNIMARC and even in authorities records.
Looks like it is quick fix code added to start Elasticsearch use.
This behavior is disturbing and very strange for UNIMARC flavour.
This patch corrects by defining record ids mandatory in Koha::SearchEngine::Elasticsearch::Indexer::update_index().
This ids array is actually always given (except in UT).
I think it is useless to allow adding a record without its id.
Test plan :
1) Use Elasticsearch as SearchEngine
2) Create a subfield 999$z in default framework
3) Create a record with default framework
4) Enter a random string (never used in catalog) like "tototata" in 999$z
5) In Search engine configuration, define search field "subject" for 999$z
6) Rebuild record : misc/search_tools/rebuild_elasticsearch.pl -b -bn <biblionumber> -v
7) Search for the random string => You get a result
8) Optionnaly look at records in ES : <es server>:9200/<es index name>/data/<biblionumber>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb083813a8237691f0b9d419d826fdea58096cd4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 9 Oct 2019 12:28:32 +0000 (08:28 -0400)]
Bug 23626: Add missing TT failure
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90e2882568375bce956d0cb50edfa070c42cafce) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Mon, 7 Oct 2019 16:34:07 +0000 (12:34 -0400)]
Bug 23626: [alternate] Default to including all rows
If a person is fetching all data, it seems most likely that that person wants
to see all the data in the chart. We should default to that behavior.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit afa1106782d794b98efa90200ac793d7078a2686) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick [Wed, 2 Oct 2019 09:58:59 +0000 (09:58 +0000)]
Bug 23626: Only fetch full chart data if requested
This patchset prevents the full return of report data unless explicitly requested by the user for charting purposes
Additionally the user is warned if requesting more than 1000 rows of data
To test:
1 - Create a report that returns over 1000 rows of data
2 - Run the report
3 - Note you have two buttons now 'Chart data' and 'Fetch all data for chart'
4 - Click chart data
5 - Note the note that you are only charting visible data
6 - Create the chart and confirm it works
7 - Close the chart
8 - Click 'Fetch all data'
9 - Note the confirm window
10 - Click 'cancel', note there is no change
11 - Repeat and click ok
12 - Fetch all data button is gone
13 - Page to next data, note fetch all does not return
14 - Click 'Chart data'
15 - Note you now have checkbox option to use all data in report
16 - Click it
17 - Create chart
18 - Confirm it works as expected
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 83a545d8318560eb2ee385289ff8c291f07f6716) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>