]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 5458: increase ccode column to varchar 80
Fridolin Somers [Tue, 4 Sep 2018 08:40:29 +0000 (10:40 +0200)]
Bug 5458: increase ccode column to varchar 80

Koha allows you to define an authorised value having length 80, but then you
can't use it.

Here is why:
The SQL field items.ccode is a varchar(10).
The SQL field authorised_values.authorised_value is a varchar(80).
Therefore the authorised value is truncated to length 10 in items.ccode and the mapping from authorised value to description string fails in Koha.

This patch increases ccode column to varchar 80, like location.

Test plan :
1) Dont apply patches
2) Check there is on item field a subfield with authorised value category CCODE
3) Check this subfield is linked with database column items.ccode
4) Create an authorised values in category CCODE with 'DOCUMENTATION'
5) Edit an item on ccode and choose 'DOCUMENTATION'
6) Save item
7) Look at items.ccode in database or export in MARCXML
8) The value is troncated to 'DOCUMENTAT'
9) Apply patches and update database with installer/data/mysql/atomicupdate/bug_5458.sql
10) Repeate step 5 to 7
11) The value is not truncated 'DOCUMENTATION'

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20023: (QA follow-up) Tiny simplification
Marcel de Rooy [Fri, 21 Sep 2018 09:38:15 +0000 (11:38 +0200)]
Bug 20023: (QA follow-up) Tiny simplification

Remove empty emails from the list rightaway.
Would be tempted to lc the params->{email} at the start btw..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20023: Password recovery using email should be case insensitive
Blou [Mon, 17 Sep 2018 20:34:19 +0000 (16:34 -0400)]
Bug 20023: Password recovery using email should be case insensitive

When entering an email to recover the password, a user should not have to know or remember the casing of the given email.

Test
0) enable OpacResetPassword
1) On the OPAC, click "Forgot your password"
2) Enter your email address as in your user account BUT WITH A DIFFERENT CASING
3) Submit.  This will fail.
4) Apply the patch, redo with success.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21196: Use replacement cost from the item type if not set at item level
Jonathan Druart [Mon, 13 Aug 2018 15:40:22 +0000 (12:40 -0300)]
Bug 21196: Use replacement cost from the item type if not set at item level

When circ rules are set to cap at item replacement cost, calcfine only
checks the price in the item record, not the default replacement cost by
item type.

Note: We do not take '0' into account, what if you do not want to set
a replacement cost for an item? It is how it is done in chargelostitem
so keeping the existing behaviour, but that may be considered as a bug (?)

Test plan:
- Set useDefaultReplacementCost to use
- Set a default replacement cost for a given item type
- Create an item of that type with a replacementcost=0
- Create a circ rule for that item type that accrues fines but caps at
replacement cost
- check the item out, forcing a due date in the past
- check that item in
=> Fines should have been generated

Signed-off-by: Caroline Cyr La rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21196: Add tests
Jonathan Druart [Mon, 13 Aug 2018 15:36:41 +0000 (12:36 -0300)]
Bug 21196: Add tests

Signed-off-by: Caroline Cyr La rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21353: (follow-up) same check for select/clear all links
Jonathan Druart [Sun, 16 Sep 2018 17:41:49 +0000 (10:41 -0700)]
Bug 21353: (follow-up) same check for select/clear all links

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21353: Display checkboxes to merge patron even if cannot manage lists
Jonathan Druart [Sat, 15 Sep 2018 18:02:05 +0000 (11:02 -0700)]
Bug 21353: Display checkboxes to merge patron even if cannot manage lists

When permission 'manage_patron_lists' is off, there is no checkbox on
/cgi-bin/koha/members/member.pl to merge patrons.

Test plan:
Remove permission manage_patron_lists
Add permission edit_borrowers
Search for patrons
=> Without this patch you will not be able to select patrons to merge
(checkboxes are not displayed)

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21323: Handle multi params in redirect after login
Jonathan Druart [Fri, 14 Sep 2018 23:10:56 +0000 (16:10 -0700)]
Bug 21323: Handle multi params in redirect after login

Multi params are not handle correctly after login

Test plan:
[0] Use staff interface
[1] Use advance search and tick itemtype more than one checkbox
[2] Copy result url
[3] Logout
[4] Paste url in browser
[5] Type username and password
[6] In search result page, results limit description under breadcrumbs
will show all limits

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 20223: Merge members-menu and circ-menu inc files
Owen Leonard [Fri, 29 Jun 2018 14:26:17 +0000 (14:26 +0000)]
Bug 20223: Merge members-menu and circ-menu inc files

This patch removes members-menu.inc and replaces the last functional use
of it with a call to circ-menu.inc.

An invalid use of members-menu.inc has been removed from member.tt.

To test, apply the patch and open a patron record for editing. The
sidebar menu should look correct and all sidebar links should work
correctly.

View the patrons home page and confirm that nothing has broken.

Search the Koha codebase for references to members-menu.inc. There
should be none.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21281: (QA follow-up) Introduce _add_backtics
Marcel de Rooy [Fri, 21 Sep 2018 07:15:08 +0000 (09:15 +0200)]
Bug 21281: (QA follow-up) Introduce _add_backtics

Added a (initially trivial) test in Creators/Lib.t too.
Sometimes you start something, but you end somewhere else ;)

The test seems a bit slower now (regex, lookahead, etc). But this should
not hurt label creators in daily use.
Advantages: code is even more solid, consolidated in one place and can be
tested on its own.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21281: Correct t/db_dependent/Creators/Lib.t failures
Mark Tompsett [Wed, 5 Sep 2018 18:41:32 +0000 (18:41 +0000)]
Bug 21281: Correct t/db_dependent/Creators/Lib.t failures

TEST PLAN
---------
1) apply first patch
2) kshell kohadev
3) prove -r -v t/db_dependent/Creators/
   -- failures
4) apply this patch
5) repeat 2,3
   -- no failures
6) run koha qa test tools

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21281: Surround creator_templates.rows with backquotes
Jonathan Druart [Wed, 29 Aug 2018 20:05:50 +0000 (17:05 -0300)]
Bug 21281: Surround creator_templates.rows with backquotes

