]> git.koha-community.org Git - koha.git/log
koha.git
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>
5 years agoBug 18930: (RM follow-up) Drop refund_lost_item_fee_rules
Martin Renvoize [Fri, 12 Jul 2019 13:08:56 +0000 (14:08 +0100)]
Bug 18930: (RM follow-up) Drop refund_lost_item_fee_rules

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23299: Switch address1 and streetnumber for German address format on opac-memberentry
Marcel de Rooy [Thu, 11 Jul 2019 10:16:35 +0000 (10:16 +0000)]
Bug 23299: Switch address1 and streetnumber for German address format on opac-memberentry

Test plan:
Toggle value of pref AddressFormat and verify change on opac-memberentry.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
5 years agoBug 23219: (QA follow-up) Change wording of test slightly
Katrin Fischer [Fri, 12 Jul 2019 06:15:38 +0000 (06:15 +0000)]
Bug 23219: (QA follow-up) Change wording of test slightly

We no longer delete, but cancel the holds when deleting a patron.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23219: (QA Follow up) Cancel patrons holds when patron delete
Emmi [Tue, 9 Jul 2019 06:24:30 +0000 (09:24 +0300)]
Bug 23219: (QA Follow up) Cancel patrons holds when patron delete

Adds test for patrons holds cancelation when patron is deleted.

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23219: Cancel patrons holds when patron delete
Emmi [Tue, 2 Jul 2019 08:05:36 +0000 (11:05 +0300)]
Bug 23219: Cancel patrons holds when patron delete

Currently deleting a patron deletes all their holds and leaves
no record to the "old_reserves" table.

 Steps to reproduce:
- Create a patron
- Add holds for patron
- Holds are recorded to "reserves" table
- Delete patron
- Confirm delete
=>Patron and all holds are deleted and no record of holds is
left in "old_reserves" table

This patch displays alert text notifying user that deleting patron
cancels all their holds. Holds are cancelled instead of deleting them.
This patch also writes stringified datetime to holds cancel log instead
of whole datetime object.

To test:
- Apply this patch
- Create a patron
- Add holds for patron
- Holds are recorded to "reserves" table
- Delete patron
- Alert text of holds is displayed
- Confirm patron delete
=> Patron is deleted, their holds are cancelled and moved to
"old_reserves" table

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nadine Pierre <nadine.pierre@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>
5 years agoBug 22768: Global search form keyboard navigation broken
Owen Leonard [Thu, 25 Apr 2019 11:45:58 +0000 (11:45 +0000)]
Bug 22768: Global search form keyboard navigation broken

Bug 22045 made changes to the global staff client JavaScript which
broken keyboard navigation for the most common forms in the resident
search form("Check out, Check in, Renew, Search). This patch
reimplements the tab selection code on the basic MARC editor page so
that the keyboard shortcut behavior can be restored.

To test, apply the patch go to Cataloging.

 - Search for an existing record and edit it in the basic MARC editor.
   - Test that the numbered tabs (0-9) at the top work correctly.
 - Select a tab other than 0 and choose Save -> Save and continue
   editing. When the page reloads you should be returned to the tab you
   were on when you saved.
 - Go to the Circulation home page. Test the keyboard shortcuts for
   switching tabs in header area:

   - Alt-u (Check out)
   - Alt-r (Check in)
   - Alt-w (Renew)
   - Alt-q (Search)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
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>
5 years agoBug 22709: (RM follow-up) AddBiblio returns a list not a scalar
Martin Renvoize [Mon, 15 Jul 2019 11:37:42 +0000 (12:37 +0100)]
Bug 22709: (RM follow-up) AddBiblio returns a list not a scalar

AddBiblio was being called in scalar context in
Biblio_and_Items_plugin_hooks.t and this was leading to difficult to
reproduce test failures. If the tests was run after any other test that
also called AddBiblio then it would fail, but if it was run as the first
test it would pass. This is due to a fluke in processing which meant the
the final return value of the list (itemnumber) happened to match a
biblionumber.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
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>
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>
5 years agoBug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls
Josef Moravec [Wed, 17 Apr 2019 06:02:59 +0000 (06:02 +0000)]
Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls

Test plan:
Run tests, at least:
    t/db_dependent/Biblio.t
    t/db_dependent/Biblio/TransformHtmlToMarc.t
    t/db_dependent/Charset.t
    t/db_dependent/Circulation/GetTopIssues.t
    t/db_dependent/Filter_MARC_ViewPolicy.t
    t/db_dependent/ImportBatch.t
    t/db_dependent/Items.t
    t/db_dependent/Items/AutomaticItemModificationByAge.t
    t/db_dependent/Items/GetItemsForInventory.t
    t/db_dependent/Koha/Filter/EmbedItemsAvailability.t
    t/db_dependent/Serials.t
    t/db_dependent/XISBN.t
    t/db_dependent/FrameworkPlugin.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20364: Show languages from MARC21 field 041 in intranet
Pasi Kallinen [Fri, 9 Mar 2018 09:05:52 +0000 (11:05 +0200)]
Bug 20364: Show languages from MARC21 field 041 in intranet

Show the language names coded in field 041, in intranet search
results and in detail view.

Test plan:
1) Apply patch
2) Do a search, and check the results look correct
3) Check some biblio detail pages that they look correct
4) Add some 041 subfields (a, b, d, h, j) in any combinations
5) Repeat 2 and 3

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23259: Compiled CSS
Martin Renvoize [Thu, 11 Jul 2019 15:18:51 +0000 (16:18 +0100)]
Bug 23259: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23259: Remove reset-fonts-grids.css
Owen Leonard [Wed, 3 Jul 2019 18:30:38 +0000 (18:30 +0000)]
Bug 23259: Remove reset-fonts-grids.css

