]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 23229: Only load ILL table JS when needed
Andrew Isherwood [Fri, 28 Jun 2019 09:24:32 +0000 (10:24 +0100)]
Bug 23229: Only load ILL table JS when needed

This patch prevents the JS associated with the ILL table from loading
unless we're actually displaying the table. This has the knock on effect
of not causing the "get all ILL requests" API request to fire when
loading any ILL page.

Test plan:

- Go to "ILL requests" page
- TEST: Observe that the table loads all ILL requests
- Go to the "New ILL request" page for any installed backend
- TEST: Check the browser dev tools "Network" panel, observe that the
/api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias,comments,requested_partners
request is not made.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f79da166ae7f910648266b98d89f19f4307d10ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5ab8a4c13ed843b540274f4856fdf3e83202bc03)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23455: Patron card printing from Patron lists is broken
Owen Leonard [Thu, 15 Aug 2019 13:46:35 +0000 (13:46 +0000)]
Bug 23455: Patron card printing from Patron lists is broken

This patch makes a few corrections to the process of printing patron
cards from the patron lists page. These changes are necessitated by Bug
20650: Changes to the markup in patroncards/print.tt were not reflected
in the JavaScript in patron_lists/lists.tt.

Also fixed: A missing quotation mark, a missing semicolon, and
incorrect template variable filter.

To test, apply the patch and go to Tools -> Patron lists.

 - Click the "Actions" menu corresponding to a patron list.
 - Select "Print patron cards."
 - In the "Print patron cards" modal, click the "Export" button.
 - The modal should reload with a link to download a patron card PDF.
   The link should work correctly.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23428: (bug 23151 follow-up) Fix self registration with a verification email
Jonathan Druart [Mon, 5 Aug 2019 13:40:12 +0000 (08:40 -0500)]
Bug 23428: (bug 23151 follow-up) Fix self registration with a verification email

DBIx::Class::Row::store_column(): No such column 'changed_fields' on
Koha::Schema::Result::Borrower at /home/vagrant/kohaclone/Koha/Object.pm
line 75

Test plan:
- Turn PatronSelfRegistrationVerifyByEmail on
- Register a new account
- Click on the link (see the message_queue table)
=> Without this patch you get the error
=> With this patch you will see the login form

Signed-off-by: Michal Denar <black23@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 c5f73575ab07e75b45e5e9495820b602225c75f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a94bacb02a856bd9b3dbe9ba2ed05c11fbef5bed)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23322: Correct case for boolean in ES search
Nick Clemens [Tue, 16 Jul 2019 12:08:47 +0000 (12:08 +0000)]
Bug 23322: Correct case for boolean in ES search

I did not include tests only because this is a very small reasonable change and routine has no tests.
It does not affect behaviour, it only touches syntax lightly.

To test:
  0 - Set SearchEngine to ElasticSearch
  1 - Import the example record (a version is included in sample data in devbox/testing docker so you can skip)
  2 - Stage the attached example record
  3 - Match using 'ISBN' rule
  4 - No matches found
  5 - Apply patch
  6 - Restart all the things
  7 - Reapply matching with no rule
  8 - Reapply with ISBN matcing
  9 - It matches!
 10 - Set SearchEngine to Zebra
 11 - Reapply matching with no rule
 12 - Reapply with ISBN matching
 13 - Matching works as before in Zebra

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ce1b79d55d421d6d173d644ee7061ebb5b93919a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d4596cee7a1dc2a2657ab27c9661fffe036db719)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23431: Don't nullify DOB if it's hidden by sysprefs
Liz Rea [Mon, 5 Aug 2019 22:39:37 +0000 (22:39 +0000)]
Bug 23431: Don't nullify DOB if it's hidden by sysprefs

To test:

Turn on  OPACPatronDetails
put dateofbirth in PatronSelfModificationBorrowerUnwantedField
Have a patron with a set date of birth
Attempt any modification on that patron through the OPAC
The date of birth will be one of the fields changed for that borrower
when you check it in the staff intranet.

Apply this patch, repeat the above.
Date of birth will not be one of the changed fields.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d71b263a89839e3b2f9aa7166dba2657a2aecf14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 936f1450b802a6d00e6bf681eb60f3844ff865d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22617: Fix checkout notes typo in manage_checkout_notes permission usage
Fridolin Somers [Fri, 14 Jun 2019 08:43:15 +0000 (10:43 +0200)]
Bug 22617: Fix checkout notes typo in manage_checkout_notes permission usage

When logged into the staff client with an account with full circulate permissions (and therefore including the manage_checkout_notes permission) an error occurs when clicking on the Checkout notes pending link.  The account is logged out automatically with the message:  "Error: you do not have permission to view this page.  Log in as a different user".
The same error occurs for both the link on the home page dashboard and from the Circulation module button.  Works as expected if Superlibrarian permission is set.

This is just a typo in perl script : circulation instead of circulate

Test plan :
1) Set preference "AllowCheckoutNotes" to "Allow"
2) Create a user with only permissions "catalogue" and "circulate > manage_checkout_notes"
3) Loggin with this user
4) Go to "Circulation" home page
5) Click on "Checkout notes"
6) You should be allowed to access

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 206498dc5585fbd555181a1b241d5049632870df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 79bafa2aa84bcb135ebbbc98bf485356be37c98b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23132: Fix encoding issues in facets with show more link
Fridolin Somers [Mon, 17 Jun 2019 14:28:22 +0000 (16:28 +0200)]
Bug 23132: Fix encoding issues in facets with show more link

When one uses characters like Ã, ç ... the first searcshow up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.

Test plan :

Without the patch:
- check if you have your SysPref SearchEngine with Elasticsearch as value,
- put your SysPref FacetMaxCount at 10,
- search in the catalog "a" and then in Refine your search click on show more (just to see how it works),
- then search with special characters like "é", ç" ... and make the same test, the research should be wrong when you click on show more and the page is realoaded.

Then apply the patch:
- and make the same with a classic reasearch, then with special characters,
- verify that when you click on show more the page isn't realoded and the reasearch is correct.
- same with show less
- and finnaly, add some facets and test show more/less

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b976bad50a03ca4d4fa369e2c5371ec35dfb0d5f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9ff7e1d25d1189745ef67d681dc273a04578b892)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23103: (QA follow-up) Return undef implicitly
Kyle M Hall [Wed, 19 Jun 2019 11:00:01 +0000 (07:00 -0400)]
Bug 23103: (QA follow-up) Return undef implicitly

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23103: Cannot checkin items lost by deleted patrons with fines attached
Kyle M Hall [Wed, 12 Jun 2019 19:08:08 +0000 (15:08 -0400)]
Bug 23103: Cannot checkin items lost by deleted patrons with fines attached

Test Plan:
1) Checkout an item to a patron
2) Ensure the item has a replacement cost (or itemtype has default)
3) Ensure patrons are charged when items lost
4) Mark the item lost
5) Confirm patron has a fine
6) Write off the fine
7) Delete the patron
8) Check in the item
9) Note the internal server error
10) Apply this patch
11) Repeat steps 1-8
12) Note there is no internal server error!
13) prove t/db_dependent/Circulation.t

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23078: (follow-up) Update self checkout help page
Owen Leonard [Tue, 9 Jul 2019 13:51:24 +0000 (13:51 +0000)]
Bug 23078: (follow-up) Update self checkout help page

This patch takes care of some preference instances I missed in the self
checkout module's help page. It also removes some obsolete lines from
Auth.pm.

To test, apply the patch and re-test based on the previous test plan.
Also test in the self-checkout module by logging into self checkout and
clicking the "Help" link in the upper right of the screen.

