]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 13618: (follow-up) Manually replace missing .raw
Jonathan Druart [Fri, 24 Aug 2018 22:15:18 +0000 (19:15 -0300)]
Bug 13618: (follow-up) Manually replace missing .raw

Must be |$raw, not |raw

Error:
Template process failed: undef error - raw: filter not found at
/home/vagrant/kohaclone/C4/Templates.pm line 122

To recreate:
Add a new restriction and visit circulation.pl?borrowernumber=42

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: (RM follow-up) Update schema files
Nick Clemens [Sat, 25 Aug 2018 15:16:47 +0000 (15:16 +0000)]
Bug 15524: (RM follow-up) Update schema files

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: DBRev 18.06.00.020
Nick Clemens [Fri, 24 Aug 2018 16:03:50 +0000 (16:03 +0000)]
Bug 15524: DBRev 18.06.00.020

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: (RM follow-up) Fix calls and add filter
Nick Clemens [Fri, 24 Aug 2018 15:10:45 +0000 (15:10 +0000)]
Bug 15524: (RM follow-up) Fix calls and add filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: (QA follow-up) Change Can[Book|Item]BeReserved to return hashref, pass...
Kyle M Hall [Fri, 10 Aug 2018 14:36:36 +0000 (10:36 -0400)]
Bug 15524: (QA follow-up) Change Can[Book|Item]BeReserved to return hashref, pass limit to template

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: (QA follow-up) Respect ReservesControlBranch
Kyle M Hall [Fri, 10 Aug 2018 14:36:53 +0000 (10:36 -0400)]
Bug 15524: (QA follow-up) Respect ReservesControlBranch

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: (QA follow-up) Pass max_holds at the right position in update
Marcel de Rooy [Fri, 16 Feb 2018 11:12:12 +0000 (12:12 +0100)]
Bug 15524: (QA follow-up) Pass max_holds at the right position in update

When updating max_holds should be before the categorycode in the update
query.
Things that can be found by testing :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: (QA follow-up) Fix meaningless test
Marcel de Rooy [Fri, 16 Feb 2018 08:02:39 +0000 (09:02 +0100)]
Bug 15524: (QA follow-up) Fix meaningless test

The last test claims to allow a hold when branch=5 and patron=5, but look
at the preceding statements:
    $rule_branch->max_holds(5);
    $rule_branch->update();
    $rule_branch->max_holds(5);
    $rule_branch->insert();
The last insert will not be done, since the record is already present.
A create should have triggered an error on the primary key.
Obviously, we should use $rule_all.

Test plan:
Run the test again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: (QA follow-up) - Change language used
Kyle M Hall [Tue, 9 Jan 2018 19:56:46 +0000 (14:56 -0500)]
Bug 15524: (QA follow-up) - Change language used

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15524: Set limit on maximum possible holds per patron by category
Kyle M Hall [Wed, 28 Jun 2017 12:54:03 +0000 (08:54 -0400)]
Bug 15524: Set limit on maximum possible holds per patron by category

It's possible to set a limit on the maximum number of holds for a particular branch/category/itemtype, but not on the total number of holds for a given patron (by branch/category).
This new rule works in conjunction with the existing branch/borrower/item rules in that Koha will use the lower of the two limits. This new rule counts all holds of all types, which prevents bib-level holds from not being counted for the purpose of these limits. This makes the most sense and was also requested by the sponsor.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Go to the circ rules editor, note the new max holds rules
   by patron category in the "Checkout limit by patron category".
   ( Should we rename this section? )
4) Create find a patron that is allowed to place a hold, count the
   number of holds that patron has. Lets make that number 'X'.
5) Set the new max holds rule to X for "All libraries"
6) Note the patron can no longer place another hold
7) Set the new max holds rule to X + 1 for the patron's home library
8) Note the patron can again place another hold
9) Set the new max holds rule to X for the patron's home library
10) Note the patron can no longer place another hold

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19039: (RM follow-up) Add filters to variables
Nick Clemens [Fri, 24 Aug 2018 12:00:54 +0000 (12:00 +0000)]
Bug 19039: (RM follow-up) Add filters to variables

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19039: (follow-up) Results of virtual shelves (lists) not sortable by date
Maryse Simard [Fri, 20 Jul 2018 21:20:23 +0000 (17:20 -0400)]
Bug 19039: (follow-up) Results of virtual shelves (lists) not sortable by date

    In the staff client, when viewing the content of a list, it can be sorted by 'title', 'author' or 'call number' but not by 'date added'.

    This patch adds 'date added' as an option for default sorting of lists. It also makes it available as a sorting option while viewing lists.

    Test plan:
    In the staff client and the opac:
    1) View a list containing several items
      => Notice that you can't sort by 'date added'
    2) Try to edit the list or create a new one
      => Notice you can't choose date added as the default sort order
    3) Apply the patch
    4) When viewing the list you should now be able to sort by date added
      => Make sure it orders correctly
    5) Edit or create a list and choose date added as default sorting order
      => Make sure it uses date added as default
      => On the staff client: test that the filter for 'sort by' works for date added
      => On the opac: test that, while viewing the contents, choosing 'default sorting' in the dropdown menu sorts correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19039: Results of virtual shelves (lists) not sortable by date
