]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 27204: Fix end boundary index, never return results for non-existant accountlines
Kyle M Hall [Fri, 11 Dec 2020 12:13:12 +0000 (07:13 -0500)]
Bug 27204: Fix end boundary index, never return results for non-existant accountlines

There are two primary issues I've identified with requesting line items
for fees via SIP:

1) The end boundary is incorrect. For example, if send a request with a
BP ( starting item) of 1, and a BQ (end item) of 1, I should get just
the first item. Instead I will get two items

2) Our SIP server does not check bounds. For example, if I have 3 fines,
but I send a BP of 1 and a BQ of 5, I will get back 5 AVs, two of
them being "empty" because the patron only has 3 accountlines!

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/SIP/Patron.t
3) Note the failures
4) Apply the second patch
5) prove t/db_dependent/SIP/Patron.t
6) All tests should pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 0a5232412fee9a9811b7354c8ea98ee889eaee3c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0ebfff111dcecca92deffb36fd62e58e0a9e3bba)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27204: Add unit tests for fine_items
Kyle M Hall [Fri, 11 Dec 2020 12:13:06 +0000 (07:13 -0500)]
Bug 27204: Add unit tests for fine_items

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 cb9b72b783c2951c348934dfa8358ccd2a65f986)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bf1563d86de6270add390042047e4c0bd825f2fb)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27530: Set correct dateofbirth for 'C'
Jonathan Druart [Wed, 27 Jan 2021 09:22:27 +0000 (10:22 +0100)]
Bug 27530: Set correct dateofbirth for 'C'

Categories B, J, K and YA have a upper age limit of 17 years.
We are setting the dateofbirth to today - 15 years to prevent juvenils
to be 70!

Note that DATE_SUB is a MySQLism, but there is no way to be portable
here.

Signed-off-by: Nick Clemens <nick@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 b647aff01d504533a5a3720c66e6adcf0067792f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 23dd20a9ced86e29ec37d01ade23eda92bb161b0)

3 years agoBug 27530: Set dateexpiry to 2099 in sample patrons
Jonathan Druart [Wed, 27 Jan 2021 09:17:57 +0000 (10:17 +0100)]
Bug 27530: Set dateexpiry to 2099 in sample patrons

To prevent them to be expired.

Note that the last patron is kept expired.

Signed-off-by: Nick Clemens <nick@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 e3205b4c41497d83084a8a216eefa6dd377788b1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c2f9610e3fddb93e247700b6030c8f4c54c8c872)

3 years agoBug 27450: Remove password from the mandatory fields when editing details
Jonathan Druart [Wed, 20 Jan 2021 11:09:30 +0000 (12:09 +0100)]
Bug 27450: Remove password from the mandatory fields when editing details

When a patron edit their personal details at the OPAC, the password must
be removed from the mandatory fields

Test plan:
0 - Don't apply the patch
1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password
2 - Create or sign in as a patron on the opac
3 - Click 'Your personal details'
4 - Attempt to edit
5 - Save changes
=> They are rejected because not all required fields are populated
6 - Apply the patch
7 - Repeat 3 to 5
=> details are saved successfully
8 - Test the self registration feature and confirm that the password is
required

Signed-off-by: Nick Clemens <nick@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 4b2c284092eda3f70eaeaa1b136e9c0ae8f17f82)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 06c47d8f5b923ea3eba23b9127c201dd8d780693)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27554: Clarify and add tests for update_category_to
Nick Clemens [Thu, 28 Jan 2021 13:58:14 +0000 (13:58 +0000)]
Bug 27554: Clarify and add tests for update_category_to

This patch adds a comment to the existing tests, clarifying what they test, and verifying the expected patron is affected. The
original test should be broken by 26307 when the behvaiour is prevented

I additionally add a test for 'too old'

To test:
1 - Apply patch
2 - Prove tests, they should pass
3 - Verify the comments make sense

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: behvaiour ==> behaviour
and add more info to the commit title

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ecb6703d7a627060fc7e21a149e5226262c97e8d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1a71d411964897482be26c0760b3e2061d42ec57)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27580: Handle NULL values correctly in Koha::Items->filter_by_visible_in_opac
Tomas Cohen Arazi [Fri, 29 Jan 2021 19:43:06 +0000 (16:43 -0300)]
Bug 27580: Handle NULL values correctly in Koha::Items->filter_by_visible_in_opac

This patch fixes the internally used query so it doesn't consider NULL
values as IN the set.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> FAIL: Tests fail :-/
3. Apply this patch
4. Repeat 2
=> SUCCESS: tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 b60ff6452ef2212a02f16ddc5c46edeb3d83a5e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 606f47b2e91dcc51b1348356d672e95f8943ab8a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27580: Regression tests
Tomas Cohen Arazi [Fri, 29 Jan 2021 19:40:27 +0000 (16:40 -0300)]
Bug 27580: Regression tests

This test makes all the generated sample items have undef copynumber,
and all rules are added copynumber => [ 2 ] on the tests as
suggested by Andrew on his failing example.

The tests are expected to pass. i.e. copynumber is clearly not equal to
2, so those items shouldn't be hidden.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> FAIL: Tests fail! undef is considered in [ 2 ]

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 00ea18282e622805321425789209ed9e0f8f7ea0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d767dc54a60e233afa9d295798eacc8cbc28a5f1)

3 years agoBug 26755: Make the guarantor search popup taller
Owen Leonard [Fri, 22 Jan 2021 15:20:00 +0000 (15:20 +0000)]
Bug 26755: Make the guarantor search popup taller

This patch changes the dimensions of the popup window in which
guarantors are chosen during the patron edit process.

The patch also removes an obsolete function delcaration for "Dopop"
which is unused.

To test, apply the patch and open a "child" type patron account for
editing.

Click the "Add guarantor" button. This should trigger a popup window.
Eyeball the size of the window, you'll be able to tell that it is
exactly 800 pixels wide.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
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 5fbfecdb2f9dc690eec4a03569edef624fd6f452)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cc4f8b283fae830d631ffc1148179064f6f24872)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26634: [20.05.x] Remove GetHoldRule subroutine in C4::Reserves
Nick Clemens [Tue, 24 Nov 2020 20:21:07 +0000 (20:21 +0000)]
Bug 26634: [20.05.x] Remove GetHoldRule subroutine in C4::Reserves

This routine is only used internally and incorrectly overrides
the precedence of holds rules - it should be removed

This patch removes the routine, adjusts tests, and adds test to
confirm correct precedence is followed

To test:
1 - At the All Libraries level, create a circ rule for a specific patron category and a specific item type that only allows 1 hold
2 - At the branch-specific level for Branch A, create an All/All rule that allows 2 holds
3 - confirm ReservesControll is set to patron's library
4 - find a patron from Branch A of the category for which you made your rule
5 - find two bibs with items of the itype got which you made your rule
6 - place a hold on one bib. success!
7 - try to place a hold on the second bib. you're told you cannot because the patron is only allowed 1 hold
8 - apply patch, restart services
9 - try to place your second hold again, success!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 20238: Display description of ITEMTYPECAT in search category
Amy King [Thu, 21 Jan 2021 22:41:09 +0000 (22:41 +0000)]
Bug 20238: Display description of ITEMTYPECAT in search category

When adding or editing item types (Koha administration > Basic
parameters > Item types) the drop down list currently displays
the ITEMTYPECAT authorized value description. However, on the
item types page the authorized value is displayed in the search
category column.

This enhancement changes the item types page so that the search
category column displays the authorized value's description
instead of the authorized value code.

Test plan:
1. Go to Staff interface home page > Koha administration > Basic
   parameters > Authorized values.
2. Find ITEMTYPECAT and add a new authorized value - make sure it
   has a description.
