]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 24705: Add tests
Jonathan Druart [Mon, 24 Feb 2020 09:40:54 +0000 (10:40 +0100)]
Bug 24705: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24711: Don't add logout input to login form
Nick Clemens [Fri, 21 Feb 2020 21:11:37 +0000 (21:11 +0000)]
Bug 24711: Don't add logout input to login form

To test:
1 - Set OpacPublic syspref to 'Disable'
2 - Log in to OPAC
3 - Log out
4 - Try to log in again
5 - No error, but you get the login form again
6 - Apply patch
7 - Repeat
8 - This time you can log in again

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>
4 years agoBug 24706: Fix ergonomic issue on the list view if empty
Jonathan Druart [Fri, 21 Feb 2020 14:43:06 +0000 (15:43 +0100)]
Bug 24706: Fix ergonomic issue on the list view if empty

If the list is empty, the toolbar does not render correctly.
Buttons are displayed instead of links, also the "Sort" is displayed
when it should not

Test plan:
- Create a new list, do not add items
- Notice that the toolbar now renders correctly
- Use the different link to create/edit/delete
- Confirm that the sort link is not displayed
- Add a new item
- Confirm that the toolbar is looking the same as before

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>
4 years agoBug 24646: Move RoundFinesAtPayment to 'Fines policy' section
Nick Clemens [Wed, 12 Feb 2020 18:44:05 +0000 (18:44 +0000)]
Bug 24646: Move RoundFinesAtPayment to 'Fines policy' section

To test:
 - Search Admin->System preferences for 'RoundFinesAtPayment'
 - Note it is listed under self-check
 - Apply patch
 - Restart/refresh
 - Note it is now under Accounting -> Policy

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>
4 years agoBug 24588: (RM follow-up) Update debian/control
Martin Renvoize [Fri, 21 Feb 2020 17:12:56 +0000 (17:12 +0000)]
Bug 24588: (RM follow-up) Update debian/control

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24588: Prevent e-mails from Koha to be flagged as spam
Ulrich Kleiber [Wed, 5 Feb 2020 10:04:20 +0000 (11:04 +0100)]
Bug 24588: Prevent e-mails from Koha to be flagged as spam

Set the e-mail headers Mailer-X and MessageID by Koha,
to gain a better positive score from the spam filter.

To test:
1) Let Koha send an e-mail message.
2) Check the header of this e-mail message with your e-mail client.
   There should be no X-Mailer header with value 'Koha'. If there
   is an MessageID header, it is probably set by the MSA, e.g. Exim.
   Example:
      Message-Id: <E1iyZRY-0006XT-0t@FQDN>
3) Apply patch.
4) Repeat step 1.
5) Check the header of the new e-mail message with your e-mail client.
   There should be a X-Mailer header with value 'Koha' and a MessageID
   header with a value set by Koha.
   Example:
      X-Mailer: Koha
      Message-Id: <15807387030.B731e.18490@FQDN>
6) Sign off.

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>
4 years agoBug 22655: Adding holds rules to Onboarding tool
Aleisha Amohia [Thu, 13 Feb 2020 02:47:20 +0000 (02:47 +0000)]
Bug 22655: Adding holds rules to Onboarding tool

This patch adds the following fields to the circ rule step in the
onboarding tool:
- holds allowed (total)
- holds allowed (daily)
- holds per record (count)

To test:
1) Apply patch, drop and recreate database, restart memcached and refresh page
2) Go through the installer and get to the final step of the onboarding
tool
3) Confirm the above fields are now available to set in your circulation
rule
4) Save and log in to Koha
5) Go to Admin -> Circ and fines rules
6) Confirm the fields saved correctly

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17510: enable use of subfield 0 in MMT actions
Andreas Roussos [Fri, 14 Feb 2020 19:50:39 +0000 (19:50 +0000)]
Bug 17510: enable use of subfield 0 in MMT actions

When adding MARC modification template (MMT) actions, if a subfield
value of 0 (zero) is entered it will not show up in the action's
description upon saving. Also, if you try to modify an authority or
biblio record using actions that refer to subfield 0 the procedure
will fail.

This patch fixes that.

Test plan:
0) Create a MARC modification template and add some actions to it,
   ideally testing all action types (Delete/Add new/Update existing
   or add new/Move/Copy/Copy and replace); make sure you input a 0
   (integer zero) in the text box for the subfield value(s).
1) As you save each action, observe that subfield 0 ($0) is missing
   from the action description.
2) Home > Tools > Batch record modification: try to modify a biblio-
   graphic record using the modification template you just created.
   Observe that you get an error in the system logs if you click on
   'Show MARC' or 'Modify selected records'.
3) Apply the patch.
4) Repeat steps 0-2. The subfield value ($0) should be displayed in
   the action description and the Batch record modification should
   work without problems.

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17510: update MMT-related unit tests
Andreas Roussos [Fri, 14 Feb 2020 20:07:50 +0000 (20:07 +0000)]
Bug 17510: update MMT-related unit tests

The unit tests related to MARC modification templates need to be
updated with extra tests specific to actions involving subfield 0.

Test plan:
0) Apply the patch.
1) Run the updated unit tests, they should pass without any errors:
   $ prove t/SimpleMARC.t
   $ prove t/db_dependent/MarcModificationTemplates.t

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 11161: Relabel 'child fund' to 'sub fund' in staff interface
Katrin Fischer [Sun, 12 Jan 2020 11:40:51 +0000 (12:40 +0100)]
Bug 11161: Relabel 'child fund' to 'sub fund' in staff interface

It was noted, that 'sub fund' might be a better term to use than
'child fund'. So this patch changes it.

To test, check with and without patch:

