]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 25416: Unit tests
Tomas Cohen Arazi [Mon, 11 May 2020 11:38:49 +0000 (08:38 -0300)]
Bug 25416: Unit tests

This patch adds tests for the new 'feature': i.e. searchResults passes
the added $xslt_variables to the XSLTParse4Display method.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25416: Let OPAC XSLTs know if the context is an anonymous session
Tomas Cohen Arazi [Thu, 7 May 2020 17:23:40 +0000 (14:23 -0300)]
Bug 25416: Let OPAC XSLTs know if the context is an anonymous session

This patch makes use of the 'variables' parameter in XSLTParse4Display
method in the different places that it is used in the OPAC. It does by
passing this parameter with

    anonymous_session => 1|0

The value will depend on the output from get_template_and_user (i.e. if
there's a returned borrowernumber).

A special case takes place in search results, as the call to
XSLTParse4Display happens in C4::Search::searchResults. So a new
parameter 'xslt_variables' is added to it.

To test:
1. Apply the [DO NOT PUSH] patch
2. Open the OPAC in your browser
3. Try detail pages, search results, tags and lists/shelves pages with
   or without an active session
=> FAIL: It always says (somewhere) 'Anonymous session: Yes'
4. Apply this patch, restart_all
5. Repeat 3
=> SUCCESS: It will tell the Yes/No correctly regarding anonymous
sessions!
6. Sign off :-D

Sponsored-by: Universidad ORT Uruguay
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24854: DBRev correction
Joy Nelson [Wed, 20 May 2020 17:11:03 +0000 (17:11 +0000)]
Bug 24854: DBRev correction

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24854: DBRev 19.11.05.007
Joy Nelson [Wed, 20 May 2020 14:59:21 +0000 (14:59 +0000)]
Bug 24854: DBRev 19.11.05.007

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24854: Disable IDreamBooks sysprefs
Jonathan Druart [Wed, 20 May 2020 13:01:54 +0000 (15:01 +0200)]
Bug 24854: Disable IDreamBooks sysprefs

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25510: Put space between negation operator and function name
David Cook [Mon, 18 May 2020 06:23:07 +0000 (06:23 +0000)]
Bug 25510: Put space between negation operator and function name

This patch puts a space between the negation operator ! and
the function name (ie log4perl_component).

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25510: Fix syntax error in koha-common.postinst
Jonathan Druart [Fri, 15 May 2020 08:12:46 +0000 (10:12 +0200)]
Bug 25510: Fix syntax error in koha-common.postinst

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25309: Limit size of streetnumber field to 10
Jonathan Druart [Wed, 29 Apr 2020 12:57:57 +0000 (14:57 +0200)]
Bug 25309: Limit size of streetnumber field to 10

It's its size in DB (varchar(10))

Test plan:
Create or editing a patron and confirm that you fill in more than 10
characters in the streetnumber field
Save
=> The patron has been correctly created/updated

Signed-off-by: David Roberts <david@koha-ptfs.co.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 25311: (QA follow-up) Add misssing filter
Katrin Fischer [Fri, 1 May 2020 22:04:15 +0000 (22:04 +0000)]
Bug 25311: (QA follow-up) Add misssing filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25311: Better error handling when updating a patron
Jonathan Druart [Wed, 29 Apr 2020 12:48:38 +0000 (14:48 +0200)]
Bug 25311: Better error handling when updating a patron

Same as the precedent patch for patron's modification

Test plan is identical but with an existing patron

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25311: Better error handling when creating a patron
Jonathan Druart [Wed, 29 Apr 2020 12:38:41 +0000 (14:38 +0200)]
Bug 25311: Better error handling when creating a patron

This is still not ideal but brings a bit of enhancement.

One possible problem is that the patron creation will fail if the
streetnumber field is too long (borrowers.streetnumber is varchar(10).

Test plan:
0. Don't apply this patch
1. Create a new patron with a streetnumber longer than 10 characters
2. Save
=> The patron has not been created and the app explodes
The error is about extended_attributes and not meaningful
Can't call method "extended_attributes" on an undefined value at /kohadevbox/koha/members/memberentry.pl line 560
3. Apply the patch
4. Repeat 1. and 2
=> You get a warning on the interface and you still see the creation
form
5. Check the logs
=> The error is meaningful
"Data too long for column 'streetnumber'"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoRevert "Bug 23727: Add new columns"
Joy Nelson [Tue, 19 May 2020 23:47:21 +0000 (23:47 +0000)]
Revert "Bug 23727: Add new columns"

This reverts commit dcae6b8b940df6855e1200aedcafe3b2978146c2.

4 years agoRevert "Bug 23727: Update Schema"
Joy Nelson [Tue, 19 May 2020 23:47:11 +0000 (23:47 +0000)]
Revert "Bug 23727: Update Schema"

This reverts commit d8b49065d1b86cb49e9c894db5640d4eb33db4c6.

4 years agoRevert "Bug 23727: Add Koha Object(s) related to course reserves"
Joy Nelson [Tue, 19 May 2020 23:46:50 +0000 (23:46 +0000)]
Revert "Bug 23727: Add Koha Object(s) related to course reserves"

This reverts commit c42e3d94ac42389b6ede92bb56cc1e2288c9fa00.

4 years agoRevert "Bug 23727: Editing course reserve items is broken"
Joy Nelson [Tue, 19 May 2020 23:46:46 +0000 (23:46 +0000)]
Revert "Bug 23727: Editing course reserve items is broken"

This reverts commit 07eefd07b635cc50b5210bccf5c56e283db63680.

4 years agoRevert "Bug 23727: (QA follow-up) Fix script tags"
Joy Nelson [Tue, 19 May 2020 23:46:41 +0000 (23:46 +0000)]
Revert "Bug 23727: (QA follow-up) Fix script tags"

This reverts commit 301488f66dd81ba5d585400a41b4c58d893bc744.

4 years agoRevert "Bug 23727: (QA follow-up) Fix for boolean flags"
Joy Nelson [Tue, 19 May 2020 23:46:32 +0000 (23:46 +0000)]
Revert "Bug 23727: (QA follow-up) Fix for boolean flags"

This reverts commit 5f8d94c98a1f8df817fb4df07574fc20ee125107.

4 years agoBug 23727: (QA follow-up) Fix for boolean flags
Martin Renvoize [Thu, 20 Feb 2020 17:15:57 +0000 (17:15 +0000)]
Bug 23727: (QA follow-up) Fix for boolean flags

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23727: (QA follow-up) Fix script tags
Martin Renvoize [Thu, 20 Feb 2020 17:10:49 +0000 (17:10 +0000)]
Bug 23727: (QA follow-up) Fix script tags

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23727: Editing course reserve items is broken
Kyle M Hall [Fri, 14 Feb 2020 20:22:17 +0000 (15:22 -0500)]
Bug 23727: Editing course reserve items is broken

Adding an item to course reserves and trying to edit any values in a second step does not work. Values are not saved and the table shows all values as "Unchanged".

This patch set adds two new sets of columns to the course_items table.

The first set determines if the specified column should be swapped or
not. The was previously 'implied' by the column being set to undef which
has been the root problem with that way of knowing if a column should
swap or not.

The second set of new columns are for storing the item field values
while the item is on course reserve. Previously, the column values
were swapped between the items table and the course_items table,
which leaves ambiguity as to what each value is. Now, the original
columns *always* store the value when the item is on course reserve,
and the new storage columns store the original item value while the
item is on reserve, and are NULL when an item is *not* on reserve.

Test Plan:
1) Apply this patch
2) Add and edit course items, not the new checkboxes for enabling fields
3) Everything should function as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23727: Add Koha Object(s) related to course reserves
Kyle M Hall [Fri, 14 Feb 2020 13:57:05 +0000 (08:57 -0500)]
Bug 23727: Add Koha Object(s) related to course reserves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23727: Update Schema
Kyle M Hall [Fri, 14 Feb 2020 13:45:11 +0000 (08:45 -0500)]
Bug 23727: Update Schema

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23727: Add new columns
Kyle M Hall [Fri, 14 Feb 2020 13:41:28 +0000 (08:41 -0500)]
Bug 23727: Add new columns

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25400: [< 20.05] Fix cloning of circulation rules
Jonathan Druart [Fri, 8 May 2020 10:14:07 +0000 (12:14 +0200)]
Bug 25400: [< 20.05] Fix cloning of circulation rules