3. Go to the Basic parameters > Item types page.
4. Edit an item type.
5. For the search category, select the new authorized value you
   created. The desciption should be shown in the dropdown list.
6. Save the changes.
7. In the search category column for the item type you edited, it
   should now display the description instead of the code.
8. Sign off!

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 d1e12c95e1d1ec907f6ed4465270569aa6c5a40d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7333d95a3f12f95f8ef00f9138a57d9dd72d7eb8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 14004: Set the syspref's value to an empty string
Jonathan Druart [Wed, 27 Jan 2021 11:03:33 +0000 (12:03 +0100)]
Bug 14004: Set the syspref's value to an empty string

It's tested with "defined" in C4::Context->preference

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6b23c0634b43a60f0a434d4c43a3e57718ad0806)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efdf8bb303d0fd37a80150f41193b34173e23d3f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 14004: Add OpacAdditionalStylesheet and opaclayoutstylesheet
Fridolin Somers [Thu, 21 Jan 2021 16:09:27 +0000 (17:09 +0100)]
Bug 14004: Add OpacAdditionalStylesheet and opaclayoutstylesheet

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 c009eeafed32f0da9ef3c81e5b3e748745c9f900)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 404155fbffd3b7052f7eae04a2d5e62a14a84eee)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 14004: Add ability to temporarily disable JS/CSS sysprefs
Fridolin Somers [Tue, 12 Jan 2021 10:15:25 +0000 (11:15 +0100)]
Bug 14004: Add ability to temporarily disable JS/CSS sysprefs

It would be *super* handy if intranetuserjs and/or opacuserjs could be
temporarily disabled via a check-box or syspref.
Right now, debugging issues in intranetuserjs usuaally starts with
copying the contents into a text file, blanking the syspref and re-testing.

This patch adds this feature by setting syspref via ENV
OVERRIDE_SYSPREF like override via Apache config.

Implemented only for preferences :
OPACUserCSS OPACUserJS IntranetUserCSS IntranetUserJS
=> replaced with ' '
intranetcolorstylesheet intranetstylesheet
=> replaced with 0

Test plan :
1) Set some CSS in IntranetUserCSS like : #breadcrumbs{color:red}
2) Go to staff interface home page like : /cgi-bin/koha/mainpage.pl
3) See CSS impact is visible
4) Edit URL : /cgi-bin/koha/mainpage.pl?DISABLE_SYSPREF_IntranetUserCSS=1
5) See CSS impact is not visible
6) Check with the other preferences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 180db2f63b83dc4052b42e3073be9893e7495a1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7a622302aae6ec8b4f4a4accaad8e37f5a8f9c0b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27029: Add a selenium regression test
Jonathan Druart [Wed, 27 Jan 2021 10:35:35 +0000 (11:35 +0100)]
Bug 27029: Add a selenium regression test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 03dea5f51e3859090f563f72475cffa1da9c7645)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 178026f3390ffae38445449477a39211cead3d04)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27029: (QA follow-up) Adding html filter
Marcel de Rooy [Fri, 22 Jan 2021 10:58:06 +0000 (10:58 +0000)]
Bug 27029: (QA follow-up) Adding html filter

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0e60ab4f032642200b8a3c19ad2ff05d98641460)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8e94aa575031971f0c740119971b33a5abc6b14a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27029: Add data-biblionumber attribute to OPAC detail page
David Cook [Mon, 16 Nov 2020 00:31:21 +0000 (00:31 +0000)]
Bug 27029: Add data-biblionumber attribute to OPAC detail page

This patch adds a data-biblionumber attribute to the
div#catalogue_detail_biblio elements on opac-detail.pl, so that
Javascript running on the page can easily fetch and use the
record's biblionumber.

Signed-off-by: Mark Hofstetter <mark@hofstetter.at>, <koha@trust-box.at>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f17a631d873f971ac139534fc2867c7ac86b7bd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 823e51ca4eef18208480bb6e6d975a1a1bef9bbe)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27525: Replace "wich" with "with" in batch delete template
Owen Leonard [Fri, 22 Jan 2021 11:22:30 +0000 (11:22 +0000)]
Bug 27525: Replace "wich" with "with" in batch delete template

This patch corrects two typos: "wich" -> "with."

To test, apply the patch and check the batch delete template
(batchMod-del.tt) and confirm that the two instances of this sentence
are correct:

"Last item for bibliographic record with biblio-level hold on it"

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 e063bd4f5909f0f9babb328bbecce3354d75d20b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 191248bd2e7a15987bbd6f8bc7f605977d8d92be)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27547: Typo in parcel.tt
Caroline Cyr La Rose [Mon, 25 Jan 2021 14:59:57 +0000 (09:59 -0500)]
Bug 27547: Typo in parcel.tt

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 43c475bc96214109af78d2aae4e87809c802e8dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 87dc9bf1846c59966f94b601ecd1bd965382ac69)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27531: Remove type attribute from script tags: Cataloging plugins
Owen Leonard [Fri, 22 Jan 2021 16:43:58 +0000 (16:43 +0000)]
Bug 27531: Remove type attribute from script tags: Cataloging plugins

This patch removes the no-longer-valid "type" attribute from script tags
found in cataloging plugin templates.

I don't think testing each plugin individually is a reasonable thing to
ask for a test. I think a visual verification of the changes in the
patch should be enough.

Signed-off-by: Lucas Gass <lucas@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 32d482130749fdb17cb33e2ee48b0ae0acce835a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f656ab418d6f181052b0a17eadbb6eb2baa9668d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25614: Move ILL request keyword filter to sidebar
Owen Leonard [Tue, 27 Oct 2020 12:23:45 +0000 (12:23 +0000)]
Bug 25614: Move ILL request keyword filter to sidebar

On the ILL request list page there are two filters for the table: One in
the sidebar and one configured automatically by the DataTables plugin. I
think these two systems are conflicting somehow to prevent the "clear
filter" button in the table toolbar from working correctly.

This patch doesn't fix the bug but avoids it: Since the filter field in
the table toolbar is duplicating the functionality of the form in the
sidebar, we could hide it and rely on the sidebar filter instead.

To test, apply the patch and go to the ILL requests page in the staff
interface.

 - The table of requests should display without a search form or "clear
   filter" button at the top.
 - The left-hand sidebar form should now have a "keyword" filter option
   which searches any column in the table.
 - Other filter fields should work as before.

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 6c5ad42eddce1c357bf6dc64301f774f93a06e0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8ae3c07f0147ab19f03f9daa98ad40443490b4aa)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 11344: (QA follow-up) Fix empty section warning
Marcel de Rooy [Fri, 22 Jan 2021 09:04:07 +0000 (09:04 +0000)]
Bug 11344: (QA follow-up) Fix empty section warning

*** WARNING: empty section in previous paragraph at line 28 in file misc/cronjobs/advance_notices.pl

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c117df8e30c2067dd70a4573989d24e354145adc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c3858bd4b8284ee14152fe76185f48901244c089)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl
James O'Keeffe [Tue, 19 Jan 2021 21:16:49 +0000 (21:16 +0000)]
Bug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl

This patch removes the double ups in the perldoc of the above file,
     deleting the less clear double ups. The missing "-c" in OPTIONS
     appears to have been fixed in an earlier patch (it is there
             already).

Task Plan:
1. Run perldoc misc/cronjobs/advance_notices.pl in the terminal. Note
the double ups of NAME, SYNOPSIS, and DESCRIPTION
2. Apply the patch
3. Run the command again. The double ups should be gone, with the more
clear version of each of NAME, SYNOPSIS, and DESCRIPTION remaining.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5cb6927458dfd9195a7f9cb536b2ca386f7ffb88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ecad2b444134fce35c05d54e69c54f09464dd1f3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27333: Throw the right exceptions
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:10:12 +0000 (11:10 -0300)]
Bug 27333: Throw the right exceptions

