]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 21772: (QA follow-up) Hide .tdlabel class in sco for consistancy with opac-user...
Josef Moravec [Wed, 27 Mar 2019 08:32:37 +0000 (08:32 +0000)]
Bug 21772: (QA follow-up) Hide .tdlabel class in sco for consistancy with opac-user page.

Test plan:
1) Compare holds table on selfcheckout and opac-user page, you will see
the difference: In self checkout there are labels like Status, Pickup
location, and so on in every table cell.
2) Apply the patch, the label in selfcheckout dissappear

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (follow-up) Included more information on tab label for SCO
Agustin Moyano [Tue, 12 Mar 2019 01:57:37 +0000 (22:57 -0300)]
Bug 21772: (follow-up) Included more information on tab label for SCO

Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: (follow-up) Remove redundant variable
Agustin Moyano [Thu, 7 Mar 2019 19:31:55 +0000 (16:31 -0300)]
Bug 21772: (follow-up) Remove redundant variable

Sponsored-by: City of Portsmouth Public Library
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: Add holds and account information to SCO
Agustin Moyano [Thu, 7 Mar 2019 18:58:41 +0000 (15:58 -0300)]
Bug 21772: Add holds and account information to SCO

This patch introduces holds and account information to the SCO page. It
uses the introduced include files that are also used in OPAC
(opac-user.pl and opac-account.pl).

To test:
1) Have a patron that has holds and account lines
2) Enable the SCO module
3) Use the patron's cardnumber to get to its details
=> SUCCESS: New tabs are presented, and they display holds and account
information as expected
4) Sign off :-D

Sponsored-by: City of Portsmouth Public Library
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21772: Move OPAC holds and account tables into .inc
Agustin Moyano [Thu, 7 Mar 2019 18:51:46 +0000 (15:51 -0300)]
Bug 21772: Move OPAC holds and account tables into .inc

This patch moves the code to render the account and holds information
for the patron into include files. They are loaded in the opac-user.tt
and opac-account.tt templates respectively.

To test:
1) Have a patron with account lines and holds
2) Notice they are displayed in the patron's detail section in the OPAC
3) Apply this patch
4) Reload the patron's detail page
=> SUCESS: Everything looks the same, no behaviuor or layout change.
5) Sign off

Sponsored-by: City of Portsmouth Public Library
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: DBRev 18.12.00.035
Nick Clemens [Thu, 28 Mar 2019 18:16:33 +0000 (18:16 +0000)]
Bug 19722: DBRev 18.12.00.035

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: Don't show items at job completion if over pref
Nick Clemens [Tue, 26 Mar 2019 20:20:29 +0000 (20:20 +0000)]
Bug 19722: Don't show items at job completion if over pref

To test:
1 - Set MaxItemsToDisplayForBatchMod to some number
2 - Modify less items than that
3 - Note they show
    a - Note if over 1000 they show in a simple display
4 - Modify more items
5 - Note they do not show and you see a note

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: (follow-up) Adjust template parameters
Nick Clemens [Mon, 16 Jul 2018 17:41:28 +0000 (17:41 +0000)]
Bug 19722: (follow-up) Adjust template parameters

Before we passed 'too_many_items' this was renamed to
'too_many_items_display' but deletion template lacked changes

To test:
1 - Test a batch deletion by list and file
2 - Test with deleting biblios and without
3 - Results should be as expected

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19722: Add MaxItemsToDisplayForBatchMod systempreference
Nick Clemens [Thu, 30 Nov 2017 23:22:27 +0000 (23:22 +0000)]
Bug 19722: Add MaxItemsToDisplayForBatchMod systempreference

To test:
1 - Get a list of itemnumbers or barcodes
2 - Set MaxItemsToProcessForBatchMod to less than this number of items
3 - Attempt to batch edit, you arent allowed
4 - Set MaxItemsToProcessForBatchMod to some hugh number like 60000
5 - Try a list of as many items as possible 30000 was good for me (they
        should exist in your system)
6 - Try to batch edit, system will timeout on displaying these items
7 - Apply patch, update database
8 - Set MaxItemsToDisplayForBatchMod to 1000 (default)
9 - Try large file again, should not display items, but allow
modification, wait for this to finish
10 - SetMaxItemsToProcessForBatchMod to 1000 and try large file again
11 - Should be prohibited as before

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22525: Navigation arrows on the bottom of Cataloging search pages
Owen Leonard [Tue, 19 Mar 2019 16:03:43 +0000 (16:03 +0000)]
Bug 22525: Navigation arrows on the bottom of Cataloging search pages

This patch adds a second set of pagination links to the cataloging
search result page, at the bottom of the first set of search results.

Also added is a horizontal rule after the second set of links in order
to make it clearer that the links are for the search results above.

To test, apply the patch and go to Cataloging. Perform a search which
will return multiple pages of results. Confirm that the links work
correctly.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22505: Add column configuration to patron list table
Julian Maurice [Wed, 13 Mar 2019 13:19:44 +0000 (14:19 +0100)]
Bug 22505: Add column configuration to patron list table

Test plan:
1. Create a list of patrons
2. Add some patrons to this list
3. Go to this patron list
   (/cgi-bin/koha/patron_lists/list.pl?patron_list_id=XXX)