This patch is for 19.11 and anterior versions.

The clone functionnality does not clone the "already moved rules"
maxissueqty and maxonsiteissueqty.

Test plan:
Clone some circ rules from one branch to another
Confirm that all the rules have been copied correctly

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on 19.11, no errors

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25278: add clear_search_fields_cache method
Nick Clemens [Fri, 15 May 2020 11:46:07 +0000 (11:46 +0000)]
Bug 25278: add clear_search_fields_cache method

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 25278: (follow-up) Fix other occurrences
Nick Clemens [Mon, 27 Apr 2020 14:05:46 +0000 (14:05 +0000)]
Bug 25278: (follow-up) Fix other occurrences

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.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 25278: Retrieve correct search fields for authorities
Nick Clemens [Fri, 24 Apr 2020 15:52:50 +0000 (15:52 +0000)]
Bug 25278: Retrieve correct search fields for authorities

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.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 25278: Unit tests
Nick Clemens [Fri, 24 Apr 2020 16:32:06 +0000 (16:32 +0000)]
Bug 25278: Unit tests

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.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 25277: Unit test
Nick Clemens [Fri, 24 Apr 2020 16:08:44 +0000 (16:08 +0000)]
Bug 25277: Unit test

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.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 25277: Don't specify a field in query if none passed
Nick Clemens [Fri, 24 Apr 2020 13:34:31 +0000 (13:34 +0000)]
Bug 25277: Don't specify a field in query if none passed

== test plan ==
To test:
0 - Have Koha running with ES 6 enabled
1 - Launch the z3950 responder:
    perl misc/z3950_responder.pl --config-dir /kohadevbox/koha/etc/z3950 --debug
2 - Connect using yaz-client:
    yaz-client localhost:2100
2.1 Alternative, if you add the responder as a Z39.50 server in Koha and
  do a catalogue Z39.50 search. Don't forget to search in the keywords
  field. Not the title field.
3 - base biblios
4 - find bruce
5 - No results
6 - Stop the responder
7 - Apply patch
8 - Repeat
9 - This time you get results

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.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 25308: Escape querystring for Z39.50 popup from cataloging
Phil Ringnalda [Wed, 29 Apr 2020 00:16:51 +0000 (17:16 -0700)]
Bug 25308: Escape querystring for Z39.50 popup from cataloging

Test plan:

1. For bonus fun, Administration -> MARC Frameworks -> New framework,
with the code A&B and description Ants & Bees
2. In the A&B Actions menu, choose MARC structure since Import won't
work
3. Accept the offer to copy in structure from default
4. Cataloging -> New record -> Ants & Bees
5. Type This & That in the 245$a (and for extra credit, in 020$a, and
create an author authority with an & in it so you can put it in the
100/110)
6. Click Z39.50/SRU search, make sure everything you typed is prefilled
including the parts after &
7. Search for anything that will retrieve a record (the ISBN This &
That probably won't), choose Import
8. Check that the record came back, and verify in the Settings menu that
it's still in the Ants & Bees framework.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 11446: Use encodeURIComponent on search terms in authority lookup plugin
Phil Ringnalda [Fri, 24 Apr 2020 18:34:29 +0000 (11:34 -0700)]
Bug 11446: Use encodeURIComponent on search terms in authority lookup plugin

While adding the data from the existing field to the auth_finder URI,
we're using encodeURI(), which is meant for an entire URI and thus
doesn't escape &. Things that are going into a querystring need
encodeURIComponent() instead.

Test plan:

1. Enable the system preference EnableAdvancedCatalogingEditor
2. Clear your browser cache, even a shift+reload won't get you a fresh
marc-editor.js for the advanced editor
3. Create a Topical Term authority with 150 $aThis & That$xStuff & Junk
4. In the Basic editor, use the authority plugin on the 650 field to
select that authority.
5. Click the authority plugin again, verify that the popup contains This
& That and Stuff & Junk rather than just This and Stuff
6. From the Cataloging home page choose Advanced editor
7. In a new line paste 650 _ _ ‡aThis & That‡xStuff & Junk
8. Type ctrl+shift+L and verify the popup shows both words in both
fields
9. When you remember the plugin exists there too, edit your
Stuff & Junk authority, and in a 550 tag type One & Two in
$a and Three & Four in $x and click the plugin link, verify that
the search window has your search terms not cut off.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24994: Correct DB Updates
Martin Renvoize [Thu, 26 Mar 2020 16:01:37 +0000 (16:01 +0000)]
Bug 24994: Correct DB Updates

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 25468: Preserve line breaks in hold notes
Kyle M Hall [Tue, 12 May 2020 14:49:51 +0000 (10:49 -0400)]
Bug 25468: Preserve line breaks in hold notes

In a hold note, line breaks are not preserved when viewing the note. A
note like:
--
Test 1

Test 2
--

will be rendered as:
--
Test 1 Test 2
--

Test Plan:
1) Place a hold with a note, use line breaks in the note.
2) Note the lines all run together when viewing the hold.
3) Apply this patch.
4) Reload the page.
5) Notes should now display with the original line breaks!