Maryse Simard [Tue, 12 Jun 2018 17:42:23 +0000 (13:42 -0400)]
Bug 19039: Results of virtual shelves (lists) not sortable by date

In the staff client, when viewing the content of a list, it can be sorted by 'title', 'author' or 'call number' but not by 'date added'.

Test plan:
1) In the staff client, view a list containing several items
2) Notice that you can't sort by 'date added'
3) Apply the patch
4) Repeat step 1
5) The list can now be sorted by 'date added'

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21209: (bug 20828 follow-up) Step 4 of moremember is used for Housebound and...
Jonathan Druart [Mon, 13 Aug 2018 18:07:05 +0000 (15:07 -0300)]
Bug 21209: (bug 20828 follow-up) Step 4 of moremember is used for Housebound and additional attributes

Test plan:

1) Make sure the HouseboundModule is enabled in system preferences
2) Go to a patron file
3) Next to Housebound roles, click on "Add"
4) Check "Yes" next to one of the two roles (or both)
5) Click "Save"
6) The "Add" button is now "Edit", click on it

The page is the one to edit housebound roles.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21239: (RM follow-up) regenerate staff css
Nick Clemens [Fri, 24 Aug 2018 11:47:29 +0000 (11:47 +0000)]
Bug 21239: (RM follow-up) regenerate staff css

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21239: CSS regressions caused by SCSS move
Owen Leonard [Fri, 17 Aug 2018 12:47:52 +0000 (12:47 +0000)]
Bug 21239: CSS regressions caused by SCSS move

This patch corrects some mistakes in staff-global.scss made during the
conversion from CSS.

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

View various forms in the staff client which have hints and required
fields, including:

- Notices & slips -> Modify notice
- Administration -> Budgets -> Modify budget

Verify that date format hints are positioned correctly. Try to submit
the form with empty required fields and verify that the "This field is
required" message is positioned correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21237: Clean up staff client SCSS
Owen Leonard [Thu, 16 Aug 2018 14:25:39 +0000 (14:25 +0000)]
Bug 21237: Clean up staff client SCSS

This patch removes a redundant linter configuration, .sass-lint.yml,
which was added by mistake.

Some linter rules have been modified to better conform to the defacto
standard set by our existing CSS.

staff-global.scss has been corrected to comply with linter rules
(https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md):

- Comment, style: silent
- TrailingSemicolon, true
- Shorthand
- ColorKeyword, enabled: true
- PropertySortOrder

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20984: Add 300$f to display
Joy Nelson [Fri, 22 Jun 2018 20:48:25 +0000 (13:48 -0700)]
Bug 20984: Add 300$f to display

Adding Type of Unit (300$f) to the Opac details and staff side searches results and details display

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17625: adding subfields f and g to XSLT display
Joy Nelson [Fri, 22 Jun 2018 18:56:11 +0000 (11:56 -0700)]
Bug 17625: adding subfields f and g to XSLT display

Adding 245$f and 245$g to the Results and Detail pages on OPAC and staff side

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Cab Vinton <bibliwho@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21182: Remove acqui/check_duplicate_barcode_ajax.pl
Jonathan Druart [Mon, 6 Aug 2018 18:38:58 +0000 (15:38 -0300)]
Bug 21182: Remove acqui/check_duplicate_barcode_ajax.pl

It has been added by
  commit 327be442bd6e63e5ff8c0a5e2461ae836e8deffb
  Bug 6963: Corrects a problem when a new order is created with a duplicate barcode.

But its last call removed since:
  commit eefc774e274ce8167f1063be5f9204a0d5cf5650
  Bug 7178: Acquisition item creation improvement

Test plan:
  git grep check_duplicate_barcode
should not return anything

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20248: (QA follow-up) Remove unnecessary stuff
Julian Maurice [Wed, 8 Aug 2018 12:33:11 +0000 (14:33 +0200)]
Bug 20248: (QA follow-up) Remove unnecessary stuff

- Remove useless 'action' attribute in forms
- $op should never be equal to 'reset', so remove the test
- Move 'op' parameter inside <button>s to avoid having different HTML
  tags for elements that have the same kind of behaviour

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20248: Improve Elasticsearch mappings UI and rebuild_elastic_search.pl.
Ere Maijala [Mon, 19 Feb 2018 14:54:39 +0000 (16:54 +0200)]
Bug 20248: Improve Elasticsearch mappings UI and rebuild_elastic_search.pl.

Improvements:
1) Mappings UI now has button that allows one to reset the mappings.
2) Mappings UI displays the items in alphabetical order.
3) Indexing script drops and recreates the index right away, which
helps prevent ES from autocreating a bad index if someone does something
while the first batch of records is being processed.
4) Indexing script has nicer output.

To test:
1) Change mappings.yaml file
2) Reset mappings in UI in mappings.pl
3) Verify the mappings have been changed in UI
4) The field order is alphabetical
5) Rebuild script has clean output
6) Run test t/db_dependent/Koha_Elasticsearch_Indexer.t

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19719: DBRev 18.06.00.019
Nick Clemens [Wed, 22 Aug 2018 13:57:02 +0000 (13:57 +0000)]
Bug 19719: DBRev 18.06.00.019

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19719: (follow-up) Add database update to keep collection column hidden
Katrin Fischer [Tue, 19 Jun 2018 22:16:38 +0000 (00:16 +0200)]
Bug 19719: (follow-up) Add database update to keep collection column hidden

