]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 23970: Make search with "Publication date" field work at any position
Jonathan Druart [Mon, 25 Nov 2019 12:35:25 +0000 (13:35 +0100)]
Bug 23970: Make search with "Publication date" field work at any position

The changes made in the following commit:
  commit 0d2e83bca5b91376e9262b6cb0b993f09b919018
  Bug 14636: Item search - fix search and sort by publication date for MARC21
was put at the wrong place. It was inside a "if $i == 1" test that
impacts the first field only.

Test plan:
0/ Use a MARC21 installation
1/ Search items by publication date, use twice the field using different
values.
For instance:
  publication date: 2005 OR
  publication date: 2006
=> Without this patch you only get results for 2005
=> With this patch applied you get results for both years.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c589da3c2931bbe0cc1c4f31899b71044c860082)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24128: Add alias for biblionumber search
Nick Clemens [Wed, 27 Nov 2019 11:26:45 +0000 (11:26 +0000)]
Bug 24128: Add alias for biblionumber search

To test:
1 - In staff or OPAC using ES, search for "biblionumber:3" or any existing biblionumber
2 - No results
3 - Apply patch, restart all the things
4 - Search again
5 - You go to the biblionumber

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 588f67a26da3c649e6ef966004b76e0c46fa2431)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23246: (follow-up) Hardcoding tab position is not enough
Tomas Cohen Arazi [Mon, 1 Jul 2019 17:13:15 +0000 (14:13 -0300)]
Bug 23246: (follow-up) Hardcoding tab position is not enough

There are many conditions that determine the tab number for 'media'.
Translated into variables that hold the tabs count on each condition, it
is clear that '3' was not good enough:
            [%- holdings      = (SeparateHoldings)   ? 2 : 1
                notes         = (MARCNOTES || notes) ? 1 : 0
                acq           = (Koha.Preference('AcquisitionDetails')) ? 1 : 0
                frbr          = (FRBRizeEditions  && XISBNS) ? 1 : 0
                local_covers  = (LocalCoverImages && (localimages || CAN_user_tools_upload_local_cover_images)) ? 1 : 0
                media_tab     = holdings + notes + acq + frbr + local_covers
            -%]

This patch gets rid of the hardcoded value, adds an id to the 'media'
tab (i.e. 'media_tab') and uses JS to get the right index.

To test:
- Play with the different options governing those variables
=> FAIL: 3 is not always the 'media' tab
- Apply this patch
- Repeat your tests
=> SUCCESS: It always picks the 'media' tab
- Sign off :-D

Sponsored-by: American Numismatics Society
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0e21de15d61999183ea17624465ab0bc1a6c867e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23246: Only jump into the 'images' tab HTML5MediaEnabled is set
Tomas Cohen Arazi [Mon, 1 Jul 2019 16:16:42 +0000 (13:16 -0300)]
Bug 23246: Only jump into the 'images' tab HTML5MediaEnabled is set

This patch makes jumping into the third tab happen only if
HTML5MediaEnabled is set to 'both' or 'staff'.

To test:
- Have HTML5MediaEnabled set to 'opac' or 'not at all'
- Open the detail page of a record with no holdings
=> FAIL: The 'images' tab is selected
- Apply this patch
- Reload
=> SUCCESS: The 'holdings' tab is selected as it should be.
- Sign off :-D

Sponsored-by: America Numismatic Society
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 7a9d8937f753685471dfde7a62c5871062d41a11)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23987: "return to cataloguing" if the record is deleted from bachMod-del
Jonathan Druart [Wed, 20 Nov 2019 09:56:24 +0000 (10:56 +0100)]
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del

If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead

Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button

Note that there is a link AND a button, coming from
  commit 928c0af2b6a2c7aa6ed54019c5bd7dbddbccf4ee
  Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 7c5a0759acf5f5a5a51e54f69d65067b6f22a0c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23987: Use src=CATALOGUING for edition/deletion in batch from items table
Jonathan Druart [Wed, 20 Nov 2019 09:53:32 +0000 (10:53 +0100)]
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table

