]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 20754: DB revision to remove double accepted shares
Marcel de Rooy [Fri, 4 May 2018 08:42:38 +0000 (10:42 +0200)]
Bug 20754: DB revision to remove double accepted shares

[Originally submitted for bug 11943, parked at 20754.]
[Attempt to revive it now.]

Although it is no problem to have them, we could do a cleanup.
This patch just removes duplicate rows from the table.

Note: I considered adding a unique index like:
    ALTER TABLE virtualshelfshares ADD UNIQUE INDEX (shelfnumber, borrowernumber, invitekey);
But the possible NULL values in borrowernumber and/or invitekey require
additional code changes. So I left it alone.

Test plan:
[1] Create two records with same borrowernumber and shelfnumber in the shares
    table, if not present already.
[2] Run updatedatabase.pl

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24604: Add 'Pay' button under Transactions tab in patron accounting
Julian Maurice [Thu, 6 Feb 2020 15:15:43 +0000 (16:15 +0100)]
Bug 24604: Add 'Pay' button under Transactions tab in patron accounting

It does the same thing as the 'Pay' button under 'Make a payment' tab.
It is nothing more than a shortcut.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 18227: (QA follow-up) Add fix to koha-common.postinst
Tomas Cohen Arazi [Wed, 1 Apr 2020 03:11:19 +0000 (00:11 -0300)]
Bug 18227: (QA follow-up) Add fix to koha-common.postinst

Now koha-common.postinst has a way to patch log4perl configs on
instances, we should patch the Z3950 responder config accordingly,
before it is backported to 19.11 or the 20.05 release :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 18227: Handle utf8 in Koha::Logger
Olli-Antti Kivilahti [Wed, 8 Mar 2017 10:51:43 +0000 (12:51 +0200)]
Bug 18227: Handle utf8 in Koha::Logger

No more wide characters in print when logging to a file with Koha::Logger.

Test with this string

"♯Turpo :"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25010: DBRev 19.11.05.001
Joy Nelson [Wed, 29 Apr 2020 19:55:46 +0000 (19:55 +0000)]
Bug 25010: DBRev 19.11.05.001

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25010: Fix typo 'rewewal' in debit types
Katrin Fischer [Thu, 26 Mar 2020 21:30:06 +0000 (21:30 +0000)]
Bug 25010: Fix typo 'rewewal' in debit types

This fixes a typo in the debit type description of
RENT_DAILY_RENEW

1) Go to Administration > Debit types
2) Show all debit types
3) Check for the typo
4) Apply patch
5) Verify that the typo is gone
6) Check account_debit_types table for type:
   SELECT * FROM account_debit_types;
7) Run database update
8) Repeat and verify typo is gone

Signed-off-by: Owen Leonard <oleonard@myacpl.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>
4 years agoBug 25024: Do not escape $
Jonathan Druart [Wed, 1 Apr 2020 08:58:28 +0000 (10:58 +0200)]
Bug 25024: Do not escape $

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>
4 years agoBug 25024: Make grep match full string
Nick Clemens [Tue, 31 Mar 2020 13:55:21 +0000 (13:55 +0000)]
Bug 25024: Make grep match full string

To test:
1 - Create or have a branch with code CPL
2 - Create two new branches 'ACPL' and 'CPLA'
3 - In branch transfer limits disallow some itype or collection from another branch (FPL) to ACPL and CPLA
4 - Set UseBranchTransferLimits to 'Enforce'
5 - Find a biblio with one item belonging to FPL
6 - On opac, attempt to place a hold
7 - Note that ACPL and CPLA don't show in dropdown, OK
8 - Note that CPL is disabled, NOT OK
9 - Apply patch
10 - Place hold
11 - CPL is now enabled

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>
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>
4 years agoBug 23601: Prevent default for auxclick
Nick Clemens [Mon, 30 Mar 2020 15:16:36 +0000 (15:16 +0000)]
Bug 23601: Prevent default for auxclick

The issue appears to be that the default action is not prevented for middle click because it registers
an 'auxclick' event as opposed to a 'click' event

To test:
1 - Perform a search in staff client
2 - Shift-click and hold on a result
3 - Note a new tab opens
4 - Release the click, no change
5 - Middle click and hold on a result
6 - New tab opens
7 - Release, a second new tab opens
8 - Apply patch
9 - Reload page
10 - Middle click and hold
11 - New tab opens
12 - Release
13 - No new tab

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Do not fetch all patrons for owner/users of funds
Jonathan Druart [Mon, 6 Apr 2020 09:44:18 +0000 (11:44 +0200)]
Bug 24964: [19.11.x] Do not fetch all patrons for owner/users of funds

admin/add_user_search.pl sets 'patrons_with_acq_perm_only', to only
retrieve patrons with acq (order_manage) permissions.

The original bug was hidden in the existing code, but the behavior was
terrible.
To prevent patrons matching the permissions contrainst to be hidden, we
fetched ALL the patrons from the DB, then filtered them depending on
their permissions. This might have awful performance on DB with lot of
patrons.

So basically with this patch we are adding the pagination back to the
"owner/users for funds" feature, as the permission filtering is now done
at DB level.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Fix perl critic warning
Kyle M Hall [Thu, 26 Mar 2020 12:53:59 +0000 (08:53 -0400)]
Bug 24964: [19.11.x] Fix perl critic warning

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Prevent random failures sorting by borrowernumber
Jonathan Druart [Wed, 25 Mar 2020 12:50:45 +0000 (13:50 +0100)]
Bug 24964: [19.11.x] Prevent random failures sorting by borrowernumber

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Do not filter patrons after they have been fetched
Jonathan Druart [Wed, 25 Mar 2020 10:21:15 +0000 (11:21 +0100)]
Bug 24964: [19.11.x] Do not filter patrons after they have been fetched

The svc/members/search script is called in different places.
In some places (Set owner for a fund, add users to a fund, or set a
manager to a suggestion), we need patrons to be filtered depending on
the permissions they have.
For instance you can only set a fund's owner with a patron that has
acquisition.order_manage.

Currently we have fetching X (default 20) patrons, then filter them
depending on their permission.
Says you have 3 patrons that have the correct permissions but are not in
the 20 first patrons, if you do not define a search term, the search
result will be empty.

This is not ideal and we should filter when requesting the DB.

Test plan:
- Have more than 20 patrons, remove them their permissions
- Create 3 more:
1 superlibrarian
1 with the full acq permission
1 with acquisition.order_manage
- Create a fund and set a owner
- Search for patrons, without specifying a search term (to get them all)
=> Without this patch the new patrons you created are not displayed
=> With this patch they are!

Same test plan apply to set a manager to a suggestion (freshly pushed,
see bug 23590), with suggestions and suggestions.suggestions_manage