- Add a budget in acquisitions
- Add a fund in acquisitions
- Add a sub/child fund to your fund (label of menu item #1)
- Edit your first fund, check option to update owners of
  sub/child funds (#2)
- Try to delete your 'parent' fund (tooltip #3)
- Click on the greyed out entry (alert ÃÃ#4)

If you like the change, please sign-off. If you think otherwise,
please comment on the bug report.

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>
4 years agoBug 23482: Fix BakerTaylor cover images on lists
Nick Clemens [Wed, 21 Aug 2019 02:24:11 +0000 (02:24 +0000)]
Bug 23482: Fix BakerTaylor cover images on lists

While this needs a username/pass to fully test, it should be possible to
verify the code changes by comparing to opac-results code

To test:
1 - Enable BakerTaylor images
2 - Enter your usernme and password
3 - Do not fill the BookStore URL
4 - Verify OPAC covers are working
5 - Save some times with covers to a public list
6 - Verify they do not display in list
7 - Apply patch
8 - Verify images now work

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17896: Remove duplicated use statements
Jonathan Druart [Fri, 21 Feb 2020 13:35:30 +0000 (14:35 +0100)]
Bug 17896: Remove duplicated use statements

and remove uneeded '&'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17896: load BakerTaylor module with use
Nick Clemens [Fri, 21 Feb 2020 12:56:53 +0000 (12:56 +0000)]
Bug 17896: load BakerTaylor module with use

We are incinsistent here, Amazon and Syndetics module are always loaeded in some places
BakerTaylor is conditional everywhere, and causes issues under plack

For simplicity sake I think we should just load this (small) module where it might be needed

To test:
1 - Disable Baker and Taylor images
2 - Restart plack
3 - Visit opac-readingrecord, opac-detail, opac-search, opac-shelves, opac-user
    Log in to opac
    Virew your reading history
    Make/view a list
    Search the catalog
    Look at an individual title
4 - Enable BakerTaylorEnabled
    If you don't have Baker and Taylor credentials, simply fudge them with bad data and enable
5 - Repeat steps above, in the word of Joubu "Kaboom"
6 - Apply patch
7 - Repeat 1-4
8 - You shoudl be able to load all the pages after enabling the pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24676: Remove <p/> typo in opac-auth.tt
David Cook [Tue, 18 Feb 2020 00:59:05 +0000 (00:59 +0000)]
Bug 24676: Remove <p/> typo in opac-auth.tt

This patch removes some trivial invalid HTML from opac-auth.tt

Test plan:
1. Apply patch
2. As an unauthenticated user, try to place a hold on a search result
e.g. http://localhost:8080/cgi-bin/koha/opac-reserve.pl?biblionumber=29
3. View source or use an inspector to see there is no <p></p> block
between <input type="submit" value="Log in" class="btn"> and
<div id="nologininstructions">

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: (QA follow-up) Fix TT closing braces
Martin Renvoize [Fri, 21 Feb 2020 07:03:15 +0000 (07:03 +0000)]
Bug 23777: (QA follow-up) Fix TT closing braces

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: Use To.json in request.tt
Jonathan Druart [Tue, 12 Nov 2019 08:30:40 +0000 (09:30 +0100)]
Bug 23777: Use To.json in request.tt

Test plan:
Use quotes in a library's name, then place an item on hold for a patron
that cannot do it.
If you are allowed to overwrite this restriction you will get a warning:
"This item normally cannot be put on hold except for patrons from
BRANCHNAME"
The library's name should be correcty displayed

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt
Jonathan Druart [Tue, 12 Nov 2019 08:30:27 +0000 (09:30 +0100)]
Bug 23777: Use TO.json in value_builder/unimarc_field_4XX.tt

No idea how to test this but, as other fixes work, this one should,
right?

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: Use To.json in results.tt
Jonathan Druart [Tue, 12 Nov 2019 08:24:42 +0000 (09:24 +0100)]
Bug 23777: Use To.json in results.tt

Test plan:
Search for a string with quote and confirm that it is correctly
highlighted in the result list.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: Use To.json in authorities.tt
Jonathan Druart [Tue, 12 Nov 2019 08:11:30 +0000 (09:11 +0100)]
Bug 23777: Use To.json in authorities.tt

No fix here.

Test plan:
Edit GENRE/FORM 040$a
With text: Original catalo'"ging age"'ncy
Save, you get the alert

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: Use To.json in preferences.tt
Jonathan Druart [Tue, 12 Nov 2019 07:55:30 +0000 (08:55 +0100)]
Bug 23777: Use To.json in preferences.tt

Test plan:
Search for "foo bar" (with double quotes) in the sysprefs

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: Fix for the advanced editor
Jonathan Druart [Tue, 12 Nov 2019 08:19:31 +0000 (09:19 +0100)]
Bug 23777: Fix for the advanced editor

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23777: Fix auth finder escaping
Jonathan Druart [Mon, 11 Nov 2019 18:03:41 +0000 (19:03 +0100)]
Bug 23777: Fix auth finder escaping

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22359: Prevent undercollection at the server
Martin Renvoize [Fri, 24 Jan 2020 12:23:39 +0000 (12:23 +0000)]
Bug 22359: Prevent undercollection at the server

This patch adds some additional handling to prevent undercollection of
fees at the server side.

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>
4 years agoBug 22359: Improvements to payment collection inputs
Martin Renvoize [Wed, 20 Nov 2019 16:01:56 +0000 (16:01 +0000)]
Bug 22359: Improvements to payment collection inputs

This patch attempts to clarify the uses of the various input fields on
the paycollect screens.

It does this by adding validation to the form such that entering a
'collected' value that is lower than the 'paid' value is now forbidden.

Signed-off-by: Michal Denar <black23@gmail.com>
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>
4 years agoBug 17702: (RM follow-up) Remove use of I18N tt
Martin Renvoize [Thu, 20 Feb 2020 16:39:52 +0000 (16:39 +0000)]
Bug 17702: (RM follow-up) Remove use of I18N tt

This patch removes the use of the I18N TT plugin in introduced for all
strings in the new template. We're not yet ready to use this plugin for
all strings as we need to further investigate performance for such a
move and perhaps add template compilation.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17702: DBRev 19.12.00.029
Martin Renvoize [Thu, 20 Feb 2020 14:51:02 +0000 (14:51 +0000)]
Bug 17702: DBRev 19.12.00.029

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17702: (QA follow-up) Add new field to kohastructure
Martin Renvoize [Mon, 10 Feb 2020 14:30:19 +0000 (14:30 +0000)]
Bug 17702: (QA follow-up) Add new field to kohastructure

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 17702: Add UI to manage account credit types
Julian Maurice [Fri, 7 Feb 2020 12:17:54 +0000 (13:17 +0100)]
Bug 17702: Add UI to manage account credit types

It is the same as for debit types.

It adds a new column `archived` in table `account_credit_types` that has
the same purpose than `account_debit_types.archived`

Test plan:
0. Apply patch && run updatedatabase && update_dbix_class_files
1. Go to Admin » Credit types
2. Add a new credit type, give it a code and a description and check
   'Can be manually added'
3. Go to a patron's accounting section, 'Create manual credit' tab
4. Verify that the new credit type appears
5. Return to Admin » Credit types and archive the credit type
6. Verify that the new credit type is not available anymore in 'Create
   manual credit'
7. Restore the credit type and verify that it is available again
8. Create a manual credit with the new credit type
9. Go to Reports » Cash register and make sure you can find the
   transaction by filtering on transaction type
10. Edit the new credit type and set some library limitations, make sure
    that the credit type doesn't appear if you're connected to a library
    you didn't selected, and that it appears if you're connected to a
    library you selected.

Note to QA team:
The change in Koha/Account.pm, I added it because otherwise Koha died
when adding a manual credit with a custom type.
In that case, offset type will default to 'Manual Credit'. I'm not sure
if that is the best thing to do. I'm open to suggestions :)

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 24657: Do not explicitely pass a branchcode
Jonathan Druart [Fri, 14 Feb 2020 09:23:39 +0000 (10:23 +0100)]
Bug 24657: Do not explicitely pass a branchcode

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24657: Fix t/db_dependent/Koha/Item.t and t/db_dependent/Holds.t
Agustin Moyano [Thu, 13 Feb 2020 17:16:20 +0000 (14:16 -0300)]
Bug 24657: Fix t/db_dependent/Koha/Item.t and t/db_dependent/Holds.t

on t/db_dependent/Koha/Item.t on line 172 I created 2 Koha::Library::Groups like this

my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );

I didn't realize this was creating 2 new libraries that sometimes messed up with tests, so I changed it to this

my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1, branchcode => undef } } );
my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1, branchcode => undef } } );