There are 2 ways to land in batchMod from the detail page of a bib
record: from the Edit menu, and the action buttons on top of the items
table.

We want the same behavior for both and so use src=CATALOGUING
It will make batchMod to behave identically for the "return" button

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 54e114833260055cd2b0131bc0548f80a5d7ff29)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24168: (bug 23116 follow-up) AllowHoldPolicyOverride allows a librarian to almost...
Jonathan Druart [Wed, 4 Dec 2019 15:04:45 +0000 (16:04 +0100)]
Bug 24168: (bug 23116 follow-up) AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold

This patch actually fixes the issue described on bug 23116.

Test plan:
See bug 23116 and comment 5. Important to note that the later comparison with
itemAlreadyOnHold assumes that the variable is a string.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c5336e24eb24c0faa7d28faa96bd40b13ccf834c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 24136: Update sponsors for 19.11 cycle
Martin Renvoize [Fri, 29 Nov 2019 10:49:37 +0000 (10:49 +0000)]
Bug 24136: Update sponsors for 19.11 cycle

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 98b3ae9f41f40a1230dbcc184404efda2d25980e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23089: Fix sorting on sum and regular fields
Nick [Thu, 10 Oct 2019 16:06:08 +0000 (16:06 +0000)]
Bug 23089: Fix sorting on sum and regular fields

As of bug 20589 we no longer analyze sort fields and so we no longer need to append ".phrase"
to our sort in searches.

Additionally, sort fields based on 'sum' should also use sum in building the value to sort on

To test:
0 - Be using ES
1 - Find the most circulated item in your collection
2 - Search for '*'
3 - Sort by popularity DESC
4 - Note that item is not first
5 - Try to sort by anything but relevancy, it fails
6 - Apply patch
7 - Redo searches and sorts
8 - Things should now work as expected

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a2ba8b6b23f482dcf8bbe53668d93519a11edf5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23089: Fix QueryBuilder tests.
Ere Maijala [Thu, 24 Oct 2019 10:35:52 +0000 (13:35 +0300)]
Bug 23089: Fix QueryBuilder tests.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cce9d03bf911a2279a62e742f48fbe56be91e021)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23427: Simplify sort logic
Jonathan Druart [Thu, 7 Nov 2019 12:34:31 +0000 (13:34 +0100)]
Bug 23427: Simplify sort logic

This is the usual syntax.

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 119347c76e5acc262380cc22b13684cca5a19e8d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 23427: Better sorting of previous checkouts
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>
4 years agoBug 23427: Fix previous checkouts sort order
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>
4 years agoBug 24199: (bug 23042 follow-up) Prevent t/Auth_with_shibboleth.t to fail randomly
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>
4 years agoBug 24072: Typos in advance_notices.pl causes DUEDGST not to be sent
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>
4 years agoBug 24064: DUEDGST typoed as DUEGST
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>
4 years agoBug 23389: Add 'All' option to report dropdowns
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>
4 years agoBug 23089: Unit tests
Nick [Thu, 10 Oct 2019 16:05:50 +0000 (16:05 +0000)]
Bug 23089: Unit tests

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23089: [19.05 and earlier] Use integer field directly for sorting
Nick Clemens [Wed, 13 Nov 2019 14:31:39 +0000 (14:31 +0000)]
Bug 23089: [19.05 and earlier] Use integer field directly for sorting

4 years agoBug 24145: (bug 22543 follow-up) Fix Auth.t
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>
4 years agoBug 24144: (bug 23836 follow-up) Fix regressions.t tests
Jonathan Druart [Mon, 2 Dec 2019 16:12:06 +0000 (17:12 +0100)]
Bug 24144: (bug 23836 follow-up) Fix regressions.t tests

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)

4 years agoBug 21939: Fix permissions for holds history tab
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>
4 years agoBug 23506: Display correct icon in staff client and OPAC
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>
4 years agoBug 23751: Make staffaccess permission description more precise
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>
4 years agoBug 23952: Fix body tag on OPAC course details page
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>
4 years agoBug 23954: Format notes in suggestion management
Owen Leonard [Sun, 3 Nov 2019 21:41:04 +0000 (21:41 +0000)]
Bug 23954: Format notes in suggestion management