Note: The code has been written that way to rely on
C4::Auth::haspermission, but the SQL query is quite trivial and the gain
is important.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24964: [19.11.x] Add tests
Jonathan Druart [Wed, 25 Mar 2020 10:20:20 +0000 (11:20 +0100)]
Bug 24964: [19.11.x] Add tests

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24183: Add before_send_messages hook
Martin Renvoize [Thu, 5 Dec 2019 17:42:50 +0000 (17:42 +0000)]
Bug 24183: Add before_send_messages hook

This patch adds a simple hook to the process_message_queue cronjob
to allow plugins to pre-process messages in the messaging queue before
they are sent.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 19014: [19.11.x] Prevent auto_renew notices form sending if too early to renew
Nick Clemens [Mon, 30 Dec 2019 19:27:26 +0000 (19:27 +0000)]
Bug 19014: [19.11.x] Prevent auto_renew notices form sending if too early to renew

Bug 19014: Unit tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 19014: Return auto_too_soon before on_reserve

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 19014: on_reserve blocks auto_renew

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25022: Display problem in authority editor with repeatable field
Owen Leonard [Tue, 31 Mar 2020 14:20:23 +0000 (14:20 +0000)]
Bug 25022: Display problem in authority editor with repeatable field

This patch corrects an error in the structure of the authority editor
template so that repeating subfields do not generate invalid markup. The
correction was found by comparing with addbiblio.tt.

If you are viewing the diff, please note that some minor whitespace
changes have been made.

To reproduce, clone and and populate any repeatable subfield, save, and
open the authority for editing again. The clones subfield will be
formatting incorrectly, showing bullet points on each line.

To test, apply the patch and reload the authority editor showing the
record with the cloned subfield. It should display correctly.

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>
4 years agoBug 17938: Fix display of label for repeated MARC 583 - Action note fields
Katrin Fischer [Thu, 26 Mar 2020 22:30:52 +0000 (22:30 +0000)]
Bug 17938: Fix display of label for repeated MARC 583 - Action note fields

When there are mulitple 583 on a record, the label "Action note" will be
repeated for each. This fixes it, so that the label only appears once and
multiple fields are separated by | following the existing pattern.

Also makes sure there is a space between $z and other subfields.

Note:
Ind. 1 = private - These won't display in the OPAC
Ind. 1 = 0 or empty - These will display in the OPAC
Staff will display all 583 independent from indicator.

To test:
- Add one or more records with none, one and muliple 583, at least one including $z
  For examples see:
  http://www.loc.gov/marc/bibliographic/bd583.html
- Verify display problems
- Apply patch
- Verify display is improved - one label and $z is followed by a space

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24941: Serials - Fix link to basket from acquisition details information
Katrin Fischer [Sat, 28 Mar 2020 00:22:35 +0000 (01:22 +0100)]
Bug 24941: Serials - Fix link to basket from acquisition details information

Adding orders from subscriptions makes acquisition information visible
in the serials module. In the table of acquisition data is a link back
to the basket - but this link is missing the basket number parameter -
it doesn't work. This patch fixes the TT variable to make it work.

To test:
- Add a subscription
- Add a new basket
- Add a order line using "Add from subscription"
- Go to the subscription details page, check the acquisitions tab
- Try the link to the basket - it should not work
- Apply patch
- Try the link again - now it should bring up the basket page with
  the order.

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25012: Fix class on OPAC view link in staff detail page
Katrin Fischer [Fri, 27 Mar 2020 23:46:55 +0000 (00:46 +0100)]
Bug 25012: Fix class on OPAC view link in staff detail page

Probably a copy & paste error: the OPAC view link on the staff
detail page currently has the class succeeding_entry_note.

This patch changes it to opac_view to allow for independent
styling of the link.

Note: The link will only be visible when OPACBaseURL is set.

To test:
- Use the element inspector or check the source code for
  the class used on the OPAC view link on the staff detail page
- Apply patch
- Repeat and verify that the class has changed to opac_view

Signed-off-by: David Roberts <david@koha-ptfs.co.uk>
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>
4 years agoBug 25013: Fix capitalization: Edit Items on batch item edit
Katrin Fischer [Fri, 27 Mar 2020 23:54:21 +0000 (00:54 +0100)]
Bug 25013: Fix capitalization: Edit Items on batch item edit

Fixes a tiny string issue: Edit Items --> Edit items

To test:
- Go to tools / batch item edit
- Enter a barcode
- Check the heading above the edit item form
- Apply patch
- Verify the heading is now properly capitalized

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25014: Fix capitalization for "Call Number" in staff and OPAC sort options
Katrin Fischer [Sat, 28 Mar 2020 00:05:14 +0000 (01:05 +0100)]
Bug 25014: Fix capitalization for "Call Number" in staff and OPAC sort options

There are some ocurrences of "Call Number" in the sort option lists in
staff and OPAC. The patch changes them to "Call number".

To test:
- Check the sort option list in staff and OPAC for the typo
- Apply patch
- Verify it's now all corrected

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25006: Make Koha::Item->as_marc_field skip undefined subfields
Tomas Cohen Arazi [Fri, 27 Mar 2020 19:38:15 +0000 (16:38 -0300)]
Bug 25006: Make Koha::Item->as_marc_field skip undefined subfields

This patch makes as_marc_field skip subfields that don't have a value or
contains an empty string (replicating C4::Items:1021 logic).

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail because the generated MARC::Field contains undef
subfields.
3. Apply this patch
4. Repeat 2.
=> SUCCESS: Tests pass! Undefined and empty subfields are skipped!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25006: Regression tests
Tomas Cohen Arazi [Fri, 27 Mar 2020 19:36:25 +0000 (16:36 -0300)]
Bug 25006: Regression tests

This patch introduces regression tests for as_marc_field. It makes sure
there are empty subfields and then uses List::MoreUtils' all to verify
all generated MARC subfields contain something (i.e. the undef ones are
skipped).

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 19475: Clear the caches at the end of the tests
Jonathan Druart [Mon, 30 Mar 2020 09:35:35 +0000 (11:35 +0200)]
Bug 19475: Clear the caches at the end of the tests

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>
4 years agoBug 19475: Don't copy holiday if it already exists in target calendar
Emmi Takkinen [Wed, 4 Mar 2020 11:54:34 +0000 (13:54 +0200)]
Bug 19475: Don't copy holiday if it already exists in target calendar

Calendars copy tool created duplicate values to database.
Holidays in target calendar weren't checked before
inserting new holidays. This patch fixes this.

To test:
1. Add holidays for branch A
2. Copy branch A calendar to branch B
3. Repeat copy to branch B
=> Check database, branch B has now duplicate holidays
4. Delete holidays from branches A and B
5. Apply patch
6. Repeat steps 1-3
=> Check database, no duplicates

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
4 years agoBug 19475: Add unit tests
Emmi Takkinen [Thu, 12 Mar 2020 10:35:39 +0000 (12:35 +0200)]
Bug 19475: Add unit tests