For existing installations we want to keep the current behaviour.
This patch adds the column configuration to hide the collection
column from the details and checkouts tabs until toggled.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19719: (follow-up) Show description instead of code
Katrin Fischer [Sat, 31 Mar 2018 08:13:57 +0000 (10:13 +0200)]
Bug 19719: (follow-up) Show description instead of code

This follow-up changes the display from collection code
to description, following the existing pattern for
location.

To test:
- Repeat test plan from first patch
- Verfiy now the collection descrption shows
- Change column setting in administration
- Verify they work as expected

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19719: Add new column for collection in the patron checkouts data tables
Jesse Maseto [Fri, 2 Mar 2018 13:11:44 +0000 (13:11 +0000)]
Bug 19719: Add new column for collection in the patron checkouts data tables

This makes the collection visible in the checkouts table
on the details and issues tab in the patron account in staff.

TEST:

1. Check out a few items to patron.
2. View check outs on patron account in staff client.
3. Collection code is not present.

4. Apply patch

5. Notice that not Collection code is visible while viewing check outs.

Signed-off-by: Severine QUEUNE <severine.queune@bulac.fr>
Signed-off by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15408: Fix tests to fail without patch
Nick Clemens [Tue, 7 Aug 2018 13:37:30 +0000 (13:37 +0000)]
Bug 15408: Fix tests to fail without patch

We set all the timestamps to a specified date and ensure the new budgets
don't have this date

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15408: Remove fund's timestamp when cloning a budget
Baptiste Wojtkowski [Fri, 3 Feb 2017 15:22:36 +0000 (15:22 +0000)]
Bug 15408: Remove fund's timestamp when cloning a budget

To duplicate the budget, the function CloneBudgetHierarchy create a new budget
from the old without the parameter timestamp, so that the database generates a
new one.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Added unit tests to patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Modified to run properly the QA tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21150: add the biblionumber to the output
Jonathan Druart [Tue, 7 Aug 2018 14:14:54 +0000 (11:14 -0300)]
Bug 21150: add the biblionumber to the output

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21150: Search for item types inconsistencies
Jonathan Druart [Fri, 3 Aug 2018 17:59:33 +0000 (14:59 -0300)]
Bug 21150: Search for item types inconsistencies

search_for_data_inconsistencies.pl will now display errors if:
1.item-level_itypes is set to "specific item" and items.itype is not set
or not set to an item type defined in the system (itemtypes.itemtype)
2.item-level_itypes is set to "biblio record" and biblioitems.itemtype is not set
or not set to an item type defined in the system (itemtypes.itemtype)

Test plan:
Use the script and the different possible combinations to display the
errors

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20509: Add to script documentation
Katrin Fischer [Tue, 31 Jul 2018 16:23:43 +0000 (16:23 +0000)]
Bug 20509: Add to script documentation

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20509: Search for not defined authority codes
Jonathan Druart [Wed, 27 Jun 2018 18:35:57 +0000 (15:35 -0300)]
Bug 20509: Search for not defined authority codes

This patch adds a new check in
misc/maintenance/search_for_data_inconsistencies.pl to search for not
defined authority codes.

Test plan:
Set some auth_header.authtypecode to not defined authority codes in Koha
(UPDATE auth_header SET authtypecode="XXX" WHERE authid=42;)
Then run `misc/maintenance/search_for_data_inconsistencies.pl`

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to...
Josef Moravec [Wed, 27 Jun 2018 20:27:09 +0000 (20:27 +0000)]
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21011: Search for items with not defined homebranch and/or holdingbranch
Jonathan Druart [Wed, 27 Jun 2018 18:32:56 +0000 (15:32 -0300)]
Bug 21011: Search for items with not defined homebranch and/or holdingbranch

From bug 5789: scripts can fail if items.homebranch and/or
items.holdingbranch is not defined

This script will help people catching these migration issues.

Test plan:
Update your items table to set some homebranch or holdingbranch to NULL
Run this script
It will display the different items with not defined values in these
fields.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20631: Remove unused RemoveLostItem from C4::Accounts
Katrin Fischer [Wed, 8 Aug 2018 20:34:32 +0000 (20:34 +0000)]
Bug 20631: Remove unused RemoveLostItem from C4::Accounts

RemoveLostItem was 'used' in C4::Accounts, but is not
actually used there.

Call has been removed by
  commit ed9cf81c3aa8fd82f9347556364e9d2e6cef8a82
  Bug 15896 - Use Koha::Account::pay internally for makepayment

To test:
- Verify that the routine was actually not used!

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20487: DBRev 18.06.00.018
Nick Clemens [Wed, 22 Aug 2018 12:34:45 +0000 (12:34 +0000)]
Bug 20487: DBRev 18.06.00.018

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20487: (QA follow-up) Requested db revision
Marcel de Rooy [Thu, 31 May 2018 07:02:12 +0000 (09:02 +0200)]
Bug 20487: (QA follow-up) Requested db revision