If parameters are missing, we need to throw
Koha::Exceptions::MissingParameter exceptions.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Club/Hold.t
=> FAIL: Tests fail because the method doesn't throw the right
exceptions
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

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 c5f3fdcc15bc5d1a013321944c90ce49f5c58e6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8bbc4514b7dc5757758c8a8e235b563d3fadd2b0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27333: Regression tests
Tomas Cohen Arazi [Mon, 4 Jan 2021 14:09:54 +0000 (11:09 -0300)]
Bug 27333: Regression tests

Test for the right exceptions

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 3ece5964861577185d96e2834f04f42bcc68d40e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 388ad3f1982f7372f1efdd838a00b17c456b47e1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27327: Get rid of indirect object notation in Koha::Club::Hold
Tomas Cohen Arazi [Mon, 4 Jan 2021 13:35:37 +0000 (10:35 -0300)]
Bug 27327: Get rid of indirect object notation in Koha::Club::Hold

This patch makes the code follow the PERL29 coding guideline. Period.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 17a3476d7e45fae092fdd20ce78df8b0945d1fb1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f3f1366d7ec18c8990a1577e87a6bf0da8bfa40)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27179: Misspelling of Method in REST API files
Mazen Khallaf [Tue, 19 Jan 2021 02:01:43 +0000 (02:01 +0000)]
Bug 27179: Misspelling of Method in REST API files

Test Plan:
1. Run "git grep -i mehtod" (which should return 2 files)
2. Apply patch
3. Rerun grep command (should return no files)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a22b3bb504b0a9a77aa9ce3e9f326cc71fcf8d96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 252564ebd74bef4a0f6c902b82ecb902c8905986)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27210: Typo in patron-attr-types.tt
Mazen Khallaf [Tue, 19 Jan 2021 01:49:43 +0000 (01:49 +0000)]
Bug 27210: Typo in patron-attr-types.tt

Test Plan:
1. Make sure the ExtendedPatronAttributes syspref is active
2. Go to Administration > Patron attribute types
3. Click New patron attribute type
4. Check the sentence next to the Editable in OPAC checkbox (Should say
        "Requires above, does not work during self-registration if
        PatronSelfRegistrationVerifyByEmail if set." - Notice the use of
        'if set')
5. Apply Patch
6. Repeat steps 2-4 (Should now say "Requires above, does not work
        during self-registration if PatronSelfRegistrationVerifyByEmail
        is set." - Notice the use of 'is set')
7. If it says 'is set', the patch works as expected.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5170f8ee1b6ce3007787d2415aba7794dbaded3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a9cbacb822073ded7317630ae0c7931baf3070ac)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24811: French SQL files "news" link fixed
ava li [Tue, 19 Jan 2021 21:01:15 +0000 (21:01 +0000)]
Bug 24811: French SQL files "news" link fixed

This fixes a broken link in the sample news items for fr-FR and fr-CA.

Test plan:

1) Apply the patch.

2) Install the French language files - see
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client

3) When Koha is in French, from the home page of the staff interface go to Tools/Outils > News/Annonces, and make sure the two news items are there.
    -If not, try importing the two files into your database or reset and install Koha in French (fr-FR or fr-CA).

4) There should be a news item with the heading Et maintenant ?, click the 5th link "proposez des correctifs et des améliorations".

5) If should take you to
https://wiki.koha-community.org/wiki/Version_Control_Using_Git
and there is no 404 error, the patch has worked!

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 c6009f32205c7b6c19a4dfe0346a1ebed0c05a71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4ba318f8a8d1566fd36f09f0cdbbfd9da2f49fd2)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24810: French SQL files for "news" removed "3"
ava li [Tue, 19 Jan 2021 03:44:44 +0000 (03:44 +0000)]
Bug 24810: French SQL files for "news" removed "3"

TEST PLAN
Follow https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client in order to install french.
When koha is in french, from home go to tools/outils, then
news/Annonces, make sure the two files are there.
Preview them there or view them from the homepage and check that the 3
is gone.
If the files are not there, try importing the two files into your
database.

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 42aac43290dbcb8cb1cfecbe685e738c8a95ee67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 35e723fc5323ef62f672c917f040134428b5ba24)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24055: (follow-up) Description of PayPalReturnURL system preference
Ella Wipatene [Thu, 21 Jan 2021 02:45:07 +0000 (02:45 +0000)]
Bug 24055: (follow-up) Description of PayPalReturnURL system preference

Have rephrased it as 'configured return URL' as this is what they call
it on the PayPal website.

To test:
- Go to Administration/ System preferences
- Search for PayPalReturnURL
- Verify description has changed to 'configured return URL' as one of
the options.

Sponsored.by: Catalyst IT

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 297d93ec449c08430c13ba75659f48e6a3f563c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cfa66a3e59d1167f5240bf7228a6d78dd8e95d64)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24055: Rephrase description of PayPalReturnURL slightly
Katrin Fischer [Sat, 11 Apr 2020 20:05:14 +0000 (20:05 +0000)]
Bug 24055: Rephrase description of PayPalReturnURL slightly

changes 'OPAC's alias' to 'specified URL' as suggested by
Tomas on comment#2.

To test:
- Go to Administration / System preferences
- Search for PayPalReturnURL
- Verify description has changed to "specified URL" as
  one of the options

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b31073af292e391cd1df1be3894029460fa6040)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e586acb7474c9292e7f7dbea883a0e73613d980)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 20527: (QA follow-up) Fix type 'Wiriteoff'
Nick Clemens [Thu, 21 Jan 2021 16:09:58 +0000 (16:09 +0000)]
Bug 20527: (QA follow-up) Fix type 'Wiriteoff'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c706b8aa13edd39769324ad2d5937d9d4d5ae583)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 49f01ce2985794e1e7a2e503be7fa27c6a8a36b8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 20527: Corrected paid to amountwrittenoff
Eden Bacani [Thu, 21 Jan 2021 02:54:30 +0000 (02:54 +0000)]
Bug 20527: Corrected paid to amountwrittenoff

Test Plan
1. Go to My account and go into accounting
2.Create manual invoice (If you already have invoices skip this step)
3.On the Make a payment tab click on Write off under actions of an
invoice
4. Click on Writeoff amount label and make sure that the amount written
is highlighted in green.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f3992816b20bf97de904d485e775c32b93df0726)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 21a1fb0cc239f24ee14f8659e96033f66314a226)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 11996: (follow-up) Updating the uk-UA currency
Ella Wipatene [Thu, 21 Jan 2021 01:46:21 +0000 (01:46 +0000)]
Bug 11996: (follow-up) Updating the uk-UA currency

I have changed GRN to UAH in both
installer/data/mysql/ru-RU/optional/sample_currency.sql and in
installer/data/mysql/uk-UA/optional/sample_currency.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 732e69f4b25b7af22ab034f143b8df5d7ffd263a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 63babb7401c9c94ba22e5e8a65725772e84dd546)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 11996: Made RUB default currency for ru-RU
Ethan Amohia [Thu, 17 Jan 2019 02:42:32 +0000 (02:42 +0000)]
Bug 11996: Made RUB default currency for ru-RU

Didn't know how to change the uk-UA default currency.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6bb8065af69438673ca5ed0bca0664c366a87e02)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e001395c1a3afa53ea2df7cdd34738dd3ea6f0da)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24447: Changing 'DUE' to example in database that exists.
Eden Bacani [Thu, 21 Jan 2021 01:20:49 +0000 (01:20 +0000)]
Bug 24447: Changing 'DUE' to example in database that exists.