The settings of the following preferences should be shown correctly:

 - OpacFavicon
 - OPACUserCSS

Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b5588958981a24c25536afff0b2091506bf7f92b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bb6e73c5babc0d5566a6be77a98e621082eb8bd4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23078: Use Koha.Preference in OPAC global header include
Owen Leonard [Fri, 7 Jun 2019 12:52:45 +0000 (12:52 +0000)]
Bug 23078: Use Koha.Preference in OPAC global header include

This patch updates the OPAC's doc-head-close.inc so that it uses
'Koha.Preference' syntax to output system preference data. The patch
removes handling of two preferences from Auth.pm which which are covered
by this template change.

This patch also makes some minor changes to consolidate multiple
template checks for "bidi"

To test, apply the patch and test the affected OPAC system preferences:

 - OpacFavicon
 - opaclayoutstylesheet
 - OPACUserCSS
 - OPACBaseURL

Confirm that changes made to these preferences are reflected in the
OPAC.

Signed-off-by: frederik <frederik@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a222fa2afd367257b7e0c9815a92521883128d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a6718b95c1b123a5fb8616a84c110c37a55b3ffd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23278: Reopen last panel upon "Save and continue" in notices
Owen Leonard [Fri, 5 Jul 2019 17:28:06 +0000 (17:28 +0000)]
Bug 23278: Reopen last panel upon "Save and continue" in notices

This patch modifies the Notices edit process so that if the user chooses
the "Save and continue" option the page reloads with the same panel open
which they were previously editing in.

To test, apply the patch and go to Tools -> Notices and Slips.

 - Open a notice for editing.
 - Expand one of the sections.
 - Choose "Save and continue" from the button menu in the toolbar.
   - When the page reloads, the section you expanded should be open
     again.
 - Test each section and test with no sections expanded.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c600bf439173c8a7a8ecd41a6433cd1199de078)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f558185c8fbf5b5740959c0ec06b2188d6b16f4a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23304: (follow-up) Add markup structure comments
Owen Leonard [Fri, 12 Jul 2019 13:41:30 +0000 (13:41 +0000)]
Bug 23304: (follow-up) Add markup structure comments

This patch adds comments to the template to highlight the markup
structure. It also removes the obsolete "type" attribute from the
<script> tag.

This patch should have no effect on the interface or functionality.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b76aa551049edcb1575d8a4cce917cbc0eb8fa24)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1c3f3bde8940b5e7d130ec2625065a6b1d9afb4b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23304: Reindent cataloguing/z3950_search.tt
Owen Leonard [Thu, 11 Jul 2019 18:59:21 +0000 (18:59 +0000)]
Bug 23304: Reindent cataloguing/z3950_search.tt

This patch reindents cataloguing/z3950_search.tt to use four spaces and
to eliminate tabs, following coding guidelines. Trailing white space has
been removed, and some minor markup errors have been corrected for
validity.

To test, apply the patch and use your preferred method for checking the
differences between files while ignoring whitespace. I use diff with the
"-w" flag, but I'm not giving orders, you do you.

Go to Cataloging -> New from Z39.50/SRU. Test that the search form and
results look correct and work correctly.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 377006ebe5a0e87a6f7517f0cb347a958c95a997)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aa5f0a55a399efde55d91f1a33423ef9005e94aa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23177: [18.11.x] (QA follow-up) Move three subs from the middle to the top in...
Marcel de Rooy [Fri, 21 Jun 2019 09:00:27 +0000 (09:00 +0000)]
Bug 23177: [18.11.x] (QA follow-up) Move three subs from the middle to the top in Circulation.t

Removed trailing comma for last sub too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23177: (QA follow-up) Move rollback to the end

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23177: (QA follow-up) Remove subtest txn_begin and rollback

This resolves:
DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1)
Removing unneeded subtest txn's. We should probably add them everywhere or
just at global level.

Test plan:
With all three patches applied, run Circulation.t a few times.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23177: (RM follow-up) Further test clarifications

This patch makes a few minor improvements to Circulation.t
1) Adds a name to some of the scoped blocks by converting them to
   subtests.
2) Adds output messages to some tests where they were missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23177: Rebase fixes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22021: Improve item status display when placing holds in staff
Katrin Fischer [Sat, 13 Jul 2019 12:23:19 +0000 (14:23 +0200)]
Bug 22021: Improve item status display when placing holds in staff

This patch is a bit of a clean-up to bring the item status display
more in line with the display on the detail page:

- show descrpition of authorised value for not for loan instead of hardcoded text
- Show description of authorised value for lost instead of hardcoded text
  This is also a translatability fix, as the text came from the .pl
- Show description of authorised value damaged instead of hardcoded text
- Make sequence of status match display on details page:
  lost - damaged - not for loan

To test:
- On a record with multiple items
  - Add different status to the items
    damaged, lost, not for loan
  - Make sure you have items with one status and multiple status at the same time
- Look at how the status display on the detail page
- Place a hold, compare display
- Apply patch
- Repeat

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d7e6ae38e431c4d6397c057b0696e03f5a67ce14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7468abdf951cfd70a70ff334ecbcde5187536518)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23218: (QA follow-up) Remove dummy value
Nick Clemens [Fri, 19 Jul 2019 10:49:00 +0000 (10:49 +0000)]
Bug 23218: (QA follow-up) Remove dummy value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bc188a9a54e28bd4fa2568dab5e85cf296fa87ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 267ad48da77eb3fedd06f1050db0ffc4406477c2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23218: Fix shift in patron's attributes in batch patron modification
Jonathan Druart [Sat, 29 Jun 2019 15:18:29 +0000 (10:18 -0500)]
Bug 23218: Fix shift in patron's attributes in batch patron modification

When the "new" button is clicked without selecting a patron's attribute, the update will have unexpected behaviors.

There is indeed a difference in the number of patron's attributes and the number of values.

Test plan:
Go to the batch patron modification
Enter a cardnumber
At the bottom of the page, click "new" without selecting an attribute
On the second line select one, and a value (different than an empty
string)
Save
=> The attribute will be updated with an empty string

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ea0127b7fa53335f3e9d3f0170fbc92b2ffd9e3c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b1e0a867c9ee6dbd9887c40e26efceb60e50b610)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23145: Confirming transfer during checkin clears the table of previously checked...
Owen Leonard [Tue, 16 Jul 2019 18:05:23 +0000 (18:05 +0000)]
Bug 23145: Confirming transfer during checkin clears the table of previously checked-in items

This patch corrects the checkin template so that checking in an item
with an existing transfer does not clear the page of previous checkouts.

To test, apply the patch and check in some items.

 - After each checkin the returned item should appear in the table of
   checkouts.
 - Check in an item which belongs to another branch. You will be asked
   to confirm that the items requires a transfer. When the page reloads
   you should see the same previous checkins in the table.
 - Check in that same item again. You will be again asked to confirm.

   Before this page, confirming the transfer would reload the page and
   clear the list of checkins. Now the page should reload and the table
   of checkins should still show the previously checked-in items.

Test all the actions when checking in an item which is already in
transit: OK, Print transfer slip, and Cancel transfer.

Signed-off-by: George Williams <george@nekls.org>
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 3cfd78788fe1bda05894a08c22f69ce1baa9482c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 44cd65d3ee688f24a077d51214bfa670a2cc5deb)

5 years agoBug 21316: Handle control fields in the ACQ frameworks
Jonathan Druart [Tue, 5 Mar 2019 19:09:07 +0000 (16:09 -0300)]
Bug 21316: Handle control fields in the ACQ frameworks

Test plan:
- Turn UseACQFrameworkForBiblioRecords on
- Add 003@ to the ACQ framework
- Create an order from an existing record
=> The 003 value will be displayed!