This patch removes the CSS file reset-fonts-grids.css which was required
when the staff client templates used YUI grids. Now that all staff
client templates have been converted to Bootstrap grid markup the file
can be deleted.

Because the YUI CSS also did set some baseline properties for different
tags the global SCSS file is modified in this patch in order to keep
things looking consistent. Most of these updates change font-size
declarations to preserve the previous appearance.

Some styling has been added to (non Bootstrap-classed) <input> and
<button> tags in order to keep button style consistent.

Removed from staff-global.scss: YUI-specific CSS which has been made
obsolete by the template conversions.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Clear your browser cache if necessary.

Browse through various pages of thes staff client to confirm that the
changes work well.

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>
5 years agoBug 23197: Add more batch operation options to SQL report results
Owen Leonard [Mon, 24 Jun 2019 18:48:29 +0000 (18:48 +0000)]
Bug 23197: Add more batch operation options to SQL report results

This patch extends the feature which allows the user to send item
numbers from a page of report results to batch item modification. For
biblionumbers: Batch record modification, batch record deletion, and
add to list are now available. For item numbers: batch item deletion is
added.

A new menu button is added for these options at the top of report
results, removing the button from the item number column header.
Corresponding CSS has been removed.

To test, apply the patch and create a report which includes both
biblionumber and itemnumber columns in the results.

 - Run the report and confirm that a new "Batch operations" button
   appears at the top of the results. Test each option:
   - Batch record modification
   - Batch record deletion
   - Add to list
   - Batch item modification
   - Batch item deletion

In each case the correct set of parameters should be passed to the batch
operations. Test with reports which return only biblionumbers, only
itemnumbers, and neither.

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>
5 years agoBug 23094: Use Bootstrap-style pagination on staged MARC records page
Owen Leonard [Wed, 26 Jun 2019 14:57:18 +0000 (14:57 +0000)]
Bug 23094: Use Bootstrap-style pagination on staged MARC records page

This patch makes markup changes in order to make the pagination links on
the staged MARC records page consistent with the links on the catalog
search results page.

To test properly you should have enough staged marc record batches that
there are multiple pages to list.

Go to Tools -> Manage staged MARC records. Test that the pagination
links look consistent with the catalog search results page and that they
work correctly.

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>
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>
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>
5 years agoBug 19919: Unit Tests
Martin Renvoize [Thu, 16 May 2019 07:49:22 +0000 (08:49 +0100)]
Bug 19919: Unit Tests

This patch adds unit tests for the addition of a patron accessor to the
Koha::Account::Line object.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19919: Stop using paidfor altogether
Martin Renvoize [Fri, 3 May 2019 14:44:35 +0000 (15:44 +0100)]
Bug 19919: Stop using paidfor altogether

