]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 25696: Correct "Test prediction pattern" HTML button
David Cook [Tue, 9 Jun 2020 05:38:27 +0000 (15:38 +1000)]
Bug 25696: Correct "Test prediction pattern" HTML button

This patch corrects the closing tag for the "Test prediction pattern"
button from "</a>" to "</button>"

Test plan:
1. Apply the patch
2. Create a serial subscription from a new or existing bib record
3. Choose any frequency, numbering pattern, and subscription start
date you choose (ie fill out all mandatory subscription fields)
4. Click "Test prediction pattern"
5. Note that the prediction pattern appears on the right of the screen

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4116ca4097732977d7b954a881f191174c28d651)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4001d4a9a0e0a8c2523aa82d7f042caa64409257)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 7c0b9d9108b5e63d0c1ee6a6438f453fec136656)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23276: Do not display tag if pref TagsEnabled is off
Jonathan Druart [Wed, 20 Nov 2019 14:40:10 +0000 (15:40 +0100)]
Bug 23276: Do not display tag if pref TagsEnabled is off

If the pref TagsEnabled is off we should not display the tags at the
OPAC.
There is a message to tell that tags system is disabled, but the tags
are displayed.

We should redirect to 404 like we do in opac-topissues.pl and
opac-suggestions.pl.

Test plan:
- Turn TagsEnabled on
- Add some tags
- Turn TagsEnabled off
- Hit /cgi-bin/koha/opac-tags.pl
=> Without this patch you see a warning messaging saying that the tag
system is disabled, but the tags are displayed
=> With this patch you get a 404 redirect

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6fc316d2eef5945b20a14bec81e2daa57696dd81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9893fb4ec5a480b7adcbb27f321f7387a4f38f45)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit d0336378897e33bdd31975c2c126a4ce36ac79a9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24862: Handle annonymous sessions gracefuly
Tomas Cohen Arazi [Fri, 13 Mar 2020 15:03:03 +0000 (12:03 -0300)]
Bug 24862: Handle annonymous sessions gracefuly

This patch introduces code to detect (cookie) annonymous sessions and
act as expected.

Right now, as check_cookie_auth is not passed the required permissions
(because there aren't always required permissions, and the code to check
permissions is shared with other authentication mechanisms) it returns
'ok' and the session id. This use case was overlooked when this was
coded, and yeilds unexpected error codes (500) when the user logs out
and the annonymous session cookie is used to hit the API. The end result
doesn't pose any security issue (i.e. the resource access is rejected)
but the returned error code is not correct and should be fixed.

This patch verifies for an anonymous session (and avoids querying the
corresponding patron) and then verifies if there is an authorization
config on the route and if the patron object is defined.

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail, 500 instead of the expected 401
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Repeat the original 'steps to reproduce' from the bug report using
   the browser
=> SUCCESS: Problem solved!
6. Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit de07356028d5b98af3a7cd7cbae02a7ad6402a43)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 99a3d1193ebfcb1ae5046bf36d60b1e53f8c2e93)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24862: Regression tests
Tomas Cohen Arazi [Fri, 13 Mar 2020 14:44:03 +0000 (11:44 -0300)]
Bug 24862: Regression tests

This patch introduces tests for the expected behaviour on API routes
that expect a logged in user, but the request is made with an anonymous
session cookie.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail because the situation is not handled correctly in
the code

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0547ad34dfe01ca7d7660df59e29bc30fdf3cf1d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 8d2255bddcdfad75d8b40daf47bb24c0fd13a9ed)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoUpdate release notes for 19.05.12 release v19.05.12
Victor Grousset/tuxayo [Tue, 23 Jun 2020 15:58:17 +0000 (17:58 +0200)]
Update release notes for 19.05.12 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoFix translations for Koha 19.05.12
Victor Grousset/tuxayo [Tue, 23 Jun 2020 15:44:42 +0000 (17:44 +0200)]
Fix translations for Koha 19.05.12

Marked as fuzzy the errors found by junitmsgfmt

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23825: table name is not always displayed
Jonathan Druart [Tue, 5 Nov 2019 10:07:19 +0000 (11:07 +0100)]
Bug 23825: table name is not always displayed

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0498ffb6336cd5c3f5c580181c513bff968b8c58)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23825: (QA follow-up) Remove database name
Marcel de Rooy [Mon, 28 Oct 2019 09:00:26 +0000 (09:00 +0000)]
Bug 23825: (QA follow-up) Remove database name

As requested on comment15.

Test plan:
Run t/db_dependent/Koha/Object.t again

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e5cdf8854473d6c766816355d080376afa1766d5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23825: Add tests
Jonathan Druart [Thu, 24 Oct 2019 10:51:19 +0000 (12:51 +0200)]
Bug 23825: Add tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT]
Changed 'is' to 'like' with regex since we also have the db name.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a2c5d665e67bdc050c44030cc75ca732970f9da)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23825: Koha/Object.t might fail on a backtick
Marcel de Rooy [Fri, 18 Oct 2019 09:31:10 +0000 (09:31 +0000)]
Bug 23825: Koha/Object.t might fail on a backtick