It fixes the following error:
Control fields (generally, just tags below 010) do not have subfields,
use data() at /home/vagrant/kohaclone/acqui/neworderempty.pl line 293.

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
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>
(cherry picked from commit 5759d06747e356a60b3fac82b5ff03184a946f80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c315ec1a1914b207766449aff497dfd293377cbd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 11642: change / to and in related tools menu
Mark Tompsett [Tue, 11 Jun 2019 14:31:48 +0000 (14:31 +0000)]
Bug 11642: change / to and in related tools menu

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 d7fec3af88d0ba6c2ae3246df47ee5ce29ebf78c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 399ca0de5069899896134f51f11570b5f8b4225c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 11642: (follow-up) Improve Batch patron deletion and anonymization GUI to make...
Owen Leonard [Mon, 10 Jun 2019 13:30:56 +0000 (13:30 +0000)]
Bug 11642: (follow-up) Improve Batch patron deletion and anonymization GUI to make consequences clearer

This patch makes some template changes to try to make this interface
more consistent with other areas of Koha and to make warnings more
clear.

I have also changed the phrase "deletion/anonymization" to "deletion and
anonymization."

To test, apply the patch and test the patron deletion and anonymization
process and confirm that the interface is clear and works well.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 7e29b5775f4c378e93f5a4b06f90b50f14a6c1e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4974960e3361f5b58da8f99214bb79962f7edd03)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 11642: Add confirmation and tooltips to batch deletion tool
Nick Clemens [Thu, 6 Jun 2019 15:16:35 +0000 (15:16 +0000)]
Bug 11642: Add confirmation and tooltips to batch deletion tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 f897ff77c8774b1ad942665fc18b7a012312240f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cd0f568de1c3998e789164587c9e35e9d46a2c49)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21027: Fix checkout statistics if 1+ of the fields is not defined
Jonathan Druart [Mon, 29 Apr 2019 00:55:02 +0000 (20:55 -0400)]
Bug 21027: Fix checkout statistics if 1+ of the fields is not defined

TEST

- Use a patron who hasn't checked out items before
- Set  StatisticsFields to itype|ccode
- Check out some items without location
- Verify that statistics stable shows the correct number of checkouts
- Check out one item with a location or just change one of your checked out items
- Verify the total is still correct
- Change  StatisticsFields to location|itype|ccode
- Verify the total has changed now - it's only 1 (the one with a location)

Apply the patch and try again

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17a71b990076efd04c15de6b3165c33fffe037a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 49fb1c0ae86bb888485385294466d312d069c8dc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23179: Add 'edit subfields' button to framework management
Nick Clemens [Fri, 21 Jun 2019 11:02:43 +0000 (11:02 +0000)]
Bug 23179: Add 'edit subfields' button to framework management

To test:
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) Note the dropdowns for each tag are: Edit, Subfields, Delete
4) Apply patch
5) Reload and note dropdowns are: Edit tag, View subfields, Edit subfields, Delete
6) Confirm options do what is selected

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23143: [18.11] Filter paid transactions not working
Owen Leonard [Mon, 29 Jul 2019 13:43:01 +0000 (13:43 +0000)]
Bug 23143: [18.11] Filter paid transactions not working

This patch corrects the DataTables filter for hiding paid transactions
from the table of patron account transactions. The wrong column index
was specified.

To test, apply the patch and view the "Account" tab of a patron with
multiple transactions, at least one of them paid.

Confirm that the "Filter paid transactions" link works as expected.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22710: [18.11.x] Return to the last advanced search link not filtering correctly...
Lucas Gass [Mon, 15 Apr 2019 20:52:59 +0000 (20:52 +0000)]
Bug 22710: [18.11.x] Return to the last advanced search link not filtering correctly in 18.11.x

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23308: Change html to filter to $raw
Andrew Isherwood [Fri, 12 Jul 2019 14:37:26 +0000 (15:37 +0100)]
Bug 23308: Change html to filter to $raw

This patch changes the erroneous html filter to $raw

Test plan:
- Apply patch
- Enter some HTML into the OpacMaintenanceNotice syspref
- View the OPAC front page
=> TEST: Observe that the notice displays correctly and the HTML is not
escaped

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.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 f829221f818c1f7b7779f4bd74f633206deda2e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a4e91318dad267cf690935cdf447319d38539767)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23221: (follow-up) Add comments on markup structure
Owen Leonard [Wed, 26 Jun 2019 17:52:52 +0000 (17:52 +0000)]
Bug 23221: (follow-up) Add comments on markup structure

This patch adds a few comments to the markup in order to highlight the
structure of the page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 4068484650cb76d0fa3d801a4a5f49bd65cffb0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 13eddb09b43d7b3939e37d4caacb111560b87c11)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23221: Reindent tools/manage-marc-import.tt
Owen Leonard [Wed, 26 Jun 2019 14:29:24 +0000 (14:29 +0000)]
Bug 23221: Reindent tools/manage-marc-import.tt

This patch reformats the template for the Manage staged MARC records
page. It makes only whitespace changes. It should have no effect on the
behavior of the page.

In addition to re-indentation, some lines have been broken up. These
should be the only changes highlighted when using diff while ignoring
whitespace.

To test, apply the patch and view the Manage staged MARC records page.
The page should look correct and work correctly:

 - Paging through results
 - Viewing batches
 - Cleaning batches
 - Deleting batches

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 cd66074205b571d1db6acbb57d8d8554d3d4fe85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d08cfbb5eb8c4bf0b40d48bd0aa639963f5fd3fc)

5 years agoBug 18707: Background jobs post disabled inputs
Fridolin Somers [Wed, 31 May 2017 14:24:51 +0000 (16:24 +0200)]
Bug 18707: Background jobs post disabled inputs

For example, in Tools > Batch item modification input of deleted subfields are disabled.
This form is posted using background job via JS code.
Looks like this JS code converts a POST form into a GET URL, including inputs that are disabled :

koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js
function submitBackgroundJob(f) {
...
$(':input', f).each(function() {
...

This patch add a :enabled to selector

Test plan :
<to define>

Signed-off-by: Kyle M Hall <kyle@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 e269d6e6e6c9d1e3e11ae43a7773f3026f4d801a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b9c96308fe063b28123e6081472788f88b9f4e8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 12537: Don't retrieve XISBN results for the same biblionumber
Nick Clemens [Mon, 10 Jun 2019 18:54:30 +0000 (18:54 +0000)]
Bug 12537: Don't retrieve XISBN results for the same biblionumber

For a biblio with multiple ISBNS we sometimes get our own record back when
check XISBN, we should test for this

To test:
1 - Edit a record in the catalogue, add two isbns:
     0521240670
     0521284198
2 - Enable ThingISBN and FRBRizeEditions and OPACFRBRizeEditions
3 - View the record in staff and OPAC
4 - You should see editions tab pointing to the same record
5 - Apply patch
6 - Reload the record details, you should no longer see editions tab
7 - Add the second ISBN to another record
8 - Reload details for original record, you shoudl see editions linking to the record with second ISBN
9 - prove -v t/db_dependent/XISBN.t

NOTE: Current tests don't work under elasticsearch, but the code does, tests should be rewritten on another bug

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.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 fd5686b156ceb10958cab728b7695aa2b39b9933)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 005a799051b38edb1c65070581996654b21a8e87)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23192: (RM follow-up) Add missing filters to waiting_holds.inc
Martin Renvoize [Mon, 15 Jul 2019 12:55:36 +0000 (13:55 +0100)]
Bug 23192: (RM follow-up) Add missing filters to waiting_holds.inc

Added a missing `html` filter to the 'tab' input which was added as part
of bug 23192

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d4d02fbe292ab36bb966300eb0c078c3467496e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1923fd376f778b9a7bbab65a7b92914522cbd3e9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23192: Correct tab input on waiting_holds.inc
Nick Clemens [Mon, 24 Jun 2019 11:54:56 +0000 (11:54 +0000)]
Bug 23192: Correct tab input on waiting_holds.inc

To test:
 1 - Place 2 holds
 2 - Confirm the holds
 3 - In the db change the expiration date:
UPDATE reserves SET expirationdate = '2019-01-01';
 4 - Go to Home->Circulation->Holds awaiting pickup
 5 - View your holds on the 'Holds waiting over' tab
 6 - Inspect the cancel button for one of the holds, note tab = "holdswaiting"
 7 - Apply patch
 8 - Refresh the page
 9 - Inspect the buttton, note tab = "holdsover"
10 - Cancel the hold
11 - Note you return to the holds over tab

Signed-off-by: Maryse Simard <maryse.simard@inlibro.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 f45516e73ab6ac8c2240f206bd11a88e4935359c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d673e0387e040170830b57cba0db9ce3aa8c67b0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23266: Add to cart fires twice on shelf page
Marcel de Rooy [Thu, 4 Jul 2019 12:57:17 +0000 (12:57 +0000)]
Bug 23266: Add to cart fires twice on shelf page

Remove some duplicate functionality between opac-bottom and opac-shelves.

Test plan:
[1] Before this patch, add to cart from a shelf page. Observe that the
    basket count is incremented with 2.
[2] After this patch, it should be incremented with 1.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 076d5be767d0b6667ce8aab0ae7b56116e48d48f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8bddf489e40274a822d444729247d5de717b6dc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23194: Fix other occurences
Nick Clemens [Tue, 25 Jun 2019 11:44:12 +0000 (11:44 +0000)]
Bug 23194: Fix other occurences

Throughout staff client and course reserves we also show the field with HTML filter, maybe we shouldn't?

The items lost report also included the note as a title element on title and barcode links, I removed this
as the note displays in that table

To test:
 1 - Add a link to publicnotes for an item
<a href="www.google.com">Cats!</a>
 2 - View opac details, confirm the note is a link
 3 - Same for staff side
 4 - Add item to a course reserve
    UseCourseReserves  preference must be set to 'Use'
    From the course reserves module you will need to add a course (and possibly a department first)
    Adding should be intuitive
 5 - Confirm note is a link in course details on staff and opac
 6 - Perform a batch checkout, confirm the itemnote shows as a link
     You will need to enable the system preference:  BatchCheckouts and add a patron category to:  BatchCheckoutsValidCategories
     Then a link should be available from checkout for a patron in that category
 7 - Mark the item as lost
 8 - Go to Reports->Items lost
 9 - Confirm the note is a URL and that title and barcode links don't show the note
10 - Click the barcode to go to moredetails for the item - in this case note should display as editable text, not a link

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.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 f447658f850bca5ebcdb6f29a5572c1c1707f942)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cea0189b1555859a7ae55cdc6763e6e0dc43574a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23194: Allow HTML in item public notes to be processed on OPAC details
Nick Clemens [Tue, 25 Jun 2019 11:39:54 +0000 (11:39 +0000)]
Bug 23194: Allow HTML in item public notes to be processed on OPAC details

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.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 3f40c32cbbc63dbc5f00d127edfeaa0732f4ab23)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 02e09a87951b6f9214c6c89d0dcbbda70e0189ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23227: Remove type attribute from script tags: Reports
Owen Leonard [Thu, 27 Jun 2019 13:38:50 +0000 (13:38 +0000)]
Bug 23227: Remove type attribute from script tags: Reports

This patch removes the "type" attribute from <script> tags in two
reports templates.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Reports -> Dictionary
   - Delete
   - Specifying a date range for a date column
 - Reports -> Items lost
   - Report results
     -> Datatables functionality
     -> Selection tools for export

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.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 d88709ec2d45df6f2a8e90ae7a94f9724b7e8e7e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c9594ecfad469e0fb1e1f85db7990ab85a80b23)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22957: Remove type attribute from script tags: Staff client includes 1/2
Owen Leonard [Tue, 21 May 2019 18:25:39 +0000 (18:25 +0000)]
Bug 22957: Remove type attribute from script tags: Staff client includes 1/2

This patch removes the "type" attribute from <script> tags in several
staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>"
markers.

This patch also makes minor indentation changes, so diff using the "-w"
flag.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Acquisitions -> Vendor (uses acuisitions-toolbar.inc)
 - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record
   (uses additem.js.inc)
 - Catalog -> Search results -> Bibliographic detail view. (uses
   browser-strings.inc, catalog-strings.inc, datatables.inc, and
   format_price.inc )
 - Tools -> Label creator -> Manage -> Label batches -> Export batch
   (uses greybox.inc)

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.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 0658d84732cadb3bec44126d9efbd12a87547228)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7c5bc84508588261c0b4946fca363e2174325651)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22951: (follow-up) Fix indentation
Owen Leonard [Wed, 26 Jun 2019 12:39:59 +0000 (12:39 +0000)]
Bug 22951: (follow-up) Fix indentation

This patch fixes indentation related to the markup corrections in the
previous patch. It contains no textual changes.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.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 178a805a5d3055dd17050111c1227a9d5cef1b96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 444727e3e75b0f33c6b93006455debec15e725fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22951: Markup error in OPAC holds template
Owen Leonard [Wed, 26 Jun 2019 12:43:36 +0000 (12:43 +0000)]
Bug 22951: Markup error in OPAC holds template

This patch makes minor markup changes to the OPAC holds template in
order to fix validation errors.

To test, apply the patch and go through the process of placing a
hold in the OPAC. Test various aspects of the process, including cases
where the hold is blocked and an error message is displayed (for
instance, when there are no items to be placed on hold).

The page should work correctly and validating the source should
return no relevant errors.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Frederik Chenier <frederik.chenier@inlibro.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 e0991ae2358224a15b6880c96b8472a3cd814b1b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f48f1a981c13738c104ae91fce944ad557700599)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21000: Force case sensitivity on Getopt::Long
Mark Tompsett [Fri, 28 Jun 2019 00:45:27 +0000 (20:45 -0400)]
Bug 21000: Force case sensitivity on Getopt::Long

Before patch: -D and -d are mistaken for --debug

    $ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
    Option d does not take an argument
    git status --porcelain -unormal
    git rev-parse --short=8 HEAD
    dch --force-distribution -D "squeeze-dev" -v "19.06~git+20190627205913.466f99e4-1" "Building git snapshot."
    dch warning: Recognised distributions are:
    experimental, unstable, testing, stable, oldstable, oldoldstable,
    {bullseye,buster,stretch,jessie,wheezy}-proposed-updates,
    {testing,stable,oldstable,oldoldstable}-proposed-updates,
    {bullseye,buster,stretch,jessie,wheezy}-security,
    {testing,stable,oldstable,oldoldstable}}-security, jessie-backports, stretch-backports and UNRELEASED.
    Using your request anyway.

NOTE: squeeze-dev in the first dch line and warning about Option d.

Apply patch: -D and -d are differentiated correctly.
    $ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
    git status --porcelain -unormal
    git rev-parse --short=8 HEAD
    dch --force-distribution -D "stretch" -v "19.06~git+20190627210316.b3f919a7-1" "Building git snapshot."
    dch warning: Previous package version was Debian native whilst new version is not
    dch -r "Building git snapshot."