on t/db_dependent/Holds.t on line 1058 I created 3 libraries like this

my $library1  = $builder->build_object( { class => 'Koha::Libraries' } );
my $library2  = $builder->build_object( { class => 'Koha::Libraries' } );
my $library3  = $builder->build_object( { class => 'Koha::Libraries' } );

but they needed to be pickup_locations, and sometimes they wheren't set as such, so I changed it to this

my $library1  = $builder->build_object( { class => 'Koha::Libraries', value => {pickup_location => 1} } );
my $library2  = $builder->build_object( { class => 'Koha::Libraries', value => {pickup_location => 1} } );
my $library3  = $builder->build_object( { class => 'Koha::Libraries', value => {pickup_location => 1} } );

To test:
1. do not apply this patch
2. in bash:
   for i in {1..300}; do echo "loop $i"; prove t/db_dependent/Koha/Item.t t/db_dependent/Holds.t; if [ "$?" = "1" ]; then break; fi; done
3. Grab a cup of coffee (or tea if you are healthy) and wait for a while
4. Whithin 300 iterations there should be an error in any of both scripts and for loop should exit
5. Apply this patch
6. repeat step 2 and 3 (decaff this time!)
7. All 300 loops should pass
8. Sign off

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 14567: DBRev 19.12.00.028
Martin Renvoize [Thu, 20 Feb 2020 09:12:35 +0000 (09:12 +0000)]
Bug 14567: DBRev 19.12.00.028

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 14567: Compiled CSS
Martin Renvoize [Thu, 20 Feb 2020 09:09:45 +0000 (09:09 +0000)]
Bug 14567: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 14567: Add a browse interface to the OPAC
Robin Sheat [Tue, 21 Jul 2015 05:14:09 +0000 (17:14 +1200)]
Bug 14567: Add a browse interface to the OPAC

This is an interface for quick and efficient browsing through records.

It presents a page at /cgi-bin/koha/opac-browse.pl that allows you to
enter the prefix of an author, title, or subject and it'll give you a
list of the options that match that. You can then scroll through these
and select the one you're after. Selecting it provides a list of records
that match that particular search.

To Test:
 1 - Apply patches
 2 - Update database (updatedatabase on kohadevbox)
 3 - Compile the CSS
   https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client
   yarn build --view=opac on kohadevbox
 4 - Enable the new syspref OpacBrowseSearch
 5 - Have ES running and some records in it
     SearchEngine syspref set to Elasticsearch
 6 - Browse to opac home, click 'Browse search' link
for your site)
 7 - Test searching for author, title, and subject
 8 - Verify that results are returned in expected order
 9 - Experiment with fuzziness
     https://www.elastic.co/guide/en/elasticsearch/reference/5.6/common-options.html#fuzziness
     Options are: exact (0 edits), fuzzy (1 edit), very fuzzy (2 edits)
10 - Click any result and verify specific titles are correct
11 - Click through title to record and verify it is the correct record
12 - Test that disabling pref removes the link on the opac home

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>
4 years agoBug 14898: Add button at manual invoice to redirect to pay tab
Julian Maurice [Wed, 5 Feb 2020 14:07:23 +0000 (15:07 +0100)]
Bug 14898: Add button at manual invoice to redirect to pay tab

Test plan:
1. Create manual invoice for any patron and click on "Save", you should
   be redirected to Account tab
2. Create manual invoice for any patron and click on "Save and pay", you
   should be redirected to Account tab

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>
4 years agoBug 14647: Make spelling in file format pull downs match
Katrin Fischer [Sun, 16 Feb 2020 05:41:46 +0000 (05:41 +0000)]
Bug 14647: Make spelling in file format pull downs match

While bibliographic had XML and MARC, authorities had xml and marc
in the pull down. This just makes both the same.