As requested in comment12, we can update these cases in a dbrev too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Checked out item, deleted issue record, ran dbrev.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20487: AddReturn should clear items.onloan for unissued items
Marcel de Rooy [Wed, 28 Mar 2018 14:25:07 +0000 (16:25 +0200)]
Bug 20487: AddReturn should clear items.onloan for unissued items

If an item is no longer issued but somehow still has a date in the onloan
column, checking it in should clear that date.
Adding a ModItem call in the NotIssued section.

Test plan:
[1] Run t/db_dependent/Circulation.t
[2] Bonus: Checkout item, delete issue from table, checkin. Verify that
    items.onloan has been cleared.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20504: Fix lang attribute in html tag on systempreferences page
Katrin Fischer [Thu, 9 Aug 2018 17:46:09 +0000 (17:46 +0000)]
Bug 20504: Fix lang attribute in html tag on systempreferences page

On the system preferences page the lang attribute of the
html tag is always empty.

To test:
- Go to systempreferences
- Check the html source and look at the html tag,
  it should read: <html lang="">
- Apply patch
- Check the html source again: <html lang="en">
  Verify the language code shown matches the currently
  selected language in the staff interface
- Verify the language system preferences work correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The problem was actually that
  $lang = $template->param( 'lang' );
should certainly be $lang = $input->param( 'lang' );
and, as it, it overrides the value of 'lang' passed from C4::Auth

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21234: (RM follow-up) regenerate staff css
Nick Clemens [Wed, 22 Aug 2018 12:06:32 +0000 (12:06 +0000)]
Bug 21234: (RM follow-up) regenerate staff css

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21234: Remove our .clearfix class in favor of Bootstrap's
Owen Leonard [Thu, 16 Aug 2018 13:02:34 +0000 (13:02 +0000)]
Bug 21234: Remove our .clearfix class in favor of Bootstrap's

This patch removes the ".clearfix" declaration from staff-global.scss so
that Bootstrap's built-in clearfix class will be used.

To reproduce this issue, see Administration -> Currencies and exchange
rates. The table of currencies does not appear below the table buttons.

Apply the patch and regenerate CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Clear the browser cache if necessary and reload the Currencies and
exchange rates page. The table should appear in the correct position.

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>
6 years agoBug 7996: (QA follow-up) Remove unnecessary permission check view logs template
Katrin Fischer [Mon, 20 Aug 2018 07:04:37 +0000 (07:04 +0000)]
Bug 7996: (QA follow-up) Remove unnecessary permission check view logs template

Permission is checked in the perl file, no need to check again
in the template.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7996: Correct wrong permissions for modification log
Nick Clemens [Fri, 17 Aug 2018 11:07:41 +0000 (11:07 +0000)]
Bug 7996: Correct wrong permissions for modification log

To test:
 1 - Create a staff patron with catalogue,borrowers,and view_system_logs
     permissions
 2 - Log in using that patron
 3 - Go to tools
 4 - Click 'Log viewer'
 5 - You get a blank page
 6 - View borrower circ screen, note you do not see 'Modification log'
 7 - Edit a borrower, note you do not see 'Modification log'
 8 - Apply patch
 9 - 'Log Viewer' should now load correctly
10 - You should see 'Modification log' tab during circ
11 - You should see 'Modification log' tab when editing patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21243: (follow-up) Remove extra '</div>' tag
Nick Clemens [Tue, 21 Aug 2018 13:38:42 +0000 (13:38 +0000)]
Bug 21243: (follow-up) Remove extra '</div>' tag

To test:
1 - Go to Admin->Z39/SRU servers
2 - Pick a server or add one
3 - Click 'Modify' button for mappings
4 - Copy the HTML of the popup into w3c validator
https://validator.w3.org/#validate_by_input
5 - Note extra closing div
6 - Apply patch
7 - Repeat
8 - Success

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21243: Regression: SRU mapping popup for bibliographic records is unstyled
Owen Leonard [Fri, 17 Aug 2018 14:19:20 +0000 (14:19 +0000)]
Bug 21243: Regression: SRU mapping popup for bibliographic records is unstyled

This patch corrects a regression caused by Bug 21151: The include file
which adds CSS to the page was removed from the template.

To test, apply the patch and go to Administration -> Z39.50/SRU servers
-> New SRU server.

- Click the "Modify" button next to "SRU Search fields mapping"
- Verify that the pop-up window is correctly styled.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20994: Fix capitaization "Save to Lists"
Katrin Fischer [Wed, 8 Aug 2018 20:28:29 +0000 (20:28 +0000)]
Bug 20994: Fix capitaization "Save to Lists"

On the OPAC result list, below each result, there is a link:
"Save to Lists".

Patch changes this to "Save to lists" following our
capitalization rules.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19511: Local cover images not centered in table column in staff client search...
Owen Leonard [Thu, 26 Jul 2018 15:36:24 +0000 (15:36 +0000)]
Bug 19511: Local cover images not centered in table column in staff client search results

This patch modifies the JavaScript which embeds local cover images in
staff client catalog search results. It now adds the "thumbail" class to
the image, matching Amazon cover images.

To test you should have one or more titles with local cover images
attached. Apply the patch and clear your browser cache if necessary.

Enable both the AmazonCoverImages and LocalCoverImages system
preferences and perform a search which will return titles with local
cover images. Confirm that local covers are styled like Amazon covers.