Signed-off-by: Lucas Gass <lucas@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 25480: Don't hide apache error and display incorrect error
Jonathan Druart [Wed, 13 May 2020 11:05:48 +0000 (13:05 +0200)]
Bug 25480: Don't hide apache error and display incorrect error

When searching if some apache mod are enable we are hiding the error (2> /dev/null) and display an error about the (guessed) missing module.

It can lead to wrong tracks, let display the original apache error if there is one.

This is linked with https://gitlab.com/koha-community/koha-testing-docker/-/merge_requests/119

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 agoDBRev: RMaint (follow-up) correct Koha.pm version
Joy Nelson [Wed, 13 May 2020 21:43:32 +0000 (21:43 +0000)]
DBRev: RMaint (follow-up) correct Koha.pm version

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25418: (QA follow-up) Raise size of input box
Nick Clemens [Mon, 11 May 2020 17:08:35 +0000 (17:08 +0000)]
Bug 25418: (QA follow-up) Raise size of input box

In twelve hour format the length of the string is 20 characters
we need the box to fit all of them

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 25418: (bug 25133 follow-up) Display due date with hours
Jonathan Druart [Thu, 7 May 2020 15:18:35 +0000 (17:18 +0200)]
Bug 25418: (bug 25133 follow-up) Display due date with hours

And not as due date, it's not a display-only info, but an input.

This patch is a follow-up of Bug 25133: Fix time part of due date for 12hr

== Test plan ==
1. create checkouts with the following params and results
2. tomorrow 11:59 PM timeformat syspref: 12h
   - item is due without a specific time, only date (after-checkout green box)
3. backdate 11:59 PM timeformat syspref: 12h
   - note the yellow confirm box has only the date
   - item is due at 12:00 PM (after-checkout green box)
4. tomorrow 11:23 AM timeformat syspref: 12h
   - item is due at 11:23 AM (after-checkout green box)
5. backdate 11:23 AM timeformat syspref: 12h
   - note the yellow confirm box has the date and time
   - item is due 11:23 AM (after-checkout green box)
6. tomorrow 23:59 timeformat syspref: 24h
   - item is due without a specific time, only date (after-checkout green box)
7. backdate 23:59 timeformat syspref: 24h
   - note the yellow confirm box has only the date
   - item is due at 00:00 (after-checkout green box)
8. tomorrow 11:23 timeformat syspref: 24h
   - item is due at 11:23 (after-checkout green box)
9. backdate 11:23 timeformat syspref: 24h
   - note the yellow confirm box has the date and time
   - item is due 11:23 (after-checkout green box)
10. apply patch
11. create checkouts with the following params and results
12. tomorrow 11:59 PM timeformat syspref: 12h
    - item is due without a specific time, only date (after-checkout green box)
13. backdate 11:59 PM timeformat syspref: 12h
    - note the yellow confirm box has the date and time
      - CHANGE COMPARED TO BEFORE THE PATCH
    - item is due without a specific time, only date (after-checkout green box)
      - CHANGE COMPARED TO BEFORE THE PATCH
14. tomorrow 11:23 AM timeformat syspref: 12h
    - item is due 11:23 AM (after-checkout green box)
15. backdate 11:23 AM timeformat syspref: 12h
    - note the yellow confirm box has the date and time
    - item is due 11:23 AM (after-checkout green box)
16. tomorrow 23:59 timeformat syspref: 24h
    - item is due without a specific time, only date (after-checkout green box)
17. backdate 23:59 timeformat syspref: 24h
    - note the yellow confirm box has the date and time
      - CHANGE COMPARED TO BEFORE THE PATCH
    - item is due without a specific time, only date (after-checkout green box)
      - CHANGE COMPARED TO BEFORE THE PATCH
18. tomorrow 11:23 timeformat syspref: 24h
    - item is due at 11:23 (after-checkout green box)
19. backdate 11:23 timeformat syspref: 24h
    - note the yellow confirm box has the date and time
    - item is due 11:23 (after-checkout green box)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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 25409: Add missing "Required" text and "required" classes
Slava Shishkin [Sun, 10 May 2020 15:15:09 +0000 (18:15 +0300)]
Bug 25409: Add missing "Required" text and "required" classes

Highlight text with red by adding “required” class to the label and added red
“Required” text next to select field in "onboardingstep5.tt" template.

To test:
    1) Start new installation. During onboarding tool phase you will be
       requested to create a new circulation rule.
    2) Observe that "Units" label has no "required" class and that
       there’s no “Required” text next to a select field.
    3) Apply patch.
    4) Repeat step 2 (you can reload circulation rule creation page).
    5) Observe the error is gone.

Mentored-by: Peter Vashchuk <stalkernoid@gmail.com>
Mentored-by: Andrew Nugged <nugged@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 25409: Add missing "required" class to template
Slava Shishkin [Thu, 7 May 2020 11:24:31 +0000 (14:24 +0300)]
Bug 25409: Add missing "required" class to template

Added "required" class to "itemtype" label in "onboardingstep5.tt"
template.

To test:
    1) Start new instalation. During onboarding tool phase you will be
       requested to create a new circulation rule.
    2) Observe that "itemtype" label has no "required" class.
    3) Apply patch.
    4) Repeat step 2 (you can reload circulation rule creation page).
    5) Observe the error is gone.

Mentored-by: Peter Vashchuk <stalkernoid@gmail.com>
Mentored-by: Andrew Nugged <nugged@gmail.com>
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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25417: (QA follow-up) Add integration test for AddReturn
Martin Renvoize [Tue, 12 May 2020 08:24:28 +0000 (09:24 +0100)]
Bug 25417: (QA follow-up) Add integration test for AddReturn

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 25417: (QA follow-up) Restore 'fixing' of fines
Martin Renvoize [Mon, 11 May 2020 20:14:24 +0000 (21:14 +0100)]
Bug 25417: (QA follow-up) Restore 'fixing' of fines

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 25417: (QA follow-up) Clarify _FixOverduesOnReturn test
Martin Renvoize [Mon, 11 May 2020 20:13:47 +0000 (21:13 +0100)]
Bug 25417: (QA follow-up) Clarify _FixOverduesOnReturn test

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 25417: Prevent negative debit amount on backdating returns
Jonathan Druart [Fri, 8 May 2020 10:28:46 +0000 (12:28 +0200)]
Bug 25417: Prevent negative debit amount on backdating returns

Koha::Account->add_credit is expecting a positive amount.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
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 25417: Add unit test
Kyle M Hall [Thu, 7 May 2020 18:21:59 +0000 (14:21 -0400)]
Bug 25417: Add unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
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 25478: DBRev 19.11.05.006
Joy Nelson [Wed, 13 May 2020 18:54:56 +0000 (18:54 +0000)]
Bug 25478: DBRev 19.11.05.006

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25478: (25389 backport) Catch errant cases of LOST_RETURNED
Martin Renvoize [Wed, 13 May 2020 09:57:55 +0000 (10:57 +0100)]
Bug 25478: (25389 backport) Catch errant cases of LOST_RETURNED