To test:
- Look at the pull downs on both tabs and verify they are
  now using the same spelling

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 14647: (follow-up) Fix script not detecting XML output format
Aleisha Amohia [Sun, 9 Feb 2020 21:32:12 +0000 (21:32 +0000)]
Bug 14647: (follow-up) Fix script not detecting XML output format

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>
4 years agoBug 14647: (follow-up) Changes to script
Aleisha Amohia [Mon, 10 Jul 2017 02:07:38 +0000 (02:07 +0000)]
Bug 14647: (follow-up) Changes to script

This patch adds the necessary changes to the script so that the filename
extensions works for exporting authorities.

To test:
1) Attempt to export with all filetypes for biblios and authorities
2) Confirm the extension for the exported file (after clicking the
    Export button) is correct for each one

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>
4 years agoBug 14647: Make the file name extension dynamic on exporting records
Gus [Tue, 19 Jan 2016 23:33:14 +0000 (23:33 +0000)]
Bug 14647: Make the file name extension dynamic on exporting records

Test -
1. go to cgi-bin/koha/tools/export.pl
2. Check that both tabs ("Export bibliographic records & Rxport authority records") do the following
3. In Output format
4. When changing "File format" from dropdown it update "file name"
5. Still works with user inputted names

Works as expected.

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>
4 years agoBug 24532: DBRev 19.12.00.027
Martin Renvoize [Thu, 20 Feb 2020 08:45:29 +0000 (08:45 +0000)]
Bug 24532: DBRev 19.12.00.027

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24532: Fix misidentified credit_types from bug 23049
Martin Renvoize [Thu, 30 Jan 2020 14:39:22 +0000 (14:39 +0000)]
Bug 24532: Fix misidentified credit_types from bug 23049

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24532: Fix original DB update for bug 23049
Martin Renvoize [Thu, 30 Jan 2020 13:19:37 +0000 (13:19 +0000)]
Bug 24532: Fix original DB update for bug 23049

Pathalogical cases of Payments and Writeoffs being converted to debits
are identified during the DB update for bug 23049, but we are not
correctly limiting to those types accountlines when subsequently
populating the debit_type field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24670: (QA follow-up) Add missing $rules definition
Martin Renvoize [Wed, 19 Feb 2020 21:30:22 +0000 (21:30 +0000)]
Bug 24670: (QA follow-up) Add missing $rules definition

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24670: Fetch all circulation rules at once to fix perf regression
Jonathan Druart [Mon, 17 Feb 2020 11:54:56 +0000 (12:54 +0100)]
Bug 24670: Fetch all circulation rules at once to fix perf regression

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24538: Handle Net::Netmask parser errors
David Cook [Wed, 19 Feb 2020 02:07:30 +0000 (02:07 +0000)]
Bug 24538: Handle Net::Netmask parser errors

This patch switches from the new() to new2() constructor,
which will return an undef value when it fails to parse a value.

This patch warns on parser failures, but otherwise silently drops
the invalid value, and returns objects for any valid input it can parse.
This way one mistake won't disable the whole feature.

To test:
1. Run the unit test t/Koha/Middlware/RealIP.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24538: Add unit tests for Koha::Middleware::RealIP
David Cook [Wed, 19 Feb 2020 02:05:07 +0000 (02:05 +0000)]
Bug 24538: Add unit tests for Koha::Middleware::RealIP

This patch adds some unit tests for Koha::Middleware::RealIP

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 17611: Change 'Pending order' to 'Quantity ordered'
Katrin Fischer [Sun, 12 Jan 2020 09:11:12 +0000 (10:11 +0100)]
Bug 17611: Change 'Pending order' to 'Quantity ordered'

Picking Quantity ordered as it seems more in line with
other pages in Koha where we show information. We always
show the quantity, so it makes sense to also have this
label on the 'order search' and 'copy existing order'.

Order search
1) Make sure you have some orders in your acq module
2) Go to the top and do an empty orders search
3) Review the column headings of the search results
4) Find "Pending order"

Order from existing order (copy)
1) Create or choose an existing open basket
2) 'Add to basket' - 'From existing orders'
3) Search to find some of your orders
4) Look at the column headings, find 'Pending order'
5) Pick some orders and fill out order information, save
6) Summary: Find 'Pending order' in the table again

x) Apply the patch and make sure all 'Pending' orders
above have been changed to 'Quantity ordered'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24103: (RM follow-up) Correction to updatedatabase text
Martin Renvoize [Wed, 19 Feb 2020 17:12:06 +0000 (17:12 +0000)]
Bug 24103: (RM follow-up) Correction to updatedatabase text

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 11297: DBRev 19.12.00.026
Martin Renvoize [Wed, 19 Feb 2020 16:11:13 +0000 (16:11 +0000)]
Bug 11297: DBRev 19.12.00.026

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 11297: (QA follow-up) Make table headings match other pages
Katrin Fischer [Sun, 16 Feb 2020 03:09:07 +0000 (03:09 +0000)]
Bug 11297: (QA follow-up) Make table headings match other pages

The patch set adds a table hading for the Actions column on the
summary page. If you compare with other pages, this should
be labelled 'Actions' instead of 'Options'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 11297: (follow-up) Add html filter to new input field
Katrin Fischer [Wed, 29 Aug 2018 10:20:02 +0000 (10:20 +0000)]
Bug 11297: (follow-up) Add html filter to new input field

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
4 years agoBug 11297: Modify Z3950server schema file
Charles Farmer [Wed, 21 Feb 2018 20:14:00 +0000 (15:14 -0500)]
Bug 11297: Modify Z3950server schema file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
4 years agoBug 11297: Add atomicupdate patch and modify kohastructure.sql
Charles Farmer [Wed, 21 Feb 2018 20:12:42 +0000 (15:12 -0500)]
Bug 11297: Add atomicupdate patch and modify kohastructure.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
4 years agoBug 11297: Add support for custom PQF attributes for Z39.50 server searches.
Charles Farmer [Fri, 10 Aug 2018 21:28:38 +0000 (17:28 -0400)]
Bug 11297: Add support for custom PQF attributes for Z39.50 server searches.

Adds the "Attributes" field to z3950 servers.

The feature here is not quite de same.

In the old patches, the attributes were applied to individual query parts if the part already contains "@attr" and the additionnal attribute is not already in the query part.

Here, the content of the new field is prepended to all PQF queries sent to the server.