4. Verify that you can show/hide all columns except the one containing
   the checkbox
5. Verify that you can export the table data using the Export menu
6. Go to admin/columns_settings.pl, and verify that the configuration
   works for table 'patron-list-table'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22516: DBRev 18.12.00.034
Nick Clemens [Thu, 28 Mar 2019 18:02:35 +0000 (18:02 +0000)]
Bug 22516: DBRev 18.12.00.034

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22516: Database update
Martin Renvoize [Fri, 15 Mar 2019 08:43:12 +0000 (08:43 +0000)]
Bug 22516: Database update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22516: Remove remaining calls to lastincrement
Martin Renvoize [Fri, 15 Mar 2019 08:38:17 +0000 (08:38 +0000)]
Bug 22516: Remove remaining calls to lastincrement

A few places still set lastincrement and the tests still checked for
correct values. But nowhere in the code still uses lastincrement for
anything meaningful.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: DBRev 18.12.00.033
Nick Clemens [Thu, 28 Mar 2019 15:44:47 +0000 (15:44 +0000)]
Bug 18213: DBRev 18.12.00.033

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: (follow-up) Correctly sort facets
Nick Clemens [Thu, 15 Mar 2018 12:53:13 +0000 (12:53 +0000)]
Bug 18213: (follow-up) Correctly sort facets

Previously we sorted alphabetically - that works for 1-9.
With a 10th facet category we should sort numerically

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: Add Template plugin and fix for C4/Languages
Nick Clemens [Fri, 7 Jul 2017 10:44:57 +0000 (10:44 +0000)]
Bug 18213: Add Template plugin and fix for C4/Languages

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: DB Update (facet order)
Nick Clemens [Thu, 6 Jul 2017 09:41:31 +0000 (09:41 +0000)]
Bug 18213: DB Update (facet order)

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18213: Add language facets to Elasticsearch
Nick Clemens [Wed, 5 Jul 2017 12:11:35 +0000 (12:11 +0000)]
Bug 18213: Add language facets to Elasticsearch

This patch add language as a facet to ES results - it adds
a new template plugin for languages to get the appropriate
description given an iso 639-2 code

To test:
1 - Make sure you have records with differing languages (in the MARC21 008
        field characters 35-37 or UNIMARC 101a)
2 - Apply patch
3 - Reload Elasticsearch settings:
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
4 - Reindex your records
5 - Search for a phrase that will return results in several languages
6 - Verify you see factes correctly labelled for 'Language'
7 - Verify the facets work
8 - Verify both opac and staff results
9 - prove t/db_dependent/Languages.t

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (follow-up) fix tests and remove trailing space
Nick Clemens [Thu, 28 Mar 2019 15:57:13 +0000 (15:57 +0000)]
Bug 18235: (follow-up) fix tests and remove trailing space

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: DBRev 18.12.00.032
Nick Clemens [Thu, 28 Mar 2019 15:41:22 +0000 (15:41 +0000)]
Bug 18235: DBRev 18.12.00.032

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (RM follow-up) fix mappings reset
Nick Clemens [Thu, 28 Mar 2019 15:12:52 +0000 (15:12 +0000)]
Bug 18235: (RM follow-up) fix mappings reset

Without this we could not recreate mappings as there are no defaults for
the additional fields - this restores behavoiur from before patches

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Restore facet_order for su-geo field in mappings file
Josef Moravec [Sat, 23 Mar 2019 09:29:52 +0000 (09:29 +0000)]
Bug 18235: (QA follow-up) Restore facet_order for su-geo field in mappings file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Series facet name after rebase
Josef Moravec [Fri, 8 Mar 2019 07:34:09 +0000 (07:34 +0000)]
Bug 18235: (QA follow-up) Series facet name after rebase

Bug 19575 changes many field names so "se" facet field became "title-series"

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Make db update idempotent
Josef Moravec [Mon, 4 Mar 2019 13:52:19 +0000 (13:52 +0000)]
Bug 18235: (QA follow-up) Make db update idempotent

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Do not call get_facetable_fields excessively
Jonathan Druart [Mon, 4 Mar 2019 00:36:22 +0000 (21:36 -0300)]
Bug 18235: Do not call get_facetable_fields excessively

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Update facet_order default value in atomic update
Jonathan Druart [Mon, 4 Mar 2019 00:23:12 +0000 (21:23 -0300)]
Bug 18235: Update facet_order default value in atomic update

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Add missing filters
Josef Moravec [Fri, 1 Mar 2019 06:59:48 +0000 (06:59 +0000)]
Bug 18235: (QA follow-up) Add missing filters

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: (QA follow-up) Fix POD
Josef Moravec [Fri, 1 Mar 2019 06:59:15 +0000 (06:59 +0000)]
Bug 18235: (QA follow-up) Fix POD

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Add unit tests for get_facetable_fields
Alex Arnaud [Fri, 23 Mar 2018 15:55:09 +0000 (15:55 +0000)]
Bug 18235: Add unit tests for get_facetable_fields

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: DB changes
Jonathan Druart [Wed, 8 Mar 2017 18:25:55 +0000 (15:25 -0300)]
Bug 18235: DB changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: Add missing POD to get_facetable_fields
Jonathan Druart [Fri, 20 Apr 2018 13:44:03 +0000 (10:44 -0300)]
Bug 18235: Add missing POD to get_facetable_fields

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18235: ES - Facets configurable
Jonathan Druart [Wed, 8 Mar 2017 15:04:46 +0000 (12:04 -0300)]
Bug 18235: ES - Facets configurable