NOTE: No more 'Option d' error, and "stretch" in the first dch line.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c5d158b1bc37c63196be9ae405e4a2563315dbc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0f015884c978ee2df5cf39da7c15a5138e5389f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 19012: Note additional columns that are required during patron import
Nick Clemens [Mon, 31 Jul 2017 16:13:20 +0000 (16:13 +0000)]
Bug 19012: Note additional columns that are required during patron import

This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mark Tompsett <mtompset@hotmail.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 67f86868155725b3fec29d38a54e8c161dd72c78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 87e0e88468e4af97426e4027b96d3c18d23d3e98)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23280: Silence warning
Martin Renvoize [Mon, 8 Jul 2019 16:41:16 +0000 (17:41 +0100)]
Bug 23280: Silence warning

Corrects a typo in t/db_dependent/selenium/patrons_search.t introduced
by bug 22781.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 481d34613183300bff31f7f6a66abe8aa893e07a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 55ace0434aa16511b69b5fd6bc20916a61c3897a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23199: (follow-up) Fix tab/space issues
Mark Tompsett [Tue, 2 Jul 2019 05:05:20 +0000 (05:05 +0000)]
Bug 23199: (follow-up) Fix tab/space issues

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 611b60ea9657efbe5f6c1da53d4b6a6d2d5f6a01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ede934b90799b0127ae75018e126abe865a4dbed)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23199: Added tests for Koha::Patron
Mark Tompsett [Tue, 2 Jul 2019 05:01:55 +0000 (05:01 +0000)]
Bug 23199: Added tests for Koha::Patron

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 e53bed5375638c8d7baaefb04cd77843dbe8e8a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 05dcd8489c37dc3434e53ddf13f3edf279219cef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Arthur Suzuki [Tue, 25 Jun 2019 09:17:24 +0000 (11:17 +0200)]
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref

Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 fa390ca232a0979c6786a0e00eca8d458f644f3e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ecff60025871d739f695a2ae5b88613ce6617854)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: (RM follow-up) Delete atomicupdate file
Lucas Gass [Wed, 31 Jul 2019 18:51:59 +0000 (18:51 +0000)]
Bug 23151: (RM follow-up) Delete atomicupdate file

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23077: Fix import of cardnumber 0
Nick Clemens [Tue, 2 Jul 2019 10:58:53 +0000 (10:58 +0000)]
Bug 23077: Fix import of cardnumber 0

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23077: Don't fill cardnumber with empty string
Nick Clemens [Fri, 7 Jun 2019 12:19:28 +0000 (12:19 +0000)]
Bug 23077: Don't fill cardnumber with empty string

To test:
1 - Apply unit test patch only
2 - prove the tests, they fail
3 - Attempt to import the attached sample file
4 - First patron may be imported, second will give error (or both will error)
5 - If only one error, import agian, now both have error
6 - Apply this patch
7 - Prove tests, they pass!
8 - Import the sample file
9 - It succeeds!

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
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 cc60770c4eed3ab8144acd2382e2894f7b63fb37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 80cac150b805c3c757c37c546ef1f84010c9344f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23077: Unit tests
Nick Clemens [Fri, 7 Jun 2019 12:18:55 +0000 (12:18 +0000)]
Bug 23077: Unit tests

prove -v t/db_dependent/Koha/Patrons/Import.t

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
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 51bfa2ce28fc2eed7b5d0361fe4585afd96e3e20)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit feaaa75f1585e67710caab514e6cf1aa23e830ad)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21534: Always compute wildcards
Fridolin Somers [Wed, 29 May 2019 13:20:41 +0000 (15:20 +0200)]
Bug 21534: Always compute wildcards

You get no results when searching with an hyphen + with * in query string (or with preference QueryAutoTruncate) :
ie /cgi-bin/koha/opac-search.pl?q=saints-anges*

Looks like query-string by default does not compute wildcards, see analyze_wildcard in :
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

Test plan :
1) Use Elasticsearch
2) Create a record with "saints-anges"
3) Search for "saints-anges" => you get results
4) Search for "saints-anges*" => you get results
5) Search for "saints-ang*" => you get results

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 001d433b427731a6efd55208ac3169107c830730)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a8cc9d5f49f36a5bf69265f3062f1a7a8ee0fdf4)

5 years agoBug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED
Jonathan Druart [Thu, 20 Jun 2019 01:08:04 +0000 (20:08 -0500)]
Bug 23083: Fix course reserve item editing if one of the value is set to UNCHANGED

Test plan:
0: Do not apply the patches
1: Create an item with itype, ccode, location, and holding branch set
2: Create a course
3: Add item to course, changing the values for itype, ccode, and location
4: Click Edit for that item on course-details.pl
5: Assign new values for itype, ccode, and location but leave the holding library dropdown set to LEAVE UNCHANGED
6: Hit Save
7: Back on course-details.pl, observe that the item is still showing the values set in step 3
8: Apply this patch
9: Repeat 4 to 6
10: Back on course-details.pl, observe that the item is now showing the correct values
11: Edit the course reserve again, setting new values for itype, ccode, and location and setting the holding library dropdown to whatever the holding library for the item is currently
12: hit save
13: On course-details.pl, see that the change actually happened, the item is now showing the values set in step 9

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23083: Add tests
Jonathan Druart [Thu, 20 Jun 2019 01:12:14 +0000 (20:12 -0500)]
Bug 23083: Add tests

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23255: Correct HomeOrHoldingBranch descriptions
Nick Clemens [Tue, 2 Jul 2019 16:10:10 +0000 (16:10 +0000)]
Bug 23255: Correct HomeOrHoldingBranch descriptions

To test:
1 - Apply patch
2 - View 'HomeOrHoldingBranch' system preference
3 - Confirm the options make sense

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cbf605539ad90e18a0325b1d06e43b8b71b655e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 646072e1cf3759aa9ffc676cdb153aaf0758292d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23230: (follow-up) Fix broken tests
Mark Tompsett [Wed, 3 Jul 2019 02:35:16 +0000 (02:35 +0000)]
Bug 23230: (follow-up) Fix broken tests

Before patch, the new tests don't run.
After patch, they do.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 288cc505557fdcb167737f1894cee581526b4741)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit af7c25d2493bb3ef4f3f198c1181b98e8f1025f6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23230: Make _version_compare OO context aware
Tomas Cohen Arazi [Mon, 1 Jul 2019 14:42:51 +0000 (11:42 -0300)]
Bug 23230: Make _version_compare OO context aware

On using _version_compare in plugins development, it would be nice if it
was able to be called as an object method. This way we don't need to
fully qualify it like this:

    Koha::Plugins::Base::_version_compare

and we can do

    $self->_version_compare

instead.

This patch implements this behavior change. It is backwards compatible
so plugins using the 'old way' don't break.

To test:
- Apply the unit tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Plugins.t
=> FAIL: Tests fail
- Apply this patch
- Run:
 k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90acef7a9b860e70631ff243c21b435a7d081a16)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6c208a09619d2326bfa608cd3afee343cd4f4c33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23230: Unit tests
Tomas Cohen Arazi [Mon, 1 Jul 2019 14:33:41 +0000 (11:33 -0300)]
Bug 23230: Unit tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ff5f9fb633e6f3786b093d2a2f202a66db7b3d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5232a6263932556eaa3220f4b771c16c7a735b3c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23045: Return record along with errors
Nick Clemens [Fri, 7 Jun 2019 10:14:36 +0000 (10:14 +0000)]
Bug 23045: Return record along with errors

We don't seem to directly handle the errors in most cases, let's always return the record