For upgrades taking place after the fix for the update in bug 24592 was
pushed, we need to catch any last remaining error cases and correct
them.

(cherry picked from commit c5f34fe3ada46e29c9b1ac99b10186fab6d9670f)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 25478: (25389 backport) Correct stray cases of LOST_RETURNED
Martin Renvoize [Wed, 13 May 2020 09:54:12 +0000 (10:54 +0100)]
Bug 25478: (25389 backport) Correct stray cases of LOST_RETURNED

The original DB update for bug 22563 incorrectly mapped CR to
LOST_RETURNED as aposed to LOST_RETURN.  This patch catches such cases
and updates them in the update for bug 23805

(cherry picked from commit 483e40d2236bbb584022846bd1c85d62f149f096)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 25478: (25389 backport) Correct original DB update for bug 22563
Martin Renvoize [Wed, 13 May 2020 09:50:15 +0000 (10:50 +0100)]
Bug 25478: (25389 backport) Correct original DB update for bug 22563

(cherry picked from commit ed564837a64a45bfd1551ab54417daf0a3b9c559)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 22437: (follow-up) Move deletion of merge requests to DelAuthority
Marcel de Rooy [Fri, 8 May 2020 06:46:59 +0000 (06:46 +0000)]
Bug 22437: (follow-up) Move deletion of merge requests to DelAuthority

Lines can be moved. Deletion can be done too if skip_merge is not set.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 22437: Delete older merge requests at new merge time
Marcel de Rooy [Fri, 3 Apr 2020 08:55:45 +0000 (08:55 +0000)]
Bug 22437: Delete older merge requests at new merge time

If you merge A to B, we should remove older AA merges (regular
merge to itself) in the queue before deleting A.

Test plan:
[1] Set merge limit in prefs to say X.
[2] Find three authorities A, B, C with linkcount >X, >X, <X.
[3] Merge C to B. This creates a 'BB merge' in the queue.
    Auth C is deleted.
[4] Merge B to A. Creating AA and BA in the queue.
    Auth B is deleted.
    Optionally verify that BB is no longer in the queue.
[5] Run the merge_authorities.pl cron job.
    Verify that the linkcount to A is the former total of ABC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Phil Ringnalda <philringnalda@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 22437: Add test case to Merge.t
Marcel de Rooy [Mon, 6 Apr 2020 13:44:46 +0000 (13:44 +0000)]
Bug 22437: Add test case to Merge.t

Test proves now that a 'destructive merge' is removed by
DelAuthority.

Test plan:
Run t/db_dependent/Authority/Merge.t. Should fail when you
do not apply the other two patches and pass with them.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 25342: Unit test
Nick Clemens [Thu, 7 May 2020 13:08:14 +0000 (13:08 +0000)]
Bug 25342: Unit test

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 25342: Force ES id as string
Nick Clemens [Fri, 1 May 2020 14:48:55 +0000 (14:48 +0000)]
Bug 25342: Force ES id as string

To test:
1 - Be using ES
2 - Find a unique record by searchign for title or seomthing
3 - Edit the record
4 - Repeat search and confirm you are returned to the details page
5 - Go to Tools->MARC modification templates
6 - Add a template and define an action
7 - Go to Tools->Batch record modification
8 - Select Enter a list of record numbers
9 - Enter the biblionumber of the record you searched for
10 - Use the marc modification template you setup
11 - Complete the modification
12 - Repeat your search
13 - note you get two results, both pointing to same biblionumber
14 - Check the ES index, note that you have two entries, one with the biblionumber, and the other with #.0, e.g.:
    curl -XGET 'es:9200/koha_kohadev_biblios/data/14.0?pretty'
    curl -XGET 'es:9200/koha_kohadev_biblios/data/14?pretty'
15 - Apply patch
16 - Delete and rebuild ES index
    perl misc/search_tools/rebuild_elasticsearch.pl -d -b
17 - Repeat 2-12
18 - No duplication this time

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 25301: Removed URI parameter "categorycode" from the toolbar
Jonathan Druart [Mon, 11 May 2020 09:10:20 +0000 (11:10 +0200)]
Bug 25301: Removed URI parameter "categorycode" from the toolbar

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 25301: removed URI parameter "categorycode" from "circulation.tt"
Petro Vashchuk [Thu, 7 May 2020 09:22:24 +0000 (12:22 +0300)]
Bug 25301: removed URI parameter "categorycode" from "circulation.tt"

"Edit details" links in patron's circulation check-out page
was sending empty query parameter "categorycode" because there is no
defined template parameter in "circulation.pl"

This patch removes the URI parameter from "circulation.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron's circulation check-out page.
    3) Inspect "Edit details" link.
    4) Observe empty parameter "categorycode=" in that link.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the link anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25301: removed useless URI parameter "categorycode" from template
Petro Vashchuk [Wed, 6 May 2020 13:09:01 +0000 (16:09 +0300)]
Bug 25301: removed useless URI parameter "categorycode" from template

Both "Edit details" links were sending empty query parameter
"categorycode" as there is no such template parameter in "moremember.pl"
defined at all, because template code block looks copy-pasted
from "circulation.tt".

This patch removes the parameter from "moremember.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron details page of that patron.
    3) Inspect both "Edit details" links:
       one in the notification about expiration
       and other one in the "Expiration date:" field.
    4) Observe empty parameter "categorycode=" in those links.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the links anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25130: Reason for accepting/rejecting a suggestion is not visible when viewing...
David Roberts [Mon, 4 May 2020 19:43:32 +0000 (19:43 +0000)]
Bug 25130: Reason for accepting/rejecting a suggestion is not visible when viewing (not editing)

The patch adds the suggestion management reason to the display when
viewing a suggestion.

To test:

1) Edit a suggestion and assign a reason for accepting it.
2) View the suggestion (/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=XX&op=show, replacing XX with your suggestion ID)
3) Under suggestion management, the reason you've just assigned does not
display.
4) Apply the patch
5) Check the display again - the Reason should now be visible directly
under the status.

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
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 17853: Don't remove () from 780 link text
Grace McKenzie [Wed, 18 Jan 2017 22:55:48 +0000 (22:55 +0000)]
Bug 17853: Don't remove () from 780 link text

To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Bug 17853: Don't remove () from 785 link text and restore link value of 780

The only thing we change for 780 and 785 is, that if the display
text contains (), they are no longer removed.