If the SQL error message contains a backtick instead of a regular quote,
the regex for throwing an exception did not work.
Example:
Incorrect datetime value: 'wrong_value' for column `koha_master`.`borrowers`.`lastseen`
Note the backtics where the regex contains a regular quote.

This patch makes it more flexible: it allows one \W character before the
column name, even optional.

Test plan:
Run Koha/Object.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 480afea9ddf642fbd6ec499172e5ef6400905424)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoIncrement version for 19.05.12 release
Victor Grousset/tuxayo [Mon, 22 Jun 2020 13:10:35 +0000 (15:10 +0200)]
Increment version for 19.05.12 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoTranslation updates for Koha 19.05.12
Koha translators [Mon, 22 Jun 2020 12:12:21 +0000 (09:12 -0300)]
Translation updates for Koha 19.05.12

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoRevert "Bug 17232: Make sure all fields are copies when creating a new framework...
Victor Grousset/tuxayo [Sat, 20 Jun 2020 15:16:16 +0000 (17:16 +0200)]
Revert "Bug 17232: Make sure all fields are copies when creating a new framework from another"

This reverts commit a3569d321705afe0e8f75ce2af7db2f0b29ced15.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25507: Fix table in basket group PDF German 2-pages
Katrin Fischer [Fri, 22 May 2020 23:22:53 +0000 (01:22 +0200)]
Bug 25507: Fix table in basket group PDF German 2-pages

A variable was doubled up which made the columns in the
table of orders no longer line up (different number of headers
to columns).

To test:
- Create at least one basket with one or more orders
- Close the basket
- Add the basket to a basket group manually or let Koha do it
  on closing
- Change the OrderPdfFormat system preference to 'German 2-page'
- Go to the basket group page and print the PDF of the basket
- Verify the table of orders doesn't look right and runs outside
  the page
- Apply patch
- Repeat the PDF print - now table should look right

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7de78ab092f7355a15de60e9a2842d9577777581)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7acffaa03f690a2104afbfeaa3cc12277670db04)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 4b0600e9efd13b76fecdc4fd0e99f9abbd7d48fb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25521: Remove cart_to_shelf note from NewItemsDefaultLocation syspref
Andrew Fuerste-Henry [Fri, 15 May 2020 20:20:05 +0000 (20:20 +0000)]
Bug 25521: Remove cart_to_shelf note from NewItemsDefaultLocation syspref

To test:
1- find the NewItemsDefaultLocation syspref
2- confirm it says "NOTE: This system preference requires the misc/cronjobs/cart_to_shelf.pl cronjob. Ask your system administrator to schedule it."
3- apply patch
4- restart all
5- reload syspref, it doesn't say that anymore!

Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d21ad9fe11bdbd8c49eb3d64bb24c414bea8a1f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64ea0e5a34d1751a8fd7cec3fe5697083a3ebab4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 4ee996debc2181a1b1682564cb243855015f8ab5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25545: (follow-up) Fix capitalization
Katrin Fischer [Sat, 30 May 2020 00:56:04 +0000 (00:56 +0000)]
Bug 25545: (follow-up) Fix capitalization

Total + Adjustments + Shipment cost ($)

changed to:
Total + adjustments + shipment cost ($)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f98f2edf0a1515ce727e670ecaecd4f9295f34cb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 31969accb3dd74ee103c1d7d9fb77141210b1658)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 42f885d5b7c4c7299f80309d2962fd8a7183393f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25545: Add adjustments to total tax included
Nick Clemens [Wed, 27 May 2020 10:38:03 +0000 (10:38 +0000)]
Bug 25545: Add adjustments to total tax included

Adjustments are not affected by tax, they are meant as a way to alter invoice
values after receiving (damaged items, refuneds, extra charges, etc)

When adjustments were added the tax included column was missed

To test:
- Add a basket with at least one order
- Close it
- Receive shipment
- Receive the order
- Finish receiving
- Add an adjustment of any amount
- Verify in the invoice details table:
  - Total tax exc. is showing including the adjustmnt
  - Total tax inc. is missing the adjustment
- Apply patch
- Reload
  - Total tax exc. is showing including the adjustmnt
  - Total tax inc. is showing including the adjustment

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 286a739b5cd906a55b2dc97e6ab1ef9ffb00a6f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4be984e5e037b2c9767cb6c085e37ba20b3a8448)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 7cb30b79d71a663e038fdca32ae60b431b4af9c9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25597: Add missing Javascript libraries to sco printslip
David Cook [Mon, 25 May 2020 06:25:06 +0000 (16:25 +1000)]
Bug 25597: Add missing Javascript libraries to sco printslip

This patch adds missing Javascript libraries to the self-checkout
print slip. These missing libraries were preventing the auto print
prompt and close. There was also a font error.