This new way of doing is simpler and works for the sponsor.

Test plan:
 I) Apply the patch
II) Run updatedatabase.pl

1) Add a new z3950 server with the following parameters:
Hostname : catalogue.banq.qc.ca
Port     : 210
Database : IRIS
Syntax   : Marc21

2) Perform a z3950 search on that server.
    Keyword (Any) : egypt
2.1) Nothing Found.

3) Add attributes on the server administration page
    @attr 4=1

4) Perform the same z3950 search
4.1) A lot of results

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
4 years agoBug 6508: (follow-up) Remove dependency on jquery for check in templates
Katrin Fischer [Fri, 14 Feb 2020 16:25:21 +0000 (16:25 +0000)]
Bug 6508: (follow-up) Remove dependency on jquery for check in templates

Should work as before with the test plan from the second patch. But
removes the added jQuery display control code in favor of checking
if fines is set on template level.

For several patrons with and without fines and with credits:
- Check the Fines & Charges only display when there is something to see

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 6508: (follow-up) Change layout of price and hide tab if no fines
Aleisha Amohia [Thu, 13 Feb 2020 04:24:08 +0000 (04:24 +0000)]
Bug 6508: (follow-up) Change layout of price and hide tab if no fines

With this patch, the tab will not show if there are no fines.
I've also changed how the fines look in the tab header to look more like
the OPAC fines tab.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 6508: Add balance to `Fines & Charges` tab
Martin Renvoize [Wed, 23 Oct 2019 10:37:56 +0000 (11:37 +0100)]
Bug 6508: Add balance to `Fines & Charges` tab

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18433: Display the number of selected items
Jonathan Druart [Tue, 18 Feb 2020 08:57:45 +0000 (09:57 +0100)]
Bug 18433: Display the number of selected items

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18433: Add missing filter
Jonathan Druart [Tue, 18 Feb 2020 08:54:20 +0000 (09:54 +0100)]
Bug 18433: Add missing filter

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18433: Remember item search results selected rows in session storage
Julian Maurice [Fri, 17 Jan 2020 09:17:42 +0000 (10:17 +0100)]
Bug 18433: Remember item search results selected rows in session storage

Session storage is not shared between browser tabs, and is cleared when
a tab is closed, so it seems like a good fit for storing selected rows

Test plan:
1. Go to item search (intranet) and submit the form
2. Select some rows on the first page by clicking on checkboxes
3. Go to another page of results
4. Select more rows
5. Go back to the first page
6. Selected rows should still be checked
7. Play with sorting and filtering, and see that selected rows are
   always checked
8. Export as CSV and as a barcodes file, verify that the export contains
   all selected rows
9. Click on 'Clear selection', it should deselect all rows from all
   pages
10. Select some rows again
11. Click on 'Edit search' and submit the same search
12. No row should be selected
13. Select some rows again
14. Refresh the page and submit again the same search
15. No row should be selected

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>
4 years agoBug 18433: Allow to select results to export in item search
Julian Maurice [Fri, 14 Apr 2017 13:45:04 +0000 (15:45 +0200)]
Bug 18433: Allow to select results to export in item search

This adds a column of checkboxes in the results table to be able to select the
items to be exported

Test plan:
1. Go to item search and click 'Search'
2. Without checking any checkbox, verify that the export still works (it should
   export all results)
3. Tick some checkboxes and re-export, verify that only selected items are
   exported

Signed-off-by: Marc Véron <veron@veron.ch>
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>
4 years agoBug 24363: Compiled CSS
Martin Renvoize [Wed, 19 Feb 2020 16:00:11 +0000 (16:00 +0000)]
Bug 24363: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24363: Move the datepicker icon out of the input
Jonathan Druart [Thu, 13 Feb 2020 15:14:24 +0000 (16:14 +0100)]
Bug 24363: Move the datepicker icon out of the input

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24103: DBRev 19.12.00.025
Martin Renvoize [Wed, 19 Feb 2020 16:07:04 +0000 (16:07 +0000)]
Bug 24103: DBRev 19.12.00.025

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24103: (follow-up) Dump query on opac authorities search
Nick Clemens [Fri, 14 Feb 2020 11:34:46 +0000 (11:34 +0000)]
Bug 24103: (follow-up) Dump query on opac authorities search

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
4 years agoBug 24103: Add option to dump search query to templates
Nick Clemens [Mon, 25 Nov 2019 14:58:00 +0000 (14:58 +0000)]
Bug 24103: Add option to dump search query to templates

To test:
1 - Apply patch, update database
2 - Note new syspref 'DumpSearchQueryTemplate'
3 - Leave it off
4 - Enable DumpTemplateVariablesOpac and Staff
5 - Search on staff and opac
6 - View the source
7 - Search for 'search_query' - you shouldn't find it
8 - Enable the new pref
9 - Repeat, but you should find the query
10 - Test staff/opac search and advanced search, cataloguing search, authority search, authfinder search, adding to a basket form a new biblio
11 - All should work and show the query
12 - This will work under both ES and Zebra

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
4 years agoBug 23593: Link to the bibliographic record from the suggestion (OPAC)
Jonathan Druart [Tue, 12 Nov 2019 20:43:50 +0000 (21:43 +0100)]
Bug 23593: Link to the bibliographic record from the suggestion (OPAC)

If there is a link between a suggestion and a bibliographic record (ie.
if suggestion.biblionumber is set), it makes sense to have an hyperlink
on the suggestion list at the OPAC.

Test plan:
- Create 2 suggestions
- Create an order from one of them
- Go to the suggestion list at the OPAC
=> The one with the order has a to the bibliographic record
=> The other one is not linked with a bibliographic record, and so the
title is displayed, without hyperlink

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24648: Contextualization of past tense 'Created'
Caroline Cyr La Rose [Wed, 12 Feb 2020 22:29:41 +0000 (17:29 -0500)]
Bug 24648: Contextualization of past tense 'Created'

In French, everything has one of the binary genders (male or female),
and it affects the past tense verb agreements.

This patch adds contextualization for the "Created" verb