To test prove:
t/db_dependent/Holidays.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
4 years agoBug 9422: (RM follow-up) Rebase Correction
Martin Renvoize [Fri, 3 Apr 2020 13:10:07 +0000 (14:10 +0100)]
Bug 9422: (RM follow-up) Rebase Correction

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 9422: Don't allow access to 'Upload patron images' when patronimages syspref...
Katrin Fischer [Sun, 10 Feb 2019 11:09:08 +0000 (12:09 +0100)]
Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off

In addition to checking the patron image upload permission, this
adds a check for the patronimages system preference to the tools
home page and sidebar.

To test:
- Check that the patron image upload tool only displays when
  - system preference patronimages is set to 'Allow'
    and user is either
  - superlibrarian or
  - has bath_upload_patron_images permission
- Save URL of patron image uploader page
- Turn off patronimages
- Verify you get redirected to the home page of Koha when trying
  to access the page

Note: this redirect is already used by the stock rotation feature.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoUpdate release notes for 19.11.05 release v19.11.05
Joy Nelson [Wed, 22 Apr 2020 17:13:19 +0000 (17:13 +0000)]
Update release notes for 19.11.05 release

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoIncrement version for 19.11.05 release
Joy Nelson [Wed, 22 Apr 2020 16:52:21 +0000 (16:52 +0000)]
Increment version for 19.11.05 release

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7611: Compiled CSS
Joy Nelson [Tue, 21 Apr 2020 19:57:26 +0000 (19:57 +0000)]
Bug 7611: Compiled CSS

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7611: Adjust tests
Jonathan Druart [Tue, 18 Feb 2020 09:37:58 +0000 (10:37 +0100)]
Bug 7611: Adjust tests

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7611: (follow-up) separate positive and negative statuses as in the past
Nick Clemens [Fri, 8 Nov 2019 15:49:08 +0000 (15:49 +0000)]
Bug 7611: (follow-up) separate positive and negative statuses as in the past

This patch preserves someting closer to previous functionality.

Negative not for loan are in the 'unavailable' section in red, positive ones are in the 'reference' section in green. Itemtype level will also be in green in reference

Item specific status will override an itemtype level.

The line break between 'reference' and 'unavailable' existed before and is preserved - negative not for loan and checked out items appear here

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7611: (follow-up) Fix display of undefined statuses and add a class
Nick Clemens [Tue, 5 Nov 2019 16:32:45 +0000 (16:32 +0000)]
Bug 7611: (follow-up) Fix display of undefined statuses and add a class

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7611: (follow-up) Add missing space
Nick [Tue, 15 Oct 2019 13:30:02 +0000 (13:30 +0000)]
Bug 7611: (follow-up) Add missing space

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7611: Change negative notforloan as well
Nick [Thu, 29 Aug 2019 12:06:24 +0000 (12:06 +0000)]
Bug 7611: Change negative notforloan as well

This makes the changes apply to both positive and negative notforloan values

The extra line generated before is removed

Some spans are added and cleaned up and labels moved to CSS to allow for easier altering where needed

Itemtypes marked notforloan remain as reference, the label can be changed via css

To test:
 1 - Have a record with items in various statuses, ideally
   - 3 available, with 2 in one branch, 1 in another
   - 3 with itemtype not for loan, 2 in one branch, 1 in another
   - 3 in a positive not for loan status, 2 and 1 as above
   - 3 in a negative not for loan status, 2 and 1 as above
   - 1 in a different positive loan status, but with the same opac description as the negative above
 2 - Search the opac to include this record, take a screenshot
 3 - Apply patch
 4 - Restart all and refresh
 5 - Compare to screen shot
 6 - Differences include:
   - Positive statuses are now on separate line with opac description showing
   - Unavailable (not for loan items) now include callnumber and branch in display
   - Positive and negative notforloan with same description are combined where branches match
   - Inspect the elements, note new spans around 'Items available for
loan/reference'
 7 - Add to OPACUserCSS:
  .ItemSummary .ItemBranch{
    display:none;
  }
  .unavailable .ItemSummary .CallNumber,.unavailable .ItemSummary .LabelCallNumber{
    display:none;
  }
 8 - Note the branches are hidden, and callnumbe rhidden for unavailable
items

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search...
Mehdi Hamidi [Fri, 3 Mar 2017 19:33:29 +0000 (14:33 -0500)]
Bug 7611: Show the NOT_LOAN authorised values for item status in XSLT OPAC search results

Added : Call number for all not for loan status

XSLT Results template improvement : Use the NOT_LOAN authorised values

Improvement : Use the NOT_LOAN authorised values when showing items status in the OPAC search results.
Before this patch, these items were only considered as "unavailable".

Note : This patch only affects the OPAC XSLT search results template for MARC21 records. This patch was not tested on UNIMARC or NORMARC records. I won't be able to support these formats, so I'm hoping someone could do the same for these other record formats.