Tested and confirmed local cover images are appearing quite nicely now.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19500: Add missing span for 'other'
Jonathan Druart [Fri, 17 Aug 2018 16:20:04 +0000 (13:20 -0300)]
Bug 19500: Add missing span for 'other'

To stay consistent in the DOM structure it would make sense to have it
there as well

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19500: (QA follow-up) Add spans to ease translation
Katrin Fischer [Sun, 12 Aug 2018 19:42:30 +0000 (19:42 +0000)]
Bug 19500: (QA follow-up) Add spans to ease translation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19500: Make module names on letters overview page translatable
Katrin Fischer [Fri, 10 Aug 2018 22:54:11 +0000 (22:54 +0000)]
Bug 19500: Make module names on letters overview page translatable

While the module pull down on adding and editing a letter is
written out and fully translatable, the overview page showed
the internal 'module code'.

Patch also renames the "Members" module into the "Patrons" module
to match Koha's terminology.

To test:
- Before applying the patch:
  - Add or edit a notice, look at the pull down for module
  - Go back to the overview page
  - Verify the module names don't match
- Apply the patch:
  - Check again, pull downs should now match
  - Verify that Members is now Patrons everywhere

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21229: (RM follow-up) regenerate staff css
Nick Clemens [Tue, 21 Aug 2018 11:59:17 +0000 (11:59 +0000)]
Bug 21229: (RM follow-up) regenerate staff css

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21229: Correct nesting and specificity for some button styles
Owen Leonard [Wed, 15 Aug 2018 13:14:02 +0000 (13:14 +0000)]
Bug 21229: Correct nesting and specificity for some button styles

This patch corrects some Bootstrap button-related CSS which was causing
some buttons to have the wrong color:

 - Circulation -> Check out: "Add a new message" link is black
 - Catalog -> Details page: "Print" button is blue

To test, apply the patch and rebuild CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Clear your browser cache if necessary and view the above pages to
confirm the problem is fixed.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21144: DBRev 18.06.00.017
Nick Clemens [Tue, 21 Aug 2018 11:49:55 +0000 (11:49 +0000)]
Bug 21144: DBRev 18.06.00.017

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21144: Add ROADTYPE to default authorised values categories
Katrin Fischer [Thu, 2 Aug 2018 00:19:42 +0000 (02:19 +0200)]
Bug 21144: Add ROADTYPE to default authorised values categories

The ROADTYPE category was missing from the default list of
authorised value categories available.

To test:
- Verify ROADTYPE is not listed as authorised value category
- Apply patch and run database update
- Verify ROADTYPE is now listed
- Add an entry, for example: AV = Avenue
- Add or edit a patron, verify a pull down with your entry
  shows on the form.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21142: Open uploaded files in utf-8 - batch mod/del
Jonathan Druart [Fri, 17 Aug 2018 15:07:55 +0000 (12:07 -0300)]
Bug 21142: Open uploaded files in utf-8 - batch mod/del

Batch item/record modification/deletion tools does not open uploaded
files in utf-8

Test plan:
Edit and delete records and items using a file which will contain:
valid and invalid barcodes with and without utf-8 chars (💕)

You should see the warning message:
 "The *** 39999000💕001679 does not exist in the database."

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20014: Preselect item budget based on id not code
Nick Clemens [Wed, 17 Jan 2018 19:50:31 +0000 (19:50 +0000)]
Bug 20014: Preselect item budget based on id not code

To test:
1 - Have the same fund code in two budgets
2 - Have budget code defined in MarcItemFieldsToOrder
3 - Stage a file with some order items as defined above
4 - Inspect the fuinds drop down in the item, notice two lines are
marked selected
5 - Apply patch
6 - Repeat
7 - Only one field should be selected, with a preference for active
budget

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20773: DBRev 18.06.00.016
Nick Clemens [Tue, 21 Aug 2018 11:25:53 +0000 (11:25 +0000)]
Bug 20773: DBRev 18.06.00.016

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20773: (bug 20724 follow-up) Add a simple db revision
Marcel de Rooy [Wed, 16 May 2018 13:39:04 +0000 (15:39 +0200)]
Bug 20773: (bug 20724 follow-up) Add a simple db revision

We should correct bad data too.
This is a trivial, pragmatic approach. Instead of doing a complex
calculation with holidays etc. (as was done on 12063), we just add
MaxPickupDelay or 7 days to today probably resulting in a little bonus
time. Only for waiting holds. When the ReservesNeedReturns pref was not
Automatic, there should be no changes.

== Test plan ==
1. git checkout c585f1149770ec401f188e061211501897cec0bf~1
     This the commit before bug 20724's patches.
     We need that to be able to generate "corrupted data"
2. Set ReservesNeedReturns to "Automatically"
3. Place a hold on a specific item
4. The hold should have an *empty* expiration date
     record page → Hold → "Expiration" column
5. Apply this patch
6. Run updatedatabase.pl
7. Refresh the page
8. The hold should have an expiration date (not empty)
9. Celebrate! 🎉🎊🥳

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 20773: (followup) Remove MySQLism

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21238: Prevent TemplateToolkit.t to fail on slow servers
Jonathan Druart [Thu, 16 Aug 2018 15:29:43 +0000 (12:29 -0300)]
Bug 21238: Prevent TemplateToolkit.t to fail on slow servers