This patch makes minor CSS and markup changes in order to deliniate
suggestion notes from the other data in the suggestions list view.

To test you should have at least one suggestion with a note. Apply the
patch and go to Acquisitions -> Suggestions.

In the table of suggestions, check that the notes display clearly.

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 551097f85049c96119038879dfe368611ca87f30)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13749: On loading holds in patron account 'processing' is not translatable
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>
4 years agoBug 23768: Adjust the test for invalid ISBN
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>
4 years agoBug 23768: Return invalid ISBN when searching with variations
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>
4 years agoBug 13958: DBRev 19.05.05.001
Lucas Gass [Tue, 10 Dec 2019 23:05:53 +0000 (23:05 +0000)]
Bug 13958: DBRev 19.05.05.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 13958: Use SuspensionsCalendar syspref for more granularity
Tomas Cohen Arazi [Mon, 27 May 2019 15:10:57 +0000 (12:10 -0300)]
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>
4 years agoBug 13958: Add SuspensionsCalendar syspref
Tomas Cohen Arazi [Mon, 27 May 2019 14:30:33 +0000 (11:30 -0300)]
Bug 13958: Add SuspensionsCalendar syspref

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>
4 years agoBug 22677: Include hint to OAI page path on OAI-PMH preference
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>
4 years agoBug 23483: Show the description, not the patron's title when writing off an individua...
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>
4 years agoBug 24120: (follow-up) input_name too
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>
4 years agoBug 24120: URI filter search terms in sort dropdowns
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>
4 years agoBug 24024: Invert names on halds waiting report
Nick Clemens [Tue, 12 Nov 2019 18:29:58 +0000 (18:29 +0000)]
Bug 24024: Invert names on halds waiting report

Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
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 5cd071d66e2bba70f712b4fa4347648a51e1ed1a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoMaintanence team template corrections
Martin Renvoize [Thu, 28 Nov 2019 18:23:44 +0000 (18:23 +0000)]
Maintanence team template corrections

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 019eff289ba9db77096b9d38dd5e8d0428b6772a)

4 years agoUpdate release notes for 19.05.05 release v19.05.05-1
Fridolin Somers [Fri, 22 Nov 2019 12:50:12 +0000 (13:50 +0100)]
Update release notes for 19.05.05 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoUpdate teams for 20.05 cycle
Martin Renvoize [Thu, 28 Nov 2019 18:55:52 +0000 (18:55 +0000)]
Update teams for 20.05 cycle

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24075: Unit tests
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>
4 years agoBug 24075: Backdating a return to the exact due date and time results in the fine...
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>
4 years agoMerge remote-tracking branch 'translate/19.05.05-translate-20191122' into new/securit...
Fridolin Somers [Fri, 22 Nov 2019 11:09:15 +0000 (12:09 +0100)]
Merge remote-tracking branch 'translate/19.05.05-translate-20191122' into new/security-release-19.05.06

4 years agoIncrement version for 19.05.05 release
Fridolin Somers [Fri, 22 Nov 2019 11:08:10 +0000 (12:08 +0100)]
Increment version for 19.05.05 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoTranslation updates for Koha 19.05.05
Koha translators [Fri, 22 Nov 2019 11:06:19 +0000 (08:06 -0300)]
Translation updates for Koha 19.05.05