Patch sponsored by the CCSR ( http://www.ccsr.qc.ca )

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25142: Fix wrong grep logical test
Jonathan Druart [Tue, 14 Apr 2020 11:22:44 +0000 (13:22 +0200)]
Bug 25142: Fix wrong grep logical test

To test and understand what's going on, you can try that bit of code:
my @a = qw( a b c a);
my @b = qw( b c d );
my @c;
@c = grep { 'a' eq $_ } @a ? 'ok' : ();
say @c;
@c = ( grep { 'a' eq $_ } @a ) ? 'ok' : ();
say @c;
@c = grep { 'a' eq $_ } @a ? ('ok') : (undef);
say @c;

The problem here:
Have patrons in 3 branches CPL, MPL, SPL
Have a non superlibrarian with edit_borrowers permission but
without view_borrower_infos_from_any_libraries, from CPL
Create a library group with CPL, MPL
Use that non superlibrarian to search for patrons
You can search for patrons fro CPL and MPL
BUT, edit the value for CPL, use SPL (edit the DOM)
Search and... oops

Apply this patch, try again

Also use a superlibrarian patron (and/or with view_borrower_infos_from_any_libraries)
and confirm that they can see all patrons

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with edit_borrowers permission but NOT view_borrower_infos_from_any_libraries
Editing the DOM I can search (not edit) from any branch
With patch no entries found :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Amended test plan slightly (+ without)

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 16922: Add RewriteRule to apache-shared-intranet for dev package installs
Marcel de Rooy [Thu, 14 Jul 2016 11:51:21 +0000 (13:51 +0200)]
Bug 16922: Add RewriteRule to apache-shared-intranet for dev package installs

As a simple alternative to the solution in bug 9949 or just as an
additional measure, this patch adds a rewrite rule for intranet
in order to intercept potential misuse of perl scripts that could be
reached on a dev package install via the cgi-bin/koha scriptalias.

It simply rewrites them to the nonexistent "notfound", resulting in a
regular 404 error.

The rewrite rule does not harm regular installs and is just a little extra
step in securing a dev install. You should have more security measures in
place to secure your staff client.

QA Note: Although a rewrite rule may not be our first choice, this one
rule is more elegant and easier to maintain than e.g. a whole bunch of
aliases.

Note: This patch should have a regular and a dev install signoff.

Test plan:
[1] Make sure that this rewrite rule is inserted in your actual apache
    config via /etc/koha/apache-shared-intranet.conf. Restart Apache.
[2] For regular package installs:
    Try one of the URLs in step 3.
    Verify that your staff client still operates as usual. Test a few
    URLs inside some modules.
[3] For dev installs:
    Try some URLs like below.
    Expect 404 errors only, not 500s. If you do not see a 404, go back!
    /misc/stage_file.pl
    /t/db_dependent/default_search_class.pl
    /installer/data/mysql/updatedatabase.pl
    /Makefile.PL
[4] Do you see an additional directory to add to the regex? Please report.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25009: Avoid leakages in opac-showmarc.pl
Tomas Cohen Arazi [Fri, 27 Mar 2020 21:16:58 +0000 (18:16 -0300)]
Bug 25009: Avoid leakages in opac-showmarc.pl

This patch cleans opac-showmarc.pl so it doesn't allow retrieving
records from import batches without requiring any permissions in the
OPAC.

it does so by just removing the code portion that does that.

It also cleans the record fetch operation and how the record processor
is initialized to it actually works :-D

To test:
1. Perform a successful Z39.50 search in cataloguing (this fetches 20
   records usually)
2. Query your DB for a valid import_record_id:
  $ koha-mysql kohadev
  > SELECT * FROM import_records LIMIT 1;
3. Notice some of the MARCXML details (title, author, etc), and the
   import_record_id
4. Point your browser to the opac-showmarc.pl URL like this:
   http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-showmarc.pl?importid=20
=> FAIL: You get the record! (Bonus: no field/subfield takes place)
5. Hide some obvious subfield on the framework for a known (to you)
   biblionumber
6. Point your browser to:
   http://kohadev.mydnsname.org:8080/cgi-bin/koha/opac-showmarc.pl?id=<biblionumber_here>
=> FAIL: No filtering takes place
7. Apply this patch
8. Repeat 4
=> SUCCESS: You get an error because you did a bad request (no id param)
9. Repeat 6
=> SUCCESS: Subfield filtering actually works!
10. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24487: Add 2 more tests
Jonathan Druart [Thu, 23 Jan 2020 09:47:17 +0000 (10:47 +0100)]
Bug 24487: Add 2 more tests

And make sure tests pass if there is no patron with borrowernumber=10 in
DB.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Ammended test description
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24487: Don't apply matching criteria to path parameters
Agustin Moyano [Thu, 23 Jan 2020 04:50:29 +0000 (01:50 -0300)]
Bug 24487: Don't apply matching criteria to path parameters

This patch separates query parameters from path parameters, and uses exact matching for the later.

To test:
1. Apply this patch
2. prove t/Koha/REST/Plugin/Query.t t/db_dependent/Koha/REST/Plugin/Objects.t
SUCCESS => tests ok
3. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24487: Regresion test
Agustin Moyano [Wed, 22 Jan 2020 23:44:04 +0000 (20:44 -0300)]
Bug 24487: Regresion test

This patch introduces a regresion test where a path parameter is combined with 'contains' match criteria

To test:
1. apply this patch
2. prove t/db_dependent/Koha/REST/Plugin/Objects.t

Test should fail at this point.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24705: Fix tests for 19.11.x
Jonathan Druart [Tue, 7 Apr 2020 13:38:37 +0000 (15:38 +0200)]
Bug 24705: Fix tests for 19.11.x

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24553: Fix tests for 19.11.x
Jonathan Druart [Tue, 7 Apr 2020 13:30:06 +0000 (15:30 +0200)]
Bug 24553: Fix tests for 19.11.x

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24901: Fix tests for 19.11.x
Jonathan Druart [Tue, 7 Apr 2020 13:37:13 +0000 (15:37 +0200)]
Bug 24901: Fix tests for 19.11.x

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24901: Add tests for transferbook
Martin Renvoize [Thu, 19 Mar 2020 08:10:00 +0000 (08:10 +0000)]
Bug 24901: Add tests for transferbook

Test plan:
0/ Read the commit and confirm the new tests make sence
1/ Run the tests and verify they pass
2/ Signoff

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24901: Minor refactor of tests
Martin Renvoize [Wed, 18 Mar 2020 19:25:57 +0000 (19:25 +0000)]
Bug 24901: Minor refactor of tests

Test plan:
0/ Read the change and verify it makes sense

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24627: Compiled CSS
Joy Nelson [Wed, 15 Apr 2020 16:38:47 +0000 (16:38 +0000)]
Bug 24627: Compiled CSS

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 22771: (QA follow-up) Fix POD
Nick Clemens [Tue, 24 Mar 2020 12:15:26 +0000 (12:15 +0000)]
Bug 22771: (QA follow-up) Fix POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 22771: Fix mistakes in list of nonfiling character fields
David Gustafsson [Fri, 6 Mar 2020 13:07:53 +0000 (14:07 +0100)]
Bug 22771: Fix mistakes in list of nonfiling character fields

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 22771: Respect nonfiling indicators for search fields
David Gustafsson [Wed, 26 Feb 2020 15:14:36 +0000 (16:14 +0100)]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25000: SQL report not updated
Nazlı Çetin [Fri, 27 Mar 2020 12:25:46 +0000 (12:25 +0000)]
Bug 25000: SQL report not updated

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24386: Prevent double form submission on adding orders to basket from a file
Nick Clemens [Thu, 9 Jan 2020 15:53:45 +0000 (15:53 +0000)]
Bug 24386: Prevent double form submission on adding orders to basket from a file

To test:
 1 - Have a marc record file
 2 - Go to Acquisitions, find a vendor, then an open basket
 3 - Add to basket from a new file (if you already have one staged you can choose that instead)
 4 - Import the file, then add to basket
 5 - On the page where you select the records and set info select a record, set matching to 'Do not check' fill in the fund for the order
 6 - When ready, click save as many times as you can
 7 - When you go to the basket there are many copies of the order added
 8 - Don't despair, apply the patch
 9 - Repeat above
10 - When ready to add orders, click furiously
11 - The order is only added once!
12 - Success!

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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>
4 years agoBug 24765: Updated on date in Claims returned starts off as 12/31/1969
Kyle M Hall [Mon, 2 Mar 2020 14:36:47 +0000 (09:36 -0500)]
Bug 24765: Updated on date in Claims returned starts off as 12/31/1969

When an item is claimed returned by staff, there is a column called Updated On - this date field column should remain blank until this claimed returned has been updated.  Currently, when an item has been claimed returned, the date in the updated column states 12/31/1969. This date only shows up in the display, it is doesn't show up in the database like this.

Test Plan:
1) Enable return claims
2) Make a claim
3) Note the 'updated on' column has the date 1969-12-31
4) Apply this patch
5) Reload the page ( you may need to clear your browser cache )
6) Note the field is now blank

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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>
4 years agoBug 24905: Make installer update log4perl.conf for instances
Tomas Cohen Arazi [Thu, 19 Mar 2020 13:51:40 +0000 (10:51 -0300)]
Bug 24905: Make installer update log4perl.conf for instances