The following files have been modified:
booksellers.tt - refers to a basket
basket.tt - refers to a basket
transferorder.tt - refers to a basket
memberentrygen.tt - refers to a patron restriction
suggestion.tt - refers to a suggestion

To test, apply the patch and visit all those pages in English to make
sure there is no change.
1) Go to Acquisitions
2) Search for vendors
3) On the vendors result pages, check the 'Created by' column heading
of the baskets
4) Click on one of the baskets, check the basket info at the top,
it should say 'Created by:'
5) Click Transfer on one of the orders
6) Search for and choose a vendor
7) In the list of that vendor's basket, it should say 'Created by'
8) Go to a patron's account
9) Add a manual restriction in the Restrictions tab at the bottom
10) In the restriction info, it should say 'Created'
11) Click on the Purchase suggestions tab on the left
12) Add a new suggestion
13) In the Suggestion management section, it should say 'Created by:'
14) Submit the suggestion
15) From the list of suggestions, click on the title
16) In Suggestion management, it should say 'Created by:'

Next, install a new language (fr-CA used as example)
1) translate create fr-CA
2) open fr-CA-messages.po and add a translation for 'basket created by',
'patron restriction created on' and 'suggestion created by' (it doesn't
have to be real, just write something different for each)
3) translate install fr-CA
4) in the system preferences, enable the french language in
'language'
5) change interface language to french

Redo the tests above to make sure the word you put in the translation
for the basket is in the places where 'Created by' refers to a basket, that
the translation for the patron restriction is where it should be and that
the translation you put in for the purchase suggestion is in the places where
'Created by' refers to a purchase suggestion

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24669: Fix selenium test
Jonathan Druart [Wed, 19 Feb 2020 14:02:11 +0000 (15:02 +0100)]
Bug 24669: Fix selenium test

There is one more "Unlimited" on the circ rules now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24269: Adjust C4::Heading to generate headings from auth tags
Nick Clemens [Tue, 14 Jan 2020 13:00:03 +0000 (13:00 +0000)]
Bug 24269: Adjust C4::Heading to generate headings from auth tags