This patch adds a new section 'Facet order' in the Biblio tab of the
'Search engine configuration' admin page of the Elastic mappings.
The idea is to let the librarians define the facet to display and order
them as their needs.

The ergonomic is not perfect and I am open to any suggestions.

Test plan:
Move up and down the field list to order the facets
Hide/show some facets
Rebuild index
At the OPAC and the staff interface you should see the changes on the
search result page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21049: Set 007/00 when selecting material type (Rancor)
Julian Maurice [Fri, 8 Mar 2019 09:12:50 +0000 (10:12 +0100)]
Bug 21049: Set 007/00 when selecting material type (Rancor)

There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21049: Fix value of material select for Rancor 007 widget
Julian Maurice [Wed, 6 Mar 2019 07:43:18 +0000 (08:43 +0100)]
Bug 21049: Fix value of material select for Rancor 007 widget

The material type is selected in accordance with position 0 of 007

Test plan:
1. Create a new record using the advanced editor
2. Select a material type for field 007 and set at least the position 0
   of this field
3. Save the record and reload the page
4. The material type should remain selected
5. Try with all available material types

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22593: Fix bad ternaries after bug 22008
Martin Renvoize [Wed, 27 Mar 2019 13:55:05 +0000 (13:55 +0000)]
Bug 22593: Fix bad ternaries after bug 22008

A series of ternaries were introduced when we moved to add_debit which
defaulted to 'user 0' should a userenv not be set.  This was incorrect
as userenv may well not be set (during cronscript runs for example) and
the new constraint would not allow such a default. We switch to 'undef'
here to satisfy the constraint.

Test plan
1) Ensure you have data in your system that would be caught by the
longoverdues cronjob.
2) Ensure you're sysprefs are setup to charge for lost items
3) Run the script and varify it runs to completion without errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12159: (QA follow-up) Remove double use module
Marcel de Rooy [Fri, 22 Mar 2019 10:52:16 +0000 (10:52 +0000)]
Bug 12159: (QA follow-up) Remove double use module

Speaks for itself.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12159: (QA follow-up) Rename relation in Patron::Attributes
Marcel de Rooy [Fri, 22 Mar 2019 10:49:03 +0000 (10:49 +0000)]
Bug 12159: (QA follow-up) Rename relation in Patron::Attributes

It seems that we do not need the extra belongs_to in the schema result
files if we rename the relation to code.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12159: Add tests
Josef Moravec [Fri, 16 Mar 2018 11:03:23 +0000 (11:03 +0000)]
Bug 12159: Add tests

Test plan:
prove t/db_dependent/Koha/Patron/Attributes.t t/db_dependent/Koha/Patrons.t

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 12159: Fix getting extended patron attributes for circ-menu
Josef Moravec [Thu, 15 Mar 2018 13:12:55 +0000 (13:12 +0000)]
Bug 12159: Fix getting extended patron attributes for circ-menu

Changes:
- Replace getting preference ExtendedPatronAttributes by Koha.Preference
in templates
- Add Koha::Patron->attributes for getting patrons extended attributes
- Use this method in circ-menu.inc
- Remove getting attributes from members perl scripts

Test plan:
0) Apply the patch
1) Add some patron attributes type - with free text, authorised value,
    limited by libraries...
2) Add some values to this attributes for some patrons
3) Go through as many patron pages as you can and confirm that
attributes are shown at side panel when they shoul and are not shown
when they should not be shown

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed Koha/Schema/Result/BorrowerAttribute.pm
[EDIT] Added missing semicolon on L114 in Koha/Patron/Attribute.pm

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10577: (QA follow-up) Remove tab chars
Josef Moravec [Wed, 27 Mar 2019 16:04:13 +0000 (16:04 +0000)]
Bug 10577: (QA follow-up) Remove tab chars

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10577: (QA follow-up) Remove bad call signature
Martin Renvoize [Wed, 13 Mar 2019 11:16:09 +0000 (11:16 +0000)]
Bug 10577: (QA follow-up) Remove bad call signature

Whilst working through this patch for signoff I found a case where the
calling signature of GetBudgetPeriod was incorrect. I removed the
superflous passed parameter in this followup

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10577: Improve semantics of GetBudgetPeriod()
Galen Charlton [Thu, 11 Jul 2013 16:41:26 +0000 (16:41 +0000)]
Bug 10577: Improve semantics of GetBudgetPeriod()

Remove the option to pass zero to this function in
order to get "the" active budget.  This was a problem
in three ways:

- Koha doesn't require that there be only one active
  budget at a time, so the concept of "the" active
  budget doesn't make sense.
- Having the single parameter be either an ID or a flag
  based on its value is poor function design.