To Test:
0) Apply patch
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Press F12 on keyboard and choose Console
5) Note no Javascript errors
6) Note that print dialog appears and closes after
a print option is chosen

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8e00a96cf17f9c429050ce2ce5e3095fe566121a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f83d9e683f7f24126e0bba5b36ab4a55d8673de9)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit b0c7a80c5acf76d78f07d75724c9c1afdfad935b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25701: Remove sort on removed field
Nick Clemens [Wed, 10 Jun 2020 10:58:25 +0000 (10:58 +0000)]
Bug 25701: Remove sort on removed field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 35bb41dfc14603d85a6ddb85fec9b4de8d1a4001)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2605cbb912a6259c46e9083789100577a02e498e)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 33934f9dba130bb5de7d758b73df308ab71f2efd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25701: (bug 14419 follow-up) Always display facet groups in the same order
Jonathan Druart [Wed, 10 Jun 2020 10:03:20 +0000 (12:03 +0200)]
Bug 25701: (bug 14419 follow-up) Always display facet groups in the same order

It seems that this regression comes from bug 14419, but I have not found
a logic reason behind that.
This patch restores the behaviour we always had: facet groups must be
displayed in a given order: the Zebra index (au, ccode, holdingbranch,
etc.)

Test plan:
Apply this patch, restart all and confirm that the facets are not moving
up and down when you refresh your search result page.

QA note:
I think the following line must be removed
@facets_loop = sort {defined $a->{expand} && defined $b->{expand} && $a->{expand} cmp $b->{expand}} @facets_loop;

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d6696944267ca1afd7682193ddf3680a905a773d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91ad11021609bc15e9099f7fe9d4afeb69786647)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit dcfb394e03e3ccb56b2f6bc21e481cfd001548a1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25492: Your Account Menu button does nothing on mobile devices
Owen Leonard [Sat, 23 May 2020 14:35:45 +0000 (14:35 +0000)]
Bug 25492: Your Account Menu button does nothing on mobile devices

This patch removes some redundant code from the OPAC JavaScript which
was causing problems with the show/hide action on two controls which are
shown only at narrower browser widths: The "Your account" menu shown
when the user is on a user-related page, and the "Refine your search"
menu shown on the search results page.

To test, apply the patch and go to the OPAC. Narrow your browser width
to below 768 pixels.

 - Perform a search.
 - On the search results page you should see a "Refine your search"
   link at the top of the results. Clicking it should expand and
   collapse the facets menu.
 - Log in to the OPAC.
 - On the "Your summary" page there should be a "Your account menu" link
   at the top of the main part of the page. Clicking it should expand
   and collapse the account menu.
 - Verify that these menus display correctly when you widen and narrow
   the browser window.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9ac43fd97b58120560a33e26509d5acc712c97fb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5b263c80dc647778bd0a4e23dbfd65167cf4c336)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 1a90ca94ddb5ff170fb0e0ae4ef65fd9ca5bb0fb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25526: Equality matching is case sensative
Martin Renvoize [Mon, 8 Jun 2020 09:23:53 +0000 (10:23 +0100)]
Bug 25526: Equality matching is case sensative

TEST PLAN:
1. Have a fine on a Patron's account.
2. Choose the "Write off Selected" button
3. Enter an amount less than the amount owed by the patron.
4. Koha will give a yellow box with a note "You must collect a value
   greater than or equal to 2.00." The $2.00 is the amount that is
   attempted to write off (the amount less than the amount owed).
5. Apply patch
6. Again try to writeoff an amount less than the amount owed.
7. You should be able to write it off.
8. Try paying an amount more than owed, you should still get an
   error. You shouldn't be able to write off more than the amount.
9. Follow the above steps via 'Pay selected' as aposed to 'Writeoff
   selected'.
10. You should not be able to 'Tender' less than the amount you have
    'Paid'.
11. Disable Javascript and run through all the above steps. You should
    still be blocked where relevant.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bbac95d9fbbcc0b586a7bc094f421c35a7d71011)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 433fe0710043660404feb45b54ef5235974fa9a4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 392ce9cbd57a916d94dc50487f4f71ee2eabfe08)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 17842: Simplify the code
Jonathan Druart [Tue, 2 Jun 2020 09:05:12 +0000 (11:05 +0200)]
Bug 17842: Simplify the code

There is no need for all the conditions.
From Encode::encode POD:
  "If the $string is undef, then undef is returned."

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 74c7530e3dacd7a1df9ed72d031bc1a5b7063142)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6802d1a67e47fae0982c969f414b05f4f6a7cc28)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 4809536e8f561ea708264b80d415b10b4703a9fd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 17842: UTF-8 encode ISO2709 MARC download from cart
David Cook [Tue, 26 May 2020 02:30:53 +0000 (12:30 +1000)]
Bug 17842: UTF-8 encode ISO2709 MARC download from cart

The cart was outputing ISO2709 MARC records with Latin-1
encoding. Records containing non-latin1 characters were
automatically re-encoded as UTF-8 by browsers, which led to
inconsistent character encodings for downloaded MARC files.

This patch explicitly encodes ISO2709 MARC characters from
the cart download as UTF-8 encoded bytes, which resolves the problem.

Test Plan:
0) Don't apply patch
1) Create bib record with only ASCII characters
2) Add a ü character to the title
3) Save bib record
4) Download bib record from cart (opac and staff client)
5) Using xxd or some other program, note that the ü is
represented by a FC byte (latin-1 encoded)
6) Apply the patch
7) Download bib record from cart (opac and staff client)
8) Using xxd or some other program, note that the ü is
represented by C3 BC bytes (utf-8 encoded)
9) Success