'rows' is a reserved word since MariaDB 10.2.4 and MySQL
https://mariadb.com/kb/en/library/mariadb-1024-release-notes/
https://dev.mysql.com/doc/refman/8.0/en/keywords.html

Test plan:
Do not apply this patch and make sure you recreate the reported issue
Apply this patch and confirm that it is now fixed.

QA will take care for the changes in installer and test files

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20819: (Follow-up) Show more clearly that a user gave no consent
Marcel de Rooy [Fri, 21 Sep 2018 06:00:20 +0000 (08:00 +0200)]
Bug 20819: (Follow-up) Show more clearly that a user gave no consent

See comment60 on Bugzilla.
Although I intentionally did not want to show date and time of refusal,
we can obviously add one line saying that we already have a no.

Test plan:
Login without consent and see no additional line.
Agree and verify that you see the registered on xxx line.
Disagree and verify that you now see "You indicated recently...".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20743: Remove duplicated line 'See your public page'
Nick Clemens [Fri, 21 Sep 2018 11:39:30 +0000 (11:39 +0000)]
Bug 20743: Remove duplicated line 'See your public page'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20656: (RM follow-up) Add missing filter
Nick Clemens [Thu, 20 Sep 2018 13:35:29 +0000 (13:35 +0000)]
Bug 20656: (RM follow-up) Add missing filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20656: (follow-up) Don't display title for F or FU fines (it is in description)
Nick Clemens [Sun, 16 Sep 2018 03:50:13 +0000 (03:50 +0000)]
Bug 20656: (follow-up) Don't display title for F or FU fines (it is in description)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20656: Better formatting for print summary
Nick Clemens [Tue, 24 Apr 2018 20:58:50 +0000 (20:58 +0000)]
Bug 20656: Better formatting for print summary

This patch is a slightly edited c&p from boraccount.tt

1 - Manually add a credit with no notes to patron
2 - Print summary
3 - Inspect the line
4 - Note that td has extra newlines and no words
5 - Apply patch
6 - Print summary again
7 - Note better formatting

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20656: Don't print lines that have no balance on print summary
Nick Clemens [Tue, 24 Apr 2018 20:57:17 +0000 (20:57 +0000)]
Bug 20656: Don't print lines that have no balance on print summary

To test:
1 - Add at least two fines to a patron
2 - Pay off one of them
3 - Print summary - all 3 lines show
4 - Apply patch
5 - Print summary - only line with balance shows

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20819: (RM follow-up) Add missing filters
Nick Clemens [Thu, 20 Sep 2018 13:34:49 +0000 (13:34 +0000)]
Bug 20819: (RM follow-up) Add missing filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20819: DBRev 18.06.00.031
Nick Clemens [Thu, 20 Sep 2018 13:02:20 +0000 (13:02 +0000)]
Bug 20819: DBRev 18.06.00.031

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20819: Add consent to self-registration process
Marcel de Rooy [Thu, 31 May 2018 10:29:59 +0000 (12:29 +0200)]
Bug 20819: Add consent to self-registration process

We add a section for the GDPR consent in opac-memberentry (only for the
self-registration). Not when editing personal details.

Test plan:
[1] Enable selfregistration (with confirm) and GDPR policy.
[2] Register a new account in OPAC. Verify that the GDPR checkbox is
    required.
[3] After you submit, you should see a date in borrower_modifications
    field gdpr_proc_consent.
[4] When you confirm, verify that the consent is visible on your consents.
[5] Enable selfregistration without confirmation mail. Register again.
[6] Check your consents tab again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
6 years agoBug 20819: Add check in get_template_and_user to enforce GDPR
Marcel de Rooy [Mon, 28 May 2018 12:59:31 +0000 (14:59 +0200)]
Bug 20819: Add check in get_template_and_user to enforce GDPR

If you choose to enforce GDPR policy, a user needs to give consent for
data processing before he does something else in the OPAC while being
logged in.

Test plan:
[1] Set GDPR_Policy to Disabled or Permissive. Usual behavior.
[2] Set to Enforced. Save a refusal on your consents. Notice that
    you are logged out when saving. When you login again, all OPAC
    requests are redirected to your consents tab.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
6 years agoBug 20819: Add your consents tab to opac-user
Marcel de Rooy [Mon, 28 May 2018 07:28:50 +0000 (09:28 +0200)]
Bug 20819: Add your consents tab to opac-user

This patch adds a consents tab to the OPAC user account menu. We now
add a GDPR section here, but it is open for future extensions. Think of
a newsletter checkbox for instance.

Script opac-patron-consent handles the tab. And now only includes some
GDPR code but is also written for more general use too.

Test plan:
[1] Set GDPR_Policy pref to Disabled. Verify that OPAC operates as usual.
[2] Set pref to Permissive. Try to save a consent or a refusal. Note that
    you are not logged out when saving a refusal.
[3] Set pref to Enforced. Save a refusal. You should be logged out.
    Log in again and verify that the consents tab shows a No.
    Note: a follow-up patch will add further enforcements.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
6 years agoBug 20819: Add Koha object classes for patron consents
Marcel de Rooy [Mon, 28 May 2018 11:05:53 +0000 (13:05 +0200)]
Bug 20819: Add Koha object classes for patron consents

Introduces Koha::Patron::Consent[s] for new table.
Adds basic CRUD test.

Test plan:
Run t/db_dependent/Koha/Patron/Consents.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
6 years agoBug 20819: Db rev for new table patron_consent and sysprefs
Marcel de Rooy [Mon, 4 Jun 2018 11:11:58 +0000 (13:11 +0200)]
Bug 20819: Db rev for new table patron_consent and sysprefs

[1] We add table patron_consent.
It allows for future extension. We could e.g. save consent for newsletter etc.
[2] Add one field to borrower_modifications
Datetime the patron who self-registered, gave consent.
[3] Syspref PrivacyPolicyURL
[4] Syspref GDPR_Policy: enforced, permissive or disabled.