This patch removed references to setting and getting the items.paidfor
field. Where it was used for display, in moredetail.pl, we replace it
with a query on the accountlines.

Test plan:
1) Apply patch
2) Pay off a LOST item
3) Check for the associated display of 'Paidfor?:' on the itemdetails
page
4) Writeoff a LOST item
5) Check that a 'Paidfor?:' is not displayed on the itemdetails page.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: DBRev 19.06.00.012
Martin Renvoize [Thu, 11 Jul 2019 15:29:48 +0000 (16:29 +0100)]
Bug 22563: DBRev 19.06.00.012

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (follow-up) Fix tests in Koha/Account.t
Tomas Cohen Arazi [Fri, 5 Jul 2019 17:55:34 +0000 (14:55 -0300)]
Bug 22563: (follow-up) Fix tests in Koha/Account.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: Typo in query (manualinvoice)
Tomas Cohen Arazi [Fri, 5 Jul 2019 17:47:09 +0000 (14:47 -0300)]
Bug 22563: Typo in query (manualinvoice)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (QA follow-up) Correction to DB update
Martin Renvoize [Mon, 17 Jun 2019 14:01:11 +0000 (15:01 +0100)]
Bug 22563: (QA follow-up) Correction to DB update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (QA follow-up) Catch LOST maninvoice cases
Martin Renvoize [Sat, 15 Jun 2019 06:17:46 +0000 (07:17 +0100)]
Bug 22563: (QA follow-up) Catch LOST maninvoice cases

One could add a manual invoice of type LOST but we would not associate
it with an issue_id. This patch tries to catch such cases and
extrapolate an issue_id to add to the accountline.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (QA follow-up) Use issue_id in chargelostitem
Martin Renvoize [Fri, 14 Jun 2019 19:05:27 +0000 (20:05 +0100)]
Bug 22563: (QA follow-up) Use issue_id in chargelostitem

C4::Accounts::chargelostitem contained a FIXME which asked if an item
should be charged for it lost, returned and then lost again. We add
handling for that case here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database
Martin Renvoize [Thu, 18 Apr 2019 11:53:42 +0000 (12:53 +0100)]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (follow-up) Corrections for overdue tests
Martin Renvoize [Thu, 18 Apr 2019 14:47:24 +0000 (15:47 +0100)]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (follow-up) Items LOST should not be RETURNED
Martin Renvoize [Thu, 18 Apr 2019 07:45:54 +0000 (08:45 +0100)]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: (follow-up) Corrections for tests
Martin Renvoize [Wed, 27 Mar 2019 14:56:52 +0000 (14:56 +0000)]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: Update lost handling to use accountline.status
Martin Renvoize [Fri, 22 Mar 2019 16:28:52 +0000 (16:28 +0000)]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22563: Be more descriptive with accountypes
Martin Renvoize [Fri, 22 Mar 2019 15:25:16 +0000 (15:25 +0000)]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: DBRev 19.06.00.011
Martin Renvoize [Thu, 11 Jul 2019 15:24:16 +0000 (16:24 +0100)]
Bug 18930: DBRev 19.06.00.011

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: (QA follow-up) Remove debug code
Josef Moravec [Wed, 3 Jul 2019 22:04:19 +0000 (22:04 +0000)]
Bug 18930: (QA follow-up) Remove debug code

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: (follow-up) Change variable used in refund select for default options
Agustin Moyano [Tue, 7 May 2019 03:19:31 +0000 (00:19 -0300)]
Bug 18930: (follow-up) Change variable used in refund select for default options

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: (follow-up) Amend search parameter in Koha::RefundLostItemFeeRules->_defau...
Agustin Moyano [Tue, 7 May 2019 02:14:04 +0000 (23:14 -0300)]
Bug 18930: (follow-up) Amend search parameter in Koha::RefundLostItemFeeRules->_default_rule

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: (follow-up) Amend Koha::RefundLostItemFeeRules->find
Agustin Moyano [Tue, 7 May 2019 02:11:09 +0000 (23:11 -0300)]
Bug 18930: (follow-up) Amend Koha::RefundLostItemFeeRules->find

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: (follow-up) Make DB update idempotent
Tomas Cohen Arazi [Wed, 6 Mar 2019 13:41:17 +0000 (10:41 -0300)]
Bug 18930: (follow-up) Make DB update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: Do not insert '*' in circulation_rules
Jonathan Druart [Thu, 25 Oct 2018 13:16:20 +0000 (10:16 -0300)]
Bug 18930: Do not insert '*' in circulation_rules