4 years agoBug 23042: Correct shib param escaping
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>
4 years agoBug 23042: Only include GET params in return URL for Shibboleth
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>
4 years agoBug 23042: Add tests to catch POST params in return URL
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>
4 years agoBug 23836: exit after output_error
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>
4 years agoBug 23836: Don't forward form tracklinks if not tracking
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>
4 years agoBug 23329: (RM follow-up) Restore DB after test
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>
4 years agoBug 23329: Fix tests
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>
4 years agoBug 23329: Move error page to its own subroutine
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>
4 years agoBug 23329: (RM follow-up) Add regression tests
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>
4 years agoBug 23329: (QA follow-up) Resolve warning on wrong biblionumber
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>
4 years agoBug 23329: (follow-up) Allow item URI with a biblionumber parameter
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>
4 years agoBug 23329: (follow-up) Use any instead of grep
Tomas Cohen Arazi [Tue, 23 Jul 2019 19:39:18 +0000 (16:39 -0300)]
Bug 23329: (follow-up) Use any instead of grep

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>
4 years agoBug 23329: Only redirect tracklinks.pl to urls contained in records
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>
4 years agoBug 23451: Fix other similar wrong filterings
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>
4 years agoBug 23451: Prevent XSS vulnerabilities in opac-imageviewer.pl
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>
4 years agoBug 22543: Prevent "back and refresh attack"
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.

This fix was originally proposed by LMSCloud:
https://github.com/LMSCloud/Koha-LMSCloud/commit/74a7fe0f0c5b2ce0d65bd26452c6dcaf0a7f65ad

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>
4 years agoBug 24060: Use patron object to load club tab
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>
4 years agoBug 23827: Correction for missed 'F' and 'FU' case
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>
4 years agoBug 23822: Fix deletion of patrons with credit
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>
4 years agoBug 23765: Do not display localized templates if TranslateNotices is off
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>
4 years agoBug 23854: Fix failure on dates when editing a suggestion
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>
4 years agoBug 23985: (bug 21206 follow-up) Fix checkout list when "Hold pickup library match...
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>
4 years agoBug 23846: Handle exception gracefully at the OPAC
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>
4 years agoBug 23846: Add a check to the data inconsistencies script
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>
4 years agoBug 23846: Display degraded view when MARCXML is invalid (staff detail)
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>
4 years agoBug 23986: Pass strings to Catmandu for deletion
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>
4 years agoBug 23851: Add the homebranch prefix to the barcode when adding multiple copies of...
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>
4 years agoBug 23933: (bug 10132 follow-up) Fix commit_file.pl
Jonathan Druart [Mon, 4 Nov 2019 11:25:33 +0000 (12:25 +0100)]
Bug 23933: (bug 10132 follow-up) Fix commit_file.pl

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 0eb9edbf229bdbde02ff65e5f955fb18cf0cc7db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22857: (QA follow-up) Cosmetic changes: typo, whitespace
Marcel de Rooy [Fri, 8 Nov 2019 09:00:32 +0000 (09:00 +0000)]
Bug 22857: (QA follow-up) Cosmetic changes: typo, whitespace

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 bd30a17d3bc0040460543ced27140690f50d27f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22857: Sync koha-conf.xml files
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>
4 years agoBug 23529: (QA follow-up) Fix closing bracket, add label
Nick Clemens [Fri, 25 Oct 2019 11:31:46 +0000 (11:31 +0000)]
Bug 23529: (QA follow-up) Fix closing bracket, add label

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>
4 years agoBug 23529: (follow-up) Fix syntax error
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>
4 years agoBug 23529: Narrow scope of changed
Andrew Isherwood [Mon, 2 Sep 2019 08:29:14 +0000 (09:29 +0100)]
Bug 23529: Narrow scope of changed

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>
4 years agoBug 23963: Revert bug 21987 to restore image quality
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>
4 years agoRevert "Bug 21987: Add tests"
Fridolin Somers [Fri, 15 Nov 2019 10:13:15 +0000 (11:13 +0100)]
Revert "Bug 21987: Add tests"

This reverts commit afb39b132b10b74efec31cd8191cdcd72a61d8d3.

4 years agoRevert "Bug 21987: Do not generate true color thumbnails if not needed"
Fridolin Somers [Fri, 15 Nov 2019 10:13:14 +0000 (11:13 +0100)]
Revert "Bug 21987: Do not generate true color thumbnails if not needed"

This reverts commit 5c41d584cb654efbfd8c854bac0d30d87a054ab5.