Test plan:
[1] Run the dbrev or do a new install.
[2] Look at the description of the new prefs in Administration.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
6 years agoBug 21374: Fix self registration verification
Josef Moravec [Tue, 18 Sep 2018 20:17:46 +0000 (20:17 +0000)]
Bug 21374: Fix self registration verification

Test plan:
0) Do not apply the patch
1) Set PatronSelfRegistration  to Allow
2) Set PatronSelfRegistrationVerifyByEmail to Require
3) Try to create a account using self registration and verify it (use link
    in e-mail or take the url from table mesage_queue ;)
    The verificatin url return ISE - DBIx::Class::Row::store_column(): No
    such column 'timestamp' on Koha::Schema::Result::Borrower
4) Apply the patch
5) Try to acces the verification url again - now it should work

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13406: (RM follow-up) Add missing filter
Nick Clemens [Wed, 19 Sep 2018 14:35:41 +0000 (14:35 +0000)]
Bug 13406: (RM follow-up) Add missing filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: Bibliographic Record => Bibliographic record
Jonathan Druart [Sun, 16 Sep 2018 17:15:10 +0000 (10:15 -0700)]
Bug 19833: Bibliographic Record => Bibliographic record

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: (follow-up) Minor corrections
Owen Leonard [Fri, 16 Mar 2018 14:24:56 +0000 (14:24 +0000)]
Bug 19833: (follow-up) Minor corrections

This patch makes minor corrections to lines modified in the previous
ones.

On the biblio framework page, I have deleted this line because it didn't
make much sense before or after the change:

"Framework name, then go to MARC biblio to set MARC editor parameters"

In the web services preferences file, I reverted a change to
"deletedbiblio" because it refers to a table name.

I've also made corrections to instances of "biblio" in the following
pages, including changing "biblio number" to "biblionumber," since it
refers to a specific Koha column name.

- MARC detail page
- Help files:
  - Record matching rule;s
  - Batch item modification
  - MARC modification templates
- Export data
- Staged MARC record management

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: Changing the "biblios"
Zoe Bennett [Wed, 17 Jan 2018 02:57:27 +0000 (02:57 +0000)]
Bug 19833: Changing the "biblios"

To Test:
Check the following files that all the "biblio" or "biblio record" are
now written in rull as "bibliographic record".

modules/about.tt

Corrected a single capitalization error during signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: Changing the "biblios" acqui
Grace Smyth [Wed, 17 Jan 2018 02:38:38 +0000 (02:38 +0000)]
Bug 19833: Changing the "biblios" acqui

To test:
Check the following files that all all "biblio" or "biblo record" are
now writen in full as "bibliographic record".

modules/acqui/addorderiso2709.tt:44
modules/acqui/booksellers.tt:3
modules/acqui/invoices.tt:3

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: Changing the "biblios" - most of reports
Zoe Bennett [Wed, 17 Jan 2018 02:27:57 +0000 (02:27 +0000)]
Bug 19833: Changing the "biblios" - most of reports

To Test:
Check the following files that all the "biblio" or "biblio record" are
now written in full as "bibliographic record".

modules/reports/acquisitions_stats.tt
modules/reports/cash_register_status.tt
modules/reports/catalogue_stats.tt
modules/reports/issues_stats.tt
modules/reports/reserves_stats.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: Changing the "biblios" - most of admin
Zoe Bennett [Wed, 17 Jan 2018 01:55:34 +0000 (01:55 +0000)]
Bug 19833: Changing the "biblios" - most of admin

To Test:
Check the following files that all all "biblio" or "biblo record" are
now writen in full as "bibliographic record".

modules/admin/authtypes.tt
modules/admin/biblio_framework.tt
modules/admin/preferences/authorities.pref
modules/admin/preferences/cataloguing.pref
modules/admin/preferences/circulation.pref
modules/admin/preferences/opac.pref
modules/admin/preferences/searching.pref
modules/admin/preferences/serials.pref
modules/admin/preferences/web_services.pref
modules/admin/searchengine/elasticsearch/mappings.tt

Corrected a single capitalization error during signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: Kill the "biblios"
Charlotte Cordwell [Tue, 16 Jan 2018 22:02:20 +0000 (22:02 +0000)]
Bug 19833: Kill the "biblios"

1) Check files modules/about.tt, modules/acqui/booksellers.tt and
modules/acqui/invoices.tt for typos nad check that there are no "biblio"
and only "biblographic record".

Fixed one capitalization error during signoff.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19833: Kill all the "bibilos" - final couple
Charlotte Cordwell [Wed, 17 Jan 2018 01:55:30 +0000 (01:55 +0000)]
Bug 19833: Kill all the "bibilos" - final couple

Check the following files to see that all "biblio" or "biblio record"are changed to "bibliograhic records" and there are no typos.

modules/ill/ill-requests.tt
modules/installer/step3.tt

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20564: Don't use system to unzip files
Nick Clemens [Tue, 10 Jul 2018 13:48:07 +0000 (13:48 +0000)]
Bug 20564: Don't use system to unzip files

To test:
1 - Setup a zip file for patron images and cover images
2 - Test each tool
3 - Get a '500 error' after upload (note images do upload and attach)
4 - Apply patch
5 - Restart all the things
6 - Test agtain, uploads should complete and results display

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7143: Update about page for new dev - Jane Sandberg
Nick Clemens [Wed, 19 Sep 2018 13:40:59 +0000 (13:40 +0000)]
Bug 7143: Update about page for new dev - Jane Sandberg

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7143: Update history to reflect recent point releases
Martin Renvoize [Thu, 6 Sep 2018 12:58:19 +0000 (13:58 +0100)]
Bug 7143: Update history to reflect recent point releases

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13406: (follow-up) Add styling classes to authority MARC detail display
Jane Sandberg [Sun, 16 Sep 2018 22:38:29 +0000 (22:38 +0000)]
Bug 13406: (follow-up) Add styling classes to authority MARC detail display

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Amended patch: replace tab characters with spaces

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13406: Add styling classes to authority MARC detail display
Jane Sandberg [Sun, 16 Sep 2018 18:59:40 +0000 (11:59 -0700)]
Bug 13406: Add styling classes to authority MARC detail display