We must insert NULL instead, otherwise the FK constraint will fail

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18930: Move lost item refund rules to circulation_rules table
Kyle M Hall [Wed, 12 Jul 2017 14:55:08 +0000 (10:55 -0400)]
Bug 18930: Move lost item refund rules to circulation_rules table

This patch will move the list item refund rules from a dedicated table to the circulation_rules table.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Verify lost item refund rules remain unchanged

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13597: Make staff client Amazon no image results match OPAC
Nick Clemens [Mon, 1 Jul 2019 11:45:14 +0000 (11:45 +0000)]
Bug 13597: Make staff client Amazon no image results match OPAC

The point is to make staff client HTML for missing Amazon cover
images more equivalent to that of the OPAC

To test:
1 - Enable Amazon images everywhere
2 - Search on the staff and OPAC to get some results without
    Amazon covers (missing ISBNs and bad ISBNs)
3 - Note OPAC missing images are like:
<span class="no-image">No cover image available</span>
4 - Note staff client are like:
<img src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />
5 - The staff links do not lend themselves to easy CSS hiding/styling
6 - Apply patch
7 - Repeat
8 - Note increased consistency

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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
5 years agoBug 23018: Refunding a lost item fee may trigger error if any fee has been written...
Kyle M Hall [Thu, 30 May 2019 18:15:52 +0000 (14:15 -0400)]
Bug 23018: Refunding a lost item fee may trigger error if any fee has been written off related to that item

If a lost item fee is written off, it creates a writeoff with the same itemnumber but the amount column is a negative number.

Now, when the lost item is returned, it calls _FixAccountForLostAndReturned which searchs for all accountlines with an account type of 'L' or 'W'.

Then, if the *first* of those lines has an outstanding balance, a credit is created and *all* the lines found are passed to $credit->apply. The apply method then calls is_debit on each line and when it hits the writeoff, it throws an exception ( Koha::Exceptions::Account::IsNotDebit ).

When this happens, the credit is creating but not applied the the outstanding lost item fee, and the librarian is presented with an error page.

It seems like the solution is to only fetch the first result since it seems like that is the only one we should be operating on.

Test Plan:
1) Create a lost item with a fee
2) Create a manual debit using the barcode of the item
3) Write off that manual debit
4) Check in the item, note the error
5) Apply this patch
6) Repeat steps 1-3
7) Check in the item, no error!

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>
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>
5 years agoBug 22709: (RM follow-up) Clean up plugin tests
Martin Renvoize [Fri, 12 Jul 2019 10:45:25 +0000 (11:45 +0100)]
Bug 22709: (RM follow-up) Clean up plugin tests

The plugin tests were failing due to failed rollbacks and run order.
This patch moves them into their own directory and adds a reset test to
restore the original state of the plugin system after the tests have
run.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22709: (RM follow-up) Enable plugin in tests
Martin Renvoize [Tue, 9 Jul 2019 10:21:29 +0000 (11:21 +0100)]
Bug 22709: (RM follow-up) Enable plugin in tests

Now that we clean up properly in t/db_dependent/Plugins.t when we reload
the Koha::Plugin::Test plugin we must also enable it for the tests to
function.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23284: Remove test duplication
Martin Renvoize [Tue, 9 Jul 2019 07:26:15 +0000 (08:26 +0100)]
Bug 23284: Remove test duplication

A duplicate test was introduced during rebaseing work on bug 21073

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22709: (RM follow-up) Add rollback to plugin test
Martin Renvoize [Mon, 8 Jul 2019 17:33:16 +0000 (18:33 +0100)]
Bug 22709: (RM follow-up) Add rollback to plugin test