(Note that you could potentially use Notepad++ or some other
program to open the downloaded file and just note the encoding
that it finds. You could also try "chardetect" instead. Lots
of options for figuring out the encoding.)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 13ec430eccd52413e756c88f90a370787842cbc2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a1a1ed902d5dd4af9dbab6eb30f4d07f6eb52732)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit eb6c53b8ea4d8ec775c7f0bc21fb1c340639ac1b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25653: Update tab selector to use 'active' and include all options
Nick Clemens [Tue, 2 Jun 2020 14:00:25 +0000 (14:00 +0000)]
Bug 25653: Update tab selector to use 'active' and include all options

It looks like the functionality was broken when ui tabs were upgraded
and mainmainentry was added

To test:
1 - Browse to Authorities
2 - Search in each tab
3 - Note all search results revert to 'Search main heading a only'
4 - Apply patch
5 - Note selection is retained after search

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4365b64403ba9492650e2e1733ccad8772dcdfc2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e77736c6d6683d145c7f66821c70a24c4e07e2f8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit e6227af570de4ec3726fcdb8dce3059ec1ef0d6f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25634: Warn if koha-shell returns non-zero in koha-foreach
David Cook [Mon, 1 Jun 2020 23:53:06 +0000 (09:53 +1000)]
Bug 25634: Warn if koha-shell returns non-zero in koha-foreach

By putting koha-shell in an if statement, "set -e" will no longer
cause the entire koha-foreach program to exit, if koha-shell
returns a non-zero status.

If a non-zero status is returned, we warn on it, and the caller
of koha-foreach can interpret that command visually.

To Test:
1) Write a shell script that says "Hello" and then exits with a 1
status
2) Run koha-foreach against that shell script with multiple instances
available to koha-foreach
3) Before the patch, koha-foreach will die after the first "Hello"
4) After the patch, koha-foreach will continue, through all the
instances, and report which instances returned non-zero statuses
by which command.

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>
(cherry picked from commit 4c548cb08f3f3013778da71d47745f48b6adffd8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 79663817ec58b23525f08862210ad4c29fe89d33)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 1e982eafd1748f659438d2dd43c4f87a301459a5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25677: Checkbox options for EDI accounts cannot be enabled
Kyle M Hall [Thu, 4 Jun 2020 18:43:58 +0000 (14:43 -0400)]
Bug 25677: Checkbox options for EDI accounts cannot be enabled

Checking any of the checkboxes in the EDI Account editor does nothing.
They always remain set to "off".

Test Plan:
1) Browse to edi_accounts.pl
2) Create a new EDI account, check all the checkboxes
3) Edit the account, note none of the checkboxes are checked
4) Apply this patch
5) Repeat steps 1-2
6) Note the checkboxes remain checked

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4714b08f7270b86c62d9e32ce8f14d3afb08f37e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bfdd12d7c1c5df21a633b68b36af9043dc931395)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 0ed56937655e15868e9864afc875153bff0ad8e4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25557: Correct basket.pl column config
Lucas Gass [Thu, 21 May 2020 23:42:01 +0000 (23:42 +0000)]
Bug 25557: Correct basket.pl column config

This patch corrects the column configuration tool for basket.pl
TO TEST:
1. Go to Acquisitions and look at basket.pl
2. Open another tab and go to column configuration and try to hide some columns like Quantity.
3. See that the wrong columns are being hidden.
4. Apply patch
5. Trying hiding each column in the table and make sure the correct one is being hidden.
6. Rejoice!

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 79f7879303724aa1ae69db8c3f2ea5aa34148dc5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e63e40d6d42454eeef2dbe47a3f32d33d5e7950f)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 3715c8680031d3da17c193e7de3583b88c58a8ee)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25538: Default to --login|-i if no command passed
Jonathan Druart [Wed, 10 Jun 2020 11:21:42 +0000 (13:21 +0200)]
Bug 25538: Default to --login|-i if no command passed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c9be26ad5ac7615f2f723900dfd16d83d71b66fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 06e121115fa9e9d723f20b6fff17336f18081704)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 02449287a89bdd611c4b33a3de0c7cd678daf41c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25538: Use sudo -i in koha-shell
Jonathan Druart [Wed, 10 Jun 2020 09:17:34 +0000 (11:17 +0200)]
Bug 25538: Use sudo -i in koha-shell

See man sudo, -i parameter.
Should we expect regressions?