To test:
1 - Add some blank lines to editor, previous patch is okay with this
2 - Add a line with just 'e' or some other incomplete field
3 - Try to save
4 - Note JS leader error
5 - Apply this patch
6 - No errors

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f927d801121f9d7b291516649cf3b55be49b8e3d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1e2dc2340105b35355d29ad5eda1d74a83375a4e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23045: TextMarc errors on blank lines
Nick Clemens [Tue, 4 Jun 2019 14:25:53 +0000 (14:25 +0000)]
Bug 23045: TextMarc errors on blank lines

Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when
processing blank lines.

We should just pass on these rather then erroring

To test:
1 - Define a new macro that delete more fields than it adds
  delete 245
2 - Run it
3 - Note an error in JS console, and helpers will not load
4 - Apply patch
5 - Reload, try again
6 - No error

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 545f38d13c210e4cb173e67d2578d825a9ffeb47)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2340df6f7c85c48a2ae68292204e9f16d485e7b9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23183: Reindent cataloging.js
Owen Leonard [Fri, 21 Jun 2019 14:07:49 +0000 (14:07 +0000)]
Bug 23183: Reindent cataloging.js

This patch makes some very minor corrections to indentation in
cataloging.js, a JavaScript file used by the bibliographic and item
records editors.

To test, apply the patch and perform a diff against master using the
'-w' flag:

git diff -w origin/master

There should be no changes reported.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.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 f50afc1fc0b9044c21564b45f44687993ebc07e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 25caca7d5308b0650c6df7672b210552c342af24)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22128: Add Rudolf Byker to contributors
Martin Renvoize [Fri, 28 Jun 2019 13:31:03 +0000 (14:31 +0100)]
Bug 22128: Add Rudolf Byker to contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18767d62a873570637d199586bbeca4200e67d1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a7784942bf243d4918d3ec230f35bde02b554902)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22128: Removed outdated comment
Mark Tompsett [Tue, 11 Jun 2019 13:39:48 +0000 (13:39 +0000)]
Bug 22128: Removed outdated comment

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 787b86f9d4d3aa83502f9b2afdc98d9ff6761b8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bac77d76d53c8d39e7df9c9e12a090f5a97cf4ca)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE
Rudolf Byker [Fri, 24 May 2019 18:25:45 +0000 (13:25 -0500)]
Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE

MySQL 5.7 is old, and the latest versions fail on "GRANT USAGE" if the
user does not exist. "DROP USER IF EXISTS" has been with us since 5.7,
so all users should have it by now. This patch fixes the issue.

To test:

Try to koha_remove a site, and if it works with no errors, all good!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e9bb407f62a208d42aefb03d16decd87bae228e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efab6445010254973468314c90b544e4f5318684)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23220: Prevent form submission before redirect
Nick Clemens [Wed, 26 Jun 2019 12:49:14 +0000 (12:49 +0000)]
Bug 23220: Prevent form submission before redirect

To test:
 1 - Check in an item to generate a transfer (form another library, no floating)
 2 - Check it in again, click 'Cancel transfer'
 3 - It may or may not work
 4 - To highlight the issue edit return.tt to add the delay line as below:
$('.cancel-transfer').on("click",function(e){
delay(5000);
window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&amp;canceltransfer=1'
});
 5 - Check in the item repeatedly, click 'Cancel transfer'
 6 - View the item in the staff or opac and verify it remains in transit
 7 - Undo changes above, apply patch
 8 - Test 'Cancel transfer', note it works
 9 - Add the delay back in, confirm it still works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dcf416dc9547fd28e6ed846d08d6bbecb144552)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0dd58132e64be0d146d1809967a41730965c5d62)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23211: Prevent SIP/Transaction.t to fail randomly
Jonathan Druart [Tue, 25 Jun 2019 22:43:41 +0000 (17:43 -0500)]
Bug 23211: Prevent SIP/Transaction.t to fail randomly

The checkout failed because patron's category is the one used for statistics (category_type=X).

To recreate the failure:
modified: t/db_dependent/SIP/Transaction.t
@ Transaction.t:37 @ subtest fill_holds_at_checkout => sub {
     plan tests => 6;

-    my $category = $builder->build({ source => 'Category' });
+    my $category = $builder->build({ source => 'Category', value => { category_type => 'X' }});
     my $branch   = $builder->build({ source => 'Branch' });
     my $borrower = $builder->build({ source => 'Borrower', value =>{
         branchcode => $branch->{branchcode},

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 466f99e44230968aeb51598e50f65d212941c5b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a38bc661008aecfcc1d2a3f92eb242dd4eabcc96)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23156: [18.11] Add pagination to checkouts in ILS-DI GetPatronInfo service
Julian Maurice [Wed, 19 Jun 2019 10:07:58 +0000 (12:07 +0200)]
Bug 23156: [18.11] Add pagination to checkouts in ILS-DI GetPatronInfo service

When patrons have a lot of checkouts, GetPatronInfo can take a lot of
time. This patch introduces two new parameters to allow pagination of
this list of checkouts

Also, fix a warning in C4::ILSDI::Services::GetPatronInfo

Test plan:
1. Go to /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X&show_loans=1
   where X is a borrowernumber of a patron who has several checkouts
   Verify that all checkouts are listed
2. Add '&loans_per_page=1&loans_page=1' to the URL. Verify that you have
   now only one checkout listed, and that there is a new element
   <total_loans> which contain the total number of checkouts
3. Increase the page number in the URL until you have seen all checkouts
4. prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22566: (QA follow-up) Fix pod complaint
Nick Clemens [Tue, 25 Jun 2019 12:40:57 +0000 (12:40 +0000)]
Bug 22566: (QA follow-up) Fix pod complaint

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35093039df3b42ae33c746385669ba13deb38c7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 85ff5a7a7dd15ddda8e96298405570b1bab2cb31)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22566: Add 'branch' key to GetPreparedLetter
Martin Renvoize [Tue, 18 Jun 2019 13:29:02 +0000 (14:29 +0100)]
Bug 22566: Add 'branch' key to GetPreparedLetter

The branch key was missing from the subsitution call to
GetPreparedLetter.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b3795df8012545af4134d7402e9609e2d89f7be9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 14d13d9b5dab629f8f5be6b5ad8e53ba14688ff7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22566: Clarify intent of reports and add warnings
Martin Renvoize [Tue, 18 Jun 2019 13:24:27 +0000 (14:24 +0100)]
Bug 22566: Clarify intent of reports and add warnings

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4e4f0b637c66ca04a07473c347cc741d456c20c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4e31d54c9b910f2019c4ec4100f6c3a0c3c83aeb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22566: Rename 'report_email' to 'report_by_branch'
Martin Renvoize [Tue, 18 Jun 2019 12:38:43 +0000 (13:38 +0100)]
Bug 22566: Rename 'report_email' to 'report_by_branch'

To clarify the intention of this routine, lets rename it

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e226ba3c018a890c823f10365dbe2b3d1d22d23)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0bf47532e64fc5493d07958355927720dd5f8ca7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22566: Accept 'all' in the branch params
Martin Renvoize [Tue, 18 Jun 2019 11:57:07 +0000 (12:57 +0100)]
Bug 22566: Accept 'all' in the branch params

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2b392a6db231c8069d57be88ebf4f2960af199fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 79736abef5b59722055f4ea3b95d4bb250c38895)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22566: Fix some more issues
Martin Renvoize [Fri, 7 Jun 2019 11:50:32 +0000 (12:50 +0100)]
Bug 22566: Fix some more issues