To test:
- Catalogue a record with 785$a some text (including) parenthesis
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.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 25157: Silent patron deletion cmd line script
Jonathan Druart [Fri, 17 Apr 2020 10:24:24 +0000 (12:24 +0200)]
Bug 25157: Silent patron deletion cmd line script

Without -v the script will no longer display messages unless the error
is major.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25343: Use of item in review/comment feature is misleading
Owen Leonard [Thu, 7 May 2020 14:57:25 +0000 (14:57 +0000)]
Bug 25343: Use of item in review/comment feature is misleading

This patch updates the terminology associated with leaving a comment in
the OPAC. the word "item" is replaced with the more specific "title."

To test, apply the patch and make sure the  reviewson system preference
is enabled.

 - Log in to the OPAC and view a bibliographic record which has no
   comments.
 - Under the "comments" tab, verify that the text in the tab says
   "There are no comments on this title. Post your comments on this
   title."

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 19312: Fix typo in template
George Veranis [Wed, 22 Apr 2020 09:43:53 +0000 (11:43 +0200)]
Bug 19312: Fix typo in template

This patch fixes a simple typo

Test plan:
1) Go to Administration -> MARC bibliographic framework
2) Select a framework and add plugin unimarc_field_121a.pl to 121 field
3) Open cataloguing screen
4) Go to 121 field and check if for subfield a shows two times the value
   2-dimensional
5) Apply the patch
6) Go to 121 field again and check if it shows 2 different values

Mentored-by: Andreas Roussos <a.roussos@dataly.gr>
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 25388: There is no link for the "online help"
David Roberts [Thu, 7 May 2020 18:07:21 +0000 (18:07 +0000)]
Bug 25388: There is no link for the "online help"

This patch removes a non-existent link to the online help from the marc
subfield editor.

To test:

1) Go to Admin > MARC Bibliographic framework > Edit MARC structure >
Edit subfield (for example /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=000&frameworkcode=AR)
2) Check that the Max Length value in the Advanced constraints area
contains text saying "See online help"
3) Apply patch
4) Check that the reference to the online help has disappeared.

Remove tabs from start of line

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 25099: Sending a LANG variable to plug-in template
Nicolas Legrand [Thu, 9 Apr 2020 14:50:55 +0000 (16:50 +0200)]
Bug 25099: Sending a LANG variable to plug-in template

To make internationalised plug-ins, it may be useful to get the lang
from C4::Languages::getlanguage. This patch adds
C4::Languages::getlanguage result to a LANG variable which is sent to
the template plugin.

In your plugin, you can add a i18n directory containing
lang[-DIALECT].inc files with a TOKENS hash like this:

    [%
      TOKENS = {
        PLUGIN_NAME = "Mannequin"
        PRESENTATION = "Voici un example d'outil."
        CLICK_ME = "Cliquez moi !"
      }
    %]

The plugin template can then include such a lang[-DIALECT].inc with a
hash containing all the plugin strings:

    [% TRY %]
        [% PROCESS "$PLUGIN_DIR/i18n/${LANG}.inc" %]
    [% CATCH %]
        [% PROCESS "$PLUGIN_DIR/i18n/default.inc" %]
    [% END %]

The strings are then printed in the template with something like:

    [% TOKENS.PRESENTATION %]

Test plan:

1. apply patch
2. install, enable and run BULAC Mannequin plugin
3. it should print stuff in english by default
4. install french French (fr-FR)
5. change you Koha lang to French
6. run again the plugin
7. ho là là! French!

Thanks to Tomàs Cohen and his pay via paypal plug-in from which most
ideas in this patch are taken.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25082: Don't remove characters from string
Katrin Fischer [Tue, 5 May 2020 11:43:39 +0000 (11:43 +0000)]
Bug 25082: Don't remove characters from string

At the moment, show-lang-041 will either get a code
or an AV description to deal with. If it's a description,
we don't want to remove spaces and other chars from it.

To test:
- Repeat tests from first patch with an AV in LANG category
  that consists of multiple words, has a - and other possible
  punctuation.
- The description should show correctly in OPAC and staff.

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 25082: Make 041 descriptions display, if authorised value list is used
Katrin Fischer [Sun, 12 Apr 2020 16:30:05 +0000 (16:30 +0000)]
Bug 25082: Make 041 descriptions display, if authorised value list is used

When 041$a or another subfield is linked to an authorised value list,
Koha will replace the codes with the descriptions from the authorised
value in the MARCXML before passing it to the XSLT.

The XSLT was made to translate codes into descriptions - as there is
no code now, this fails and 'unknown language' is shown.

The patch changes the handling so that when the XSLT is handled something
that doesn't match a known code, it displays the subfield without
processing.

To test:
- Create some records with 041.
  Examples: http://www.loc.gov/marc/bibliographic/bd041.html
- Verify this displays nicely in staff and OPAC
- Apply patch
- Verify display is unchanged
- Remove the patch
- Change one of your MARC frameworks (use another framework than
  for your first test records)
  and link the 041 subfields to the LANG authorised value list
- Go to administration and create some entries for LANG with language
  codes and descriptions
- Catalog a 041 using the normal editor (not advanced)
- You can now use a pull down to select the values you want
- Verify the display is now 'Unknown language' for this record
- Apply patch
- Verify all records display the language descriptions now, using
  an authorised value or not
- Run misc/maintenance/generate_MARC21Languages.pl

Verify the output at the end reads like:
<xsl:otherwise>
    <!-- when 041\$a is mapped to an authorised value list, this will show the description -->
    <xsl:value-of select="\$code" />
</xsl:otherwise>

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 25184: (follow-up) fix number of tests
Joy Nelson [Mon, 11 May 2020 21:56:04 +0000 (21:56 +0000)]
Bug 25184: (follow-up) fix number of tests

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25184: DBRev 19.11.05.005
Joy Nelson [Mon, 11 May 2020 21:52:39 +0000 (21:52 +0000)]
Bug 25184: DBRev 19.11.05.005

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25184: Add syspref
Kyle M Hall [Tue, 21 Apr 2020 16:52:38 +0000 (12:52 -0400)]
Bug 25184: Add syspref

It's entirely possible that some libraries are relying on the current
before for part of their workflow. Do to this possibility, it seems like
a good idea to control this behavior via a system preference.

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Set TrapHoldsOnOrder to "don't trap"
4) Set an item's notforloan value to -1
5) Place a hold on that item
6) Check in the item
7) Note the item is not trapped for hold
9) Set TrapHoldsOnOrder to "trap"
10) Check in the item
11) Koha should now ask if you'd like to trap the item for the hold!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25184: Items with a negative notforloan status should not be captured for holds
Kyle M Hall [Fri, 17 Apr 2020 18:06:32 +0000 (14:06 -0400)]
Bug 25184: Items with a negative notforloan status should not be captured for holds