This patch makes koha-common.postinst check if the log4perl.conf files
on the instances need tweaking. If they do, it appends the relevant
configuration text.

To test:
1. Install Koha 19.11 or earlier using the packages
2. Create an instance:
   $ koha-create --create-db test1
   $ koha-create --create-db test2
=> FAIL: /etc/koha/sites/test1/log4perl.conf doesn't include an entry for
z39.50
3. Apply this patch and run:
   $ docker run \
      --volume=/path/to/your/clone:/koha \
      --volume=/dest/path/for/debs:/debs \
      --privileged
      --env VERSION=19.12.00.047 \
      koha/koha-dpkg:master
Note: Paths need to be adjusted
4. Grab the .deb files and put them on the machine you're testing this
5. Edit /etc/koha/sites/test2/log4perl.conf and add the following text
   at the bottom: log4perl.logger.z3950
6. Install the debs:
   $ sudo dpkg -i koha-perldeps koha-deps koha-common
=> SUCCESS: Install process doesn't explode due to the addition
=> SUCCESS: /etc/koha/sites/test1/log4perl.conf has a new entry for log4perl.logger.z3950
=> SUCCESS: /etc/koha/sites/test2/log4perl.conf doesn't have a new entry for log4perl.logger.z3950
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24905: Add missing entry in log4perl-site.conf.in
Tomas Cohen Arazi [Thu, 19 Mar 2020 12:47:25 +0000 (09:47 -0300)]
Bug 24905: Add missing entry in log4perl-site.conf.in

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24614: Fix Reports/Guided.t
Jonathan Druart [Fri, 27 Mar 2020 16:09:27 +0000 (17:09 +0100)]
Bug 24614: Fix Reports/Guided.t

DBD::mysql::st execute failed: Column 'public' cannot be null [for Statement "UPDATE `saved_sql` SET `last_modified` = ?, `notes` = ?, `public` = ?, `report_group` = ?, `report_name` = ?, `report_subgroup` = ?,
`savedsql` = ? WHERE ( `id` = ? )" with ParamValues: 0='2020-03-27T16:03:04', 1=undef, 2=undef, 3=undef, 4='Just another report', 5=undef, 6=undef, 7=25] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
    # Looks like you planned 17 tests but ran 6.

update_sql expect all the paramters to be set, otherwise it will be
nulled.

The best way to fix it is at test level. There is only 1 occurrence in
controller/module, and it sends all the parameters. That is the correct
way to do and will make things easier when we will removed them to use
Koha::Reports directly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24614: Use Koha::Reports from save_report and update_sql
Jonathan Druart [Tue, 11 Feb 2020 16:21:38 +0000 (17:21 +0100)]
Bug 24614: Use Koha::Reports from save_report and update_sql

In order to get the default value defined at DBMS level, we use
Koha::Reports (to inherit from Koha::Object->store) from the 2 add/edit
methods of C4::Reports::Guided.
A second step would be to remove completely those CRUD subroutines and
use directly Koha::Reports instead.

Test plan:
1. Add and edit some reports
2. Disable memcached, create a report, edit it
=> Should not crash
3. Make sure the tests make sense and that they pass after the second
patch.

The error was:
DBD::mysql::db do failed: Column 'cache_expiry' cannot be null [for
Statement "UPDATE saved_sql SET savedsql = ?, last_modified = now(),
report_name = ?, report_group = ?, report_subgroup = ?, notes = ?,
cache_expiry = ?, public = ? WHERE id = ? "] at
/kohadevbox/koha/C4/Reports/Guided.pm line 633.

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: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24614: Add tests
Jonathan Druart [Tue, 11 Feb 2020 16:21:15 +0000 (17:21 +0100)]
Bug 24614: Add tests

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: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24829: ClaimReturnedWarningThreshold is always triggered if patron has one or...
Kyle M Hall [Mon, 9 Mar 2020 13:33:54 +0000 (09:33 -0400)]
Bug 24829: ClaimReturnedWarningThreshold is always triggered if patron has one or more claims

ClaimReturnedWarningThreshold is supposed to display a warning if a patron has more than the number of claims specified in the system preference. Currently the warning is displayed for any number of claims over zero.

Test Plan:
1) Make 3 return claims for a patron
2) Set ClaimReturnedWarningThreshold to 4
3) Note the claims warning displays for the patron on circulation.pl
4) Apply this patch
5) Reload circulation.pl, the warning should go away
6) Set ClaimReturnedWarningThreshold to 2
7) Reload the page, the warning should reappear

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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>
4 years agoBug 24875: Remove extra punctuation from tools start page
Katrin Fischer [Fri, 13 Mar 2020 20:30:06 +0000 (20:30 +0000)]
Bug 24875: Remove extra punctuation from tools start page

The patron clubs note was ending with .., but patch also removed
some single . to be consistent with the majority of entries on the
tools page.

To test:
- Check the tools start page for ending . in the notes
- Apply patch
- Verify the punctuation is now consistent

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
4 years agoBug 24877: Add link from vendor to linked subscriptions
Katrin Fischer [Fri, 13 Mar 2020 20:52:24 +0000 (20:52 +0000)]
Bug 24877: Add link from vendor to linked subscriptions

Koha shows the number of subscriptions linked to a vendor,
but there is no way to look them up. This adds a link to the
subscription search with the vendor name, so there is an easy way
to find the subscriptions.

To test:
- Be superlibrarian or have serials permission
- Make sure you have one or more subscriptions linked to vendors
- Go to the vendor's detail page in acquisitions
- Verify the number of subscriptions is now a link
- Verify the search results are correct when clicking on it
- Remove permissions (no serials, not superlibrarian)
- Verify now the number shows, but is not linked

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
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>
4 years agoBug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC...
Katrin Fischer [Thu, 15 Aug 2019 10:59:46 +0000 (10:59 +0000)]
Bug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC user account

This patch makes 2 changes:
- bug 22702 allowed adding HTML to the circulation note, so this patch
  restores that ability.
- display OPAC note and messages as multi-line in OPAC

To test:
- Add a circulation and an OPAC note with line breaks and HTML tags
  to the patron account