When viewing authority MARC records in the staff client (detail view), the
MARC tags were not displaying with the tag_num, tag_desc, tag_ind1,
tag_ind2, and desc classes, which made it impossible to add styles
to these specific parts of a MARC tag.  This commit adds these
styles (which are the same as the classes in the bibliographic
MARC detail display).

To test:
1) Open the staff client, then click Authorities.
2) Search for an authority record.
3) Click on Details.
4) Examine some MARC fields.  Note that the entire tag title line
is in a single <div>.
5) Apply this commit.
6) Repeat steps 1-3.
7) Notice that the tag title line is now separated into several
spans, each with their own classes.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21257: (bug 13618 follow-up) Handle undef values in JS before escapeHtml call
Jonathan Druart [Fri, 24 Aug 2018 19:22:20 +0000 (16:22 -0300)]
Bug 21257: (bug 13618 follow-up) Handle undef values in JS before escapeHtml call

To test:
1 - Find an item with no collection or location defined
2 - Check it out to a patron
3 - Note you cannot view the checkouts table
4 - Check the console: TypeError: oObj.collection is null
5 - Apply patch
6 - Restart all the things
7 - Checkouts table should load

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21317: Compiled CSS
Nick Clemens [Sun, 16 Sep 2018 04:20:40 +0000 (04:20 +0000)]
Bug 21317: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21317: Format long lists under Koha Team tab as columns
Owen Leonard [Wed, 5 Sep 2018 14:13:25 +0000 (14:13 +0000)]
Bug 21317: Format long lists under Koha Team tab as columns

This patch adds a couple of new CSS classes for formatting content in
columns: .columns-3 and .columns-4. The four-column class is applied to
the dev team and contributing companies lists on the about page.

The patch also modifies the style of H3 on this page to improve
readability.

Unrelated: "Nelsonville Public Library" corrected to "Athens County
Public Libraries."

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

View the various tabs on the about page and confirm that everything
looks good. Confirm that the dev team and contributing companies lists
are formatted as columns.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13692: series link is taking you to just 800a instead of whole 800
Owen Leonard [Fri, 3 Aug 2018 15:13:57 +0000 (15:13 +0000)]
Bug 13692: series link is taking you to just 800a instead of whole 800

This patch modifies the OPAC and staff client's XSL template for the
detail page so that series links based on a traced 490 tag use both
author and series title from the 800 tag.

To test you should have multiple titles in the same series with matching
490 and 800 tags in each record. Apply the patch and restart Plack if
necessary.

View the detail page for one of the series' titles. The "Series:" link
should link to a search which uses both series title and author.
Clicking the link should return the correct results.

Test both the OPAC and staff client.

Signed-off-by: John Sterbenz <jsterben@umich.edu>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21347: Escaped fields that should be in addorderiso2709
Chris Cormack [Fri, 14 Sep 2018 22:48:23 +0000 (22:48 +0000)]
Bug 21347: Escaped fields that should be in addorderiso2709

Test plan
1/ Stage a MARC file (if you have none staged)
2/ Create a basket in aquisitions
3/ Add an order via staged file
4/ Look at the item information tab, notice there is escaped html
5/ Apply patch
6/ Refresh page, notice it is fixed

Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20217: Compiled CSS
Nick Clemens [Sun, 16 Sep 2018 00:28:30 +0000 (00:28 +0000)]
Bug 20217: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20217: Make header's catalog search menu into a split button
Owen Leonard [Fri, 10 Aug 2018 13:37:49 +0000 (13:37 +0000)]
Bug 20217: Make header's catalog search menu into a split button

This patch modifies the markup for the staff client header's catalog
search menu so that it mimics the behavior of a Bootstrap split button
(As seen on the cataloging home page's 'New from Z39.50' button).

To test, apply the patch, run 'yarn build' to regenerate the staff
client's CSS, and clear your browser cache.

- View any page in the staff client.
- Hover your mouse over the "Search" link in the header. It should
  trigger a hover affect on the adjacent menu link.
- Clicking the "Search" link should take you directly to the advanced
  search page.
- Clicking the adjacent menu link should display a menu containing links
  to advanced search and item search.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19817: (follow-up) Remove local help files + edit help feature
Jonathan Druart [Sun, 16 Sep 2018 17:25:37 +0000 (10:25 -0700)]
Bug 19817: (follow-up) Remove local help files + edit help feature

I have no idea what happened but RM did not rebase that one correctly
before pushing it ;)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21305: Update two-column templates with Bootstrap grid: Patron clubs
Owen Leonard [Wed, 2 May 2018 16:08:29 +0000 (16:08 +0000)]
Bug 21305: Update two-column templates with Bootstrap grid: Patron clubs

This patch modifies patron clubs templates to use the Bootstrap grid
instead of YUI.

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

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

 - Tools -> Patron clubs
   - View club enrollments

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 21306: Update two-column templates with Bootstrap grid: Tags
Owen Leonard [Mon, 7 May 2018 14:45:25 +0000 (14:45 +0000)]
Bug 21306: Update two-column templates with Bootstrap grid: Tags

This patch modifies the tags management 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:

 - Tools -> Tags
   - View list of tags
   - Click tag to view the list of titles tagged with that term

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 21356: Add Missing space in parcel.tt
Caroline Cyr La Rose [Sat, 15 Sep 2018 20:10:22 +0000 (16:10 -0400)]
Bug 21356: Add Missing space in parcel.tt

This patch adds a space between the user's name and 'On:'
in parcel.tt.

To test:

1) Go to Acquisitions
2) Search for a vendor
3) Create a new basket
4) Add an order to the basket
5) Close the basket
6) Receive the order
7) In the page title 'Receipt summary' notice there is no space
between the 'Received by' user name and 'On:'
8) Apply the patch
9) Refresh the page, there should now be a space

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21262: Do not format numbers for editing if too big
Nick Clemens [Thu, 23 Aug 2018 14:44:31 +0000 (14:44 +0000)]
Bug 21262: Do not format numbers for editing if too big