Test Plan:
1.Using  perldoc C4/Members/Messaging.pm check that message_name
attribute name example  is Item_Due and not DUE.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0a0ff7c5ceab836631be060a4571681ff40e275c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c4aeca752210bbb504a84d84dbe49a9394ff0a3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25381: (QA follow-up) Fix occurence in the one file that escaped
Katrin Fischer [Thu, 21 Jan 2021 23:44:10 +0000 (23:44 +0000)]
Bug 25381: (QA follow-up) Fix occurence in the one file that escaped

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 02adae8a5f7ecf8f6e44042d078e406b0aacf19a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6dcba06353386483d9a00cfcc05df821cd9f92d8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25381: XSLTs should not define entities
Didier Gautheron [Fri, 8 May 2020 13:19:54 +0000 (15:19 +0200)]
Bug 25381: XSLTs should not define entities

Bug 23290 explicitly disabled entity expansion during XML parsing for security reasons.

However, many XSLTs define the following entity:
<!ENTITY nbsp "&#160;" >

They don't use the entity &nbsp, but its presence could lead to confusion.

Signed-off-by: Eden Bacani <eden.bacani@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 10c08b6552c7063c4c029701018d6f54e6549acb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c83158f5bf80f6f4fdfd5ae7e6abfbfbc033f681)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 7143: Update about page for new devs
Jonathan Druart [Fri, 22 Jan 2021 13:52:07 +0000 (14:52 +0100)]
Bug 7143: Update about page for new devs

Eden Bacani
Ella Wipatene
Ava Li

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b7aecb00634e2fe4c8358dd99cef880916a5fc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c9764b5fe75553459dd34d7cbc87620128dbd1a8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 7143: Update about page for new devs
Jonathan Druart [Thu, 21 Jan 2021 15:01:19 +0000 (16:01 +0100)]
Bug 7143: Update about page for new devs

Mazen Khallaf
Amy King
Catherine Ma
James O'Keeffe
Victoria Faafia

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a57278f39b8c5b7a82b21671f266dbf32e2d41a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9016c317f5cb1c5ce36b9dee66564336f0fec220)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27457: Set focus for cursor to Debit type code field
Catherine Ma [Tue, 19 Jan 2021 01:08:28 +0000 (01:08 +0000)]
Bug 27457: Set focus for cursor to Debit type code field

Test Plan:
1.Click administration
2.Click debit types
3.Click new debit type
4.Check if the cursor is in the first form field (it shouldn't)
5.Add patch
6.Repeat steps 1-3
7.Check if the cursor is in the first form field (it should)

Sponsored by Catalyst IT
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
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 958a91dc4ec3965956bfbdb8d4cdae5db07c7a0f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1868aa3a735288e98909aa9f97fefa73d92ea642)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27458: Set focus for cursor to Credit type code field
Amy King [Wed, 20 Jan 2021 00:57:35 +0000 (00:57 +0000)]
Bug 27458: Set focus for cursor to Credit type code field

Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: Edit commit title

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d05547dcb64895febca9a79b818d47119fee9a6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f42409234a8b26fa56abc336fc77e11f03aeb834)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoRevert "Bug 27299: Remove tokenization for phrase register/index with ICU"
Andrew Fuerste-Henry [Wed, 3 Feb 2021 18:48:28 +0000 (18:48 +0000)]
Revert "Bug 27299: Remove tokenization for phrase register/index with ICU"

This reverts commit 83716bc4ac3676a151845e2e507d6aef90dd1e13.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27011: Remove unused $name variable
Amy King [Tue, 19 Jan 2021 03:27:27 +0000 (03:27 +0000)]
Bug 27011: Remove unused $name variable

The variable is no longer used in the template, it has been removed by:

  commit 76eb3a0549efe4c1f1557071a6cb4b33d4bd3e4d
  Bug 18789: (follow-up) Pass a Koha::Patron object from returns.pl

-            <td>[% name %]</td>
+            <td>[% INCLUDE 'patron-title.inc' patron=patron %]</td>

We can simply remove the $name variable from the controller script.

Test Plan:
1. Check out a book
2. Check in a book
3. Note what happens
4. Apply patch
5. Repeat step 1-2
6. Note that it doesn't break and everything still works

JD Amended patch: fix commit message

Signed-off-by: Andrew Fuerste-Henry <andrew@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 113992e620095aac59253cf653acfa47f1ec7768)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6a4541776e4b8f6176de7ba85e2f2011574ddd5c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25808: (QA follow-up) Fix unit tests
Kyle M Hall [Wed, 20 Jan 2021 14:35:33 +0000 (09:35 -0500)]
Bug 25808: (QA follow-up) Fix unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6c66a88aea7579b67f869163c11fec70cd73b98c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4117732b56bdb7ce57c8c5228c9594767639f803)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25808: (QA follow-up) Add regression test
Martin Renvoize [Thu, 14 Jan 2021 14:40:31 +0000 (14:40 +0000)]
Bug 25808: (QA follow-up) Add regression test

This patch adds a basic regression test for the bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: remove trailing space char

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bdf1ec7b71042e26a952329838093391fe8a21f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 209c97a5b4d6c913471fe369ca4e9f339942ede8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25808: Renewal via the SIP 'checkout' message gives incorrect message
Kyle M Hall [Thu, 18 Jun 2020 17:23:04 +0000 (13:23 -0400)]
Bug 25808: Renewal via the SIP 'checkout' message gives incorrect message

If a renewal via SIP cannot be made because the patron has reached the maximum number of renewals,
the AF screen message should read "Item has reached maximum renewals!",
instead we get "Item checked out to another patron".

Test Plan:
1) Check out an item to a patron
2) Using the SIP CLI tool, run checkout messages until the checkout has
   reached the maximum number of renewals
3) Note the incorrect message in the AF field
4) Apply this patch
5) Restart the SIP server
6) Run another SIP checkout message
7) Note the message is now correct!

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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 6cdfa37e63901c713f817fb44c279367a0c21ab0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 606a3a2e21fe230d163b2d5d3458ec5351d7f9a9)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27192: Automatically set focus to the item type input box
Andreas Roussos [Fri, 8 Jan 2021 14:45:32 +0000 (15:45 +0100)]
Bug 27192: Automatically set focus to the item type input box

When adding a new item type, you have to click inside the
"Ιtem type:" input box before you can start entering text.

This patch fixes that by adding the "focus" class to the relevant
<input> element so that cursor focus is set when the page loads.

Test plan:

1) Try to add a new item type: notice how you have to manually
   click inside the "Item type:" input box before you start typing.
2) Apply this patch.
3) Repeat step 1) -- this time the "Item type:" input box should
   gain focus automatically.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 a219a78239049245768ae3abd781136745f9a01f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 791bd8803115691b0f8567eec6d99ef9509455bf)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24272: Correctly encode output to prevent 'Wide character in say'
Jonathan Druart [Wed, 20 Jan 2021 09:02:45 +0000 (10:02 +0100)]
Bug 24272: Correctly encode output to prevent 'Wide character in say'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 67b1b20e33f5d73ea515ea3b4d244dde73576448)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3fd8e4a13c361ad33d4cb02a7d77155f752b9f06)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24272: Use Pod2Usage and surround values with ''
Jonathan Druart [Wed, 20 Jan 2021 09:02:10 +0000 (10:02 +0100)]
Bug 24272: Use Pod2Usage and surround values with ''

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b1915293441b7f61d0e61c6b7dd105de1bbd5d8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1601911977dc427e11428190bf62f416023c381b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24272: (follow-up) Test defined not true
Nick Clemens [Fri, 15 Jan 2021 11:00:39 +0000 (11:00 +0000)]
Bug 24272: (follow-up) Test defined not true

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a9ea5d1ba42d8d0bbf3f8ad01e22521f20efdd38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a8f2eaa7958f595e549b91d162ee6d8320ff12ed)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24272: add check_sysprefs_cache.pl
Nick [Thu, 19 Dec 2019 03:20:36 +0000 (03:20 +0000)]
Bug 24272: add check_sysprefs_cache.pl