- Add a message with line breaks to the patron account
- Check line breaks don't show on
  - OPAC > patron account > my summary page
  - Staff > patron account > details
- Apply patches
- Repeat test

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
4 years agoBug 23409: show borrowernotes and opacnote's lines feeds
Alex Arnaud [Thu, 1 Aug 2019 12:48:31 +0000 (14:48 +0200)]
Bug 23409: show borrowernotes and opacnote's lines feeds

Test plan:
  - Fill borrowernotes and opacnote with lines separated by lines
    endings,
  - save and check the content is displayed on a single line,
  - apply this patch,
  - check lines endings are displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
4 years agoBug 24872: Set languages prefererences after install
Bernardo Gonzalez Kriegel [Sun, 15 Mar 2020 14:39:42 +0000 (11:39 -0300)]
Bug 24872: Set languages prefererences after install

This patch set 'languages' and 'opaclanguages' system
preferences with the language used during install.

To test:
1. Apply the patch
2. Do a clean install in a language other than english
3. Verify that 'languages' and 'opaclanguages' system
preferences show the language code used during install,
besides english.

Signed-off-by: Owen Leonard <oleonard@myacpl.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>
4 years agoBug 24874: Printing is broken on opac-results.pl page (19.11.x)
Mason James [Thu, 19 Mar 2020 07:41:00 +0000 (20:41 +1300)]
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)

to test in 19.11.x...

- search for something in opac
- print page using file -> print
- observe printing is broken (pic1)

- apply patch

- search for something in opac
- print page using file -> print
- observe printing is fixed (pic2)

it seems this issue was introduced by bug 5287

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24876: Fix capitalization on patron search for holds
Katrin Fischer [Sun, 22 Mar 2020 11:10:43 +0000 (12:10 +0100)]
Bug 24876: Fix capitalization on patron search for holds

When placing a hold in the staff interface, the heading on the
search box reads: Search Patrons or clubs
The patch changes it to be Search patrons...  instead.
Also changes club id to club ID.

To test:
- Place a hold in the staff interface
- Verify the capitalization error
- Switch tabs to Clubs, see: club id
- Apply patch
- Verify it's all good now

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 21708: Sort MARC fields in TransformHtmlToMarc
Marcel de Rooy [Tue, 10 Mar 2020 15:11:07 +0000 (15:11 +0000)]
Bug 21708: Sort MARC fields in TransformHtmlToMarc

Instead of pushing 999 in the front :)

Test plan:
Do not yet apply this patch.
Edit a record. Save. And open MARC view/view plain on opac-detail.
Verify that the biblionumber field (MARC21 999) follows leader.
Apply this patch. Restart Plack.
Edit a record. Save. And open MARC view/view plain on opac-detail.
Verify that the biblionumber field is in right position.
Run t/db_dependent/Biblio/TransformHtmlToMarc.t. Should pass now.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
4 years agoBug 21708: Add a few tests in TransformHtmlToMarc.t
Marcel de Rooy [Wed, 11 Mar 2020 13:22:31 +0000 (13:22 +0000)]
Bug 21708: Add a few tests in TransformHtmlToMarc.t

Test plan:
Run t/db_dependent/Biblio/TransformHtmlToMarc.t without the module change
patch. Verify that the test fails on the order of fields.
Go to test plan of the second patch.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
4 years agoBug 24324: Resolve error with delete_records_via_leader.pl
Liz Rea [Fri, 3 Jan 2020 21:18:27 +0000 (21:18 +0000)]
Bug 24324: Resolve error with delete_records_via_leader.pl

To test:

Have a record with the 000 position 5 set to "deleted" (record status)
Use koha-shell to run the job with the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -i -v
* items and the record should be deleted
Mark another record with the 000 position 5 set to deleted (record status)
Use koha-shell to run the job without the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -v
* if the record had items, it will not be deleted
* if the record did not have items, it will be deleted.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
4 years agoBug 24902: Join different mc- limits with AND (elasticsearch)
Julian Maurice [Thu, 19 Mar 2020 08:38:52 +0000 (09:38 +0100)]
Bug 24902: Join different mc- limits with AND (elasticsearch)

In the advanced search form, you can enable several limits using syspref
AdvancedSearchTypes (namely itemtypes, shelving locations, collections)
When used, the resulting query parts end up being joined with OR, even
if the field is different. That means that if you pick "Book" under
itemtypes tab, and "Fiction" under collection tab, it will search
"itype:BOOK OR ccode:FIC". It should be AND.

For instance, if you select:
    Itemtypes:
        âœ“ Book
        âœ“ DVD
    Location:
        âœ“ Child
        âœ“ Adult

it should search:
    itype:(Book OR DVD) AND location:(Child OR Adult)

Test plan:
0. Do not apply the patch yet
1. Enable elasticsearch
2. Set syspref AdvancedSearchTypes = 'itemtypes|loc|ccode'
3. Create a new itemtype and a new authorised value for categories LOC
   and CCODE
4. Create a biblio with the new itemtype, another biblio with the new
   location, another biblio with the new collection, and again another
   biblio with the new itemtype, location and collection
5. Verify that you can find these new biblio records using only the
   "advanced search types" in the advanced search form
6. In the advanced search form, pick all 3 limits (itemtype, location,
   collection) and verify that it returns the 4 records.
7. Apply the patch
8. Repeat step 6, it should now return only the biblio that satisfies
   all criteria
9. Verify that if you select more than one
   {itemtype|location|collection} it still returns results that
   satisfies any selected criteria
10. prove t/Koha/SearchEngine/ElasticSearch/QueryBuilder.t

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
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>
4 years agoBug 24688: Check the priority of the fulfilled hold when fixing priorities
Aleisha Amohia [Thu, 20 Feb 2020 01:36:32 +0000 (01:36 +0000)]
Bug 24688: Check the priority of the fulfilled hold when fixing priorities

Currently when fixing priorities of existing holds, priorities aren't
fixed when checking out a middle priority hold because the hold has been
fulfilled and deleted. This patch adds a check for, if the hold can't be
found, an old hold with the required reserve_id.

To test:
1. Place at least four holds on a biblio for different borrowers
2. Check out an item to the 3rd priority borrower
3. Check the existing holds table for the biblio. The priorities might be
out of order, or try clicking the dropdowns and there might be an empty
dropdown option, or open the browser developer tools and notice the option
values in the select are missing value=3.
4. Apply patch and restart memcached
5. Check out an item to the 2nd priority borrower
6. Check the existing holds table for the biblio. Confirm the priorities
have been fixed and are now consecutive with no gaps.

Sponsored-by: Chartered Accountants Australia and New Zealand
Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24892: Resolve uninitialized warns from opac-memberentry
Marcel de Rooy [Wed, 18 Mar 2020 13:54:52 +0000 (13:54 +0000)]
Bug 24892: Resolve uninitialized warns from opac-memberentry