This patch copies the code from bug 15770 to the format_for_editing
sub.

It also corrects schema issue, listing the purpose for two acq columns
instead of claing unused

To test:
1 - Edit a fund
2 - Set warning at amount to: 100000000000000
3 - Save budget
4 - Try to edit - internal server error
5 - Apply patch
6 - Should be able to edit budget
7 - Number should appear unformatted

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2 quick notes:
1. Code must be moved to a subroutine if reused later
2. It would have prefered to have the comment of the 2 DB columns on a separate patch
(even separate bug report). As it's minor and that the patch will certainly backported
I will not block it.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21360: Prevent IssueSlip.t to fail when run at 23:59
Jonathan Druart [Sun, 16 Sep 2018 16:49:46 +0000 (09:49 -0700)]
Bug 21360: Prevent IssueSlip.t to fail when run at 23:59

Not sure what happened on bug 15029 (Make the IssueSlip tests pass even if
launched after 23:00) but we should have tested with 23:59, not 23:50...

koha_1       |     # Looks like you planned 3 tests but ran 2.
koha_1       |
koha_1       | #   Failed test 'Issue slip'
koha_1       | #   at t/db_dependent/Members/IssueSlip.t line 294.
koha_1       | Label not found for "last SKIP" at /usr/share/perl5/Test/More.pm line 1370.
koha_1       | # Looks like your test exited with 255 just after 1.
koha_1       | [23:59:10] t/db_dependent/Members/IssueSlip.t
koha_1       | Dubious, test returned 255 (wstat 65280, 0xff00)
koha_1       | Failed 3/3 subtests

Test plan:
0/ Don't apply this patch
1/ sudo date -s "2018-09-15 23:59:00";prove t/db_dependent/Members/IssueSlip.t
=> You should get the error
2/ Apply this patch and repeat 1.
=> Tests should pass now!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20777: DBRev 18.06.00.030
Nick Clemens [Sat, 15 Sep 2018 21:52:47 +0000 (21:52 +0000)]
Bug 20777: DBRev 18.06.00.030

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20777: (follow-up) Remove 'dispute' reference in /credits endpoint
Tomas Cohen Arazi [Fri, 14 Sep 2018 16:10:50 +0000 (09:10 -0700)]
Bug 20777: (follow-up) Remove 'dispute' reference in /credits endpoint

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20777: DBIC update
Tomas Cohen Arazi [Thu, 17 May 2018 13:55:26 +0000 (10:55 -0300)]
Bug 20777: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20777: Remove unused accountlines.dispute field
Tomas Cohen Arazi [Thu, 17 May 2018 13:53:55 +0000 (10:53 -0300)]
Bug 20777: Remove unused accountlines.dispute field

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21288: DBRev 18.06.00.029
Nick Clemens [Sat, 15 Sep 2018 21:44:05 +0000 (21:44 +0000)]
Bug 21288: DBRev 18.06.00.029

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21288: Slowness in acquisition caused by GetInvoices
Pasi Kallinen [Thu, 30 Aug 2018 08:29:54 +0000 (11:29 +0300)]
Bug 21288: Slowness in acquisition caused by GetInvoices

The SQL query done by GetInvoices is quite slow on our production server,
taking about a minute.

In the query, there's this join:

  LEFT JOIN subscription ON biblio.biblionumber = subscription.biblionumber

but there's no index on subscription.biblionumber. Adding the index speeds
up the query so it only takes up about 3 seconds.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20765: Fix search for items by acqdate in label batch
Fridolin Somers [Mon, 14 May 2018 14:18:29 +0000 (16:18 +0200)]
Bug 20765: Fix search for items by acqdate in label batch

In Tools >  Label creator, when creating a batch you can add items using a search.

This search has filters on acquisition date.
Actually those filters does not work.
The create a search using CCL syntaxe to query Zebra search engine.

The cause is that operator "ge" or "le" must be before "st-date-normalized" in CCL query.
Looks like it is because of "st-date-normalized" uses "r=o" in ccl.properties.

Test plan :
1) Check in advance search you have indexed acquisition date
2) Go to Tools > Label creator
3) Click on New > Label batch
4) Click on Add item(s)
5) Enter a relevent date in "Added on or after date" and in "Added on or before date"
6) Click on "Search"
=> SUCCESS: You get results
7) Apply the patch
8) Retry the 'Add item(s)' step
=> SUCCESS: Patch doesn't change behaviour for old Zebra
9) Get rid of the patch on your working branch
10) Use the latest Zebra:
- /etc/apt/sources.list.d/indexdata.list:
deb http://ftp.indexdata.dk/debian jessie main
- Add the repo key:
  $ wget http://ftp.indexdata.dk/debian/indexdata.asc -O- | sudo apt-key add -
- Upgrade:
  $ sudo apt update; sudo apt dist-upgrade
  $ sudo koha-rebuild-zebra -f -a -b -v kohadev
  $ restart_all
11) Retry the 'Add item(s)' step
=> FAIL: No results!
9) Apply the patch, retry
=> SUCCESS: Search results!
- Sign off :-D

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
It doesn't break with 2.0.59-1 (stretch/jessie), and fixes the problem
for 2.1.X.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21355: Prevent GetDailyQuote.t to fail when run after 23:00
Jonathan Druart [Sat, 15 Sep 2018 18:24:32 +0000 (11:24 -0700)]
Bug 21355: Prevent GetDailyQuote.t to fail when run after 23:00