Test plan:
0. Use D11 or U18.
Don't apply this patch
1.
$ echo $KOHA_INTRANET_URL
$ sudo koha-shell kohadev
$ echo $KOHA_INTRANET_URL
2. Apply this patch
$ cp debian/scripts/koha-shell /usr/sbin/koha-shell
3. Repeat 1.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e5ffbb4dd4c3b616f715b74a9091e73e48ff0715)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f5f0307e41c9c869eaff8a7082c7f5031e494426)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit c3d6d776318e25a6d304f0f1f9d27e22cf245e6b)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25538: Don't run search_utf8.t if KOHA_*_URL empty
Jonathan Druart [Wed, 10 Jun 2020 08:50:05 +0000 (10:50 +0200)]
Bug 25538: Don't run search_utf8.t if KOHA_*_URL empty

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c4d2444057dd2f8ae613ad73328f880258810c7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d1f60037b9d390c4d91bee61b06b7dfda368f3c1)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 27831fe44293b9503da082739c16dd31f5de87db)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25517: Look in all possible places for MO files
Julian Maurice [Fri, 22 May 2020 14:45:02 +0000 (16:45 +0200)]
Bug 25517: Look in all possible places for MO files

On a 'dev' install, MO files will be installed in
<intranetdir>/misc/translator/po
On 'standard' and 'single' installs, they will be installed in
<intranetdir>/../../misc/translator/po

This patch makes Koha::I18N try to use the "dev" directory first, and
fallback to the "standard" directory.
If none of these directories exist, it dies.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6028c92c7b299b85d871605cd46d5bb97b760f7b)

(cherry picked from commit a43eb84800b8e744354b414e7a8220a55934ed68)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25617: (QA follow-up) Add responses to tests
Nick Clemens [Thu, 28 May 2020 17:37:20 +0000 (17:37 +0000)]
Bug 25617: (QA follow-up) Add responses to tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 46e23b3a035e9c326c50aaa2dfba62667a9aca4b)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit db19a00854453ba1ad0fada7018562d87d41fe86)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25617: (bug 25133 follow-up) 12 PM is not 24 but 0
Jonathan Druart [Thu, 28 May 2020 14:12:57 +0000 (16:12 +0200)]
Bug 25617: (bug 25133 follow-up) 12 PM is not 24 but 0

There was an error in the precedent code, in 12hr format, 12PM is
actually 00:00

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dd0c7c55fc2b5f0a312055d0c051b166d75ea82d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 04791a15cae2cc0c9c5fd2ccc9b2aeca3930f67a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25473: Move JavaScript out of the footer of addorderiso2709.tt
Owen Leonard [Thu, 14 May 2020 11:47:51 +0000 (11:47 +0000)]
Bug 25473: Move JavaScript out of the footer of addorderiso2709.tt

This patch undoes the move of the JavaScript block to the footer made in
Bug 22734. The item information tab can include embedded JavaScript for
cataloging plugins, and these don't currently work with JS in the
footer.

To test, apply the patch and test the JavaScript driven features of the
"Add to basket from a staged file" page:

- Acquisitions -> Vendor -> Basket -> Add to basket from a staged file
  - MARC and Card previews, select all/clear all
  - Item information tab: Cataloging plugins for fields like
    date acquired, barcode
  - Default accounting details tab: Show inactive control

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9e665fb9a753032fed711959f1d8cc5780655b8c)

(cherry picked from commit 04fc143d25f743b9d58c6fd1f28ba1d9cd0216cb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24413: Add tests
Jonathan Druart [Wed, 13 May 2020 13:18:29 +0000 (15:18 +0200)]
Bug 24413: Add tests

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bbe6b07f4340afca18763724194fbc577b77959d)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit ec82606a3ad0371cac8427a01cb058a9df36dbc2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24413: Do not remove the restrictions from AddReturn
Jonathan Druart [Fri, 21 Feb 2020 11:37:44 +0000 (12:37 +0100)]
Bug 24413: Do not remove the restrictions from AddReturn

As we are now removing them from MarkIssueReturned they should not be
removed from AddReturn as well.
Also I think this will fix a regression, if $doreturn is not set (in
case the item is withdrawn and BlockReturnOfWithdrawnItems or the item
is lost and BlockReturnOfLostItems, and other specific cases).

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 10af741387a75d29c6b7782c6ce3d2c07cad9517)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit b50c446f46c2ce987498baeed19c0af07a61fd42)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24413: Apply AutoRemoveOverduesRestrictions for lost items
Jonathan Druart [Mon, 17 Feb 2020 15:27:57 +0000 (16:27 +0100)]
Bug 24413: Apply AutoRemoveOverduesRestrictions for lost items

It's quite hard to know where this need to be fixed.
it can be either MarkIssueReturned or LostItem, depending on the
different cases we want to handle.

This patch picked MarkIssueReturned, but maybe the similar code in
AddReturn needs to be removed then.

== Test plan ==
1. Set MarkLostItemsAsReturned to 'from items tab of the catalog module'
2. Set AutoRemoveOverduesRestrictions to 'Do'
3. Set up an overdues restriction in the notice triggers
4. Check out an item and let the overdues process restrict the account
5. Navigate to the moredetail.pl page (items tab) for the overdue item
6. Mark the item lost
7. Return to the account in question - notice the item has been returned, but the restriction remains
8. Clean state: remove restriction + remove item lost status
9. Apply patch
10. Redo the test but this time in addition to the item being returned,
    the restriction will be lifted.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 70ae2eaf9cdc7708f85b1724e5bc89623355b585)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 28664aea0ae023ffd9fb57ff130138662e591b1d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25428: Correctly encode link if authority subfield is a URL