It failed 3x in the last 6 runs (on node 1), we should mock
DateTime->now to prevent it to fail again.

The error is:
koha_1       |         #   Failed test at
t/db_dependent/Letters/TemplateToolkit.t line 724.

When comparing <<today>> replacement:
koha_1       |         # 08/16/2018 14:25<br />
[...]
koha_1       |         # 08/16/2018 14:24<br />

Let's mock DateTime->now to prevent it to fail again.

Test plan:
0. Do not apply this patch
1. Add "sleep(60);" at line ~715, before "# Add a second checkout"
2. Run the tests
=> Fail!
3. Apply this patch
4. Run the tests again
=> Pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21223: (RM follow-up) Generate css
Nick Clemens [Mon, 20 Aug 2018 14:49:53 +0000 (14:49 +0000)]
Bug 21223: (RM follow-up) Generate css

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21223: Fix some floating values
Jonathan Druart [Tue, 14 Aug 2018 20:26:26 +0000 (17:26 -0300)]
Bug 21223: Fix some floating values

See description of the bug for screenshots

I do not really know why we have these issues, but maybe we should
regenerate the .scss in order to catch the other problems?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18947: LDAP - do not assume anonymous bind if no user or password
Nick Clemens [Wed, 13 Dec 2017 13:27:36 +0000 (13:27 +0000)]
Bug 18947: LDAP - do not assume anonymous bind if no user or password

To test:
Ideally tested on a working ldap server with bind by auth and no
anonymous bind
1  - Define an LDAP config with bind by auth
2  - Don't define user/pass
3  - Define anonymous_bind = 0
4  - Attempt bind by auth
5  - Error is something like:
LDAP search failed to return object : XXXXXXXXX: LdapErr: XXXX-XXXXXX,
     comment: In order to perform this operation a successful bind must
     be completed on the connection., data 0, v2580 at
     /usr/share/koha/lib/C4/Auth_with_ldap.pm line 102.
6  - Define user/pass
7  - Now bind by auth should work
8  - remove user/pass
9  - Apply patch
10 - Attempt again
11 - Bind by auth shoudl succeed

prove -v t/db_dependent/Auth_with_ldap.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21203: ILS-DI - Make GetRecords handle non-existent records
Jonathan Druart [Fri, 10 Aug 2018 15:17:45 +0000 (12:17 -0300)]
Bug 21203: ILS-DI - Make GetRecords handle non-existent records

Caused by
  commit cb336e633bf7e0cb25051a8ed8157af8486a58d7
  Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio->biblioitem

Can't call method "biblioitem" on an undefined value at /home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212

Test plan:
- Enable ilsdi
- hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X
With X an existing biblionumber and a non existing one

Both requests must succeed

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>
6 years agoBug 13618: Fix xt/tt_valid.t
Jonathan Druart [Fri, 17 Aug 2018 17:58:52 +0000 (14:58 -0300)]
Bug 13618: Fix xt/tt_valid.t

We are going to say it quietly but this test does not catch the problem
when there are no spaces....shhhh

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Fix wrong condition in xt tests
Jonathan Druart [Fri, 17 Aug 2018 16:50:39 +0000 (13:50 -0300)]
Bug 13618: Fix wrong condition in xt tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Remove filter when assigning array
Jonathan Druart [Fri, 17 Aug 2018 16:51:01 +0000 (13:51 -0300)]
Bug 13618: Remove filter when assigning array

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Add POD to raw.pm
Jonathan Druart [Fri, 17 Aug 2018 16:11:28 +0000 (13:11 -0300)]
Bug 13618: Add POD to raw.pm

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: (follow-up) Add html filters to all the variables
Jonathan Druart [Thu, 16 Aug 2018 18:00:32 +0000 (15:00 -0300)]
Bug 13618: (follow-up) Add html filters to all the variables

JS block has been re-added to the top whereas it was moved to the
bottom!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: (follow-up) Manually replace missing .raw
Jonathan Druart [Thu, 16 Aug 2018 17:58:31 +0000 (14:58 -0300)]
Bug 13618: (follow-up) Manually replace missing .raw

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Remove html filter for NEXT
Jonathan Druart [Thu, 16 Aug 2018 17:55:47 +0000 (14:55 -0300)]
Bug 13618: Remove html filter for NEXT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Remove html filter for STOP and deal with existing USE raw
Jonathan Druart [Tue, 14 Aug 2018 15:23:08 +0000 (12:23 -0300)]
Bug 13618: Remove html filter for STOP and deal with existing USE raw

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Add tests
Jonathan Druart [Tue, 14 Aug 2018 18:08:46 +0000 (15:08 -0300)]
Bug 13618: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Add missing raw filters
Jonathan Druart [Tue, 14 Aug 2018 17:50:46 +0000 (14:50 -0300)]
Bug 13618: Add missing raw filters

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: (follow-up) Escape HTML chars in holds.js
Jonathan Druart [Mon, 13 Aug 2018 18:17:31 +0000 (15:17 -0300)]
Bug 13618: (follow-up) Escape HTML chars in holds.js

For biblio level holds we got:
TypeError: oObj.itemcallnumber is undefined

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: (follow-up) Add html filters to all the variables
Jonathan Druart [Mon, 13 Aug 2018 17:31:52 +0000 (14:31 -0300)]
Bug 13618: (follow-up) Add html filters to all the variables