Tests will fail (Jenkins run #554) if run after 23:00

 #   Failed test 'Id is correct'
 #   at t/db_dependent/Koha/GetDailyQuote.t line 72.
 #          got: 6
 #     expected: 8

 #   Failed test 'Timestamp 2018-09-15 00:44:46 is correct'
 #   at t/db_dependent/Koha/GetDailyQuote.t line 74.
 #          got: '2018-09-14 23:44:46'
 #     expected: '2018-09-15 00:44:46'
 # Looks like you failed 2 tests of 12.
 [23:44:46] t/db_dependent/Koha/GetDailyQuote.t
 Dubious, test returned 2 (wstat 512, 0x200)

Adding only 1 second will hugely reduce the risk of failure here.

It also updates a useless test (column 'quote' does not exist)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested:
- Run:
  $ sudo date -s 2018-09-15T23:10:00
  $ kshell
 k$ prove t/db_dependent/Koha/GetDailyQuote.t
=> FAIL: Tests fail as patch author mentions
- Apply the patch
 k$ prove t/db_dependent/Koha/GetDailyQuote.t
=> SUCCESS: Tests pass!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21233: (follow-up) POD fix
Tomas Cohen Arazi [Fri, 14 Sep 2018 23:23:58 +0000 (16:23 -0700)]
Bug 21233: (follow-up) POD fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21334: Add bibliographic content type definitions
Tomas Cohen Arazi [Tue, 11 Sep 2018 17:48:15 +0000 (10:48 -0700)]
Bug 21334: Add bibliographic content type definitions

This patch adds the following content type definitions, to be used by
endpoint authors implementing MARC-related endpoints:

--------------------------------------
| Content-type             | Alias   |
|--------------------------|---------|
| application/marcxml+xml  | marcxml |
| application/marc-in-json | mij     |
| application/marc         | marc    |
--------------------------------------

Code using this aliases will use them like this:
- Suppose you want to output data in MARCXML format:

my $record = cool_method_that_returns_MARC_RECORD();
return $c->render( status => 200, format => 'marcxml', text => $record->as_xml_record );

Note: 'text' by defaults encodes output as UTF-8. If the encoding is not
UTF-8 you should encode the data on your own.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/V1.t
=> SUCCESS: Test pass!
- Sign off :-D

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21334: Unit tests
Tomas Cohen Arazi [Tue, 11 Sep 2018 17:43:32 +0000 (10:43 -0700)]
Bug 21334: Unit tests

This patch adds unit tests for the new content types being added.
It also adds tests for the 'json' overloading that already takes place
in V1.pm.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19179: (QA follow-up) Replace second E-mail
Marcel de Rooy [Fri, 14 Sep 2018 09:53:37 +0000 (11:53 +0200)]
Bug 19179: (QA follow-up) Replace second E-mail

Better write here exactly what we need to type in the pref text box.
Since E-mail will not work and Email will :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19179: Email option for SMSSendDriver is not documented
Charlotte Cordwell [Fri, 7 Sep 2018 03:35:36 +0000 (03:35 +0000)]
Bug 19179: Email option for SMSSendDriver is not documented

'Email' is not documented as a valid setting.

1) Apply patch.
2) Go to Administration --> search SMSSendDriver
3) Check if SMSSendDriver has this message is at the end of the box:
   "If you would prefer to receive SMS via E-mail set SMSSendDriver to Email"

Signed-off-by: Michal Denar <black23@gmail.coml>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21293: Remove another misplaced html filter on housebound.tt
Jonathan Druart [Fri, 31 Aug 2018 16:51:18 +0000 (13:51 -0300)]
Bug 21293: Remove another misplaced html filter on housebound.tt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21293: Display of housebound delivery information broken by Bug 13618
Owen Leonard [Thu, 30 Aug 2018 16:43:09 +0000 (16:43 +0000)]
Bug 21293: Display of housebound delivery information broken by Bug 13618

This patch corrects the patron housebound details template. A stray
"html" filter broke display of delivery information.

To test, apply the patch and enable the HouseboundModule system
preference.

 - Open a patron record and select the "Housebound" tab in the left-hand
   navigation menu.
 - Click "Add a new deliver" and save some delivery details.
 - Upon saving you should be directed back to the housebound details
   page. All the details of the delivery you saved should appear
   correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21233: (QA follow-up) It is not only trailing whitespace characters
Tomas Cohen Arazi [Fri, 14 Sep 2018 19:27:36 +0000 (12:27 -0700)]
Bug 21233: (QA follow-up) It is not only trailing whitespace characters

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21233: (QA follow-up) We do not like the plural form of whitespace
Marcel de Rooy [Fri, 24 Aug 2018 09:06:14 +0000 (11:06 +0200)]
Bug 21233: (QA follow-up) We do not like the plural form of whitespace

The word "whitespace" is usually uncountable.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21233: Unit tests
Tomas Cohen Arazi [Thu, 16 Aug 2018 09:54:53 +0000 (06:54 -0300)]
Bug 21233: Unit tests

This patch adds tests for the required password-related exceptions. The
tests verify the stringified version of the exceptions.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t
=> FAIL: Exceptions not implemented, tests fail!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 21233: Add Koha::Exceptions::Password
Tomas Cohen Arazi [Thu, 16 Aug 2018 09:56:30 +0000 (06:56 -0300)]
Bug 21233: Add Koha::Exceptions::Password

This patch adds some exceptions that we need. To test:

- Apply this patch
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
- Sign off! :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 19469: DBRev 18.06.028
Nick Clemens [Fri, 14 Sep 2018 17:46:58 +0000 (17:46 +0000)]
Bug 19469: DBRev 18.06.028

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: (QA follow-up) Disable priority pulldowns when using split holds queue
Kyle M Hall [Fri, 7 Sep 2018 18:28:31 +0000 (14:28 -0400)]
Bug 19469: (QA follow-up) Disable priority pulldowns when using split holds queue

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: (RM follow-up) Add filters and fix variable name
Nick Clemens [Fri, 7 Sep 2018 15:02:25 +0000 (15:02 +0000)]
Bug 19469: (RM follow-up) Add filters and fix variable name

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: (QA follow-up) When altering priorities, use the existing priority numbers...
Kyle M Hall [Fri, 27 Apr 2018 09:21:28 +0000 (09:21 +0000)]
Bug 19469: (QA follow-up) When altering priorities, use the existing priority numbers of the given table

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: (QA follow-up) Use hold item's itemtype if available, fix priority changing
Kyle M Hall [Tue, 17 Apr 2018 14:29:27 +0000 (14:29 +0000)]
Bug 19469: (QA follow-up) Use hold item's itemtype if available, fix priority changing

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: Remove use of Dumper on request.tt
Kyle M Hall [Wed, 7 Mar 2018 12:05:11 +0000 (07:05 -0500)]
Bug 19469: Remove use of Dumper on request.tt

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: (follow-up) Use patron-title.inc as proposed by bug 18403
Tomas Cohen Arazi [Mon, 5 Mar 2018 19:10:25 +0000 (16:10 -0300)]
Bug 19469: (follow-up) Use patron-title.inc as proposed by bug 18403