This script ensure that no sysprefs have been changed directly in the database and/or
that the cache has not become corrupted. We have occasionally seen this happen on production sites

To test:
1 - In the staff interface go to Administration
2 - Search for system preference 'IntranetUserJS'
3 - Add content to the syspref:
    console.log('Hi!');
4 - On the command line launch mysql
    sudo koha-mysql kohadev
5 - Alter the syspref directly
    UPDATE systempreferences SET value = "console.log('Bye!');" WHERE variable = 'IntranetUserJS';
6 - run the script
    perl misc/maintenance/check_syspref_cache.pl
7 - You are warned about the altered system preference

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 de5527f37d898e756cac4d8ed9de63c6576c1241)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5a1e18efd87c34ef9f158c4a6f663d30ab3a4e43)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27416: Make "Modify tag" and "Add tag" translatable
Jonathan Druart [Wed, 13 Jan 2021 10:11:36 +0000 (11:11 +0100)]
Bug 27416: Make "Modify tag" and "Add tag" translatable

Those two strings are not translatable as they are passed from the
controller.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4491cdd803226c22c585f3a23f6aa77000841bed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 054428a57d4b810bc3278d625de573a66cb5d076)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 17429: document the --plack/--noplack options of koha-list
Andreas Roussos [Tue, 29 Dec 2020 09:41:38 +0000 (10:41 +0100)]
Bug 17429: document the --plack/--noplack options of koha-list

The man page of koha-list does not list the --plack and --noplack
options.

This patch fixes that.

Test plan:

1) View the current man page for `koha-list` (with `man koha-list`)
   and notice how the --plack and --noplack options are missing.

2) Apply this patch.

3) Run the following command to re-generate the man page:

   xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
   debian/docs/koha-list.xml

   View the manual page again (with `man -l koha-list.8`), the
   two options are now displayed under SYNOPSIS and OPTIONS.

4) Make sure this test passes:
   prove -v xt/verify-debian-docbook.t

Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.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 920d3efcdfe1efc79e81017f8340227063ae2973)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd2489c17544becb33bff1193c35875a14abad6a)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 15448: Remove items fetch
Jonathan Druart [Thu, 14 Jan 2021 09:44:46 +0000 (10:44 +0100)]
Bug 15448: Remove items fetch

We fetch them already too many times.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6cd68dd05bdac2787fa0b67b7f90a5836c57745c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 54a9ef09bfe7fe8eff67a173dc7b79a278aba88f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 15448: Fix ISE
Jonathan Druart [Thu, 14 Jan 2021 09:42:53 +0000 (10:42 +0100)]
Bug 15448: Fix ISE

The method Koha::Items->itemnumber is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Objects.pm line 592
Koha::Objects::AUTOLOAD('Koha::Items=HASH(0x55981fd94790)') called at /kohadevbox/koha/opac/opac-reserve.pl line 465

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9790b5ca3a1b8a92d56a14207d6245c02dfe7fd6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 60e08d51bb814eb1dae834afa0c259539eaf2c61)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 15448: (follow-up) Adapt to changes on bug 24254
Tomas Cohen Arazi [Mon, 21 Dec 2020 19:30:31 +0000 (16:30 -0300)]
Bug 15448: (follow-up) Adapt to changes on bug 24254

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8af3ecdd538f22bfbf4d99bda629283fe856f3de)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 655c4427c7d2c9e4d05c016fa52833feb9c59892)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 15448: (follow-up) Fetch the patron category once
Tomas Cohen Arazi [Fri, 4 Dec 2020 11:33:43 +0000 (08:33 -0300)]
Bug 15448: (follow-up) Fetch the patron category once

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c9f66f5e6b5360a57885c26436c7eb3f2747bd28)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cdfea7001131055c8d91459d4c48dbc4adb4741e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 15448: Filter out items hidden in OPAC on placing hold
Tomas Cohen Arazi [Fri, 4 Dec 2020 11:21:36 +0000 (08:21 -0300)]
Bug 15448: Filter out items hidden in OPAC on placing hold

This patch leverages on bug 24254's
Koha::Items->filter_by_visible_in_opac to filter out items that
shouldn't be presented to the end user in the OPAC interface.

To test:
1. Circulation and Fine rules for item-level holds are set to allow.
2. Setting the OpacHiddenItems preference to "ccode: [SUPPRESS]"
3. An item with collection Code Suppress is set.
4. Search for the title in the OPAC.
=> SUCCESS: The Suppress ccode item isn't shown.
5. View the detail page for the title.
=> SUCCESS: The suppress ccode item isn't shown.
6. Place a hold on the item:
  -- Click "Show more options"
  -- Select "A specific item"
=> FAIL: the ccode with the opachiddenitems rule has an item that appear in the list to place a hold
7. Apply this patch and repeat 6
=> SUCCESS: The item doesn't show!
8. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 051f5519861cb2365ddd06d08a9047648af2318b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 284b2da589aabb2475b1292b1cf843be818b384e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27299: Remove tokenization for phrase register/index with ICU
David Cook [Tue, 22 Dec 2020 22:57:38 +0000 (09:57 +1100)]
Bug 27299: Remove tokenization for phrase register/index with ICU

This patch removes tokenization for phrase register/index when
using ICU.

This should cause "exact" searches to work the same way with ICU
as they do with CHR.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7f9c909d5a603c40125064e7e32f24e595d596e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3a841a3a74a6165af996f8ca9c8affe8c5192f9e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24254: (QA follow-up) Inlines opachiddenitems handling
Martin Renvoize [Thu, 14 Jan 2021 11:28:35 +0000 (11:28 +0000)]
Bug 24254: (QA follow-up) Inlines opachiddenitems handling

We decided to inline the opachiddenitems filter as we don't believe it
will be used exclusively.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24254: Implement separate filters and add patron param
Tomas Cohen Arazi [Mon, 21 Dec 2020 18:50:13 +0000 (15:50 -0300)]
Bug 24254: Implement separate filters and add patron param

This patch introduces two new methods for stacking filters on
Koha::Items:

- filter_out_lost
_ filter_out_opachiddenitems

This two filters are what actually happened inside the
filter_by_visible_in_opac. Everything is covered by tests.

In the process I added a Koha::Patron param to the method that is
internally used to decide if the OPACHiddenItems syspref needs to be
honoured or not. This *could* be better done with a fallback to
C4::Context->userenv if no param is passed.

I decided to leave that part for later, if we really find it would help
(e.g. if bug 10589 gets some action and we really need something here to
 handle that).

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24254: Read the OpacHiddenItems preference internally
Tomas Cohen Arazi [Sat, 19 Dec 2020 13:21:18 +0000 (10:21 -0300)]
Bug 24254: Read the OpacHiddenItems preference internally

After discussing the 'rules' parameter usefulness we decided it was not
the best idea, and the gains in terms of 'performance' would me
meaningless (in-memory caching of sysprefs). This patch makes a really
minor tweak to the tests so they mock the C4::Context->yaml_preference
method, but keeping the same original rules to highlight no behaviour
change takes place.

Then the rules parameter is removed from the calls, and the tests should
keep passing.

A minor change to make $rules = undef is made to highlight the // {}
behaviour when reading the syspref..

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24254: Compare itemlost with 0
Tomas Cohen Arazi [Sat, 19 Dec 2020 13:05:16 +0000 (10:05 -0300)]
Bug 24254: Compare itemlost with 0

On C4::Search and C4::Circulation the uses of the items.itemlost field
highlight the fact that the comparisson itemlost <= 0 was wrong, as it
is evaluated as a Perl boolean.