IntranetUserJS was missing (?!)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Fix item search
Jonathan Druart [Thu, 9 Aug 2018 20:31:20 +0000 (17:31 -0300)]
Bug 13618: Fix item search

We want to encode HTML characters for the "key => value"'s
like branchcode => branchname
But not the whole JSON string
We could have done it controller-side but it sounds better to do it as
we do for other places

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Explicitly use raw for itemtype.checkinmsg
Jonathan Druart [Thu, 9 Aug 2018 16:13:12 +0000 (13:13 -0300)]
Bug 13618: Explicitly use raw for itemtype.checkinmsg

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Specific for labels/spinelabel-print.tt
Jonathan Druart [Thu, 9 Aug 2018 16:04:02 +0000 (13:04 -0300)]
Bug 13618: Specific for labels/spinelabel-print.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Specific for labels
Jonathan Druart [Thu, 9 Aug 2018 15:55:04 +0000 (12:55 -0300)]
Bug 13618: Specific for labels

This is definitely wrong, html is generated in C4/Creators/Lib.pm (see
FIXME).
We will need to fix it, but let's do that later!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Escape HTML chars in checkouts.js
Jonathan Druart [Thu, 9 Aug 2018 15:32:49 +0000 (12:32 -0300)]
Bug 13618: Escape HTML chars in checkouts.js

On the way the itemtype is not displaying correctly the description
instead of the code (in the relative's checkouts table)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Add the escapeHtml JS prototype to String
Jonathan Druart [Thu, 9 Aug 2018 15:08:45 +0000 (12:08 -0300)]
Bug 13618: Add the escapeHtml JS prototype to String

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Escape HTML chars in holds.js
Jonathan Druart [Thu, 9 Aug 2018 13:31:51 +0000 (10:31 -0300)]
Bug 13618: Escape HTML chars in holds.js

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Deal with span in patron-title
Jonathan Druart [Wed, 8 Aug 2018 19:13:05 +0000 (16:13 -0300)]
Bug 13618: Deal with span in patron-title

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Specific for IntranetCirculationHomeHTML
Jonathan Druart [Wed, 8 Aug 2018 19:12:52 +0000 (16:12 -0300)]
Bug 13618: Specific for IntranetCirculationHomeHTML

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: (follow-up) Manually replace missing .raw
Jonathan Druart [Thu, 19 Jul 2018 21:56:26 +0000 (18:56 -0300)]
Bug 13618: (follow-up) Manually replace missing .raw

Syntax was wrong:
Template process failed: file error - parse error - bodytag.inc line 4:
unexpected token (_)

It's escaped later so sounds ok here

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Manually replace missing .raw
Jonathan Druart [Thu, 19 Jul 2018 21:47:46 +0000 (18:47 -0300)]
Bug 13618: Manually replace missing .raw

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Fix BLOCKs
Jonathan Druart [Thu, 19 Jul 2018 21:24:10 +0000 (18:24 -0300)]
Bug 13618: Fix BLOCKs

perl -p -i -e  's/BLOCK \| html/BLOCK/g' **/*.inc **/*.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Add the raw TT filter
Jonathan Druart [Thu, 19 Jul 2018 20:56:34 +0000 (17:56 -0300)]
Bug 13618: Add the raw TT filter

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Remove html filters for HtmlTags
Jonathan Druart [Thu, 19 Jul 2018 20:36:29 +0000 (17:36 -0300)]
Bug 13618: Remove html filters for HtmlTags

We will have to make sure this filter (HtmlTags) is not used with
unsafe variables.

Generated by:
perl -p -i -e 's/HtmlTags tag([^\|]*)\| html -%]/HtmlTags tag\1-%]/g' **/*.tt **/*.inc
perl -p -i -e 's/HtmlTags tag([^\|]*)\| html %]/HtmlTags tag\1%]/g' **/*.tt **/*.inc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15717: Installer: Step 3 has <br /> showing
Mark Tompsett [Mon, 1 Feb 2016 19:25:56 +0000 (14:25 -0500)]
Bug 15717: Installer: Step 3 has <br /> showing

The step to install optional/mandatory things is broken with
many <br />'s instead of line breaks.

TEST PLAN
---------
1) Back up database
2) Drop database
3) Create empty database
4) Run web installer
   -- Notice that step 3 has ugly <br />'s at the last
      part of step 3.
5) Apply patch
6) Repeat steps 2-4
   -- Notice the <br />'s are now nice line breaks.
   NOTE: No promises of perfect positioning!
7) Run koha qa test tools.

Joubu: I have no idea if this is still needed. TO TEST

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
https://bugs.koha-community.org/show_bug.cgi?id=13618

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Escape patron's attributes - do we want that?
Jonathan Druart [Thu, 19 Jul 2018 20:09:26 +0000 (17:09 -0300)]
Bug 13618: Escape patron's attributes - do we want that?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Add html filters to all the variables
Jonathan Druart [Fri, 23 Jan 2015 12:18:54 +0000 (13:18 +0100)]
Bug 13618: Add html filters to all the variables

Here we go, next step then.
As we did not fix the performance issue when autofiltering
the variables (see bug 20975), the only solution we have is to add the
filters explicitely.