- No callers of GetBudgetPeriod() were actually using this
  modality.

This patch also improves the DB-dependent tests for budgets by

- wrapping the test in a transaction
- counting budgets correctly

To test:

[1] Apply the patch.
[2] Verify that prove -v t/db_dependent/Budgets.t passes
[3] Verify in the staff interface that:
    - the budget hierarchy displays correctly
    - you can add and modify a budget

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22536: Display problem in Holds to Pull report
Owen Leonard [Tue, 19 Mar 2019 12:41:26 +0000 (12:41 +0000)]
Bug 22536: Display problem in Holds to Pull report

This patch modifies the display of several values in the holds to pull
report so that they can be displayed as lists instead of as chunks of
HTML generated in SQL.

This patch modifies the SQL in pendingreserves.pl so that values can be
formatted in the same way that holding branch is. The better long-term
solution is to remove SQL from pendingreserves.pl altogether, but this
is a quick fix.

This patch also makes a couple of minor markup changes to fix
validation.

To test, apply the patch and go to Circulation -> Holds to pull. To see
the changes the patch makes your holds to pull list should have titles
with multiple items at multiple branches, with call number, copy number,
and enumeration data. These values should all be displayed in bulleted
lists.

Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22076: Add missing whitespace on if statments
Kyle M Hall [Wed, 9 Jan 2019 12:06:25 +0000 (07:06 -0500)]
Bug 22076: Add missing whitespace on if statments

Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22076: Fix the same situation for lost items
Kyle M Hall [Wed, 9 Jan 2019 12:02:30 +0000 (07:02 -0500)]
Bug 22076: Fix the same situation for lost items

Signed-off-by: Geeta Halley <ghalley@roundrocktexas.gov>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22076: SIP checkin for withdrawn item returns ok in checkin response
Kyle M Hall [Mon, 7 Jan 2019 17:46:29 +0000 (12:46 -0500)]
Bug 22076: SIP checkin for withdrawn item returns ok in checkin response

If an item that is withdrawn is checked in via SIP2, Koha does not process the checkin, but still indicates the checkin succeeded via the ok flag in the checkin response message.

To recreate:
 1 - Mark an item withdrawn
 2 - Set up sip server:
     https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup
 3 - Set 'BlockReturnOfWithdrawnItems' to block
 4 - Use the sip_cli_emulator to checkin the withdrawn item
 5 - There is no error in the checkin

Test Plan:
1) Mark an item withdrawn
2) Set BlockReturnOfWithdrawnItems to block
3) Use the sip cli emulator to checkin the withdrawn item
4) Note the response begins with 101
5) Apply this patch
6) Restart all the things ( including SIP server )
7) Repeat checkin with sip cli emulator
8) Note the checkin now beings with 100

Signed-off-by: Geeta Halley <ghalley@roundrocktexas.gov>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22560: Forgotten password "token expired" page still shows boxes to reset password
Owen Leonard [Fri, 22 Mar 2019 13:19:51 +0000 (13:19 +0000)]
Bug 22560: Forgotten password "token expired" page still shows boxes to reset password

This patch modifies the OPAC password recovery template so that the new
password entry form doesn't appear if the patron has followed an invalid
or expired link.

This patch also corrects the markup in the page title.

To test, apply the patch and follow the process for resetting a
forgotten password. When you follow the password recovery link, modify
the URL so that the "uniqueKey" parameter is different.

The page should show an error message. The password entry form should
not appear.

Check the page title in the browser's title bar. It should look correct.

https://bugs.koha-community.org/show_bug.cgi?id=22520

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22561: Forgotten password requirements hint doesn't list all rules for new passwords
Owen Leonard [Fri, 22 Mar 2019 12:57:31 +0000 (12:57 +0000)]
Bug 22561: Forgotten password requirements hint doesn't list all rules for new passwords

This patch modifies a few templates in the OPAC so that all available
information on password requirements is displayed for each case where
the patron is setting a password:

 - If the RequireStrongPassword system preference is set, a message
   should appear listing strong password requirements and minimum
   password length.
 - If RequireStrongPassword is not set, the message should only ask for
   a minimum password length.

To test, apply the patch and enable the PatronSelfRegistration and
OpacResetPassword preferences.

On the following pages, test with RequireStrongPassword both on and
off. The correct messages should appear.

 - OPAC -> Forgot password. Follow the process to reset your password
   until you reach the step where you are entering the new password.
 - OPAC -> Register here. Check the password section of the registration
   form.
 - OPAC -> Log in -> Change your password.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17746: (QA follow-up) Make set_password.pl generate a password if required
Tomas Cohen Arazi [Wed, 20 Feb 2019 14:26:40 +0000 (11:26 -0300)]
Bug 17746: (QA follow-up) Make set_password.pl generate a password if required

This patch makes the set_password.pl script generate the password if it
is not passed as an argument.

It also changes the behaviour of set_password.pl: it will now print the
userid and password (generated or not) to mimick the behaviour from
koha-reset-passwd.

The koha-reset-passwd gets simplified as it doesn't generate the random
password anymore, it passes the responsability to set_password.pl