The column can only be an int and NOT NULL, so we need to check if it is
0 to ponder if not hidden.

This patch changes the tests to reflect this, and adjust the
Koha::Items->filter_by_visible_in_opac implementation to adapt to this.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24254: Add Koha::Items->filter_by_visible_in_opac
Tomas Cohen Arazi [Thu, 3 Dec 2020 18:11:14 +0000 (15:11 -0300)]
Bug 24254: Add Koha::Items->filter_by_visible_in_opac

This patch adds a method based on the original idea from Nick, but on
Koha::Items.

The idea is to build a proper filter, based on the current rules for
hiding things, directly on the DBIC query. The caller takes care of
knowing if the filtering should apply (i.e. checking the patron category
exceptions) and then it would do something like:

    my @items;
    if ( <patron_category_does_not_have_exception> ) {
        @items = $biblio->items->filter_by_visible_in_opac(
            {
                rules => $rules
            }
        );
    }
    else {
        # still want to enforce 'hidelostitems'
        @items = $biblio->items->filter_by_visible_in_opac;
    }

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Look at the use cases on the tests, read the code
=> SUCCESS: It all makes sense
4. Compare with Koha::Item->hidden_in_opac
=> SUCCESS: It all makes sense
5. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24254: Unit tests
Tomas Cohen Arazi [Thu, 3 Dec 2020 18:11:00 +0000 (15:11 -0300)]
Bug 24254: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27297: Add required and blank options to av-build-dropbox.inc
Nick Clemens [Tue, 22 Dec 2020 19:28:28 +0000 (19:28 +0000)]
Bug 27297: Add required and blank options to av-build-dropbox.inc

This patch adds two options to av-build-drobx
required - which will add the required attribute to the select
blank - which will add a blank option to avoid preselecting others

To test:
1 - In OpacSuggestionMandatoryFeilds select itemtype
2 - Go to OPAC
3 - Add a suggestion
4 - Don't fill out any fields
5 - Submit
6 - Suggestion is added
7 - Delete it
8 - Apply patch
9 - Add a suggestion
10 - Note itemtyp edefaults to 'None'
11 - You cannot submit until you select a value

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
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 cb95c9140316d4b9dc28cd696d14106b460774aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6124adab15d39cd94e8a8c2fa9f21bde80e0e317)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27306: (QA follow-up) Add space between title and subtitle
Katrin Fischer [Sun, 10 Jan 2021 22:41:46 +0000 (23:41 +0100)]
Bug 27306: (QA follow-up) Add space between title and subtitle

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 9c8d4abeed95113ff5da56d3438a68ed64c8fedf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7e0e1d8f8c4cf804578fc4eec2cdae5962f9e045)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27306: Add subtitle to return-claims-table
Lucas Gass [Wed, 23 Dec 2020 20:47:32 +0000 (20:47 +0000)]
Bug 27306: Add subtitle to return-claims-table

To test:
-turn on claim returned
-find some items with a 245b or add a 245b to some items
-check those items out and mark them as claimed returned
-on the borrowers /cgi-bin/koha/circ/circulation.pl page look at the return-claims-table
-no subtitle
-apply patch and clear browser cache, restart_all
-now you should see the subtitle

Signed-off-by: Kelly McElligott <kelly@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 ee6c4548ad27c3efd4c78956e70336baffb994b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 44e986d6728e7f93618241ae28f12b11ae59faf0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26713: Add pagination to bottom of saved SQL reports table
Owen Leonard [Thu, 3 Dec 2020 12:06:46 +0000 (12:06 +0000)]
Bug 26713: Add pagination to bottom of saved SQL reports table

This patch adds a second pagination menu to the bottom of the report
results table.

To test, apply the patch and go to Reports.

- Run a report which will return multiple pages of results (greater
  than 20).
- The results should display with a pagination bar at the top and bottom
  of the table.
- Confirm that both pagination menus work correctly.

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 dbc74154754c4d5d03baa7c96b8511e0c2e0d036)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 544b4c44930053a8c173eaafb304fa8b362de572)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27308: Skip blank lines when inserting new
Nick Clemens [Thu, 24 Dec 2020 13:35:28 +0000 (13:35 +0000)]
Bug 27308: Skip blank lines when inserting new

The intent of the macro insert new function is to add a new field at the correct numerical place in the record. If you have a blank line while editing, however, the new line will be inserted at the blank line, rather than checking the rest of the record.

To test:
1 - Create a macro like
    new 690=‡aLOCAL SUBJECT
2 - Insert a blank line into your record somewhere before where the 690 should be inserted
3 - Run the macro
4 - Line is inserted before the blank line
5 - Apply patch
6 - Reload (ensure cache is cleared and JS files are reloaded)
7 - Remove the previously created field, but leave the blank
8 - Run the macro
9 - Field is created at correct position

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 27308: (QA follow-up) Remove commented line

I don't think we need to keep the original line as a comment.. this
patch simply cleans it up.

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 3b0f86b53173d30da5dbb42710a7c9bf9edaa3bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d27b1018a96667c6fce8fc746e968e9a206858a0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27307: Don't drop phrase directive when searching keyword index
Nick Clemens [Thu, 24 Dec 2020 14:04:55 +0000 (14:04 +0000)]
Bug 27307: Don't drop phrase directive when searching keyword index

We convert 'keyword' to '' as an index since we want it to search all fields

When we are searching 'as phrase', however, we should not drop the search type

To test:
 1 - Enable IntranetCatalogPullDown
 2 - Set searchEngine to Elasticsearch
 3 - Perform a search for 'Keyword as phrase' for a phrase that does appear in a record
 4 - You get the result
 5 - Reverse the order of words in the phrase
 6 - You still get a result?
 7 - Apply patch
 8 - Restart all the things
 9 - Reversed search does not return record
10 - Correct order and search, correct record returned

Signed-off-by: Andrew Fuerste-Henry <andrew@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 9cfce5f010c485ee5e046bcc99a9d33a70d9213a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d9b2c504639e3e336a0ef8a1f75c31452a556e90)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27307: Unit test
Nick Clemens [Thu, 24 Dec 2020 14:04:17 +0000 (14:04 +0000)]
Bug 27307: Unit test

Signed-off-by: Andrew Fuerste-Henry <andrew@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 2e9344d2e3e959f9c474d43f59ff7688d1a784ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 90edb4ee0ac437e87b26ca94043f2dad3f0e0326)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26957: Don't remove words that are also operators from search terms
Nick Clemens [Mon, 23 Nov 2020 18:37:48 +0000 (18:37 +0000)]
Bug 26957: Don't remove words that are also operators from search terms

FindDuplicate has a hardcoded regex to remove 'and', 'or', and 'not' from any search fields, however,
is does this with no regard for these terms being embedded in the middle of a word or phrase.

E.g.:
'Coupland' becomes 'Coupl'
'Frog and toad' becomes 'frog toad'
etc.

This patch simplay removes the substitutions as we already quote the terms as well

To test:
1 - Add records to your system like:
    The night circus by Erin Morgenstern
    Frog and toad all year
    Nothing ever happens
2 - Attempt to add purchase suggestions like
    title: the night circus, author:Morgenstern, Erin
    title: For and toad all year
    title:nothing ever happens (case is important)