Owen Leonard [Fri, 8 May 2020 16:13:40 +0000 (16:13 +0000)]
Bug 25428: Correctly encode link if authority subfield is a URL

This patch modifies the script and template for showing the details of
an authority record so that if the authority subfield is configured to
be a link the link is correctly output in the template.

To test you must have an authority type configured with at least one
subfield designated as a URL:

 - Go to Administration -> Authority types
 - Select "MARC structure" from the actions menu for the authority type
   you want to modify.
 - Select "Subfields" from the actions menu for the tag containing
   the subfield you want to modify (for instance 856).
 - Edit the subfield you want to display as a link (e.g. subfield u).
 - In the subfield configuration form under "Advanced constraints" check
   the "Is a URL" checkbox and save your changes.

 - Apply the patch and go to Authorities in the staff interface.
 - Search for or create an authority record which contains URL
   information in the right subfield (for instance 856$u).
 - View the details for the record. Using the 856 example, the "8" tab
   should contain an active link pointing to the correct URL.

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>
(cherry picked from commit 1bcc45be621b19dc602d675ca10d844301496b06)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit c5d8ee7651da7732990139682c1ad404d17a9d7f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25452: Restore alternate address email display
Jonathan Druart [Mon, 11 May 2020 08:58:15 +0000 (10:58 +0200)]
Bug 25452: Restore alternate address email display

Broken since
  commit 0ab22e1c7c6b6e8d14a4fb7478ab2a3d42da347d
  Bug 18789: Send Koha::Patron object to the templates

Test plan:
Create or modify a patron, fill the "email" field of the "alternate
address" block (B_email)
Go to the detail view of the patron
=> Without this patch the email is not display
=> With this patch applied you see 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>
(cherry picked from commit 635242a69a5ed049801d018a6be712d8dcbabb07)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit e42359b1f53937afc2f14b6d35b7b2758fcb0a9d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25506: Fix for "Use of uninitialized value" in about.pl
Slava Shishkin [Thu, 14 May 2020 14:53:47 +0000 (17:53 +0300)]
Bug 25506: Fix for "Use of uninitialized value" in about.pl

Perl warning on the "About Koha" page:

Use of uninitialized value in string eq
at /home/vagrant/kohaclone/about.pl line 220.

Fixed by adding additional precheck for
C4::Context->config('zebra_auth_index_mode') being Perl's "true".

To test:
    1) Ensure you don't have "<zebra_auth_index_mode>...
       </zebra_auth_index_mode>" in your koha-conf.xml so you will have
       "C4::Context->config" returning "undef"
    2) Go to the "About Koha" page.
    3) Observe the warning in the log file.
    4) Apply patch.
    5) Repeat step 2.
    6) Check that previous warning was suppressed.

Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 67ff0f72854d4dabdda8cb59696f15e7b5d88c2a)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 95c56339b9d0de7a8b5d10a77b52917ec79ff1fe)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25184: RMaint follow-up: DBRev 19.05.11.002: Replay of 19.05.10.003 upgrade to...
Victor Grousset/tuxayo [Thu, 11 Jun 2020 22:42:47 +0000 (00:42 +0200)]
Bug 25184: RMaint follow-up: DBRev 19.05.11.002: Replay of 19.05.10.003 upgrade to fix typo

It's to ensure the changes are done because it initially had a typo.
Because fixing the typo wasn't enough since the typo was released.
So people who upgraded to 19.05.11 didn't have the DB changes.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25563: (bug 24386 follow-up) Don't disable submit button if form has not been...
Jonathan Druart [Thu, 21 May 2020 10:00:34 +0000 (12:00 +0200)]
Bug 25563: (bug 24386 follow-up) Don't disable submit button if form has not been submitted yet

On bug 24386 we prevent double form submission using the our own preventDoubleFormSubmit JS function.

The problem is that we are checking some conditions, and prevent the
form submission if something is not filled (for instance no checkbox
checked, or no fund selected).

Technically it means that:
- click the submit button
- it submits the form
- we disable the submit button
- we prevent the form to be submitted before something is wrong
At this stage the button is disabled and the form cannot be longer be
submitted.

This patch replaces the "on submit" event of the form with the "on click" event of the submit button.
Which means we are going to:
- click the submit button
- we prevent the form to be submitted before something is wrong
=> The button will only be disabled if the form is really submitted

Test plan:
- stage a marc record
- acquisitions: have a basket
- click on "Add to basket"
- "From a staged file"
- Don't tick the record
- Save
- You should see an expected error message
- Tick the record
- Save
- You should see an expected error message
- Choose a fund
- Click the "Save" button as many times as you can, to try double submit
it.
=> The order is saved

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 37370c415ab5e59422aff46be14ccfec0cf8c373)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 74b4b64bf94ec60c2b6a01e4dbfad67216ffeeb1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25531: Debar patron if needed when checkin is backdated
Jonathan Druart [Mon, 18 May 2020 15:50:11 +0000 (17:50 +0200)]
Bug 25531: Debar patron if needed when checkin is backdated