This patch makes the new template include file use the patron-title.inc
include to render the patron name.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: Add ability to split view of holds view on record by pickup library and...
Kyle M Hall [Sat, 30 Sep 2017 12:02:57 +0000 (08:02 -0400)]
Bug 19469: Add ability to split view of holds view on record by pickup library and/or itemtype

It is possible to set up circulation rules to limit trapping of holds by pickup library and itemtype.
To make it easier to understand which holds will be trapped in a given circumstance,
it would be nice if we could optionally group holds by pickup library and/or itemtype.

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Enable AllowHoldItemTypeSelection
4) Pick a record and create holds with various pickup libraries and itemtype combinations
5) Enable HoldsSplitQueueNumbering
6) Try the different combinations of HoldsSplitQueue
7) Ensure the hold "arrows" move the items correctly
   * Up and down arrows should move hold above or below the adjacent hold within a hold fieldset
   * Top and borrom arrows should move hold to the top or bottom within a hold fieldset

Sponsored-by: Stockholm University Library
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Followed test plan, patch worked as described. Also passed QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19469: Clean up template whitespace
Kyle M Hall [Sat, 30 Sep 2017 12:03:30 +0000 (08:03 -0400)]
Bug 19469: Clean up template whitespace

Sponsored-by: Stockholm University Library
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passed QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21127: Remove jqTransform jQuery plugin from the OPAC
Owen Leonard [Fri, 27 Jul 2018 12:43:50 +0000 (12:43 +0000)]
Bug 21127: Remove jqTransform jQuery plugin from the OPAC

This patch removes the jqTransform jQuery plugin from the OPAC. It was
added for the CCSR theme, which no longer exists.

http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=c7c2e9efbde273f2b77786316b7502a8847072bd

There will be no visible changes to the OPAC after applying the patch.
Search the Koha codebase for references to jqTransform and confirm that
none exist.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21248: Fix COinS carp in MARC details page on unknown record
Pasi Kallinen [Mon, 20 Aug 2018 04:30:45 +0000 (07:30 +0300)]
Bug 21248: Fix COinS carp in MARC details page on unknown record

Looking up a nonexistent record in the MARC details -page causes
the COinS to carp. The fix is trivial, just move the COinS call
couple lines, after the record existence check.

TEST PLAN
---------
1) reset_all for kohadevbox
2) log in to staff client - admin/admin
3) search catalogue for green
4) tweak the top URL to have a bad biblionumber (eg. 9999)
5) cat /var/log/koha/kohadev/plack-err.log
   -- floody! with errors.
6) echo | sudo tee /var/log/koha/kohadev/plack-err.log
7) restart_all
8) repeat steps 2 through 5.
   -- just nice starting messages, not floody.
9) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13779: (QA follow-up) Correct checkauth call in offline_circ/download.pl
Marcel de Rooy [Fri, 7 Sep 2018 07:50:40 +0000 (09:50 +0200)]
Bug 13779: (QA follow-up) Correct checkauth call in offline_circ/download.pl

Script offline_circ/download.pl does not use the return values of
checkauth. So should not assign them to bad chosen variables that do
not correspond with checkauth but with get_template_and_user.

Test plan:
Look for $template, $loggedinuser, $cookie, $flags in the code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13779: sessionID declared twice in C4::Auth::checkauth()
David Cook [Thu, 19 Jul 2018 06:57:22 +0000 (16:57 +1000)]
Bug 13779: sessionID declared twice in C4::Auth::checkauth()

The bug is that $sessionID is declared twice in C4::Auth::checkauth().
At the moment, this doesn't actually create a problem, because no
one seems to be using the $sessionID which is returned by checkauth(),
except in the case of opac/external/overdrive/auth.pl which skips
the second declartion as it doesn't require auth.

This patch removes the redefining of the $sessionID variable.

In terms of testing, try logging in with a username and password
and see if it works. The only risk this patch would pose is breaking
auth I would think, since nothing is actually using the return value
from checkauth() for $sessionID.

NOTE:
It was initially defined near the top of the function (~line 791).
I believe the scoping would mean the correct version of $sessionID
would be used in the latter lines for the unset'ing.
I have skimmed code to see if the sessionID return value is used.
I did not test overdrive, as I do not know how. However, this is
the only area, I think this could possibly break. This change makes
sense to me.

QA: Please test overdrive.
opac/external/overdrive/auth.pl only checks if the value is set, so
   this patch might fix/break something there?
opac/svc/overdrive same kind of check.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This is a (tiny) code improvement. Now we consistently return the session
id that is also stored in the returned cookie. (Which can be an 'anon'
session.)
Fact is that Koha almost everywhere ignores the returned session id and
sometimes gets the session from the cookie (obviously). The session id is
also passed to the template by get_template_and_user but never used in
templates.
As mentioned, the two overdrive scripts are the exception. But since both
test on both $user && $sessionID, they will not choke on an anynonomous
session id without userid. So theoretically fine, but not tested.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21324: Fix column defs and spans
Nick Clemens [Fri, 7 Sep 2018 11:33:44 +0000 (11:33 +0000)]
Bug 21324: Fix column defs and spans

TO test:
1 - Open a bastket in acquisitions
2 - Order some items
3 - Close the basket
4 - Receive some items
5 - Note the columns are out of alingment on parcel.pl
6 - Note a JS error breaking datatable on 'Already received'
7 - Apply patch
8 - Things should be better

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21285: Add missing select2x2.png file
Tomas Cohen Arazi [Wed, 29 Aug 2018 16:46:39 +0000 (13:46 -0300)]
Bug 21285: Add missing select2x2.png file