3 - No warnings about existing biblios
4 - Apply patches
5 - Delete existing suggestions
6 - Repeat step 2
7 - Each attempt should warn you of existing biblio

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 a52a9d787544aae384aee1a33c9d3bb35d98f8fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 680fc0f77d9c7c3c20dacc14c9db94b52d009ee4)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26957: Unit tests
Nick Clemens [Mon, 23 Nov 2020 18:37:39 +0000 (18:37 +0000)]
Bug 26957: Unit tests

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 a1f44a831e2c41da8074bca4fcf250335687135a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b99770e5b5bae85a9b6bb76be7c2b253ae7ef61f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoUpdate release notes for 20.05.08 release v20.05.08
Andrew Fuerste-Henry [Fri, 22 Jan 2021 22:07:32 +0000 (22:07 +0000)]
Update release notes for 20.05.08 release

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoIncrement version for 20.05.08 release
Andrew Fuerste-Henry [Fri, 22 Jan 2021 21:39:24 +0000 (21:39 +0000)]
Increment version for 20.05.08 release

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoTranslation updates for Koha 20.05.08
Koha translators [Fri, 22 Jan 2021 21:03:25 +0000 (18:03 -0300)]
Translation updates for Koha 20.05.08

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27180: (follow-up) Remove unused %is_holiday
Victor Grousset/tuxayo [Sat, 26 Dec 2020 14:19:59 +0000 (15:19 +0100)]
Bug 27180: (follow-up) Remove unused %is_holiday

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 a26d529a2bc7faee3743b4cd1e603ba29411a0b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dea3855db6b07861613e9b729926bab6fb39e5f1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27180: Update fines on holidays
Nick Clemens [Wed, 9 Dec 2020 15:39:09 +0000 (15:39 +0000)]
Bug 27180: Update fines on holidays

This patch removes code that prevents fines from being update on holidays.
The fines are already being calculated, and that takes the calendar into account if
needed, so fines won't be assessed on holidays if they shouldn't.

To test:
 1 - set finesCalendar to 'ignore'
 2 - Checkout an item due yesterday
 3 - Ensure circ rules have a fine amount set
 4 - Make today a holiday
 5 - run fines.pl
 6 - No fine assessed
 7 - Apply patch
 8 - run fines.pl
 9 - Fine assessed!
10 - set finesCalendar to 'use'
11 - checkout an item, due yesterday
12 - run fines.pl
13 - no fine assessed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 80e1b4e66f01a07cad9bf37625d879f649edf52a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 69821f7aba39009b850aef5716a0818f3cb61d54)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27003: [20.05.x] Fix test failure
Nick Clemens [Fri, 22 Jan 2021 20:16:49 +0000 (20:16 +0000)]
Bug 27003: [20.05.x] Fix test failure

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27196:[20.05.x] Don't explode if item that is waiting if checked in by SIP
Jonathan Druart [Mon, 14 Dec 2020 14:54:54 +0000 (15:54 +0100)]
Bug 27196:[20.05.x] Don't explode if item that is waiting if checked in by SIP

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27413: Restore debarred and debarredcomment to batch patron mod tools
Jonathan Druart [Fri, 15 Jan 2021 10:27:47 +0000 (11:27 +0100)]
Bug 27413: Restore debarred and debarredcomment to batch patron mod tools

It was added by bug 13552 but removed by 19793.

Test plan:
Update patron in a batch and confirm that you can modify the restriction
expiration and comment.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
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 85ae9bd021aef4e7423669a61df7c4c7fd5b726b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f4a8aa75ab948cc4476b01b69f6b2e1623443828)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26894: Handle subfield 0 and delete empty fields
Nick Clemens [Mon, 2 Nov 2020 12:05:47 +0000 (12:05 +0000)]
Bug 26894: Handle subfield 0 and delete empty fields

This patch corrects handling of subfield 0 when copying/moving. Before these
patches copying from subfield 0 would copy the entire field.

We also correct an error that if moving a single subfield, we can leave behind empty
fields with no subfields. They should be deleted.

To test:
1 - Define a new MARC Modification template with actions:
        Delete field 100$0
        Add new field 100$0 with value Test
        Update existing or add new field 100$0 with value TestUpdated
        Move field 100$0 to 600$0
        Copy field 600$0 to 100$0
        Copy and replace field 245$0 to 700$0
2 - Define a new record like:
    LDR 00334nam a22001217a 4500
    003 ff
    005 20201102111604.0
    008 201102b        xxu||||| |||| 00| 0 eng d
    040 _ _ ‡cvsd
    100 1 _ ‡012345‡aKnuth, Donal Ervin‡d1938
    245 _ _ ‡012345‡aThe aty of computer programming‡cDonald E. Knuth
    650 _ 0 ‡042‡aComputer programming‡9462
3 - Modify this record using the template above
4 - Note that entier 245 is copied to 700, same for 600 field
5 - Apply patch
6 - Now only subfields 0 are copied

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 77f3d48dee24ad51dfbed65922712064dedff1ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit eb24579aef3b6461ac61044a5d78b0472bbcb68f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27149: Don't strip itemnumber when adding item status via Z3950Responder
Nick Clemens [Thu, 3 Dec 2020 17:04:19 +0000 (17:04 +0000)]
Bug 27149: Don't strip itemnumber when adding item status via Z3950Responder

This breaks MARCEdit integration as svc/bib uses the itemnumber field to update items

To test:
1 - sudo koha-z3950-responder --stop kohadev
2 - Run it manually:
    perl /kohadevbox/koha/misc/z3950_responder.pl -c /etc/koha/sites/kohadev/z3950 -u kohadev-koha -p /var/run/koha/kohadev/z3950-responder.pid -D -d kohadev-koha-z3950 -l /var/log/koha/kohadev/z3950.log
3 - Connect and search to verify itemnumber is in item records
    yaz-client localhost:2100
    base biblios
    find shuffle
    show 1+1
4 - sudo koha-z3950-responder --stop kohadev
5 - Run it manually to add item status
    perl /kohadevbox/koha/misc/z3950_responder.pl --add-item-status k -c /etc/koha/sites/kohadev/z3950 -u kohadev-koha -p /var/run/koha/kohadev/z3950-responder.pid -D -d kohadev-koha-z3950 -l /var/log/koha/kohadev/z3950.log
6 - Connect and search, no itemnumber in records
7 - Apply patch
8 - Stop, restart all the things, and manually start server with item status again
9 - Connect and search, itemnumbers are included

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 1d61203fab02038a615be979315e509b8fbdeafd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 82800db317ffceb1a8b644bf9529e685ac5b42c8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27149: Unit tests
Nick Clemens [Thu, 3 Dec 2020 17:03:40 +0000 (17:03 +0000)]
Bug 27149: Unit tests

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 1ae737603f3043c590e33e517d7d95ca8a8283ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit de9bb3872d95d4e63fc9744d5d842bb811eee3c6)

Rebase fix

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26851: Don't generate a notice to library if no content
Nick Clemens [Wed, 28 Oct 2020 19:00:28 +0000 (19:00 +0000)]
Bug 26851: Don't generate a notice to library if no content

To test:
 1 - Check out an over due to a patron
 2 - Set overdue triggers to a trigger less than number of days overdue
 3 - Make sure the patron has no email
 4 - Set content of ODUE notice to:
    [%# Comment will not print %]
 5 - perl misc/cronjobs/overdue_notices.pl
 6 - Check the message queue
 7 - There is a notice sent to the library:
    "These messages were not sent directly to the patrons."
    With no messages
 8 - Apply patch
 9 - Repeat
10 - No new message generated

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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 9769160083d614601997945f29a0fe9d353bf7ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e47ed528b2f952f582b088ab57b82fb4061eebf2)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27509: Prevent cn_sort value to be lost when editing items
Jonathan Druart [Thu, 21 Jan 2021 16:21:15 +0000 (17:21 +0100)]
Bug 27509: Prevent cn_sort value to be lost when editing items

This is a bit dirty, cn_sort is not passed from the UI but built in
Koha::Item->store depending on the values of itemcallnumber and
cn_source.
It must be updated only if one of those 2 attributes are modified.
The problem is that, as it's not passed, $item->{cn_sort} does not exist,
and set_or_blank will set it to undef.
The trick here is to backup the value before set_or_blank and set it
back to the item object.
Another solution would be to force the processing of cn_sort each time
we call Koha::Item->store. I don't think that's a good idea.