Negative notforloan statuses should allow holds to be placed but not captured.

Due to coronavirus, we have libraries setting all returned materials to a negative notforloan value of Quarantine for several days.
They're using UpdateNotForLoanStatusOnCheckin to set that status automatically. However, those items are still capturing for holds,
even though those items cannot be checked out until the notforloan status is removed.

In cases like an On Order item where we do want the hold to fill at checkin,
UpdateNotForLoanStatusOnCheckin should be used to clear that notforloan status so the hold can fill.

In master, if I set an item to a not for loan but holdable status ( < 0 ) I can place the hold,
capture the hold and set it to waiting, but *not* check it out to the patron!
This does not make sense. I should not be able to trap an item for checkout unless it can be checked out.

Test Plan:
1) Set an item's notforloan value to -1
2) Place a hold on that item
3) Check in the item
4) Trap the item for that hold
5) Attempt to check the item out to the patron, you will be unable to
   because it is notforloan
6) Apply this patch
7) Restart all the things!
8) Repeat steps 1-3
9) The screen should no longer ask if the item should be trapped
   to fill the hold!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Catherine Ingram <Catherine.Ingram@cedarparktexas.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 15727: Add MARC21 385 - Audience to detail pages
Katrin Fischer [Sat, 11 Apr 2020 14:09:27 +0000 (14:09 +0000)]
Bug 15727: Add MARC21 385 - Audience to detail pages

This add 385$m$a to the staff and intranet detail pages.

To test:
- Catalog different variations of 385 and verify the
  display in the OPAC and staff client is ok

Examples can be found in the LOC MARC21 documentation:
http://www.loc.gov/marc/bibliographic/bd385.html

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
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 22335: Fix comment on suggestions.STATUS in kohastructure.sql
Katrin Fischer [Mon, 13 Apr 2020 02:42:37 +0000 (04:42 +0200)]
Bug 22335: Fix comment on suggestions.STATUS in kohastructure.sql

The description on STATUS was incomplete, missing 2 status and
the SUGGEST_STATUS category.

To test:
- Later this will show up in schema.koha-community.org, but
  for now it can only be verified reading the patch.

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 18670: Remove RewriteLog and RewriteLogLevel from sample config files
Katrin Fischer [Sun, 19 Apr 2020 11:39:08 +0000 (13:39 +0200)]
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files

It looks like RewriteLog will no longer work with Apache 2.4 and later.

RewriteLog
Those familiar with earlier versions of mod_rewrite will
no doubt be looking for the RewriteLog and RewriteLogLevel
directives. This functionality has been completely replaced
by the new per-module logging configuration mentioned above.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

All lines removed were commented out, so there should be
no change in behaviour or side effects.

To test.
- Verify every mention of RewriteLog has been removed from Koha
- Verify patch by reading it

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 24995: (QA follow-up) Terminology: Use checkin and checkout
Katrin Fischer [Sat, 2 May 2020 02:29:11 +0000 (04:29 +0200)]
Bug 24995: (QA follow-up) Terminology: Use checkin and checkout

... instead of issue and return.

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 24995: Add issuedate to table_account_fines and finest
Lucas Gass [Thu, 26 Mar 2020 21:17:42 +0000 (21:17 +0000)]
Bug 24995: Add issuedate to table_account_fines and finest

TO TEST:
1. Have a patron with some fines on an item. Try accruing fines.
2. Go to the accounting tab and look at both the Tranaction tab and Make a payment Tab
3. No Issue Date
4. Apply patch
5. Check those tabs again and see the issue date displays.
6. Go to column configuration and try to hide the issuedate, make sure it hides properly. Try this for both tables. Also make sure other columns hide properly.
7. Sign off!

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24740: Use biblio title rather than biblio number in OPAC search result cover...
Didier Gautheron [Thu, 27 Feb 2020 09:51:19 +0000 (10:51 +0100)]
Bug 24740: Use biblio title rather than biblio number in OPAC search result cover images tooltips

In OPAC biblionum doesn't mean much to patrons, use biblio title field if not empty.

Test plan:
OPAC search
1) Apply the patch
2) For each cover images providers available to tester in:
/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=Cover
OPACLocalCoverImages, AdlibrisEnabled, OPACAmazonCoverImages, GoogleJackets, Coce provider.
3) Enable the provider.
4) Search a Library Catalog for a book with a cover image.
6) test mouse over cover image display biblio title.

OPAC Shelves
1) Enable OPAC virtualshelves preference
2) Create a list.
3) For each covers providers available.
4) Search the List
5) test mouse over cover image display biblio title.

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
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 25341: Remove whitespace from barcode in add_items.pl
Lucas Gass [Fri, 1 May 2020 17:01:11 +0000 (17:01 +0000)]
Bug 25341: Remove whitespace from barcode in add_items.pl

TEST PLAN:
1. Go to course reserves and trying adding a course with a barcode that has some leading/trailing whitespace.
2. It doesnt work
3. Apply patch and restart_all
4. Try again with leading/trailing whitespace, it should work.

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 24522: Show alert when trying to add nothing to a list in staff
Owen Leonard [Fri, 1 May 2020 13:23:12 +0000 (13:23 +0000)]
Bug 24522: Show alert when trying to add nothing to a list in staff

This patch modifies the JavaScript which handles the process of adding
items to a list in the staff client. Error-handling is added in the case
when a set of biblionumbers hasn't been passed to the vShelf function.

To test, apply the patch and perform a catalog search in the staff
client.

On the search results page, select any list from the "Add to list" menu
at the top of the search results table without checking any checkboxes.

You should get an alert, "No item was selected."

Also test that adding to a list works correctly after selecting one or
more titles.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 25340: Pass biblio object to OPAC comments template
Owen Leonard [Fri, 1 May 2020 12:43:40 +0000 (12:43 +0000)]
Bug 25340: Pass biblio object to OPAC comments template

This patch modifies the OPAC comments system so that the biblio object
is passed to the template. This allows the biblio-title include to
properly access the title and subtitle information.

Unrelated change: Remove some custom CSS from the page which was
obsolete.

To test, apply the patch and make sure the "reviewson" preference is
enabled.

- Log in to the OPAC and open a bibliographic record's detail page.
- Under the "Comments" tab, click the "Post your comments" link to
  trigger the pop-up window.
- In the pop-up window, verify that the item's title is correct in the
  page title and the heading. Author should display correctly, if
  present.
- Test submitting a comment and editing a comment. Everything should
  work correctly.

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 24636: (follow-up) - move 'by' into include file
Bernardo Gonzalez Kriegel [Sun, 3 May 2020 22:19:21 +0000 (19:19 -0300)]
Bug 24636: (follow-up) - move 'by' into include file