To test:
1 - Be using Elasticsearch
2 - Check that field 150 is mapped to 'Match-heading' or add it (the subfields don't matter)
3 - Add a topic term authority record like "150 $aCats$vFiction"
4 - Add a 650 with $aCats and $vFiction and  $e depicted to a bibliographic record
5 - Run the linker for the bib
    perl misc/link_bibs_to_authorities.pl --bib-limit "biblionumber=89" -v
6 - Confirm the record is not correctly linked to the record
7 - Apply patch
8 - Reindex authorities for ES
    perl misc/search_tools/rebuild_elasticsearch.pl -v -d -a
9 - Run the linker and confirm record is correctly linked
    perl misc/link_bibs_to_authorities.pl --bib-limit "biblionumber=89" -v

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24367: (RM follow-up) Syntax error correction
Martin Renvoize [Wed, 19 Feb 2020 12:03:17 +0000 (12:03 +0000)]
Bug 24367: (RM follow-up) Syntax error correction

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21633: DBRev 19.12.00.024
Martin Renvoize [Wed, 19 Feb 2020 11:36:50 +0000 (11:36 +0000)]
Bug 21633: DBRev 19.12.00.024

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21633: (follow-up) Cleanup other values for finesMode
Nick Clemens [Thu, 23 Jan 2020 12:06:21 +0000 (12:06 +0000)]
Bug 21633: (follow-up) Cleanup other values for finesMode

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21633: Remove finesMode 'test'
Nick Clemens [Fri, 3 Jan 2020 14:56:53 +0000 (14:56 +0000)]
Bug 21633: Remove finesMode 'test'

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24094: Strip trailing spaces and punctuation from authority headings
Nick Clemens [Fri, 31 Jan 2020 14:18:24 +0000 (14:18 +0000)]
Bug 24094: Strip trailing spaces and punctuation from authority headings

Both when searching for and creating new authorities we need to remove
punctuation that exists in the bibliographic record but does not belong in
the authority record.

For example, a series with a volume contains a semicolon in the bib record,
however, this should not be passed to the authority as the volume is not
included in the authority record.

To test:
 1 - Set AutoCreateAuthorities to 'generate'
 2 - Set BiblioAddsAuthorities to 'true'
 3 - Set CatalogModuleRelink to 'Do'
 4 - Find or create a record with:
    a 100 field with a subfield e preceded by a comma: 100 $aBoring, M. Eugene M ,$e author
    an 830 field with a volume preceded by a semicolon: 650$aLord of the rings ;$v 3.
 5 - Save the records and check the links
 6 - Note punctuation is passed through
 7 - Save again, auth records are created again
 8 - Apply patch
 9 - Save again, new auth records are created again
10 - Check the records, punctuation has been removed
11 - Save again, no more records created.

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24094: Unit tests
Nick Clemens [Fri, 31 Jan 2020 14:18:14 +0000 (14:18 +0000)]
Bug 24094: Unit tests

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24494: Make the regex more exact
Jonathan Druart [Thu, 13 Feb 2020 16:01:06 +0000 (17:01 +0100)]
Bug 24494: Make the regex more exact

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24494: tests: 00-valid-xml.t shouldn't check node_modules
Victor Grousset/tuxayo [Thu, 23 Jan 2020 14:55:18 +0000 (15:55 +0100)]
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules

== Test plan ==
- work with SCSS (just recompile it if you never did)
  - https://wiki.koha-community.org/wiki/Working_with_staff_client_SCSS
- now you have a node_modules directory
- prove -r t/00-valid-xml.t
- it should fail on files in node_modules
- apply this patch
- prove -r t/00-valid-xml.t
- it should work
- sabotage a legitimate XML file, like etc/SIPconfig.xml
- prove -r t/00-valid-xml.t
- it should fail, good the test is still useful
- undo the sabotage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 19791: Keep user in circ when viewing patron's logs
Jonathan Druart [Fri, 14 Feb 2020 10:44:44 +0000 (11:44 +0100)]
Bug 19791: Keep user in circ when viewing patron's logs

When a librarian is viewing the log for a given patron (tab "modification log"
from the circulation module), the "object" and "modules" parameter can
be modified. It does not make sense, we should stay in the circulation
module and avoid those fields to be modified.

Test plan:
- Modify several patrons (in order to have several modification logs)
- Go to the modification log tab of one of them
- Notice that the "Object" input is not a "Borrowernumber" labelled
input and that you cannot modify it.
Also notice that the "modules" is hidden.
- Go to the log viewer tool and notice that the view is still the same
as before this patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24051: Remove "search( %condition ) is deprecated" warning from batchMod.pl
Jonathan Druart [Mon, 18 Nov 2019 10:29:46 +0000 (11:29 +0100)]
Bug 24051: Remove "search( %condition ) is deprecated" warning from batchMod.pl

Test plan:
Go to Home › Tools › Batch item modification
Insert barcodes and continue
=> Without this patch you will get warning in the log
=> With this patch applied you warning does no longer appear
Confirm that the number of holds is correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 22245: Allow copy/move from and to control fields
Jonathan Druart [Sat, 16 Feb 2019 14:46:08 +0000 (11:46 -0300)]
Bug 22245: Allow copy/move from and to control fields

The JS conditions were wrong, we want to allow copy and move between
control fields.

Test plan:
Create a new MARC modification template action using control fields.
Confirm that you are allowed to copy/move a control field to another one

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24669: Show "Unlimited" values correctly in smart-rules.pl
Joonas Kylmälä [Mon, 17 Feb 2020 10:32:26 +0000 (10:32 +0000)]
Bug 24669: Show "Unlimited" values correctly in smart-rules.pl

The rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per
record (count)" were not set empty when in rule editing. Also, the
text "Unlimited" was not shown for rule "Holds per record (count)"
even though it should have been since empty value means unlimited
holds per record.

To test:
1. Apply patch
2. Edit the rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per
record (count)" to be empty and save
3. Make sure all of the above rules now say Unlimited
4. Edit the rules again and make sure the above rules are now in the
rule editing empty.

Sponsored-by: The National Library of Finland
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24669: Improve numeric input handling in smart-rules.pl
Joonas Kylmälä [Mon, 17 Feb 2020 09:48:22 +0000 (09:48 +0000)]
Bug 24669: Improve numeric input handling in smart-rules.pl

This removes code duplication by introducing a new subroutine
strip_non_numeric() that removes whitespace and makes the rule value
'' if it is a string value instead of a digit. The call to
strip_non_numeric() is now added also to all the rules it is needed
in.

To test:
1. Write some string like "test" to rules:
  - Current checkouts allowed
  - Current on-site checkouts allowed
  - Holds allowed (total)
  - Holds allowed (daily)
  - Holds per record (count)
  - Holds per record (count) – can be found in default policy
2. Save rules
3. Apply patch
4. Edit the rule line where you just typed all those strings and save
5. Notice how the values are now empty strings (some say "unlimited" but
   if you go check from DB it should show empty value there)

Sponsored-by: The National Library of Finland
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24666: (QA follow-up) Add missing filters
Martin Renvoize [Tue, 18 Feb 2020 18:32:02 +0000 (18:32 +0000)]
Bug 24666: (QA follow-up) Add missing filters

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24666: Display not registered guarantors on the patron detail page
Jonathan Druart [Mon, 17 Feb 2020 13:39:50 +0000 (14:39 +0100)]
Bug 24666: Display not registered guarantors on the patron detail page

There was no way to see the not registered guarantors apart of editing
the patron.

Test plan:
- Create a patron with category type "Child"
- Define a "guarantor surname" and/or "guarantor firstname" in the
"Contact" block (the patron is not registered)
- See the patron's detail page and notice that the info appear
- Edit and add a registered guarantor
- See the patron's detail page and notice that the 2 guarantors info appear

Note that the relationship has been added.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 5016: Fix some translation issues with English PDF order templates
Katrin Fischer [Sun, 24 Nov 2019 12:01:20 +0000 (13:01 +0100)]
Bug 5016: Fix some translation issues with English PDF order templates

Changes made:
- Instead of n° print no.
- Market Identification => Market identification
- GST => Tax

To test:
- Create at least 2 baskets with one or more orders
- Create a basket group with those baskets
- Print the PDF using
  - the 2 page layout
  - the 3 page layout
- Verify that the changes made appear and everything looks correct

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>
4 years agoBug 17221: (follow-up) Orphan comma in shelf browser
Katrin Fischer [Sun, 12 Jan 2020 03:55:41 +0000 (03:55 +0000)]
Bug 17221: (follow-up) Orphan comma in shelf browser

This further improves the display if no location or no
collection has been set. Example output:

Browsing Centerville shelves, Collection: Non-fiction

Also changes 'Collection code' to 'collection' and takes
care of additional spaces before the comma.

To test:
- Make sure your OpacShelfBrowser pref is set to "Show"
- Search for a record with items and callnumbers in your OPAC
- "Browse shelf"
- Navigate back and forth, verify the information showing on
  top of the list is correctly formatted
- Try different combinations for the following prefs:
  - ShelfBrowserUsesCcode
  - ShelfBrowserUsesHomeBranch
  - ShelfBrowserUsesLocation
- Verify the display is always nicely formatted

Note: fixing capitalization here is tricky, as it also
depends on what was displayed before. If you have no
homebranch, you would want "Shelving...", if you have one
we'd like "shelving...". Left as I found it for now.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>
4 years agoBug 17221: Remove orphan commas in shelf browser
phette23 [Sun, 12 Jan 2020 10:32:53 +0000 (11:32 +0100)]
Bug 17221: Remove orphan commas in shelf browser

This patch adds more conditions to the shelf browser template
such that the displayed text reads as a proper list no matter
what combination of system preferences are utilized

Sponsored-by: California College of the Arts
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>
4 years agoBug 21944: Improve efficiency of code
Kyle M Hall [Tue, 3 Dec 2019 16:03:18 +0000 (11:03 -0500)]
Bug 21944: Improve efficiency of code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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>
4 years agoBug 21944: Reroute waiting hold from wrong branch
Christopher Brannon [Tue, 4 Dec 2018 16:38:34 +0000 (16:38 +0000)]
Bug 21944: Reroute waiting hold from wrong branch

To Test:
1) Place a hold on an item.
2) Check in the item to trigger the hold.  Item is now listed as
waiting.
3) Set branch to a different library.
4) Check in the item to trigger the hold.  Notice that nothing but a
local use is recorded.
5) Apply the patch.
6) Repeat steps 1-4.  Notice that the hold is triggered around routed to
its original pickup location.  A transfer is set and the hold status
is changed from waiting to correctly showing the item as in transit.

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21944: Test for Circulation.pm
Christopher Brannon [Thu, 13 Dec 2018 00:08:54 +0000 (00:08 +0000)]
Bug 21944: Test for Circulation.pm

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24110: Do not html filter TT vars when dumped
Jonathan Druart [Tue, 26 Nov 2019 08:27:21 +0000 (09:27 +0100)]
Bug 24110: Do not html filter TT vars when dumped