This file is part of the Select2 jquery plugin, but wasn't added when
the use of the plugin was introduced in Koha.

To test:
- On a high DPI screen (retina mac?) on Chrome or Safari
- Edit an item
=> FAIL: dropdowns using Select2 (like 'Shelving location') don't display the icons (down arrow and cross) and a default value is wrongly selected
=> FAIL: the inspector says the requested select2x2.png file returned a 400 error.
- Apply this patch
- Reload the edit page
=> SUCCESS: Things display correctly! Dropdowns without selected values
by default!
=> SUCCESS: No errors fetching select2x2.png
- Sign off :-D

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21116: Add API routes through plugins
Tomas Cohen Arazi [Mon, 23 Jul 2018 14:14:47 +0000 (11:14 -0300)]
Bug 21116: Add API routes through plugins

This patch adds plugins the capability of injecting new routes on the
API.

The plugins should provide the following methods to be considered valid API-generating plugins:

- 'api_routes': returning the 'path' component of the OpenAPI specification corresponding to the routes served by the plugin
- 'api_namespace': it should return a namespace to be used for grouping the endpoints provided by the plugin

otherwise, they will be just skipped.

All plugin-generated routes will be added the 'contrib' namespace, and
will end up placed inside /contrib/<namespace>, where <namespace> is what the 'api_namespace' returns.

A sample endpoint will be added to the Kitchen Sink plugin, and tests
are being written.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
=> SUCCESS: Tests pass!
- Install the (latest) KitchenSink plugin
- Point your browser to the API like this:
  http://koha-intra.myDNSname.org:8081/api/v1/.html
=> SUCCESS: The /contrib/kitchensink/patrons/:patron_id/bother endpoint
implemented by the plugin has been merged!
- Sign off! :-D

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@deichman.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21116: Unit tests
Tomas Cohen Arazi [Mon, 27 Aug 2018 19:24:09 +0000 (16:24 -0300)]
Bug 21116: Unit tests

This path implements unit tests for the route-from-plugin development.
It adds the required methods to the Koha::Plugin::Test plugin
distributed along with the tests. A second plugin implementing invalid
OpenAPI specs is added (Koha::Plugin::BadAPIRoute).

Edit: I made terminology changes to make it less rude.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7534: (QA follow-up) Use Koha.Preference template plugin to fetch the pref's...
Jonathan Druart [Mon, 10 Sep 2018 20:45:32 +0000 (13:45 -0700)]
Bug 7534: (QA follow-up) Use Koha.Preference template plugin to fetch the pref's value

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19550: (QA follow-up) Add missing [% USE %]
Julian Maurice [Fri, 7 Sep 2018 15:06:38 +0000 (17:06 +0200)]
Bug 19550: (QA follow-up) Add missing [% USE %]

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19550: (RM follow-up) Add filters
Nick Clemens [Thu, 6 Sep 2018 14:34:03 +0000 (14:34 +0000)]
Bug 19550: (RM follow-up) Add filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19550: Add links to related authorities for UNIMARC
Julian Maurice [Tue, 31 Oct 2017 12:25:17 +0000 (12:25 +0000)]
Bug 19550: Add links to related authorities for UNIMARC

Links exist in search results for MARC21 but not for UNIMARC.
This patch fixes that.

Test plan:
1. Create an authority with a field 550 that links to another authority
   e.g. 550 $a Foo $9 42
2. Reindex this authority
3. Search for this authority
4. See that you now have a link "Foo" to authorities/detail.pl?authid=42
   in the summary

Signed-off-by: delaye <stephane.delaye@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21235: DBRev 18.06.00.027
Nick Clemens [Fri, 7 Sep 2018 15:53:24 +0000 (15:53 +0000)]
Bug 21235: DBRev 18.06.00.027

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21235: (QA follow-up) Remove table services_throttle
Martin Renvoize [Fri, 7 Sep 2018 15:28:22 +0000 (16:28 +0100)]
Bug 21235: (QA follow-up) Remove table services_throttle

Add the missing db update to nuke the services throttle from high orbit

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21235: Remove table services_throttle
Jonathan Druart [Wed, 15 Aug 2018 15:01:56 +0000 (12:01 -0300)]
Bug 21235: Remove table services_throttle

This table was only used by XISBN, this patch remove the table and the
related code (cronjobs)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=21235
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21319: Remove highlight and tooltip on Koha Team version
Owen Leonard [Thu, 6 Sep 2018 11:56:41 +0000 (11:56 +0000)]
Bug 21319: Remove highlight and tooltip on Koha Team version

This patch modifies the about page to remove a <span> on the Koha
version number which explained the version numbering change.

To test, apply the patch and view the "Koha team" tab on the about page.
The "Koha 18.05 release team" header should not have the number
highlighted.

Signed-off-by: pierre-marc <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20776: Add Selenium::Remote::Driver to the dependency list
Tomas Cohen Arazi [Thu, 17 May 2018 13:33:32 +0000 (10:33 -0300)]
Bug 20776: Add Selenium::Remote::Driver to the dependency list

This dependency is missing from the PerlDependencies.pm file.
This patch adds it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17530: DBRev 18.06.00.025
Nick Clemens [Fri, 7 Sep 2018 13:32:31 +0000 (13:32 +0000)]
Bug 17530: DBRev 18.06.00.025

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17530: (QA follow-up) Fix caching error
Marcel de Rooy [Fri, 7 Sep 2018 05:50:13 +0000 (07:50 +0200)]
Bug 17530: (QA follow-up) Fix caching error

The fourth patch made this change:
-    $last_article_requestable_guesses->{$key} = $res;
+    $cache->set_in_cache(GUESSED_ITEMTYPES_KEY, $res);

This removed the category level in the cached hash. Adding it back here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by verifying cached values, running opac-search with anonymous
session as well as user context.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>