4 years agoRevert "Bug 21987: (RM follow-up) Add text for simple tests"
Fridolin Somers [Fri, 15 Nov 2019 10:13:14 +0000 (11:13 +0100)]
Revert "Bug 21987: (RM follow-up) Add text for simple tests"

This reverts commit 1464328718619a673f233406fdb238f0391b0785.

4 years agoBug 23467: Exit after output_html - opac-reserve.pl
Jonathan Druart [Wed, 6 Nov 2019 09:59:26 +0000 (10:59 +0100)]
Bug 23467: Exit after output_html - opac-reserve.pl

To avoid double screen

There are several ways to recreate the issue, the easiest is:
  /cgi-bin/koha/opac-reserve.pl?biblionumber=

You should see "ERROR: No record id specified."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a4f2ad76f98e023489dec44f481f290302f44c78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23774: Server-side confirmation for hold pickup location in OPAC
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>
4 years agoBug 17359: Use a unicode character in tests
Jonathan Druart [Tue, 5 Nov 2019 09:25:50 +0000 (10:25 +0100)]
Bug 17359: Use a unicode character in tests

And remove an unused variable.

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 b920cb708b8acacbf2075b00c0c68e70b6d5a29b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 17359: Correct encoding when displaying patron import summary
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>
4 years agoBug 17359: Add tests
Jonathan Druart [Wed, 16 Oct 2019 08:22:38 +0000 (10:22 +0200)]
Bug 17359: Add tests

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 c58fc50128eff5d23ac7e9c71b6f78da3bba3c71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23234: Mock DateTime->now using the time zone
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>
4 years agoBug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
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>
4 years agoBug 23181: Extend unit tests
Katrin Fischer [Sat, 2 Nov 2019 01:05:06 +0000 (01:05 +0000)]
Bug 23181: Extend unit tests

Run t/db_dependent/Accounts.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 88db3b587e319f97f47e6699c1af1ac2acd0ae6d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propa...
Jonathan Druart [Wed, 13 Nov 2019 11:35:45 +0000 (12:35 +0100)]
Bug 24026: (bug 22847 follow-up) Display correctly max[onsite]issueqty (not the propagated ones)

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>
4 years agoBug 24026: (bug 22847 follow-up) Remove c/p issues
Jonathan Druart [Wed, 13 Nov 2019 11:35:39 +0000 (12:35 +0100)]
Bug 24026: (bug 22847 follow-up) Remove c/p issues

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>
4 years agoBug 23713: (follow-up) Add missing semicolon
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>
4 years agoBug 23713: Subscription add form broken for translations
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:

> cd misc/translator
> perl translate update de-DE
> perl translate install de-DE

 - 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>
4 years agoBug 23398: Disable the XML import/export format for biblio framework
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>
4 years agoBug 23813: (bug 18925 follow-up) Remove invalid circ rules to avoid FK constraints...
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.

Test plan:
git reset --hard 1e4f442442844cfaf17f5b06f122f6259d5fee92 # before 18.12.00.020
reset_all

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>
4 years agoBug 22280: Add a unit test
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>
4 years agoBug 22280: (RM follow-up) Correction to POD
Martin Renvoize [Mon, 23 Sep 2019 15:49:35 +0000 (16:49 +0100)]
Bug 22280: (RM follow-up) Correction to POD

Minor correction to mislabled POD section for private method.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ceeebd5244d8e05342a905e52c43747b1778c68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22280: Fix typo in _status_graph_union
Tomas Cohen Arazi [Wed, 3 Jul 2019 18:34:48 +0000 (15:34 -0300)]
Bug 22280: Fix typo in _status_graph_union

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>
4 years agoRevert "Bug 23484: Update pendingreserves.pl to use circulation_rules"
Fridolin Somers [Fri, 15 Nov 2019 07:34:29 +0000 (08:34 +0100)]
Revert "Bug 23484: Update pendingreserves.pl to use circulation_rules"

This reverts commit 39762da92f45856fa4e46764494b64b045e30010.