Especially line 500 (current master).

Use of uninitialized value $new_data{"sort2"} in string eq at /usr/share/koha/opac/opac-memberentry.pl line 500.
Use of uninitialized value in string eq at /usr/share/koha/opac/opac-memberentry.pl line 500.

Simple fix, not completely trivial due to adding xor ;)

Test plan:
Do not apply, update from opac memberentry. Check warns in log.
Apply patch, update again. Less warns?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24848: Improve manual links for the label creator
Katrin Fischer [Fri, 13 Mar 2020 17:40:38 +0000 (17:40 +0000)]
Bug 24848: Improve manual links for the label creator

Some of the manual links in the label creator tool were
not working correctly or pointing to the wrong pages.

A problem is the label-manage.pl file. This can show
different data depending on an added parameter. Example:
/cgi-bin/koha/labels/label-manage.pl?label_element=template

But it appears that parameters will be ignored when creating
links to the manual. So this patch links to the beginning
of the label creator section in the manual for now.

To test:
- Go to the lable creator
- Try the various pages of the tool
  - Note: All 'New ...' links should point to the
    correct section in the manual (batches, templates, ...)
    Except: Barcode range. This feature is new and not
    yet documented in the manual. Link goes to label creator section.
  - Note: All 'Manage ...' links should point to the
    beginning of the 'label creator' section in the manual

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24553: Use 'barcode' not 'item_id' when removing hold from SIP patron
Nick Clemens [Tue, 25 Feb 2020 14:42:29 +0000 (14:42 +0000)]
Bug 24553: Use 'barcode' not 'item_id' when removing hold from SIP patron

The drop_hold routine was using the wrong parameter for item info in the patron's
array of holds. We store it as 'barcode' not 'item_id'. This is true for both waiting and unavailable
holds

To test:
1 - Apply unit tests patch
2 - prove -v t/db_dependent/SIP/ILS.t
3 - It fails
4 - Apply second patch
5 - prove -v t/db_dependent/SIP/ILS.t
6 - It passes!

You can also see bug 24175 - you cna hack sip_cli_emulator to allow cancelling a hold
and check the messages, test coverage is improved by this patch and should be sufficient
for testing

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24553: Unit tests
Nick Clemens [Tue, 25 Feb 2020 14:42:17 +0000 (14:42 +0000)]
Bug 24553: Unit tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 22025: Remove warnings when importing patrons
Jonathan Druart [Mon, 16 Mar 2020 14:43:49 +0000 (15:43 +0100)]
Bug 22025: Remove warnings when importing patrons

The following warning is raised when importing patrons
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018

if one of the following headers is passed but does not have a value:
 * privacy
 * privacy_guarantor_fines
 * privacy_guarantor_checkouts
 * anonymized

Test plan:
- Do not apply the patch
- Generated a csv file with at least one those headers
- Import it using the import_patrons.pl script (or using the GUI)
- Notice the warnings without the patch
- Apply the patch
- Confirm that the warnings do not longer appear

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 22025: Add a regression test
Jonathan Druart [Mon, 16 Mar 2020 14:43:38 +0000 (15:43 +0100)]
Bug 22025: Add a regression test

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 8595: (follow-up) Changing other occurrences of 'host item' to 'host record'
Aleisha Amohia [Tue, 25 Feb 2020 02:02:22 +0000 (02:02 +0000)]
Bug 8595: (follow-up) Changing other occurrences of 'host item' to 'host record'

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 8595: Rename 'host item' to 'host record'
Aleisha Amohia [Thu, 13 Feb 2020 21:23:58 +0000 (21:23 +0000)]
Bug 8595: Rename 'host item' to 'host record'

To test:

1) Enable the syspref EasyAnalyticalRecords
2) Find a biblio record, go to the detail page
3) Click the Edit dropdown and notice the option "Link to host item"
4) Apply patch and refresh page
5) Click the Edit dropdown and confirm the renamed "Link to host record"
button

Sponsored-by: Catalyst IT
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23411: Do not fall back to 'email' for SMS messages
Nick Clemens [Thu, 1 Aug 2019 14:57:29 +0000 (14:57 +0000)]
Bug 23411: Do not fall back to 'email' for SMS messages

To test:
 1 - Have a patron wiht an sms number, but no email
 2 - Enable sms by setting SMSDriver syspref to Email
 3 - Set Notice triggers to send an overdue via sms and email
 4 - Ensure the selected notice is defined only for 'email'
 5 - Checkout an overdue to the patron above
    You can set a specify a due date in the past
 6 - perl misc/cronjobs/overdue_notices.pl -t
 7 - Check the patron notices tab, they have a print notice and an SMS notice pending
 8 - The SMS notice used the 'email' template
 9 - Apply patch
10 - sudo koha-mysql kohadev
11 - DELETE * FROM message_queue WHERE borrowernumber={borrower as above};
12 - Run the cron again
13 - Patron should have a print notice queued, no sms
14 - Define an SMS notice
15 - delete the message queue
16 - Run again
17 - The patron should have a print and an SMS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24250: Do not duplicate debarred comment in patron screen message AF field
Jonathan Druart [Tue, 17 Dec 2019 10:31:40 +0000 (11:31 +0100)]
Bug 24250: Do not duplicate debarred comment in patron screen message AF field

Caused by
  commit bddfed75913a2302c19c00b00a6fe86538af6f9f
  Bug 19933: Remove patronflags - tricky ones

Test plan:
1 - Setup SIP in your testing environment
    https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup
2 - Set a patron to have a restriction
3 - Send a patron status request or patron information command via
    the SIP cli emulator (see link above)
4 - Note the comment on the restriction is sent only once

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: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23900: Add tests
Jonathan Druart [Wed, 26 Feb 2020 11:51:06 +0000 (12:51 +0100)]
Bug 23900: Add tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23900: Teach label maker to concat database fields
Jonathan Druart [Mon, 11 Nov 2019 16:54:56 +0000 (17:54 +0100)]
Bug 23900: Teach label maker to concat database fields

Test plan:
- define a label layout with this field list: "100a 245s","enumchron copynumber"
- find or create a record with values for all of those fields
- generate a label for that record
- the 100a and 245s successfully display on one line
- the enumchron and copynumber are displayed and separated by a space

Try other combinations

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24566: UpdateItemLocationOnCheckin triggers SIP2 alert flag, even with checked_in...
Kyle M Hall [Mon, 3 Feb 2020 12:56:37 +0000 (07:56 -0500)]
Bug 24566: UpdateItemLocationOnCheckin triggers SIP2 alert flag, even with checked_in_ok enabled

If UpdateItemLocationOnCheckin, it triggers an alert flag but cannot be acted on in the same way as LocalUse and thus should be removed in the same fashion.