Rollback for InstallPlugins

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
5 years agoBug 23230: (RM follow-up) Add rollback to plugin test
Martin Renvoize [Mon, 8 Jul 2019 11:16:25 +0000 (12:16 +0100)]
Bug 23230: (RM follow-up) Add rollback to plugin test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
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>
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>
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>
5 years agoBug 21181: Make cancel_expired_reserves.pl Cancel all holds not waiting if ExpireRese...
Nick Clemens [Wed, 24 Apr 2019 01:22:06 +0000 (01:22 +0000)]
Bug 21181: Make cancel_expired_reserves.pl Cancel all holds not waiting if ExpireReservesMaxPickupDelay not set

To test:
0 - Make sure ExpireReservesMaxPickupDelay is set to 'Don't allow'
1 - Place a hold for a patron
2 - Check in at another library to set it in transit
3 - Update expirationdate of hold to be in the past
    UPDATE reserves SET expirationdate='1999-12-31'
4 - Run cancel_expired_holds.pl
5 - Hold is not canceled
6 - Apply patch
7 - Run again
8 - Hold is cancelled

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>
5 years agoBug 21181: Unit tests
Nick Clemens [Wed, 24 Apr 2019 01:21:56 +0000 (01:21 +0000)]
Bug 21181: Unit tests

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>
5 years agoBug 23248: (QA follow-up) Consolidate 404s
Marcel de Rooy [Fri, 5 Jul 2019 06:07:25 +0000 (06:07 +0000)]
Bug 23248: (QA follow-up) Consolidate 404s

Merging two conditions: biblionumber is empty or biblionumber cannot be
found. This make the strange int($biblionumber) unneeded.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23248: Avoid opac-ISBDdetail.pl breaking on invalid biblionumber
Tomas Cohen Arazi [Mon, 1 Jul 2019 18:52:02 +0000 (15:52 -0300)]
Bug 23248: Avoid opac-ISBDdetail.pl breaking on invalid biblionumber

This patch makes opac-ISBDdetail.pl redirect to a 404 page (as it
should) in the event of a bad biblionumber passed.

To test:
- Open your browser on a known record detail page (OPAC)
- Switch to the ISBD view
=> SUCCESS: It shows
- Alter the biblionumber on the URL into an obviously non-existent
biblionumber (e.g. very high value)
=> FAIL: Internal errors are shown
- Apply this patch
- Reload the bad biblionumber ISBD view
=> SUCCESS: Browser is redirected to the 404 page as it should
- Sign off :-=> FAIL: Internal errors are shown
- Apply this patch
- Reload the bad biblionumber ISBD view
=> SUCCESS: Browser is redirected to the 404 page as it should
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
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>
5 years agoBug 21801: (follow-up) Use ->account
Tomas Cohen Arazi [Fri, 9 Nov 2018 14:58:10 +0000 (11:58 -0300)]
Bug 21801: (follow-up) Use ->account

This patch is a minor refactoring, that reuses the $account object we
already get from $patron, instead of creating new ones all over the
place. Code gets simpler to read too.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21801: Make paycollect.pl pass library_id when calling ->pay
Tomas Cohen Arazi [Fri, 9 Nov 2018 14:33:59 +0000 (11:33 -0300)]
Bug 21801: Make paycollect.pl pass library_id when calling ->pay

This patch makes paycollect store the branchcode of the current library
when payments are done.

- Try all the possible options, specially selecting things to pay for (not
using the individual buttons).
- Check on the DB, that the  accountlines for the patron you're playin
with have the branchcode stored correctly in all cases:
  $ sudo koha-mysql kohadev
  > SELECT * FROM accountlines WHERE borrowernumber=<the_bn>;
=> SUCCESS: Things are as expected
- SIgn off :-D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22709: (follow-up) Move new test file into a Plugins subdirectory
Kyle M Hall [Wed, 3 Jul 2019 12:18:35 +0000 (08:18 -0400)]
Bug 22709: (follow-up) Move new test file into a Plugins subdirectory

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>
5 years agoBug 22709: (follow-up) Mock enable_plugins config entry
Tomas Cohen Arazi [Tue, 2 Jul 2019 13:07:27 +0000 (10:07 -0300)]
Bug 22709: (follow-up) Mock enable_plugins config entry

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
5 years agoBug 22709: Add after biblio/item action hooks
Tomas Cohen Arazi [Fri, 21 Jun 2019 20:10:23 +0000 (17:10 -0300)]
Bug 22709: Add after biblio/item action hooks