To ease correct translation.

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 24636: translate planning sections
Bernardo Gonzalez Kriegel [Wed, 29 Apr 2020 00:21:09 +0000 (21:21 -0300)]
Bug 24636: translate planning sections

This patch adds a new inc file to process
and translate plannig sections

To test:
1) Apply patch
2) Create new language files
(cd misc/translator; ./translate create xx-YY)
3) Verify new file is taken into account in
translation files
egrep -n budget_planning misc/translator/xx-YY*.po
check new strings in staff-prog file
4) Go to Administration > Budgets > Founds > Planning
select different options, check page title and
'Planning for...' phrase
5) Translate strings, install new language, enable it,
verify the text change with options like point 4)

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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 25335: group by authorised_value in addbiblio.pl
Andrew Fuerste-Henry [Thu, 30 Apr 2020 19:35:51 +0000 (19:35 +0000)]
Bug 25335: group by authorised_value in addbiblio.pl

To Test:
1- Edit your default framework, connect any subfield outside of the 952 to an authorised value (for example, connect the 942$n to the Yes_No auth value)
2 - Find a record in that framework
3 - Edit the record and find your subfield
4 - The subfield shows a dropdown with no contents
5 - check plack log, see "DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_value' isn't in GROUP BY "
6 - apply patch, restart all
7 - reload edit record page, see your auth value dropdown has contents

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 25133: (follow-up) Move changes to timepicker.inc
Nick Clemens [Mon, 4 May 2020 11:33:11 +0000 (11:33 +0000)]
Bug 25133: (follow-up) Move changes to timepicker.inc

Witht the changes in calendar.inc there can be a js error where the timepicker is not
included. Moving the changes to timepicker.inc should resolve this

Note: in previous patches the amnames/pmnames were removed. It is possible they had
no effect because they were declared in two files, so I have left them in timepicker.inc

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 25133: (follow-up) Remove Names as they do no affect display
Nick Clemens [Tue, 21 Apr 2020 12:06:09 +0000 (12:06 +0000)]
Bug 25133: (follow-up) Remove Names as they do no affect display

In testing I couldn't make any changes to the names have an effect
and everythign worked as expected without these lines

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.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 25133: Handle 12hr format for dt_from_string
Jonathan Druart [Mon, 20 Apr 2020 08:59:55 +0000 (10:59 +0200)]
Bug 25133: Handle 12hr format for dt_from_string

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.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 25133: Fix time part of due date for 12hr
Jonathan Druart [Fri, 17 Apr 2020 10:11:25 +0000 (12:11 +0200)]
Bug 25133: Fix time part of due date for 12hr

With Timeformat system preference set to 12 hours format:

Prior to 19.05.08, when due date was specified at checkout,
the time in the box would show in 24hr format (e.g. 15:59)
while the due date in the patron's checkouts would show
in 12hr format (e.g. 3:59 PM).

After 19.05.08, the format in the specify a due date box
shows in 24hr format and the due date in 12hr format
(in patron checkouts) as before.

But when checking out multiple items using the specify due
date option for the session, the time changes from PM to
AM.

To test:
- Check out an item with specified due date 15:50 PM
- Check out a second item in same transaction
- Verify date changed to AM
- Apply patch
- Repeat
- Verify this time the date is kept as set

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.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 24801: (follow-up) Display all the libraries - Selenium fix
Jonathan Druart [Wed, 8 Apr 2020 06:47:49 +0000 (08:47 +0200)]
Bug 24801: (follow-up) Display all the libraries - Selenium fix

We have it failing now for the delete link..
14:26:50 selenium_1   | 05:26:50.451 WARN - Exception: Unable to locate element: {"method":"xpath","selector":"//*[@id=\"delete_library_UT_BC\"]"}

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24801: Display all the libraries - Selenium fix
Jonathan Druart [Thu, 26 Mar 2020 08:59:32 +0000 (09:59 +0100)]
Bug 24801: Display all the libraries - Selenium fix

Same as for categories.

22:41:28 koha_1       | STRACE: /usr/share/perl5/Try/Tiny.pm:104 in Selenium::Remote::Driver::catch {...}
22:41:28 koha_1       |  /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm:353 in Try::Tiny::try
22:41:28 koha_1       |  (eval 1337):1 in Selenium::Remote::Driver::__ANON__
22:41:28 koha_1       |  (eval 1339):2 in Selenium::Remote::Driver::__ANON__
22:41:28 koha_1       |  /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm:1330 in Selenium::Remote::Driver::_execute_command
22:41:28 koha_1       |  /usr/local/share/perl/5.20.2/Selenium/Remote/Driver.pm:1330 in (eval)
22:41:28 koha_1       |  /kohadevbox/koha/t/lib/Selenium.pm:174 in Selenium::Remote::Driver::find_element
22:41:28 koha_1       |  /kohadevbox/koha/t/lib/Selenium.pm:166 in t::lib::Selenium::click_when_visible
22:41:28 koha_1       |  t/db_dependent/selenium/administration_tasks.t:128 in t::lib::Selenium::click
22:41:28 koha_1       |
22:41:28 selenium_1   | 14:41:28.273 INFO - Executing: [take screenshot])
22:41:28 selenium_1   | 14:41:28.873 INFO - Done: [take screenshot]
22:41:31 koha_1       |
22:41:31 koha_1       | SCREENSHOT: https://framapic.org/0nvX5dhLHpU1/tAEnENSeLRXB
22:41:31 koha_1       | An element could not be located on the page using the given search parameters: //div[@class="main container-fluid"]//a[contains(@href, "/admin/branches.pl?op=add_form&branchcode=UT_BC")],xpath at /kohadevbox/koha/t/lib/Selenium.pm line 174.

The screenshot was obvious, the UT_BC was not on the first page.
There was a total of 33 libraries at this point, which is not expected,
maybe data not deleted from previous selenium tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 24801: Display all the categories - Selenium fix
Jonathan Druart [Wed, 4 Mar 2020 14:53:12 +0000 (15:53 +0100)]
Bug 24801: Display all the categories - Selenium fix

To make sure we are going to be able to click on the "Delete" button of
our newly created category PATRON_CAT, we are displaying them all.

Test plan:
Create several patron categories that will fill the first page:

use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
for my $i ( 1..20 ) {
    $builder->build_object({ class => 'Koha::Patron::Categories', value => { description => "cat_$i" } });
}

Execute the selenium tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 23081: [19.11.x] Set items.issues to 0 if not provided (AddItem)
Jonathan Druart [Mon, 11 May 2020 14:04:27 +0000 (16:04 +0200)]
Bug 23081: [19.11.x] Set items.issues to 0 if not provided (AddItem)