Test Plan:
1) Enable UpdateItemLocationOnCheckin and set it up to trigger at
checkin for an item
2) Return that item via SIP2
3) Note the alert flag is set
4) Apply this patch
5) Repeat steps 1 and 2
6) The alert flag should not be set

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kevin Cook <ILS@cedarparktexas.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24901: Add tests for transferbook
Martin Renvoize [Thu, 19 Mar 2020 08:10:00 +0000 (08:10 +0000)]
Bug 24901: Add tests for transferbook

Test plan:
0/ Read the commit and confirm the new tests make sence
1/ Run the tests and verify they pass
2/ Signoff

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24901: Minor refactor of tests
Martin Renvoize [Wed, 18 Mar 2020 19:25:57 +0000 (19:25 +0000)]
Bug 24901: Minor refactor of tests

Test plan:
0/ Read the change and verify it makes sense

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24856: Remove itemtypes.imageurl in fr-FR sample data
Jonathan Druart [Thu, 12 Mar 2020 09:01:10 +0000 (10:01 +0100)]
Bug 24856: Remove itemtypes.imageurl in fr-FR sample data

in installer/data/mysql/fr-FR/3-LecturePub/sample_itemtypes.sql and installer/data/mysql/fr-FR/4-Conservation/sample_itemtypes.sql the values of imageurl point to non-existent images.

Test plan:
Insert the 2 sql file and confirm that imageurl is not empty

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24870: Translate installer data label
Bernardo Gonzalez Kriegel [Sun, 15 Mar 2020 00:00:24 +0000 (21:00 -0300)]
Bug 24870: Translate installer data label

This patch enable the translation of the
labels 'Mandatory' or 'Optional' present at install time
for groups of installer files.

To test:
1) Try install using de-DE language,
   at step3 verify 'Mandatory' and 'Optional'
   labels for marc21 or other data checklist
   Do not close this window!
2) Apply this patch
3) Update de-DE translation files, reinstall lang files
   cd misc/translator
   ./translate update de-DE
   ./translate install de-DE
4) Reload page at step3, now 'Mandatory' label
is translated to 'Pflichtfeld'
5) Verify strings in translation file
Search for
^msgid \"Mandatory\"
^msgid \"Optional\"
in po/de-DE-staff-prog.po.

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>
4 years agoBug 24510: Add missing filter
Jonathan Druart [Mon, 16 Mar 2020 11:16:27 +0000 (12:16 +0100)]
Bug 24510: Add missing filter

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>
4 years agoBug 24510: Code cleaning
Jonathan Druart [Wed, 26 Feb 2020 16:38:53 +0000 (17:38 +0100)]
Bug 24510: Code cleaning

Additional test plan:
Create 3 clubs: abc adf axy
place a hold for on of those club, search for a club 'a'
you will get the focus on the "Clubs" tab

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.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>
4 years agoBug 24510: When Placing a Hold, cursor doesn't focus on Patron Name
Owen Leonard [Wed, 26 Feb 2020 15:53:48 +0000 (15:53 +0000)]
Bug 24510: When Placing a Hold, cursor doesn't focus on Patron Name

This alternate patch tries to implement a fix in a more "correct" way by
tying the cursor focus to the initialization of the jQueryUI tabs. By
configuring both the "create" and "activate" events we can make sure the
correct input field is focused.

I think the only advantage of this patch over the other one is that
tying the focus to the tabs activation makes it a little more obvious
where in the DOM loading sequence the focus is being set.

To test, follow the original patch's test plan:

TEST PLAN:
1. Go to Biblio Record
2. Place Hold (request.pl) - either the Hold above the Bib or the Hold
   on the left, it does the same thing.
3. Note that the cursor does not go to Patron Name (for whom to place
   the hold for), it goes to the Top Search bar under Checkout.
4. Apply patch and reload the page.
5. The focus should now be correctly set.
6. Toggle between 'Patrons' and 'Club' tabs.
7. Focus should stay set.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.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>
4 years agoBug 24510: Add focus to Patron/club input
Lucas Gass [Fri, 24 Jan 2020 15:34:07 +0000 (15:34 +0000)]
Bug 24510: Add focus to Patron/club input

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.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>
4 years agoBug 15775: Change wording slightly
Katrin Fischer [Sat, 29 Feb 2020 22:36:46 +0000 (23:36 +0100)]
Bug 15775: Change wording slightly

maxoutstanding only blocks holds, for checkouts we got
noissuechage.

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>
4 years agoBug 15775: Show message on OPAC summary if holds are blocked due to fines
Aleisha Amohia [Thu, 6 Feb 2020 22:25:06 +0000 (22:25 +0000)]
Bug 15775: Show message on OPAC summary if holds are blocked due to fines

To test:
1) Set maxoutstanding syspref to 5
2) Create a manual invoice for a borrower for $6
3) Log in to the OPAC as this borrower
4) Go to opac-user.pl, your summary page
5) Confirm there is a warning box explaining that the borrower is
blocked from holds due to fines
6) Back on the staff side, pay some or all of the borrower's fines so
they are no longer over the max outstanding amount
7) Refresh the summary page in the OPAC and confirm the warning is gone

Sponsored-by: Catalyst IT
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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24844: Focus syspref searchbar
Aleisha Amohia [Wed, 11 Mar 2020 03:38:44 +0000 (03:38 +0000)]
Bug 24844: Focus syspref searchbar

To test:
1) Go to Administration
2) Notice neither of the syspref search bars are focussed so you have to
click inside one to begin searching
3) Apply patch and refresh page
4) Notice the header syspref search bar is now focussed so you can begin
typing straight away

Sponsored-by: Catalyst IT
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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>
4 years agoBug 24847: Select AND by default in items search
Fridolin Somers [Wed, 11 Mar 2020 11:00:21 +0000 (14:00 +0300)]
Bug 24847: Select AND by default in items search

In items search form, when clicking on "New field" a new conjunction and search field are added.
It would save time to select AND conjunction by default, like it is in advanced search.

Test plan:
1) Go to items search
2) Click on  "New field"
3) Check that AND is selected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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>
4 years agoBug 24518: Fix IE11 partner filtering
Andrew Isherwood [Mon, 27 Jan 2020 12:00:47 +0000 (12:00 +0000)]
Bug 24518: Fix IE11 partner filtering

This patch adopts the approach detailed in comment #1.

It also fixes a couple of additional minor bugs relating to the ILL
partner list:
- Exclude partners with no email address, we cannot use them
- Quote the "value" attribute to avoid warnings displayed by IE, they
should be quoted anyway!

Test plan: USE IE11
- Apply the patch
- Define 3 ILL partner patrons (patrons in the category that has a code
that matches the <partner_code> value in the ILL config). One patron
should have no email address, the other two should have an email address
- Navigate to "Place request with partners" for an ILL request
- TEST: Observe that the patron with no email address is not displayed
- Try filtering the list
- TEST: Observe that the list filters correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.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>