Commit Graph

34374 Commits

Author SHA1 Message Date
Nick Clemens 44a011c3e0 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 bc188a9a54)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 267ad48da7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-13 20:10:40 +00:00
Jonathan Druart 797b2fe285 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 ea0127b7fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b1e0a867c9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-13 20:09:58 +00:00
Owen Leonard c65b97a16c 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 3cfd78788f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 44cd65d3ee)
2019-08-13 19:59:31 +00:00
Jonathan Druart 36adec60b7 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 5759d06747)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c315ec1a19)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-13 19:52:18 +00:00
Mark Tompsett d4902ebb4c 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 d7fec3af88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 399ca0de50)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-13 19:32:00 +00:00
Owen Leonard feb1dbae44 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 7e29b5775f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4974960e33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-13 19:31:46 +00:00
Nick Clemens 6d09dd8856 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 f897ff77c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cd0f568de1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-13 19:31:34 +00:00
Jonathan Druart 51f9b88c36 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 17a71b9900)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 49fb1c0ae8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-13 19:23:23 +00:00
Nick Clemens 48aaab491d 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>
2019-08-06 05:13:47 +00:00
Owen Leonard c59cf4f6a4 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>
2019-08-06 05:11:04 +00:00
Lucas Gass f3d16629c2 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>
2019-08-06 05:04:44 +00:00
Andrew Isherwood dd178e1349 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 f829221f81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a4e91318da)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 04:58:45 +00:00
Owen Leonard e25f95d296 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 4068484650)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 13eddb09b4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 04:53:26 +00:00
Owen Leonard ecd8eef4ed 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 cd66074205)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d08cfbb5eb)
2019-08-06 04:53:04 +00:00
Fridolin Somers 182caed9c3 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 e269d6e6e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8b9c96308f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 04:40:27 +00:00
Nick Clemens 9963687308 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 fd5686b156)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 005a799051)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 04:35:29 +00:00
Martin Renvoize 5dddc0e9a7 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 d4d02fbe29)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1923fd376f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 04:21:11 +00:00
Nick Clemens a4a3b44e84 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 f45516e73a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d673e0387e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 04:20:47 +00:00
Marcel de Rooy 0c4881833b 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 076d5be767)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8bddf489e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 02:10:34 +00:00
Nick Clemens 94ed3519ef 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 f447658f85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cea0189b15)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 01:59:41 +00:00
Nick Clemens 96ee477876 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 3f40c32cbb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 02e09a8795)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 01:59:05 +00:00
Owen Leonard 8de215303f 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 d88709ec2d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c9594ecfa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 01:40:25 +00:00
Owen Leonard 38c3be1c1a 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 0658d84732)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7c5bc84508)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 01:35:41 +00:00
Owen Leonard 62c1182123 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 178a805a5d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 444727e3e7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 01:31:47 +00:00
Owen Leonard 05018c3dc7 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 e0991ae235)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f48f1a981c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 01:31:30 +00:00
Mark Tompsett fa915e4d44 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 5c5d158b1b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0f015884c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 01:19:36 +00:00
Nick Clemens 47ec90873c 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 67f8686815)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 87e0e88468)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 00:23:55 +00:00
Martin Renvoize b5211d1566 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 481d346131)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 55ace0434a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-06 00:17:12 +00:00
Mark Tompsett d5486eb13f 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 611b60ea96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ede934b907)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-02 20:16:19 +00:00
Mark Tompsett e4c7906dbd 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 e53bed5375)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 05dcd8489c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-02 20:15:59 +00:00
Arthur Suzuki 27a2c98e53 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 fa390ca232)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ecff600258)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-08-02 20:15:42 +00:00
Lucas Gass 36d20d4600 Bug 23151: (RM follow-up) Delete atomicupdate file
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-31 18:51:59 +00:00
Nick Clemens 480ce53dd8 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 9796f5adb3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd91300c04)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-31 18:23:00 +00:00
Nick Clemens b450462d74 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 cc60770c4e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 80cac150b8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-31 18:22:45 +00:00
Nick Clemens 225c3ba5ed 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 51bfa2ce28)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit feaaa75f15)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-31 18:22:30 +00:00
Fridolin Somers 60b4ab8a92 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 001d433b42)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a8cc9d5f49)
2019-07-26 06:00:41 +00:00
Jonathan Druart 23e62d6aa8 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 e4ee363630)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75e886e31e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:40:07 +00:00
Jonathan Druart 2d7529e953 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 44469cf4c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd850bdd07)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:39:51 +00:00
Nick Clemens e81a0b32d9 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 cbf605539a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 646072e1cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:22:20 +00:00
Mark Tompsett 7665edd38f 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 288cc50555)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit af7c25d249)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:15:09 +00:00
Tomas Cohen Arazi bf8f38ebce 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 90acef7a9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6c208a0961)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:14:51 +00:00
Tomas Cohen Arazi bd2e6c6734 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 2ff5f9fb63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5232a62639)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:14:20 +00:00
Nick Clemens b78fc7961d 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 f927d80112)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1e2dc23401)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:07:08 +00:00
Nick Clemens 8b3e00174b 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 545f38d13c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2340df6f7c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 03:03:54 +00:00
Owen Leonard 0995e70bb6 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 f50afc1fc0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 25caca7d53)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-26 02:40:09 +00:00
Martin Renvoize b239e36563 Bug 22128: Add Rudolf Byker to contributors
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18767d62a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a7784942bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-25 21:15:16 +00:00
Mark Tompsett ca27710f57 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 787b86f9d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bac77d76d5)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-25 21:10:19 +00:00
Rudolf Byker 33ba8d247c 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 e9bb407f62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efab644501)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-25 21:10:00 +00:00
Nick Clemens e44d62b067 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 4dcf416dc9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0dd58132e6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-25 20:53:05 +00:00
Jonathan Druart 496e507122 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 466f99e442)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a38bc66100)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-07-25 20:49:45 +00:00