To test:
- Follow the steps from the original platch
- Verify all behaves as expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17746: Add misc/admin/set_password.pl script
Tomas Cohen Arazi [Mon, 4 Feb 2019 18:09:34 +0000 (15:09 -0300)]
Bug 17746: Add misc/admin/set_password.pl script

This patch introduces a script that allows changing a patron's password.
The change overrides the defined password enforcement policy.

If multiple conditions are passed to match on the patron, they all need
to match. Otherwise an error message is printed.

Attributes to search the patron on:
- cardnumber
- patron_id (a.k.a. borrowernumber)
- userid

we usually know some of them, but if we specify more than one, they need
to match a patron, together.

To test:
1) Apply this patch
2) Have a known patron (i.e. you know the cardnumber, the borrowernumber
   and the userid).
3) Run:
  $ kshell
 k$ perl misc/admin/set_password.pl --cardnumber <the_card_number> \
                                    --password a_password
4) Verify you can login with the new password
5) Repeat 3) through 5) with --patron_id and --userid
=> SUCCESS: You can login in all cases
6) Try combining some or all the parameters
=> SUCCESS: It fails when it should, it succeeds when it should
7) Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17746: Make koha-reset-passwd user set_password.pl
Tomas Cohen Arazi [Tue, 5 Feb 2019 17:04:12 +0000 (14:04 -0300)]
Bug 17746: Make koha-reset-passwd user set_password.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22550: OPAC suggestion form doesn't require mandatory fields
Owen Leonard [Wed, 20 Mar 2019 16:24:42 +0000 (16:24 +0000)]
Bug 22550: OPAC suggestion form doesn't require mandatory fields

Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
   Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
   The required fields should be labeled in red.
   (you can change the mandatory fields by preference 'OPACSuggestionMandatoryFields')

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>
Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22495: Restore Elasticsearch mapping for su-geo
Ere Maijala [Tue, 12 Mar 2019 09:29:33 +0000 (11:29 +0200)]
Bug 22495: Restore Elasticsearch mapping for su-geo

Test plan:
1. Reset mappings
2. Run perl misc/search_tools/rebuild_elastic_search.pl -d -b -v
3. Do a search and verify that the Places facet works

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21974: Make Elasticsearch connection settings configurable
Ere Maijala [Mon, 17 Dec 2018 14:22:58 +0000 (16:22 +0200)]
Bug 21974: Make Elasticsearch connection settings configurable

Default settings are appended in get_elasticsearch_params so that there's a central place for them. Defaults can be overridden in koha-conf.xml.

Test plan:

1. Verify that searches still work with the patch applied.
2. Verify that search fails after adding the following under <elasticsearch> in koha-conf.xml:
<cxn_pool>Static</cxn_pool>
3. Verify that search fails after adding the following under <elasticsearch> in koha-conf.xml:
<cxn_pool>FOO</cxn_pool>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoRevert "Bug 22399: Improve responsive behavior of the basic marc editor"
Nick Clemens [Wed, 27 Mar 2019 17:36:35 +0000 (17:36 +0000)]
Revert "Bug 22399: Improve responsive behavior of the basic marc editor"

This reverts commit b5a742c62f016969dabad9b786a7fe2d75cca760.

Style changes broke other features of rancor. Reverting to restore functionality

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22008: (follow-up) Additional fix for bad test
Martin Renvoize [Wed, 27 Mar 2019 14:47:27 +0000 (14:47 +0000)]
Bug 22008: (follow-up) Additional fix for bad test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21622: (RM follow-up) adjust for changes from bug 21282
Nick Clemens [Mon, 25 Mar 2019 12:58:39 +0000 (12:58 +0000)]
Bug 21622: (RM follow-up) adjust for changes from bug 21282

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22008: (follow-up) Additional test fix and fix typo
Nick Clemens [Wed, 27 Mar 2019 13:13:48 +0000 (13:13 +0000)]
Bug 22008: (follow-up) Additional test fix and fix typo

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22008: Fix failing tests
Nick Clemens [Mon, 25 Mar 2019 19:41:15 +0000 (19:41 +0000)]
Bug 22008: Fix failing tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22565: (QA follow-up) Fix test Acquisition.t
Josef Moravec [Mon, 25 Mar 2019 11:21:45 +0000 (11:21 +0000)]
Bug 22565: (QA follow-up) Fix test Acquisition.t

Test plan:
prove t/db_dependent/Acquisition.t
should pass

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22565: Add test for ModReceiveOrder regression
Martin Renvoize [Mon, 25 Mar 2019 11:04:37 +0000 (11:04 +0000)]
Bug 22565: Add test for ModReceiveOrder regression

This test checks that order_internalnote is only updated for the given
orderline in ModReceiveOrder.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22565: Do NOT replace all internalnote's on receive
Martin Renvoize [Mon, 25 Mar 2019 10:49:15 +0000 (10:49 +0000)]
Bug 22565: Do NOT replace all internalnote's on receive

Bug 21467 introduced a but whereby setting any order_internalnote on
receive one would end up setting all orders to have that internalnote.