This patch introduces after-action hooks for
- C4::Biblio::{Add|Mod|Del}Biblio
- C4::Items::{Add|Mod|Del}Biblio

After the action has taken place, a call to a helper method is done,
which loops through all plugins implementing the hooks, and calls the
plugin method. The related object is passed, along with an 'action'
string specifying the action that took place, and the object id (which
is specially important for the 'Del' case).

To test:
- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/Biblio_and_Items_plugin_hooks.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
5 years agoBug 22709: Unit tests
Tomas Cohen Arazi [Fri, 21 Jun 2019 20:09:56 +0000 (17:09 -0300)]
Bug 22709: Unit tests

This patch introduces tests for new plugin hooks added to
C4::Biblio::{Add|Mod|Del}Biblio and C4::Items::{Add|Mod|Del}Item.

They are tested together as for creating an item you need to first create
a biblio and tests looks basically the same.

The testing strategy is
- Make sure the plugin is passed the right params
- Throw an exception at plugin-level, to be trapped by the C4::Biblio
and C4::Items lib, and converted into a warning. So we test for the
warning.
- Also, the fact that C4::Biblio and C4::Items warns, means the
exception was cought, and then Koha won't break on faulty plugins or
fatal errors from plugins.

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>
5 years agoBug 22999: (follow-up) Indentation updates
Owen Leonard [Tue, 2 Jul 2019 12:29:08 +0000 (12:29 +0000)]
Bug 22999: (follow-up) Indentation updates

The markup changes require indentation updates. This patch contains
indentation changes only.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22999: Switch two-column templates to Bootstrap grid: Circulation
Owen Leonard [Fri, 28 Jun 2019 16:27:16 +0000 (16:27 +0000)]
Bug 22999: Switch two-column templates to Bootstrap grid: Circulation

This patch modifies the circulation page template to use the Bootstrap
grid instead of YUI.

To test, apply the patch and view the checkout page, confirming that
it looks correct at various browser widths:

 - Check out (no patron)
 - Check out -> Patron search
   - Results
   - No results
 - Check out -> Patron selected
   - Can check out
     - Checkout blocked (renewal confirmation, item on hold, etc)
   - Can't check out (expired, restricted)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
5 years agoBug 14419: (QA follow-up) Restore the link styling
Josef Moravec [Wed, 3 Jul 2019 20:56:56 +0000 (20:56 +0000)]
Bug 14419: (QA follow-up) Restore the link styling

Test plan:
Look at Show more/less links in facets, in opac and staff client
--> without this patch they are pure text, no styling, no hand cursor
--> with this patch it is link, but continues to work as before

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14419: Expanding facets (Show more) performs a new search
Nick Clemens [Tue, 2 Jul 2019 11:58:49 +0000 (11:58 +0000)]
Bug 14419: Expanding facets (Show more) performs a new search

This patch removes the constraint of only passing 5 facets to the template unless the list is expanded, in fact, it removes the 'expanded' attribute from Search.pm
Now that all facets are passed to page it adds a 'show more' link at the bottom of lists and allows user to expand or collapse any facet set without reloading page.

Updated tests included.

To test:
1  - Perform an OPAC search that returns more than 5 of any given facet type
2  - Click the "Show more" link on the facets and see that the search is reloaded
3  - Apply patch
4  - Repeat search
5  - Note that you can click "Show more" without reloading page
6  - Test that page load is not greatly affected
7  - Ensure that all facet links function normally
8  - Ensure that facets are the same a prior to patch
9  - Repeat for staff client
10 - Prove t/Search.t

NOTE: This patch makes it much easier to see that there is an existing issue with marking the "active" facet.  Ending punctuation seems to confuse the matcher.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
5 years agoBug 20959: (RM follow-up) Fix selenium test
Martin Renvoize [Tue, 2 Jul 2019 16:08:10 +0000 (17:08 +0100)]
Bug 20959: (RM follow-up) Fix selenium test