If think this case does not apply to real-life, but the logic needs to
be fixed.
If an item is due now, and AddReturn is called now with a return date in
the future, the issue is overdue and the patron must be debarred.
However it is not as we compare with now and not the return date

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>
(cherry picked from commit 0c238db2f5763db48fe3d451b599ffd6b0e42869)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25531: Add tests
Jonathan Druart [Mon, 18 May 2020 15:49:37 +0000 (17:49 +0200)]
Bug 25531: Add tests

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>
(cherry picked from commit 6066bb39a5ed9b284bf2344e4b98394e89f809a3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24062: Make sure TestBuilder will stop generate X or other invalid category's...
Jonathan Druart [Tue, 19 Nov 2019 09:14:31 +0000 (10:14 +0100)]
Bug 24062: Make sure TestBuilder will stop generate X or other invalid category's types

To make sure this kind of random failures will not appear in a future we
are going to fix it at TestBuilder level.

Test plan:
  prove t/db_dependent/TestBuilder.t
and confirm it returns green

You could also only apply the tests against master, run them several
times and confirm that they fail most of the time.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fda209ca505a2a0e0099788aa5f654601f1caf07)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24062: Fix the failing test
Jonathan Druart [Tue, 19 Nov 2019 08:40:07 +0000 (09:40 +0100)]
Bug 24062: Fix the failing test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cbe22553fe4bdcb9bf1bfc127dd4371f09ef43e9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24881: [19.05.x] Try to fix random failure from Circulation.t
Jonathan Druart [Mon, 16 Mar 2020 16:19:22 +0000 (17:19 +0100)]
Bug 24881: [19.05.x] Try to fix random failure from Circulation.t

This is a follow-up of bug 22917.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b0551cfd178565b5b30980096f53d4fffcfca454)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23403: Catch other cases of ->{patron}
Nick Clemens [Mon, 13 Apr 2020 15:51:36 +0000 (15:51 +0000)]
Bug 23403: Catch other cases of ->{patron}

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>
(cherry picked from commit 840b417890cdd341922cb3a086b08946bb96736d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23403: List borrowernumber in the ILS::Patron fields
Jonathan Druart [Mon, 23 Mar 2020 14:57:14 +0000 (15:57 +0100)]
Bug 23403: List borrowernumber in the ILS::Patron fields

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>
(cherry picked from commit 20a6b0f7dbe6db1f5b47b8bb7371b7b0cd192062)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23403: Fix whitespace
Kyle M Hall [Mon, 23 Mar 2020 12:52:58 +0000 (08:52 -0400)]
Bug 23403: Fix whitespace

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>
(cherry picked from commit dbc4e4c63d83beed132a4d9b20ef47b2327f4f67)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23403: Remove cardnumber from SIP
Jonathan Druart [Thu, 21 Nov 2019 17:39:15 +0000 (18:39 +0100)]
Bug 23403: Remove cardnumber from SIP

== Test plan ==
1 - Have two patrons with userids and no cardnumber
2 - Note which of these has the higher borrower number
3 - Use the SIP cli emulator to connect and checkout a book to the patron with higher borrowernumber
      See example after
4 - Note the book may checkout to the wrong patron!
5 - Apply patch
6 - Checkout to both patrons via sip
7 - The patrons get the correct checkouts

=== SIP CLI emulator ===
./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 \
-l CPL --patron 23529001000463 -m checkout --item 39999000001259

translation: via the koha user term1, checkout item 39999000001259 to
patron 23529001000463

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
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>
(cherry picked from commit 7e4296c4194afaa722a20b114cf928e2f17d7ad0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24458: Regression tests
Tomas Cohen Arazi [Mon, 11 May 2020 13:08:36 +0000 (10:08 -0300)]
Bug 24458: Regression tests

This patch introduces tests for searchResults. The idea is to set a
subfield as hidden in OPAC and another on the staff interface, and see
if searchResults honours this on the XSLTResultsRecord contents.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Search.t
=> FAIL: This is not really implemented

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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 448915cc3d8dcd92ce93736bea09a5a0a113dc03)

4 years agoBug 24458: Use the ViewPolicy filter on search results
Tomas Cohen Arazi [Mon, 11 May 2020 13:10:39 +0000 (10:10 -0300)]
Bug 24458: Use the ViewPolicy filter on search results

This patch implements the use of the ViewPolicy record processor filter
inside C4::Search::searchResults. The idea is that the $record_processor
is instantiated once and reused inside the loop. This leaves options for
further optimizations I will do on a follow-up bug.

The filter is applied to the MARC data before it is passed to the XSLT
processor.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Search.t
=> FAIL: This is not implemented, tests fail
3. Apply this patch
4. Repeat 2
5. Feel the joy in your body from a long standing bug being solved
6. Sign off :-D

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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit e78231f3f63ed49fc65ac653e57159a8aba7fbe2)