Test plan:
- Create a new item with a cn_source value and an itemcallnumber value
- write a quick report to see the cn_sort value: SELECT cn_sort FROM items WHERE itemnumber=your itemnumber, see your item has a cn_sort value
- edit your item and save it without changing either the cn_source of the itemcallnumber
- run your report again, cn_sort is not modified
- edit your item, changing either the cn_source or itemcallnumber
- run report again, cn_sort is modified as expected

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27420: Use object accessor for $attr_type->class()
Martin Renvoize [Wed, 13 Jan 2021 11:22:53 +0000 (11:22 +0000)]
Bug 27420: Use object accessor for $attr_type->class()

We introduced a bug in the patron attribute forms with bug 5161.

Test plan
1/ Create two PA_CLASS authorized values
2/ Create two corresponding patron attribute types referencing the above
classes.
3/ Edit a patron, both attributes should appear within their own
fieldsets at the bottom of the member entry form.
4/ Set a value for the first of the two patron attributes and save
5/ Edit the patron again, note that the first attribute no longer
resides within it's own fieldset
6/ Apply the patch
7/ Edit the patron again, note that the first attribute now resides
inside it's own fieldset again
8/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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 08396d4b2ffe7db4f7550631a751603f01387095)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2cb36767ad9aa80f72b1e3b6aaecaf180f4bcbeb)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27003: [20.05.x] Item creation log must be done after the item is created
Jonathan Druart [Wed, 2 Dec 2020 08:56:04 +0000 (09:56 +0100)]
Bug 27003: [20.05.x] Item creation log must be done after the item is created

Otherwise we don't have its itemnumber yet!

Test plan:
Add and modify an item and confirm that the action logs are created
correctly

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Applied the patch on a live server showing missing info in the logs.
Created and deleted an item. Verified the logs now have the same
info as in the olden days.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26593: Remove _get_discount_from_rule
Nick Clemens [Thu, 19 Nov 2020 15:46:52 +0000 (15:46 +0000)]
Bug 26593: Remove _get_discount_from_rule

This patch remove the private sub used in GetIssuingCharges in favor
of get_effective_rule

It corrects the wrong precedence for rules and adds tests to cover this
subroutine

NOTE: the 'branch' for the discount will be determined by the signed in branch,
    this is a bug to be fixed in the future

To test:
1 - Define a rentalcharge for an itemtype
2 - Define a 10% discount for library A, category A, all itemtypes
3 - Define a 50% discount for all libraries, category A, same itemtype
4 - Attempt to checkout an item from library A of the matching itemtype
5 - The 50% discount is applied
6 - Apply patches
7 - Attempt to checkout an item from library A of the matching itemtype
8 - The 10% discount is applied

prove -v t/db_dependent/Circulation.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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 c055685ac4f59b2a83730c67792c6fb3c81d2123)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 50ac537d92e4596451f1b673364b74df01ddc629)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27280: revert from 20.05.x
Andrew Fuerste-Henry [Wed, 20 Jan 2021 14:04:28 +0000 (14:04 +0000)]
Bug 27280: revert from 20.05.x

This reverts commit 59b58965ad66ea831a91d425dcaceaca70a25a11.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26848: Fix Readonly dependency in cpanfile
Julian Maurice [Wed, 28 Oct 2020 15:29:16 +0000 (16:29 +0100)]
Bug 26848: Fix Readonly dependency in cpanfile

- It is a required module. If it is missing, Koha will not start
- Set the minimum version to 2.00. While not strictly required, it's the
version that states that "Deprecation of Readonly::XS as a requirement
for fast, readonly scalars is complete", it is available in Debian
oldoldstable (jessie, 8), and Readonly::XS was not even needed with Perl
> 5.8, which allows us to:
- Remove dependency on Readonly::XS

Signed-off-by: Mason James <mtj@kohaaloha.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 3af9563a4f52e050461942e4f25c7e9e4918f3d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f6ef3c80d3cda7ddabd415b4377fc2b17a704747)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 21301: add unit tests
Fridolin Somers [Fri, 4 Sep 2020 08:01:20 +0000 (10:01 +0200)]
Bug 21301: add unit tests

Run t/db_dependent/ILSDI_Services.t with and without previous patches

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 d828feafbd5f3b788d76a1a79bc4c0522bdb600e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f345f480c2b6fdaeb000d0e68bd7bf1c367e41f1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 21301: (follow-up) Remove borrowernumber in issues for GetRecords ILS-DI service
Fridolin Somers [Thu, 26 Mar 2020 12:02:14 +0000 (15:02 +0300)]
Bug 21301: (follow-up) Remove borrowernumber in issues for GetRecords ILS-DI service

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 83f5fef84edb0306f401f736008423a5871bdbc5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bb59e26e9ecf7245a6063ea885a52dd61f554c0d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 21301: (QA follow-up) Fix number of tests
Marcel de Rooy [Fri, 8 Nov 2019 07:07:32 +0000 (07:07 +0000)]
Bug 21301: (QA follow-up) Fix number of tests

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 97d94bad13bc2d14a954cb67aca6c6605f9d4906)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 34e679646db33b746db5c7e025d6bd08dcb3117b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 21301: Remove patron informations in reserves for GetRecords ILS-DI service
Fridolin Somers [Thu, 3 Oct 2019 13:43:56 +0000 (15:43 +0200)]
Bug 21301: Remove patron informations in reserves for GetRecords ILS-DI service

Actually, the GetRecords service gives many information :
borrowernumber (reserves field)

The issue data should not be sent by these service, its a privacy problem.

Test plan :
1) Enable ILS-DI webservice
2) Place hold on an item
3) Go to {opac}/cgi-bin/koha/ilsdi.pl?service=GetRecords&id={biblionumber}
4) Check the reserves tag content

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 37c042b9f3d3c307dac8e9205c65227e3c956ee3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 813eb5afc74478f574510c0fdc197ed2ffdf54e3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 21301: Remove patron informations in issues for GetRecords ILS-DI service
Fridolin Somers [Wed, 2 Oct 2019 14:28:21 +0000 (16:28 +0200)]
Bug 21301: Remove patron informations in issues for GetRecords ILS-DI service

Actually, the GetRecords service gives many information :
bibliographic data (marcxml field)
item data (items field)
issue data (issues field)

The issue data should not be sent by these service, its a privacy problem.
Biblio title and author are redundant.
This patch changes to use Koha::Checkouts to get issues informations with only the addition of item barcode.

Test plan :
1) Enable ILS-DI webservice
2) Checkout an item
3) Go to {opac}/cgi-bin/koha/ilsdi.pl?service=GetRecords&id={biblionumber}
4) Check the issues tag content

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 8ae0ef6eb529cb866914ee8cffba469a9486a53c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b6d2ea13c7517ecfa913a1f7d85e6ab3b8775f1e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24470: Mark a batch as 'imported' if all the bib has been imported
Jonathan Druart [Wed, 9 Dec 2020 14:22:35 +0000 (15:22 +0100)]
Bug 24470: Mark a batch as 'imported' if all the bib has been imported

When a staged MARC file is used to populate a basket in acquisitions,
the status of the batch is kept as "staged" until a user repeat the operation.
The "imported" status is added to the batch when new orders are added to
a basket "from a new file" (yes!...)

Test plan:
- Create a basket
- Add to basket From a New File
- Select a marc file and stage
- Add titles to your basket
Until all your records are imported the batch will have the status
"staged"
When all your records will be imported, the status of the batch will be
"imported"

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 99cebb82dc6fd1aa3f7466f03a267cac9deedc6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5f126b129128ecbf7a65eda4b5b62f355c7349d8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>