1) Fix warning for undefined value in sprintf when no items have the
indemand flag set.
2) Corrections to report_full for bad ternary in string construction
3) Perldoc corrections

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4f3413f0d2688017f6a35b43d0d1d4a9d7295c5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5126306dda991270fe975253c04a599211af8898)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22566: Fix some problems
Nick Clemens [Fri, 22 Mar 2019 17:23:35 +0000 (13:23 -0400)]
Bug 22566: Fix some problems

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b62473d192abaf9371bffb0ec4d73267a0070447)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7a89deb63a7e45c1fd5a41a82ce975ab57003cb9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22949: Markup error in OPAC course reserves template
Owen Leonard [Tue, 21 May 2019 14:45:06 +0000 (14:45 +0000)]
Bug 22949: Markup error in OPAC course reserves template

This patch adds a missing "=" in opac-course-reserves.tt in order to
quiet errors returned by the HTML validator.

To reproduce the problem you should have one or more course reserves
available in the OPAC. Go to the course reserves page. Run the page
through the W3C validation service: https://validator.w3.org. Either by
pasting in the URL for the search results (if web accessible) or by
viewing source, copying, and pasting into "Validate by Direct Input."

This patch addresses these errors:

 - 'Quote " in attribute name. Probable cause: Matching quote missing
    somewhere earlier.'
 - 'Attribute class"inst_surname" not allowed on element span at this
    point.'

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the page.

Signed-off-by: Frederik Chenier <frederik@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35fe9cf40bb1472799db0f7596d33f1bd184fb9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f0cdc306cd45c4f897202fb6ddb009f45111dbf1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23115: Compiled CSS
Lucas Gass [Thu, 25 Jul 2019 20:09:29 +0000 (20:09 +0000)]
Bug 23115: Compiled CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22935: Improve style of Bootstrap pagination
Owen Leonard [Fri, 17 May 2019 15:03:24 +0000 (15:03 +0000)]
Bug 22935: Improve style of Bootstrap pagination

This patch makes some updates to the staff client CSS and adds Font
Awesome icons to the Bootstrap pagination include.

To test, apply the patch and rebuild the staff client CSS.

Perform a search in the staff client which will return multiple pages of
results. Check that the pagination links look good.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 33b70b798d4cc2bc6d6db43a40d006dd8c1109b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19ccb03a7409faf7270d7028ca39367a5a499445)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23098: Reword success message of KOC upload process
Katrin Fischer [Mon, 17 Jun 2019 21:20:41 +0000 (23:20 +0200)]
Bug 23098: Reword success message of KOC upload process

When uploading KOC files the processing of transactions needs
to happen in a separate second step. This is why the success
message "Your file was processed" was found to be misleading.

This patch changes it to the wording suggested by Benjamin
Daeuber in the original bug report. Thx!

To test:
- Create a KOC file either manually or by downloading it
  from the plugin
- Upload the KOC file into Koha using Circulation >
  Upload offline circulation file (.koc)
- Verify the new message is clear and has no typos :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 286f151009f778d6d4d0890b1a8bead1a6e62bde)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d16983ca0dc191367824253fc57d7f8de0155db6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoIncrement version for 18.11.08 release v18.11.08
Lucas Gass [Tue, 23 Jul 2019 16:55:40 +0000 (16:55 +0000)]
Increment version for 18.11.08 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoTranslation updates for Koha 18.11.08
Koha translators [Tue, 23 Jul 2019 16:42:40 +0000 (13:42 -0300)]
Translation updates for Koha 18.11.08

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: DBRev 18.11.07.001
Lucas Gass [Tue, 23 Jul 2019 00:06:45 +0000 (00:06 +0000)]
Bug 23151: DBRev 18.11.07.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: (QA follow-up) Remove debug leftover
Marcel de Rooy [Fri, 19 Jul 2019 08:04:45 +0000 (08:04 +0000)]
Bug 23151: (QA follow-up) Remove debug leftover

Removes: Running... Running... Ran

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: (QA follow-up) Fix atomic update
Kyle M Hall [Fri, 28 Jun 2019 14:15:40 +0000 (10:15 -0400)]
Bug 23151: (QA follow-up) Fix atomic update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4f90d7ecc7d07551c2115ed0c564dc918735d428)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8dd0f86cd55c30ecc6bd762d841340b7f227d8bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: (follow-up) tweaked tests
Mark Tompsett [Wed, 19 Jun 2019 16:31:17 +0000 (16:31 +0000)]
Bug 23151: (follow-up) tweaked tests

This forces the tests to use the new changed_fields
field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c5a261e4ed9880723ce782a2c85677d2e1d0e05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8a52db3b2e9a7e919631ffcbbc7badc5aeb7a545)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: Add tests
Jonathan Druart [Wed, 19 Jun 2019 03:54:27 +0000 (22:54 -0500)]
Bug 23151: Add tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 286ffd5f2f255e77aac1099f31b9c418827d842e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d08367c9aaf327d926a35c93d083d692089693d4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: Tweak to use the new database structure
Mark Tompsett [Wed, 19 Jun 2019 16:29:59 +0000 (16:29 +0000)]
Bug 23151: Tweak to use the new database structure

This will use changed_fields to know whether a
borrower field is actually modified.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 30fd4eb1a59fd480406261f30daa40692f16bc10)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9ca074496d30f4164679bba2c7458ccefe4fa254)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: Schema changes
Mark Tompsett [Wed, 19 Jun 2019 16:32:10 +0000 (16:32 +0000)]
Bug 23151: Schema changes

It is best to regenerate these from scratch.
On a kohadevbox:
$ misc/devel/update_dbix_class_files.pl --db_name=koha_kohadev --db_user=koha_kohadev --db_passwd=password

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1af2698b84e21c11f80ed5c080430596ee712709)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7c0a88f9e1b6f5b5e6748b2b4b819a43c36a39b0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23151: Modifiy database structure
Mark Tompsett [Wed, 19 Jun 2019 16:28:44 +0000 (16:28 +0000)]
Bug 23151: Modifiy database structure

This modifies a fresh install structure, and provides
an atomic update.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d102165f8de3b808e2f555df2c97e8864b5445aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c1e8c57e588e69644c691035c8c50dd7b6d1e014)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23250: Just use an @ in the password
Mark Tompsett [Thu, 4 Jul 2019 00:29:01 +0000 (00:29 +0000)]
Bug 23250: Just use an @ in the password

Rather than try to use -y and symbols, since
older versions of pwgen don't have the -y,
Purposefully just shorten the generated
password to 15 characters and put @ on the end.
This avoids nasty shell globbing, fixes the
MySQL requiring a symbol by default in the
newer versions.

While @ at the end is less secure, the
password portion providing security is
still 15 characters long.

Before patch, password should have potentially
multiple ugly symbols in it.
After patch, when creating an instance, the
password will have an @ at the end of it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a6866afa343e3b53ad77a36552e19404ac7afab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit db843e0dc848b45d5ec9c0a27d2fdb65b2e8989f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23116: AllowHoldPolicyOverride allows a librarian to almost place a hold on an...
Kyle M Hall [Thu, 13 Jun 2019 10:34:38 +0000 (06:34 -0400)]
Bug 23116: AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold

A library appears to be able to place a second item level hold on an item a patron already has on hold if
A) AllowHoldPolicyOverride is enabled
and
B) the circ rule allow for multple item level holds.

Once the patron submits the hold requests though, the hold does not get stored in the database.

Because allowing two item level holds for the same item makes no sense, we should not allow
this attempt to take place, even if AllowHoldPolicyOverride is enabled.

Test Plan:
 1) Enable AllowHoldPolicyOverride
 2) Set up circ rules to allow for multiple item level holds on one record
 3) Place an item level hold on a record
 4) Note you can force placing a second item hold on that reocrd
 5) Attempt to do so, it will not actually work
 6) Apply this patch
 7) Note you can no longer place another item level hold for the same item
   you just placed an item-level hold on
 8) Note you can still force holds that contravene the circ rules for
   any and all other reasons
 9) Test with record level holds