4 years agoBug 25535: Hold API mapping maps cancellationdate to cancelation_date, but it should...
Kyle M Hall [Mon, 18 May 2020 18:14:42 +0000 (14:14 -0400)]
Bug 25535: Hold API mapping maps cancellationdate to cancelation_date, but it should be cancellation_date

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>
(cherry picked from commit df41ff4a9c54c0e958bbdb49acec671c024ec29e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 23994: Fix random failure from AdditionalFields.t (U18)
Jonathan Druart [Fri, 8 Nov 2019 09:28:01 +0000 (10:28 +0100)]
Bug 23994: Fix random failure from AdditionalFields.t (U18)

t/db_dependent/Koha/Objects/Mixin/AdditionalFields.t .. 1/12
 #   Failed test '->additional_field_values should return the correct values'
 #   at t/db_dependent/Koha/Objects/Mixin/AdditionalFields.t line 82.
 #     Structures begin differing at:
 #          $got->[0]{value} = 'bar value for basket2'
 #     $expected->[0]{value} = 'foo value for basket2'
 # Looks like you failed 1 test of 12.

We do not really know why, but the values are not returned in the order they
are stored in DB. Fixing this random failure for now at test level.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6f464191ffcca26d65c158c37f21216cee8aa227)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 24854: DBRev 19.05.11.001
Joy Nelson [Wed, 20 May 2020 14:59:21 +0000 (14:59 +0000)]
Bug 24854: DBRev 19.05.11.001

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit a17ea63d028fe500f80ff75b42a4fa1a511fe708)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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>
(cherry picked from commit 12b91faa040d9b0fd166074df587f7394959b0e9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
4 years agoBug 25184: Rmaint follow-up: fix updatedatabase typo
Lucas Gass [Thu, 28 May 2020 22:48:12 +0000 (22:48 +0000)]
Bug 25184: Rmaint follow-up: fix updatedatabase typo

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoUpdate release notes for 19.05.11 release v19.05.11
Lucas Gass [Fri, 22 May 2020 20:11:24 +0000 (20:11 +0000)]
Update release notes for 19.05.11 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoIncrement version for 19.05.11 release
Lucas Gass [Fri, 22 May 2020 20:06:03 +0000 (20:06 +0000)]
Increment version for 19.05.11 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoTranslation updates for Koha 19.05.11
Koha translators [Fri, 22 May 2020 19:58:06 +0000 (16:58 -0300)]
Translation updates for Koha 19.05.11

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 359b9f2029a8171d673bbc84d21797283822b7e8)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 25ad50b252941e96541dc2d056559159b7d9dcc2)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 048894ffa5b7eb8dc1f5f9517be5834a3a889e1c)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 4e2078d81b3ccb17e9794a6452578c5e87817e70)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 4c201630ff3c8239c33588a3ffd82156a3c762ec)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 6f9dda2f295a2d25c01ad48fd3f54fb25735f60b)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit e21179fd9bad471c931ce0e89cd8f4df145af8f1)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 180360e3fde1befd73fb0d626d0fc7ddebc057de)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 2cb01116ee3ed6ce6296cb0ad5e794fd68e58f8a)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 08aa52c8315c7bec6df9800101c61591892d07dd)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit c748b95d57ef625e77742785f8ced5369b326787)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 5518f9183054a49c672c94c6d98081da41571668)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 1bae59611da3ed166176fc67f5e68980afbb87d0)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 7560c4581331a6a09f023df38cf04e4e8b4d5b2c)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 4bc3fe1c72602c6e3886725836558af8f7b370f2)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 96202ca7bb533ddf6bcb1c8486b8ae5a9591f1a1)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit b48282ba825870f11c10edc7aee44f4b0db52435)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 75e7861df4834d7172b55552d1b7a03d3ab3b537)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
4 years agoBug 25184: DBRev 19.05.10.003
Lucas Gass [Fri, 15 May 2020 22:00:59 +0000 (22:00 +0000)]
Bug 25184: DBRev 19.05.10.003

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit bb3893720d55100380bf431cf6aea8a044a9bd04)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit aa9a4fc3f64787e536faabd4b49be76d1e8144f1)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit e98dc9494a1bf0307084c5d11bdfb25d49d0b131)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 8a8130c0524efd4c211155cecce78392a76804f6)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit d14e25b57ed68637517da323d28108d5ea5b247b)

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>
(cherry picked from commit 9be2c20c461382ebb6ebed0482b16f3d066c2ea0)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit f46d88125d48fa21893f77f14584320dc3548a64)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit b4c06e171730e1ed5d9b317670f25f01744cf742)

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>
(cherry picked from commit e49ecdedd87d8796da77adeaa9e864c43ca90763)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit f5c7e3fd76f3d08b7b7ed2090f4d822bd3f2e3de)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 7202498771468b9263474e1255039e3845da64c0)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 1adb28bc23b11e4c11b97f0524b829e840c70a74)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 1973003eaafd4cc7f7040cc66f946751eb2bacc3)

Signed-off-by: Lucas Gass <lucas@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>
(cherry picked from commit 93f37f3a03fc1205b3c3cb54e650081dc3dd79ea)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 18f3661179e6a556fc1c39a8841edb99e4e97cd9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit e4e31117e7dcdc769f6c94553165202c49c7e0ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit b325831210dacbb0857f843670eb26b0c5268e6d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 6e53814c58be68bf7392395896c7a66a40d12bd1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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>
(cherry picked from commit 8dea59bba0c620da41a47698e2142e61f1dba3f9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>