This patch adds the missing WHERE clause to the database query which was
likely lost during a rebase?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22032: Compiled CSS
Nick Clemens [Fri, 22 Mar 2019 20:29:19 +0000 (20:29 +0000)]
Bug 22032: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22032: Improve local cover image tab on detail page
Owen Leonard [Thu, 20 Dec 2018 16:32:34 +0000 (16:32 +0000)]
Bug 22032: Improve local cover image tab on detail page

This patch makes a variety of improvements to the images tab of the
staff client's bibliographic detail page.

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

 - Enable the LocalCoverImages system preference.
 - Locate a bibliographic record which has no images attached.
   - There should be a "no images" message and an upload button.
     - Upload an image and return to the detail page.
       - The "Images" tab should have a nicely-styled thumbnail of the
         image you uploaded.
         - Test the "Delete image" link: It should ask for a
           confirmation. If you confirm, the image should disappear and
           a "loading" spinner should appear.
           - When the image has been deleted the thumbnail container
             should disappear and the "no images" message should
             reappear.
 - Test this process with AllowMultipleCovers enabled and disabled.

Extra credit: Modify the AJAX url in the removeLocalImage
function in detail.tt. After misspelling a parameter name or the URL
path, clicking the "Delete image" link should trigger an alert and
re-show the image thumbnail.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: (QA follow-up) Remove dateFormat from javascript on ill requests pages.
Josef Moravec [Mon, 18 Mar 2019 14:33:24 +0000 (14:33 +0000)]
Bug 18589: (QA follow-up) Remove dateFormat from javascript on ill requests pages.

This is not needed, the right formatting is done in calendar.inc

Test plan:
Use datepickers on ILL requests list page and ensure they work as
expected and the list is right filterred

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: (QA follow-up) Move template to bootstrap grid
Josef Moravec [Mon, 18 Mar 2019 13:40:54 +0000 (13:40 +0000)]
Bug 18589: (QA follow-up) Move template to bootstrap grid

Test plan:
Go to patrons Ill request history page and ensure the layout is not
broken and is consistant with other patron pages (except Circulation and
Details pages)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: (QA follow-up) Rename page to "ILL requests history" for consistancy
Josef Moravec [Mon, 18 Mar 2019 09:32:11 +0000 (09:32 +0000)]
Bug 18589: (QA follow-up) Rename page to "ILL requests history" for consistancy

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: (follow-up) Fix merge problem
Andrew Isherwood [Tue, 12 Mar 2019 09:41:56 +0000 (09:41 +0000)]
Bug 18589: (follow-up) Fix merge problem

Bug in passing row to getStatusName

As per item 3) in comment #20:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18589#c20

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: (follow-up) Add borrowernumber test
Andrew Isherwood [Tue, 12 Mar 2019 09:19:56 +0000 (09:19 +0000)]
Bug 18589: (follow-up) Add borrowernumber test

As per comment #21:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18589#c21

We now test borrowernumber filter works. This test has come from
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83184&action=diff
and will be removed from that bug

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: (follow-up) Fix QA tool failures
Andrew Isherwood [Mon, 11 Mar 2019 15:58:42 +0000 (15:58 +0000)]
Bug 18589: (follow-up) Fix QA tool failures

As per comment #17:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18589#c17

Sorry Josef, I honestly have no idea where those tabs came from :( Every
once in a while my copy of Vim decides to embarass me and stick in tabs
instead of spaces... <shakes fist at screen>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: (follow-up) Remove redundant-ness
Andrew Isherwood [Mon, 11 Mar 2019 14:19:36 +0000 (14:19 +0000)]
Bug 18589: (follow-up) Remove redundant-ness

Following feedback from Josef via IRC, removing redundant code

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18589: Show ILLs as part of patron profile
Andrew Isherwood [Mon, 11 Mar 2019 11:56:28 +0000 (11:56 +0000)]
Bug 18589: Show ILLs as part of patron profile

This patch moves the display of a patron's ILL requests to be inline in
the Patron Profile page, as per all other patron information.

It includes a substantial refactor of
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt in that it
moves the display of the illlist table (which is populated by an API
request) into it's own separate include file. It also moves the
datatable related Javascript for this table into it's own JS file. Doing
this allows us to reuse both in both the new members/ill-requests.tt
template and the pre-existing ill/ill-requests.tt template.

To test:
1) Ensure ILL is enabled and your user has sufficient permissions
2) Ensure your user has some ILL requests
3) Navigate to the user's patron profile page
4) Click on the "Interlibrary loans" tab
5) Observe that the requests table is displayed inline
6) Observe that only your user's requests are displayed

Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie
This is essentially a reimplementation of attachment 84796 to take into
account all changes that had happened beneath this bug and also to
ensure JS strings are translatable.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21998: Silent tests
Jonathan Druart [Wed, 27 Feb 2019 17:49:35 +0000 (14:49 -0300)]
Bug 21998: Silent tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21998: Throw exception on bad pattern
Josef Moravec [Tue, 18 Dec 2018 11:53:21 +0000 (11:53 +0000)]
Bug 21998: Throw exception on bad pattern

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21998: Add pattern parameter in Koha::Token
Marcel de Rooy [Wed, 19 Sep 2018 13:36:36 +0000 (15:36 +0200)]
Bug 21998: Add pattern parameter in Koha::Token