10) Test by placing multiple holds from search results

Signed-off-by: Martha Fuerst <mfurest@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Simple fix for a regression. Works as expected.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c5e9bed7de83d01be755475b96a3cf439e0126c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d0186dd176c86e1175c80db9e5d38db1d6a9e2b2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23057: If checked_in_ok is set and item is not checked out, alert flag is supress...
Kyle M Hall [Fri, 19 Jul 2019 11:52:40 +0000 (07:52 -0400)]
Bug 23057: If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason

Acknowledgements: Patch also contains original code by David Cook. Patches were squashed for ease of use.

This patch fixes a bug from Bug 15221 and hopefully also makes it so that the alert flag
is suppressed when checked_in_ok is set and an item is not checked out.
To test:
0) Create patron in web interface with a cardnumber and userid of "staff" with a password
that matches the account in SIPconfig.xml. Also set their branch to CPL
(also matching SIPconfig.xml).
1) Create an item with a barcode of 'test'
2) Choose a patron to check out to and record their borrowernumber
In one terminal:
3) cd to your git directory (e.g. /home/koha/koha)
4) perl ./C4/SIP/SIPServer.pm ~/koha-dev/etc/SIPconfig.xml
In another terminal:
5) cd to your git directory (e.g. /home/koha/koha)
6) perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
NOTE: You need to replace <borrowernumber> with the borrowernumber from Step 2, and <password> with the password from Step 0.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23153: In framework management action subfields must not go directly to edition
Fridolin Somers [Wed, 19 Jun 2019 05:04:25 +0000 (07:04 +0200)]
Bug 23153: In framework management action subfields must not go directly to edition

Since 18.11, when viewing a framework field clicking on Actions >
Subfields goes to subfields edition instead of subfields table view.

This is because link contains op=add_form.
This is is also missing /cgi-bin/koha/admin.

Test plan :
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) On a line click Actions > Subfields
4) You see subfields table
5) Click on Edit subfields
6) You see subfields edition tabs

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49e0384f10f659e337fac1b08e6bdd2c163151ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 14c9a6401d733747ec93ff6045950c31949c7f4b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 15814: Add missing filters
Jonathan Druart [Tue, 18 Jun 2019 01:07:29 +0000 (20:07 -0500)]
Bug 15814: Add missing filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 12a9dfb6593c4d5ccc6936b85c82479c12337309)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c96cfdcb801a4dff276dd6cab53a4f3f4c2736b2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 15814: Handle correctly MMTA edit button
Jonathan Druart [Thu, 30 May 2019 02:28:23 +0000 (21:28 -0500)]
Bug 15814: Handle correctly MMTA edit button

The MARC modification template action edit buton does not correctly
handle variable escaping.
Assigning a JS variable containing the JSON representation of the
hashref will make the processing much more easier.

Test plan:
Create a MARC Modification Template with several actions.
In the description you should use the following characters, to try to
break this patch: \ ' " \n \r
(not sure what we handled \n and \r)
Then edit the action, modify and save again.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7a80483a1358a7bc3e516a8fbc92d34b6559dcac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 68424ae5adab4b8ab4b4f165b6c9ac72cf2590cc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23150: (follow-up) Make gdpr_proc_consent mandatory for create
Marcel de Rooy [Thu, 20 Jun 2019 12:37:27 +0000 (12:37 +0000)]
Bug 23150: (follow-up) Make gdpr_proc_consent mandatory for create

When updating (patron modification), the field should not be required.

Test plan:
Check patron modification on opac.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6dc8306b58bc1207f396d2df919a3daf4712e8e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b6b773c39a52ee92c96e2d10ceed323f55e8b885)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23150: Do not consider gdpr_proc_consent a mandatory field
Jonathan Druart [Wed, 19 Jun 2019 19:49:15 +0000 (14:49 -0500)]
Bug 23150: Do not consider gdpr_proc_consent a mandatory field

It introduced a regression in the patron's self modification feature.
Patron's details are no longer modificable, the screen displays
"You have not filled out all required fields. Please fill in all missing
fields and resubmit."

Test plan:
- Set GDPR_Policy to either Enforced or Permissive
- Set PatronSelfRegistrationBorrowerMandatoryField to empty
- Set OPACPatronDetails to Allow
- Log into the OPAC
- Accept the GDPR screen
- Go to opac-memberentry.pl, change something, submit modification
request

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3b14f7d636fea4425b2f6eab922be9aa2a9eed1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 502565a21cc71d13711d0194f809ac6062c9009b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22946: Markup error in OPAC search results around selection links
Owen Leonard [Tue, 21 May 2019 12:39:09 +0000 (12:39 +0000)]
Bug 22946: Markup error in OPAC search results around selection links

This patch makes minor corrections to the template for OPAC search
results. These corrections fix errors returned by the HTML validator.

To reproduce the problem, make sure holds and/or tags are enabled in the
OPAC. Perform a search in the OPAC which will return multiple results.
Run the page through the W3C validation service:
https://validator.w3.org. Either by pasting in the URL for the search
results (if web accessible) or by viewing source, copying, and pasting
into "Validate by Direct Input."

This patch addresses one specific error:

 - "Element div not allowed as child of element span in this context."

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the search results view.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 48259267f6830b2e388b2a91268117645bda80f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 639dda850db7832a0fb6d06db6d270f804228eac)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23097: Fix regression on overdues report and link patrons to moremember
Katrin Fischer [Mon, 17 Jun 2019 21:35:19 +0000 (21:35 +0000)]
Bug 23097: Fix regression on overdues report and link patrons to moremember

The link from the patron name in the circulation > overdues report
shouldn't point to the reserves tab, as this report is about checkouts.

The patch restores the behaviour as it was in 17.11.

To test:
- Make sure you have a patron account with overdue items
- If you don't have one, check out an item with specified due date in the
  past
- Go to Circulation > Overdues
- Veriy the overdue shows
- Click on the patron name that is linked
- Verify you go to the checkouts tab in patron account with holds tab selected
- Apply patch
- Reload Overdues report
- Verify the link now leads to the Details tab with the checkouts tab in front

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23140: Fix typo in branchcode parameters for print slip
Nick Clemens [Mon, 17 Jun 2019 17:58:56 +0000 (17:58 +0000)]
Bug 23140: Fix typo in branchcode parameters for print slip

To test:
1 - Have [% branch.branchcode %] in your TRANSFERSLIP
2 - Checkin an item from another branch (with AutomaticItemReturn = do )
3 - Inspect the button in the browser to see the typo
4 - Click 'Print slip'
5 - Note the branchcode is not populated
6 - Clear the transfer
7 - Apply patch
8 - Repeat
9 - Note typo is fixed and slip correctly populated

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 2af415a866d5ce46c6c243dfc6380b002e323db6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20e0d798ac229e9bae3cb996055a95efc4d68fe6)

5 years agoBug 13640: (QA follow-up) Allow NULL values for default_branch_item_rules.holdallowed
Marcel de Rooy [Fri, 21 Jun 2019 07:08:39 +0000 (07:08 +0000)]
Bug 13640: (QA follow-up) Allow NULL values for default_branch_item_rules.holdallowed

If a rule has not been defined for an itemtype or you submit a biblio level
hold, you cannot filter on holdallowed<>0.

Test plan:
Test with a biblio level hold. Have two items; one item should be blocked
with a policy.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20dd0b9ee950d539bdf62555f3dfec81e0379f51)

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