In master it has been replaced by Koha::Object->store and we deal with
the default value.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
4 years agoBug 20816: [19.11.x] Add ability to define custom templated fields in SIP patron...
Nick Clemens [Wed, 19 Jun 2019 17:59:14 +0000 (17:59 +0000)]
Bug 20816: [19.11.x] Add ability to define custom templated fields in SIP patron responses

To test:
 1 - You will need to enable SIP on your testing instance
    cp etc/SIPconfig.xml /etc/koha/sites/kohadev/
    sudo koha-start-sip
    add a user listed in the SIPconfig to your system and give them permissions (superlibrarian works)
    on koha-testing-docker you should be able to start sip with user koha/koha without any adjustments
 2 - If you copied the above file you should be set to get custom field DE with dateexpiry
     Otherwise edit the sip login for the user to have a custom section like:
  <login id="koha"   password="koha"  delimiter="|" error-detect="enabled" institution="kohalibrary" encoding="utf8" >
  <custom_patron_field field="DE" template="[% patron.dateexpiry %]" />
  </login>
 3 - send a status test using the sip cli tester:
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l kohalibrary --patron 23529001000463 -m patron_status_request
 4 - send an information test using the sip cli tester:
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l kohalibrary --patron 23529001000463 -m patron_information
 5 - confirm you receive the DE field with a dateexpiry
 6 - Add your own custom fields and confirm it works with several
         <custom_patron_field field="EW" template="Phone: [% patron.phone %] Email: [% patron.email %]" />
 7 - prove -v t/db_dependent/SIP/Patron.t
 8 - prove -v t/db_dependent/SIP/

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20816: Make SIP tests pass under ES

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 22515: Improve logic determining how to show OPAC suggestions
Owen Leonard [Mon, 27 Apr 2020 13:20:23 +0000 (13:20 +0000)]
Bug 22515: Improve logic determining how to show OPAC suggestions

This patch makes changes to the OPAC suggestions view so that the logic
around logged in users and the OPACViewOthersSuggestions preference is
more specific.

To reproduce the bug you should have pending purchase susggestions in
your system from more than one patron.

1. Set the OPACViewOthersSuggestions preference to "Show."
2. Log in to the OPAC as a user who has not submitted any suggestions.
3. Follow the link to the purchase suggestions page from the menu under
   the search bar.
4. The page will say that there are no  purchase suggestions.
5. Add "?suggested_by_anyone=1" to the end of the page URL.
6. You should see suggestions from other users.

To test, apply the patch and repeat steps 2-3 above. The suggestions
page should show other patrons' suggestions.

Test with different combinations of factors:

 - Logged in user, OPACViewOthersSuggestions off
 - No logged in user, OPACViewOthersSuggestions on
 - No logged in user, OPACViewOthersSuggestions off

Signed-off-by: Lucas Gass <lucas@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 25247: Only convert data ot objects when displaying on screen
Nick Clemens [Wed, 22 Apr 2020 12:11:53 +0000 (12:11 +0000)]
Bug 25247: Only convert data ot objects when displaying on screen

To test:
 1 - Modify a patron
 2 - Circulate some items to the patron
 3 - Click 'Modification log'
 4 - Verify you see your actions
 5 - Under 'Output' select 'To a file'
 6 - Save the output to a file
 7 - View the file
 8 - Not you have references ot objects in stead of patron/item data
 9 - Apply patch
10 - Repeat
11 - Note viewing on screen has not changed
12 - Note exporting to file inlcudes borrower/item numbers and not references
13 - Sign off

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>
4 years agoBug 21565: (follow-up) Make confirmation buttons more detailed
Owen Leonard [Wed, 29 Apr 2020 17:57:44 +0000 (17:57 +0000)]
Bug 21565: (follow-up) Make confirmation buttons more detailed

This patch updates the confirmation buttons to be more specific about
what each one does. My concern was that it wasn't clear that "No" meant
"No receipt" and not "Cancel logging out."

The patch also updates the modal confirmation code so that the modal
body is removed if no message is passed for it.

To test, apply the patch and repeat the previous test plan. When you
click "Finish" you should have the options "Print receipt and end
session" and "End session."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 21565: Add modal to SCO confirm
Lucas Gass [Fri, 24 Apr 2020 18:39:02 +0000 (18:39 +0000)]
Bug 21565: Add modal to SCO confirm

This patch uses the confirmModal framework to add a modal confirm to
SCO Finish.

TO TEST:

1. Enable SCO and go to /cgi-bin/koha/sco/sco-main.pl. Make sure
   SelfCheckReceiptPrompt is set to 'show'
2. Login and click 'Finish' to see the old print alert box.
3. Apply patch and repeat steps 1 and 2.
4. Make sure the modal works for confirming and denying a receipt.
   Checkout some items and make sure everything still functions the
   same.
5. Make sure when printing a receipt that the print dialog automatally
   shows
6. Set SelfCheckReceiptPrompt to 'Don't show' and confirm behavior is
   acceptable.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 25107: Remove double passing of $server variable to maybe_add in C4::SIP::Sip...
Kyle M Hall [Fri, 10 Apr 2020 10:58:43 +0000 (06:58 -0400)]
Bug 25107: Remove double passing of $server variable to maybe_add in C4::SIP::Sip::MsgType

At some point some calls to maybe_add got an extra $server var in their
parameter lists. This doubled parameter does nothing and should be
removed.

Test Plan: No change in behavior should be noted

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 23119: MARC21 added title 246, 730 subfield i displays out of order, and should...
David Roberts [Mon, 6 Apr 2020 23:42:19 +0000 (23:42 +0000)]
Bug 23119: MARC21 added title 246, 730 subfield i displays out of order, and should display before subfield a

This patch makes the subfield i display before subfield a in the 246 and
730 fields

To test:

1) Create a bibliographic record with data in several subfields in tags
246 and 730.
2) See that subfield i displays at the end of the field in the 246
field, and probably not at all in the 730 field. Check in both the OPAC
and staff client
3) Apply the patch.
4) Check your bib record again in both clients. Subfield i should now
display before subfield a.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 years agoBug 15751: Add ModDateLastSeen to ProcessOfflineReturn
Martin Renvoize [Wed, 11 Dec 2019 11:53:51 +0000 (11:53 +0000)]
Bug 15751: Add ModDateLastSeen to ProcessOfflineReturn

Test plan:
1) Before the patch when one checks in something using the KOCT the last seen
date is not updated.
2) After the patch when one checks in something using the KOCT the last seen
   date is updated.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.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 25127: Use Koha::Number::Price->round for comparison
Martin Renvoize [Mon, 20 Apr 2020 11:09:27 +0000 (12:09 +0100)]
Bug 25127: Use Koha::Number::Price->round for comparison

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 25127: Correction to tests
Martin Renvoize [Mon, 20 Apr 2020 08:34:19 +0000 (09:34 +0100)]
Bug 25127: Correction to tests

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>