Allow a pattern too in Koha::Token->generate. Only supported length.
Does not affect CSRF calls. So tiny change without further impact.

Test plan:
Run  t/Token.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22008: DBRev 18.12.00.031
Nick Clemens [Fri, 22 Mar 2019 20:04:33 +0000 (20:04 +0000)]
Bug 22008: DBRev 18.12.00.031

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22008: Fixes to make unit tests pass
Kyle M Hall [Wed, 6 Mar 2019 13:08:19 +0000 (08:08 -0500)]
Bug 22008: Fixes to make unit tests pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22008: Add missing constraints
Martin Renvoize [Wed, 27 Feb 2019 12:04:46 +0000 (12:04 +0000)]
Bug 22008: Add missing constraints

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22008: Add tests for new constraints
Martin Renvoize [Wed, 27 Feb 2019 12:02:36 +0000 (12:02 +0000)]
Bug 22008: Add tests for new constraints

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20478: Fix qa complaints
Nick Clemens [Fri, 22 Mar 2019 19:56:18 +0000 (19:56 +0000)]
Bug 20478: Fix qa complaints

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20478: (QA follow-up) Make test more standard
Martin Renvoize [Fri, 8 Mar 2019 10:35:49 +0000 (10:35 +0000)]
Bug 20478: (QA follow-up) Make test more standard

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20478: Have the cronjob script advance_notices.pl send digest messages per branch.
Andreas Jonsson [Mon, 22 Jan 2018 10:37:14 +0000 (10:37 +0000)]
Bug 20478: Have the cronjob script advance_notices.pl send digest messages per branch.

Desired behavior of the script advance_notices.pl is that the sender
address on the notice message is that of the branch of the issues in
question.  Thus, the solution is to generate digest messages per
branch.

To test:
1) Inspect unit test in t/db_dependent/cronjobs/advance_notices_digest.t and note that:
   - There are three libraries
   - There is a borrower
   - The borrower is registered at library1
   - The borrower has message preference wants_digest set to 1
   - The borrower has message preference days_in_advance set to 1
   - The content of the letter PREDUEDGST is '<<count>> <<branches.branchname>>'
   - There are three items
   - There is one issue per item
   - There is one issues at library2
   - There are two issues at library3
   - The date_due of the issues are set to tomorrow
   - For the default case (no -digest-per-message)
      - It is asserted that there is one message in the message queue after running the script
      - It is asserted that there are three items in the message.
      - It is asserted that the branchname is that of the borrower's home library.
   - For the case where -digest-per-message is enabled
      - It is asserted that there are two messages in the message queue after running the script
      - It is asserted that the item count of the message corresponding to library2 is 1
      - It is asserted that the item count of the message corresponding to library3 is 2
      - It is asserted that the branchnames are correct.
2) Run unit test: prove t/db_dependent/cronjobs/advance_notices_digest.t

Sponsored-By: Bibliotek Mellansjö, which is a cooperation between
Sponsored-By: Gullspångs kommunbibliotek
Sponsored-By: Hjo stadsbibliotek
Sponsored-By: Karlsborgs bibliotek
Sponsored-By: Mariestads stadsbibliotek
Sponsored-By: Skövde stadsbibliotek
Sponsored-By: Tibro bibliotek
Sponsored-By: Tidaholms stadsbibliotek
Sponsored-By: Töreboda kommunbibliotek
Signed-off-by: Andreas Jonsson <andreas.jonsson@kreablo.se>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Adding the --digest-per-branch switch turns the digest into one digest per
library. I think it makes perfect sense to keep the default behaviour
and hide this new functionality behind a command line switch.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20478: Refactor to remove code duplication.
Andreas Jonsson [Tue, 27 Mar 2018 09:22:45 +0000 (11:22 +0200)]
Bug 20478: Refactor to remove code duplication.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20478: Add unit test for advance_notices.pl cronjob.
Andreas Jonsson [Mon, 22 Jan 2018 08:50:10 +0000 (08:50 +0000)]
Bug 20478: Add unit test for advance_notices.pl cronjob.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19661: (follow-up) Use Basic auth in tests
Josef Moravec [Tue, 26 Feb 2019 09:16:05 +0000 (09:16 +0000)]
Bug 19661: (follow-up) Use Basic auth in tests

Test plan:

prove t/db_dependent/api/v1/acquisitions_funds.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19661: Add and change properties and parameters to conform to the funds RFC.
Matthias Meusburger [Tue, 15 Jan 2019 09:46:04 +0000 (10:46 +0100)]
Bug 19661: Add and change properties and parameters to conform to the funds RFC.

Also, perform an exact search when searching on the fund owner id.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19661: Use Koha::Acquisition::Funds instead of C4::Budgets
Matthias Meusburger [Wed, 17 Jan 2018 10:49:14 +0000 (11:49 +0100)]
Bug 19661: Use Koha::Acquisition::Funds instead of C4::Budgets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19661: REST API - Funds Endpoint
Matthias Meusburger [Thu, 12 Oct 2017 07:55:12 +0000 (07:55 +0000)]
Bug 19661: REST API - Funds Endpoint

This patch adds a new route to the REST api:

/api/v1/acquisitions/funds/

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21948: Compiled CSS
Nick Clemens [Fri, 22 Mar 2019 19:20:55 +0000 (19:20 +0000)]
Bug 21948: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21948: Clean up style of item detail page
Owen Leonard [Tue, 4 Dec 2018 19:53:29 +0000 (19:53 +0000)]
Bug 21948: Clean up style of item detail page

This patch removes some page-specific style from the item detail page in
the staff client and adds some markup in order to trigger a more
generally-used style.

This patch also adds a font-awesome icon to the "Edit item" link on the
page.

To test, apply the patch and regenerate the staff client CSS. Open a
bibliographic record and view the "Items tab."

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21304: Compiled CSS
Nick Clemens [Fri, 22 Mar 2019 19:16:46 +0000 (19:16 +0000)]
Bug 21304: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21304: (follow-up) Correct hc-sticky configuration
Owen Leonard [Tue, 19 Mar 2019 15:46:42 +0000 (15:46 +0000)]
Bug 21304: (follow-up) Correct hc-sticky configuration

This patch corrects the element passed to the hc-sticky plugin to define
which element the floating toolbar sticks to.

To test, apply the patch and perform a search in the staff client which
will return multiple results. Confirm that scrolling down the page
triggers the floating toolbar.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21304: (follow-up) Fix style of search results browser
Owen Leonard [Wed, 5 Sep 2018 12:38:33 +0000 (12:38 +0000)]
Bug 21304: (follow-up) Fix style of search results browser

This follow-up revises the style of the search result browser in the
staff client, making it behave better at smaller browser widths.

The patch also makes a couple of ESLint-prompted changes to browser.js

To test, apply the patch and regenerate CSS.

 - Perform a catalog search in the staff client.
 - Click on one of the search results.
 - On the bibliographic detail page there should be results browsing
   controls in the left-hand sidebar.
   - Resize the browser window and confirm that the controls work well
     at various sizes.
   - Test with both the first and last search result.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21304: Update two-column templates with Bootstrap grid: Catalog
Owen Leonard [Wed, 2 May 2018 14:06:23 +0000 (14:06 +0000)]
Bug 21304: Update two-column templates with Bootstrap grid: Catalog

This patch modifies several catalog templates to use the Bootstrap grid
instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Catalog -> Search
   - Search results
     - Bibliographic details
     - MARC details (viewMARC preference enabled)
     - Labeled MARC details (viewLabeledMARC preference enabled)
     - ISBD (viewISBD preference enabled)
     - Items
     - Checkout history
     - Rota (stock rotation)

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 13735: Update PrepareItemrecordDisplay to use maxlength
Katrin Fischer [Wed, 6 Feb 2019 02:02:11 +0000 (02:02 +0000)]
Bug 13735: Update PrepareItemrecordDisplay to use maxlength

The PrepareItemrecordDisplay method used to generate the item
display on receiving serials was using a hardcoded maxlength
of 255 on input fields. This patch updates it to use the
maxlength defined in the frameworks instead as the normal
item form does.

To test:
- Create or reuse an existing subscription
- Make note of the framework the record uses
- Add an item on receive
- Check the maxlength on the various fields is set to 255
  (check source code or use developer tools)
- You can also verify that by adding a long note to
  one of the note fields
- Apply patch
- Repeat tests, the maxlength should now be 9999
- In your framework settings, change the length of one
  of the subfields to another value
- Verify that the item form reflects the change

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21130: (Follow up OPAC Results) Prevent HTML class from being translated
Blou [Tue, 11 Sep 2018 18:42:03 +0000 (14:42 -0400)]
Bug 21130: (Follow up OPAC Results) Prevent HTML class from being translated

This fixes the same issue where "title" is being translated (in fr-CA at least) and thus
break the javascript impacting the result display in the OPAC

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21130: Prevent HTML class from being translated
David Bourgault [Fri, 27 Jul 2018 21:13:42 +0000 (17:13 -0400)]
Bug 21130: Prevent HTML class from being translated

Adds a xsl:value-of tag to prevent the value from being translated.

TEST PLAN
0) Apply patch
1) Translate
2) In the opac, div.record has not changed

NOTE:
I don't know if this bug affects all translations, I noticed it when translating to fr-CA.
The fix will work for all languages.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22533: Fix manual invoices from patron accounting
Liz Rea [Tue, 19 Mar 2019 17:52:46 +0000 (17:52 +0000)]
Bug 22533: Fix manual invoices from patron accounting

To test:
Attempt to create a manual fine from the patron accounting page, it
should fail.
Apply this patch, restart the things
Attempt to create a manual fine from the patron accounting page, it
should succeed.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22559: Restore OPAC forgotten password functionality
Liz Rea [Thu, 21 Mar 2019 01:53:54 +0000 (01:53 +0000)]
Bug 22559: Restore OPAC forgotten password functionality

To test:

Enable OpacResetPassword
Create a borrower with a username and password
Go to the OPAC, try to reset the password (I always get the reset link
        token out of the message_queue in the database rather than worry about
        receiving the actual email. You do you.)
Go to the link provided.
Attempt to set a password, this should fail.
Apply this patch
Go through the process again, password should be reset.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>