DumpTemplateVarsIntranet and DumpTemplateVarsOpac are devs tools to
display the variables sent to the template. They should not be filtered
otherwise it's getting complicate to read.

For instance: $VAR1 = { var =&gt; val }

Test plan:
Turn DumpTemplateVarsIntranet on
Go to the main page
Show the source of the page
Confirm that the variable are displayed as it and not filtered

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24367: May fix another warning
Jonathan Druart [Mon, 17 Feb 2020 15:59:15 +0000 (16:59 +0100)]
Bug 24367: May fix another warning

May fix the following warning:
Use of uninitialized value in concatenation (.) or string at
/kohadevbox/koha/C4/Search.pm line 1818.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24367: Resolve other uninitialized warns in Search.pm
Marcel de Rooy [Fri, 10 Jan 2020 08:51:51 +0000 (08:51 +0000)]
Bug 24367: Resolve other uninitialized warns in Search.pm

Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2074.
Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2137.
Use of uninitialized value in concatenation (.) or string at /usr/share/koha/C4/Search.pm line 2189.
Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2213.
Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2215.
Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2225.
Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2226.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24367: Resolve warn Use of uninitialized value within [arrays]
Marcel de Rooy [Fri, 10 Jan 2020 08:27:39 +0000 (08:27 +0000)]
Bug 24367: Resolve warn Use of uninitialized value within [arrays]

Use of uninitialized value within @operators in string eq at /usr/share/koha/C4/Search.pm line 1362.
Use of uninitialized value within @indexes in pattern match (m//) at /usr/share/koha/C4/Search.pm line 1367.

Trivial tests added.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24367: Resolve warn Negative repeat count does nothing
Marcel de Rooy [Fri, 10 Jan 2020 08:07:05 +0000 (08:07 +0000)]
Bug 24367: Resolve warn Negative repeat count does nothing

Negative repeat count does nothing at /usr/share/koha/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
Negative repeat count does nothing at /usr/share/koha/Koha/QueryParser/Driver/PQF/query_plan/node.pm line 102.

I am not sure if this statement actually does what the author intended,
but adding the test on node_count/atom_count removes the warn.
Repeating this change on query_plan.pm line 62.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24367: Resolve warn Argument available is not numeric in delete
Marcel de Rooy [Fri, 10 Jan 2020 07:54:33 +0000 (07:54 +0000)]
Bug 24367: Resolve warn Argument available is not numeric in delete

Argument "available" isn't numeric in delete at /usr/share/koha/C4/Search.pm line 1480.
The construction delete array[string] simply does not work.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24367: Remove warnings from Search.t
Jonathan Druart [Tue, 7 Jan 2020 15:53:50 +0000 (16:53 +0100)]
Bug 24367: Remove warnings from Search.t

* Set defaults for index to 'kw'
* Check that priority is defined before using it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 24514: Add option to exclude title from patron-title.inc
Nick Clemens [Fri, 24 Jan 2020 17:33:48 +0000 (17:33 +0000)]
Bug 24514: Add option to exclude title from patron-title.inc

Without this patch sorting by patron name on the 'holds awaiting
pickup' report sorted by title, surname, firstname. With this
patch the list will sort by surname, firstname, ignoring the title.

To test:
- generate and capture a hold for a patron named "Mr. A A"
- generate and capture a hold for a patron named "A A"
- generste and capture a hold for patron named "Mr. B B"
- generste and capture a hold for patron named "B B"
- go to holds awaiting pickup
- sort by patron name ascending
- holds sort Mr. A, Mr. B, A, B
- sort by patron name descending
- holds sort B, A, Mr. B, Mr. A
- APPLY PATCH
- Reload holds awaiting pickup
- Confirm holds sort on Surname

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 18933: Allow OPAC messaging SMS number to be set to empty
Aleisha Amohia [Sun, 9 Feb 2020 21:55:01 +0000 (21:55 +0000)]
Bug 18933: Allow OPAC messaging SMS number to be set to empty

To test:
1) Ensure EnhancedMessagingPreferences is enabled and
EnhancedMessagingPreferencesOPAC is set to Show. Set SMSSendDriver to
Email
2) Log in to OPAC, go to your messaging tab
3) Set an SMS number if you havent already
4) Try to remove it (set to empty)
5) Notice that it says the number has been updated, but it has not
been set to empty
6) Apply patch and refresh page
7) Attempt to set the number to empty
8) Confirm this is successful

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>
4 years agoBug 24249: OPAC lists page should require login for login-dependent operations
Owen Leonard [Mon, 16 Dec 2019 17:41:42 +0000 (17:41 +0000)]
Bug 24249: OPAC lists page should require login for login-dependent operations

This patch modifies opac-shelves.pl so that login is required if the
requested operation is anything but "view" and "list."

The patch also modifies a couple of "Log in to create a new list" links
so that they point to the list creation form instead of opac-user.pl.

To test, apply the patch and go to the main lists page (the list of
lists) in the OPAC while not logged in.

 - Click the "Log in to create a new list" link.
 - Log in.
 - You should be taken to the "Create a new list" form.
 - Also test the "New list" link shown in the toolbar when you're
   viewing the contents of a list.
 - When not logged in click the "Lists" menu in the page's header menu.
   Clicking "Log in to create a new list" should take you to the login
   form and then to the list creation form.

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>