This patch has been autogenerated (using add_html_filters.pl, see next
pathces) and add the html filter to all the variables displayed in the
template.
Exceptions are made (using the new 'raw' TT filter) to the variable we
already listed in the previous versions of this patch.

To test:
- Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated
data which contain <script> tags

- Remove them from borrower_debarments.comments (there are allowed here)
update  borrower_debarments set comment="html tags possible here";

- From the interface hit page and try to catch alert box.
If you find one it means you find a possible XSS.
To know where it comes from:
* note the exact URL where you found it
* note the alert box content
* Dump your DB and search for the string in the dump to identify its
location (for instance table.field)

Next:
* Ideally we would like to use the raw filter when it is not necessary
to HTML escape the variables (in big loop for instance)
* Provide a QA script to catch missing filters (we want html, uri, url
or raw, certainly others that I am forgetting now)
* Replace the html filters with uri when needed (!)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21226: DBRev 18.06.00.015
Nick Clemens [Thu, 16 Aug 2018 14:03:28 +0000 (14:03 +0000)]
Bug 21226: DBRev 18.06.00.015

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21226: Remove xISBN services
Jonathan Druart [Wed, 15 Aug 2018 14:58:12 +0000 (11:58 -0300)]
Bug 21226: Remove xISBN services

OCLC has decided to retire all xISBN services:
https://www.oclc.org/developer/news/2018/xid-decommission.en.html

The code for related features has to be removed from Koha.

Test plan:
You need to be familiar with the different sysprefs (I am not):
- FRBRizeEditions
- SyndeticsEnabled
- SyndeticsEditions
- ThingISBN

Make sure there are no regressions introduced by this patchset.

QA Note: C4/XISBN.pm should be renammed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21226: DB Changes
Jonathan Druart [Wed, 15 Aug 2018 14:36:21 +0000 (11:36 -0300)]
Bug 21226: DB Changes

Remove prefs OCLCAffiliateID, XISBN and XISBNDailyLimit

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21230: Prevent Reserves.t to fail randomly
Jonathan Druart [Wed, 15 Aug 2018 15:21:38 +0000 (12:21 -0300)]
Bug 21230: Prevent Reserves.t to fail randomly

The following test can fail if the hold has been generated with found => 'W':
 #   Failed test 'No tests run for subtest "_koha_notify_reserve() tests"'
 #   at t/db_dependent/Reserves.t line 675.
Can't call method "to_address" on an undefined value at
t/db_dependent/Reserves.t line 661.
 # Looks like your test exited with 255 just after 56.

We should call AddReserve instead.

Test plan:
0. Do not apply this patch
1. Do the following change:
    my $hold = $builder->build({
            source => 'Reserve',
            value => {
               borrowernumber=>$hold_borrower,
               found => 'W', # This line is added, do not forget the comma above
            }
        });
2. Prove it makes the test fail
3. stash the changes and apply this patch
4. Make sure the tests pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21222: (bug 20226 follow-up) Fix patron creation
Jonathan Druart [Tue, 14 Aug 2018 19:30:09 +0000 (16:30 -0300)]
Bug 21222: (bug 20226 follow-up) Fix patron creation

Since bug 20226 you cannot longer creation a patron, memberentry.pl will
explode with
Template process failed: undef error - DBIC result _type  isn't of the
_type Category at /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc
line 22.

The problem is that "patron" is actually defined and the test in
str/members-menu.inc does not work as expected.

It comes from
  commit 7b1d08df0f4f69c52826c80a13158245287f4c00
  Bug 19936: Replace Generate_Userid - Update the occurrences
where I needed $patron to be defined in order to use Koha::Patron->generate_userid
on an blessed object.
But this was actually wrong, as it could have side-effects.

Test plan:
Create a new patron
Edit it
Retest bug 19936 and make sure the userid is generated correctly in the
different situations

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21221: Shortcut memberentry scripts if patron does not exist
Jonathan Druart [Tue, 14 Aug 2018 19:26:39 +0000 (16:26 -0300)]
Bug 21221: Shortcut memberentry scripts if patron does not exist

If borrowernumber is passed and that it does not refer to a valid patron
in DB, we should not continue the script and display an error instead.

Test plan:
Create a patron
Edit a patron
=> Both should work ok
You can also test the other action memberentry.pl manage.

Edit it again but modify the borrowernumber parameter
=> You should see a friendly user message saying that the patron does
not exist.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21112: Re-indent staff client cart template
Owen Leonard [Tue, 24 Jul 2018 16:10:53 +0000 (16:10 +0000)]
Bug 21112: Re-indent staff client cart template

This patch reindents the template for the staff client cart, basket.tt

- Trailing spaces removed
- Indentation changed to a consistent 4 spaces
- Markup indentation made more consistent

To test, apply the patch and add multiple items to the cart in the staff
client.

View the cart and confirm that it looks as it should both in the "brief"
and "more details" views.

HTML validation before and after the patch should return the same
results.

Signed-off-by: DEVINIM <kohadevinim@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21137: Standardize breadcrumbs for tags page
Katrin Fischer [Tue, 31 Jul 2018 19:15:36 +0000 (19:15 +0000)]
Bug 21137: Standardize breadcrumbs for tags page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>