The basic_workflow test started to fail with this bug as the xpath for
the checking button changed. I have updated the test to reflect the
change.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22897: Switch two-column templates to Bootstrap grid: ILL requests
Owen Leonard [Mon, 13 May 2019 16:22:49 +0000 (16:22 +0000)]
Bug 22897: Switch two-column templates to Bootstrap grid: ILL requests

This patch modifies the ILL requests template to use the Bootstrap grid
instead of YUI.

To test, apply the patch and look at the ILL requests template. Confirm
that it looks correct at various browser widths.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20959: Compiled CSS
Martin Renvoize [Tue, 2 Jul 2019 08:19:28 +0000 (09:19 +0100)]
Bug 20959: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20959: Style checkin form more like the checkout form, with collapsed settings...
Owen Leonard [Thu, 27 Jun 2019 18:11:51 +0000 (18:11 +0000)]
Bug 20959: Style checkin form more like the checkout form, with collapsed settings panel

This patch modifies the structure of the checkin form so that settings
(Specify return date, book drop mode, forgive overdue charges) are in a
collapsed panel when inactive. The style of the barcode field and the
mode notification messages has been changed to reduce the vertical
motion of the form when selecting options.

Some class names have been changed in circulation.tt and circulation.js
to make them appropriate for use on both forms.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Clear your browser cache if necessary.

 - View the checkin page. The "checkin settings" panel should be
   collapsed by default.
 - Confirm that the settings panel collapses and expands as it should.
 - Confirm that selecting "Forgive overdue charges" or "Book drop mode"
   trigger the display of the correct message and that the style of the
   barcode field is changed.
 - Confirm that after submitting a barcode for check-in, the
   settings panel stays open and your selected settings are still
   selected.
 - Confirm that specifying a due date and selecting "remember" shows
   a new message with the selected date.
   - Confirm that unchecking "remember" hides the message.
   - Confirm that date settings are remembered and the correct message
     displayed (or not) during check-in.
 - Test with CircSidebar enabled and disabled.

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>
5 years agoBug 23222: Update plugins-home.tt with new ENABLE/DISABLE flag name
Agustin Moyano [Wed, 26 Jun 2019 19:15:43 +0000 (16:15 -0300)]
Bug 23222: Update plugins-home.tt with new ENABLE/DISABLE flag name

At some point of history, the flag to indicate if a plugin was enabled/disabled was called "enabled", now it's called "is_enabled"

To test:
1) get a fresh master copy
2) Enable plugins
3) Install any plugin
CHECK => plugin appears as disabled
      => If you try to enable it, it just appears as disabled just the same
4) Apply this patch
5) Reload page
SUCCESS => plugin appears as enabled
        => enable / disable action works again
6) Sign off

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23058: Prevent XSS vulnerabiliies when 'tag' is passed to opac-search
Jonathan Druart [Wed, 5 Jun 2019 23:40:54 +0000 (18:40 -0500)]
Bug 23058: Prevent XSS vulnerabiliies when 'tag' is passed to opac-search

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17003: (QA follow-up) Fix the number of tests
Kyle M Hall [Fri, 28 Jun 2019 15:27:27 +0000 (15:27 +0000)]
Bug 17003: (QA follow-up) Fix the number of tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17003: (follow-up) Update definitions according to voted RFC
Josef Moravec [Fri, 29 Mar 2019 07:53:27 +0000 (07:53 +0000)]
Bug 17003: (follow-up) Update definitions according to voted RFC

Test plan:
1) Have some patrons with checkouts, some renewable and some not
renewable
2) Use your favorite API tester and access GET
http://koha.url/api/v1/checkouts/{checkout_id}/allows_renewal
3) Check the response is OK according to voted RFC:
https://wiki.koha-community.org/wiki/Checkouts_endpoint_RFC#Checkout_renewability_2
4) prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17003: Adapt to OpenAPI
Josef Moravec [Thu, 21 Feb 2019 02:30:00 +0000 (02:30 +0000)]
Bug 17003: Adapt to OpenAPI

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17003: Add API route to get checkout's renewability
Lari Taskula [Mon, 22 Aug 2016 14:35:44 +0000 (17:35 +0300)]
Bug 17003: Add API route to get checkout's renewability

Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>