]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 18833: Plugin unimarc_field_210c pagination error
Fridolin Somers [Wed, 21 Jun 2017 11:05:40 +0000 (13:05 +0200)]
Bug 18833: Plugin unimarc_field_210c pagination error

In plugin unimarc_field_210c, the editors search results have pagination.
First page works but not other pages.

The main problem whas mainly because $startfrom var was missused. It is defined in C4::Output::pagination_bar as page number.
This patch corrects by using a $offset var.
Also removes dead code, obsoleted by using C4::Output::pagination_bar.
Also changes hardcoded results per page from 19 to 20.

Test plan :
- Use UNIMARC catalogue
- Define in framework value builder unimarc_field_210c on 210$c
- Create autority type EDITORS with heading 200$b
- Create 22 authorities of that type
- Index those new authorities
- Create a new biblio record
- Click on 210$c plugin
- Click on "Search"
- You see 20 results
- Click on page 2
=> Without patch you get empty table
=> With patch you get 2 results
- Check that you see "Results 21 to 22 of 22"
- Delete 2 autorities and retest

Works as intended.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19456: Make patron-title ability to be generated with or without html tags
Josef Moravec [Fri, 13 Oct 2017 06:44:55 +0000 (06:44 +0000)]
Bug 19456: Make patron-title ability to be generated with or without html tags

Modified pages:
circ/circulation.pl
circ/circulation_batch_checkouts.pl
members/boraccount.pl
members/files.pl
members/holdshistory.pl
members/housebound.pl
members/moremember.pl
members/notices.pl
members/purchase-suggestions.pl
members/readingrec.pl
members/routing-lists.pl
members/statistics.pl

Test plan:
0) Do not apply the patch
1) Have a patron with title/salution filled in
2) Confirm bug, go for example to circ/circulation page and see there is
html in <title> tag (you can see it in your browser page/window title)
3) Apply the patch
4) Go through circulation/patron pages (see modified page above) and
confirm there is no html in <title> tag, but on the page itself the
salutation should be in <span class="patron-title">

Signed-off-by: David Bourgalt <david.bourgault@inlibro.com>
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 19640: fix OPAC IdRef webservice display
Fridolin Somers [Thu, 16 Nov 2017 14:22:48 +0000 (15:22 +0100)]
Bug 19640: fix OPAC IdRef webservice display

The OPAC webservice IdRef display was broken.
The call returns results but citations where empty.
Maybe the webservice has changed.

This patch corrects the fetch of datas in result.
Also fixes a small HTML missing tag tr.
Also adds a comment with link to official doc :
http://documentation.abes.fr/aideidrefdeveloppeur/index.html#MicroWebBiblio

Test plan :
1) Enable system preference IdRef
2) Choose an existing PPN like 032581270
3) Look result on : https://www.idref.fr/services/biblio/032581270.json
4) Call in OPAC website : /cgi-bin/koha/opac-idref.pl?unimarc3=032581270
5) Without patch you see only one role containing empty rows
6) With patch you see all roles with correct rows

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: removed unused @unimarc3 (not to be confused with $unimarc3).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19646: (QA follow-up) Fix tab character
Marcel de Rooy [Fri, 24 Nov 2017 08:27:14 +0000 (09:27 +0100)]
Bug 19646: (QA follow-up) Fix tab character

Resolve qa tools warning:
 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_linking_section.tt
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 172)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19646: fix value_builder marc21_linking_section template
Fridolin Somers [Fri, 17 Nov 2017 12:38:06 +0000 (13:38 +0100)]
Bug 19646: fix value_builder marc21_linking_section template

When using marc21_linking_section cataloging plugin, you get the error :
Template process failed: undef error - The method selected is not
covered by tests! at /home/koha/src/C4/Templates.pm line 122.

It commes from [% IF ( itypeloo.selected ) %], selected is not defined
in itypeloo.

This patch removes this condition because all item types are fetched
from database, there is not one selected. It sets "All item types" as
selected. Also correctes two errors in HTML : ending form and div,
"<a_class=" instead of "<a class="

Test plan :
1) Use a MARC21 database
2) Define marc21_linking_section cataloging plugin in framework, on
   773$t for example
3) Create a new biblio record
4) Click on icon in 773$t
5) Check plugin works fine

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19683: Fix authority types in tools/export template
David Bourgault [Wed, 22 Nov 2017 19:35:27 +0000 (14:35 -0500)]
Bug 19683: Fix authority types in tools/export template

Fixes the bug by correcting the variable names in the template.

To test:
1) Tools > Export > Export authority records
2) Authority Types dropdown is not empty

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Changing the export script and unblessing is not needed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19766: (bug 19058 follow-up) Fix Preview routing slip
Jonathan Druart [Wed, 6 Dec 2017 19:33:56 +0000 (16:33 -0300)]
Bug 19766: (bug 19058 follow-up) Fix Preview routing slip

This patch fixes the following errors:
The method reserve_id is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 859.
The method set is not covered by tests at /home/vagrant/kohaclone/C4/Reserves.pm line 871.
Can't call method "store" on an undefined value at /home/vagrant/kohaclone/C4/Reserves.pm line 871.

This is caused by
  commit ba1f2f93ef58c8dd935add3e215facdd4a589d12
    Bug 19058: Move C4::Reserves::GetReserveId to the Koha namespace

We are calling ->reserve_id on a Koha::Holds set.

Test plan:
- Serials -> Find subscription -> "Edit routing list" in the sidebar
- Add 1+ recipients
- Save -> "Save and preview routing slip"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoDBRev 17.11.00.000 v17.11.00
Jonathan Druart [Mon, 27 Nov 2017 15:28:18 +0000 (12:28 -0300)]
DBRev 17.11.00.000

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoAdd release notes for Koha 17.11
Jonathan Druart [Mon, 27 Nov 2017 15:27:39 +0000 (12:27 -0300)]
Add release notes for Koha 17.11

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoTranslation updates for Koha 17.11.00
Bernardo Gonzalez Kriegel [Mon, 27 Nov 2017 12:31:19 +0000 (09:31 -0300)]
Translation updates for Koha 17.11.00

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19695: Fix another instance of ->find in list context (uncertainprice.pl)
Stefan Berndtsson [Mon, 27 Nov 2017 11:33:21 +0000 (12:33 +0100)]
Bug 19695: Fix another instance of ->find in list context (uncertainprice.pl)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update timeline (2 new devs)
Jonathan Druart [Sun, 26 Nov 2017 19:37:35 +0000 (16:37 -0300)]
Bug 7143: Update timeline (2 new devs)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19675: Fix update notice templates when they are translatable
Andreas Jonsson [Sun, 26 Nov 2017 17:10:38 +0000 (14:10 -0300)]
Bug 19675: Fix update notice templates when they are translatable

Avoid the following error:
DBD::mysql::db do failed: Duplicate entry
'acquisition-xxx--email-default' for key 'PRIMARY' [for Statement "

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19536: Odd number of elements in anonymous hash in svc/bib
Marcel de Rooy [Fri, 27 Oct 2017 09:38:31 +0000 (11:38 +0200)]
Bug 19536: Odd number of elements in anonymous hash in svc/bib

Resolve:
Odd number of elements in anonymous hash at svc/bib line 69.
Odd number of elements in anonymous hash at svc/bib line 118.

You can see such warnings when testing the Rancor editor.

Replacing url_param by param in fetch_bib since it is a GET call.
Not sure about doing the same in update_bib since that is a POST.
The scalar context will resolve the odd number warns.

Adding a scalar in svc/new_bib too.

Test plan:
Try URL /cgi-bin/koha/svc/bib/[number] with and without the patch.

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>
6 years agoBug 18357: Handle unlimited on-site checkouts
Jonathan Druart [Thu, 2 Nov 2017 16:22:31 +0000 (13:22 -0300)]
Bug 18357: Handle unlimited on-site checkouts

If on-site checkouts are set to unlimited (i.e. NULL/undef), they are
currently blocked.

Test plan:
1/ Set All/All rule with Unlimited/unlimited for normal/onsite checkouts
2/ Will be able to perform onsite checkout
3/ Edit rule to be 15/Unlimited normal/onsite
4/ Will be able to perform onsite checkout
=> Without this patch it was blocked
5/ Set rule to 15/15
6/ Onsite checkouts work again

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18712: (QA follow-up) Add count of tests
Nick Clemens [Mon, 13 Nov 2017 13:43:05 +0000 (13:43 +0000)]
Bug 18712: (QA follow-up) Add count of tests

Before patches we did 47 tests or none, we should plan the same number
of tests now

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18712: Remove unecessary fixtures
Jonathan Druart [Thu, 2 Nov 2017 13:26:08 +0000 (10:26 -0300)]
Bug 18712: Remove unecessary fixtures

2 fixtures are in a subroutine that is never called, it can be removed

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18712: Fix t/Matcher.t if DB is empty
Jonathan Druart [Thu, 2 Nov 2017 13:13:46 +0000 (10:13 -0300)]
Bug 18712: Fix t/Matcher.t if DB is empty

t/Matcher.t is failing with an empty DB, the data are not mocked
correctly

Test plan:
drop your DB and recreate it without any data and prove t/Matcher.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19626: (QA follow-up) Small optimization
Marcel de Rooy [Fri, 17 Nov 2017 08:23:40 +0000 (09:23 +0100)]
Bug 19626: (QA follow-up) Small optimization

We are only using $calendar when the pref is set.
Date calculation can be moved in if-else structure.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19626: Calculate expiration date for existing holds based on waitingdate
Nick Clemens [Wed, 15 Nov 2017 13:03:57 +0000 (13:03 +0000)]
Bug 19626: Calculate expiration date for existing holds based on waitingdate

To test:
1 - Have/create a 16.11 instance with some waiting holds
2 - Those holds should not have an expirationdate
3 - Make sure some of the holds are waiting longer than
ReservesMaxPickupDelay
BACKUP THE DB
4 - Upgrade to 17.05 (or later)
5 - Check the expirationdate for the holds
6 - The date wil be in the future (curdate + delay)
7 - Restore DB
8 - Apply patch
9 - Run the upgrade again
10 - expirationdate should now be based on waitingdate

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19596: Don't try to get hold or items count for non-existent biblios
Nick Clemens [Wed, 8 Nov 2017 17:55:00 +0000 (17:55 +0000)]
Bug 19596: Don't try to get hold or items count for non-existent biblios

Patch applies and works as expected.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19481: Set default sort options as sortable in ES default mappings
Nick Clemens [Wed, 18 Oct 2017 10:29:24 +0000 (10:29 +0000)]
Bug 19481: Set default sort options as sortable in ES default mappings

To test:
1 - Setup Koha with ES
2 - perform a search
3 - try sorting by pubdate, acqdate, popularity, or title
4 - Search fails!
5 - Apply patch
6 - visit:
/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
7 - Re-index ES
8 - Perform search
9 - All sorting options should work

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18131: Followup - Use data if biblionumber_tag < 10
Nick Clemens [Wed, 1 Nov 2017 16:13:23 +0000 (16:13 +0000)]
Bug 18131: Followup - Use data if biblionumber_tag < 10

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18131: ES - Fix matching staged records - Authority
Jonathan Druart [Thu, 23 Mar 2017 17:44:54 +0000 (14:44 -0300)]
Bug 18131: ES - Fix matching staged records - Authority

Occurrences of C4::AuthoritiesMarc::SearchAuthorities must be replaced
by search_auth_compat.

You need to define the search index of matching rule with one of the
values defined in %koha_to_index_name (from
Koha::SearchEngine::Elasticsearch::QueryBuilder::build_authorities_query_compat)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18131: ES - Fix matching staged records
Jonathan Druart [Mon, 27 Feb 2017 13:20:48 +0000 (14:20 +0100)]
Bug 18131: ES - Fix matching staged records

The code in C4::Matches::get_matches is terrible and a bug has been introduced
by bug 12478 because of its way to handle uniqueness.

If search engine is elastic, simple_search_compat returns array ref of MARC::Record,
used as a string for the key of the matches hashref we get things like
"MARC::Record=HASH(0x8f76ab0)".
Yes, terrible...

The file is never staged and we get an internal server error:
    stage-marc-import.pl: Can't locate object method "fields" via package "MARC::Record=HASH(0x8f76ab0)" (perhaps you forgot to load "MARC::Record=HASH(0x8f76ab0)"?) at /home/vagrant/kohaclone/C4/Biblio.pm line 2691

To recreate the issue:
- Set SearchEngine == Elastic
- Create a matching rule on 999$c (you need to edit the existing one and specify
'Local-number' as search index, not 'local-number')
- Import a file with bibliographic records and use the matching rule you defined.

Test plan:
Import authority and bibliographic records with Zebra and Elastic using a matching rule.
Everything should work correctly.

Note: I found a bug when importing authorities using Elastic, see bug 17255 comment 38.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19559: Add '-' to list of characters we don't split search terms on
Nick Clemens [Wed, 1 Nov 2017 15:47:39 +0000 (15:47 +0000)]
Bug 19559: Add '-' to list of characters we don't split search terms on

Test plan assumes
QueryAutoTruncate = automatically
SearchEngine = Elasticsearch

To test:
0 - Apply Unit test patch only
1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
2 - Should fail
3 - Apply this patch
4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
5 - should pass
6 - search for 'Local-number:"4"' (or a vlid biblionumber)
7 - should get expected result

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19559: Add tests
Nick Clemens [Wed, 1 Nov 2017 15:46:59 +0000 (15:46 +0000)]
Bug 19559: Add tests

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19651: SIP/ILS/Item misses title and author
Stefan Berndtsson [Thu, 23 Nov 2017 13:43:18 +0000 (14:43 +0100)]
Bug 19651: SIP/ILS/Item misses title and author

Signed-off-by: Benjamin Rokseth <bensinober@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended $item->biblio by $biblio.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19655: Add tests
Jonathan Druart [Sun, 26 Nov 2017 15:55:27 +0000 (12:55 -0300)]
Bug 19655: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19655: Make To.json escape doesn't escape newlines to create valid JSON
Kyle M Hall [Mon, 20 Nov 2017 16:05:35 +0000 (11:05 -0500)]
Bug 19655: Make To.json escape doesn't escape newlines  to create valid JSON

JSON does not allow real line-breaks. If a field contains them and they are not escaped, a JSON parser will be unable to convert the stringified JSON back into an object.

This is clearly exemplified by the guarantor search, where a multi-line note on the guarantor's record will break the ability to select that guarantor.

Test Plan:
1) Create Patron A with a "Circulation note" that has multiple lines in it
2) Create Patron B
3) Attempt to set Patron A to be the guarantor for Patron B
4) Note selecting the patron does nothing
5) Apply this patch
6) Repeat step 3
7) Selecting the guarantor now works!

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18547: (QA follow-up) Add comments to make tests clearer
Nick Clemens [Mon, 13 Nov 2017 15:34:53 +0000 (15:34 +0000)]
Bug 18547: (QA follow-up) Add comments to make tests clearer

Tests had some confusion with names and results, though they do seem to
cover the changes here.

I believe the tests highlight that ReserveControlBranch has no effect,
and possibly it should? Beyond the scope here but left those tests
for future work to be done

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18547: On shelf holds allowed > "If all unavailable" ignores default hold policy
Mirko Tietgen [Wed, 3 May 2017 19:13:49 +0000 (21:13 +0200)]
Bug 18547: On shelf holds allowed > "If all unavailable" ignores default hold policy

If in the circ rules matrix you set "On shelf holds allowed" to "If all unavailable",
default hold policy "From home library" is ignored.

Test plan:

- Have a test user from one branch (eg Centerville)

- Set "On shelf holds allowed" to "If all unavailable" for your patron and item
  category (or everyone and everything)
- For "Default checkout, hold and return policy", set hold policy to "From home library"
  -> make sure there is no "Default holds policy by item type" to override the setting

- Have two items for a record.
  1. An item with home branch same as test user (eg Centerville)
  -> check this item out to somebody else
  2. an item with a different home branch (eg Fairfield)
  -> available, not checked out
- Try to place a hold for your test user. Does not work.

- Apply the patch
- Try to place a hold. Should work now.

Followed test plan, worked as intended
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Followed test plan in the intranet and OPAC, worked as intended.
With few assumptions made:
- when the hold works, should be on the item 1 (Centerville)
  item 2 is only there to trigger the bug
- the circ rules were identically setup on each branch and in "Standard rules for all libraries"
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18547: Add tests
Jonathan Druart [Thu, 31 Aug 2017 18:34:20 +0000 (15:34 -0300)]
Bug 18547: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Fix translatable-templates.t failure
Jonathan Druart [Thu, 9 Nov 2017 17:22:54 +0000 (14:22 -0300)]
Bug 7317: Fix translatable-templates.t failure

Failed with
 /tmp/Lqv0BH2xC9:7979:13: invalid multibyte sequence
 msgmerge: found 1 fatal error

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: DBRev 17.06.000.028
Jonathan Druart [Thu, 9 Nov 2017 15:21:11 +0000 (12:21 -0300)]
Bug 7317: DBRev 17.06.000.028

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: DBIC Schema changes
Jonathan Druart [Thu, 9 Nov 2017 15:16:59 +0000 (12:16 -0300)]
Bug 7317: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Display all the libraries, not only one
Jonathan Druart [Thu, 9 Nov 2017 16:25:13 +0000 (13:25 -0300)]
Bug 7317: Display all the libraries, not only one

Before this patch only the first library defined in the system where
displayed.
TODO: Make sure we want to display all the libraries and not a
"filtered" list
see `git grep PROCESS options_for_libraries libraries|grep unfiltered`

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Make fields mandatory when sending emails
Jonathan Druart [Thu, 9 Nov 2017 16:24:43 +0000 (13:24 -0300)]
Bug 7317: Make fields mandatory when sending emails

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Do not use GET for deletion requests
Jonathan Druart [Thu, 9 Nov 2017 15:50:00 +0000 (12:50 -0300)]
Bug 7317: Do not use GET for deletion requests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Simplify column headers
Jonathan Druart [Thu, 9 Nov 2017 15:04:29 +0000 (12:04 -0300)]
Bug 7317: Simplify column headers

It will help translators (remove TT tags from po files) and simplify the
code. We do not need this translate_column that is used only once.
It also removes sorting option on the last column (actions)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (QA followup) Make query parameters consistent with other endpoints
Tomas Cohen Arazi [Thu, 9 Nov 2017 14:02:46 +0000 (11:02 -0300)]
Bug 7317: (QA followup) Make query parameters consistent with other endpoints

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Remove traces of UnmediatedILL
Tomas Cohen Arazi [Wed, 8 Nov 2017 19:37:52 +0000 (16:37 -0300)]
Bug 7317: Remove traces of UnmediatedILL

This patch removes references to UnmediatedILL. This feature is introduced on
a separate bug.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (followup) Remove extra columns from backends on the main list
Tomas Cohen Arazi [Wed, 8 Nov 2017 19:12:35 +0000 (16:12 -0300)]
Bug 7317: (followup) Remove extra columns from backends on the main list

This patch removes the extra columns functionality, simplifying the code.
It removes redundant code (in both Perl and JS), unused vars.

It removes the use of here_link and hardcodes the script path on the template.

It also adjusts the AJAX call so it uses the 'library' param instead of 'branch'.

The library column now displays the library name instead of the ID.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (QA followup) Rename 'branch' for 'library'
Tomas Cohen Arazi [Wed, 8 Nov 2017 19:08:01 +0000 (16:08 -0300)]
Bug 7317: (QA followup) Rename 'branch' for 'library'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Fix more translation issues
Jonathan Druart [Tue, 7 Nov 2017 20:26:13 +0000 (17:26 -0300)]
Bug 7317: Fix more translation issues

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: use preventDefault to prevent the scrollbar to move to the top
Jonathan Druart [Tue, 7 Nov 2017 19:07:31 +0000 (16:07 -0300)]
Bug 7317: use preventDefault to prevent the scrollbar to move to the top

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Add missing 'use Encode' statement
Jonathan Druart [Tue, 7 Nov 2017 19:52:09 +0000 (16:52 -0300)]
Bug 7317: Add missing 'use Encode' statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (QA followup) Fix capitalization and terminology issues
Tomas Cohen Arazi [Mon, 6 Nov 2017 19:15:32 +0000 (16:15 -0300)]
Bug 7317: (QA followup) Fix capitalization and terminology issues

This patch fixed terminology issues on the UI, and removes CSS-based
case forcing for column names.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Handle missing email addresses gracefuly
Tomas Cohen Arazi [Tue, 7 Nov 2017 15:05:04 +0000 (12:05 -0300)]
Bug 7317: Handle missing email addresses gracefuly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (QA followup) ILL sysprefs belong to circulation section
Tomas Cohen Arazi [Tue, 7 Nov 2017 15:04:21 +0000 (12:04 -0300)]
Bug 7317: (QA followup) ILL sysprefs belong to circulation section

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (followup) Make tests independent of data on the DB
Tomas Cohen Arazi [Mon, 6 Nov 2017 16:51:43 +0000 (13:51 -0300)]
Bug 7317: (followup) Make tests independent of data on the DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Add partner_code checks to abot page
Tomas Cohen Arazi [Mon, 6 Nov 2017 15:45:24 +0000 (12:45 -0300)]
Bug 7317: Add partner_code checks to abot page

This patch adds checks to the configured (or fallback) partner_code.
It produces two different warnings:

- Configured partner_code doesn't match an existing patron category
code.
- partner_code is not defined, a fallback to ILLLIBS is done

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: opac.css update
Tomas Cohen Arazi [Fri, 3 Nov 2017 18:28:56 +0000 (15:28 -0300)]
Bug 7317: opac.css update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (QA followup) Get rid of warnings from the tests
Tomas Cohen Arazi [Wed, 1 Nov 2017 19:29:54 +0000 (16:29 -0300)]
Bug 7317: (QA followup) Get rid of warnings from the tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Handle backend absense more gracefuly
Tomas Cohen Arazi [Tue, 31 Oct 2017 19:28:53 +0000 (16:28 -0300)]
Bug 7317: Handle backend absense more gracefuly

5/ This patch makes Koha::Illrequest->load_backend raise an exception
if the passed backend is invalid. This way we will catch more errors introduced.

The patch also disables the 'New Ill request' when no backends are available. Gets
rid of a related warnings.

Both OPAC and Intranet now display a warning message when no backends
are available.

Tests are added for the load_backend changes.

4/ This patch fixes the path for the checkboxes jquery plugin, and removes the include
for tablesorter, as this implementation uses Datatables. This is obviously code for older
Koha, ported to master.

TODO: There's something wrong on the styling. My idea is to get rid
of the custom column visualization tool, and have it display as regular
DataTables. We can then introduce the use of colvis on a separate bug
report.

Note: POD coverage for the exceptions file is wrongly tested. It is a false positive.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: QA followup
Magnus Enger [Tue, 31 Oct 2017 12:07:00 +0000 (12:07 +0000)]
Bug 7317: QA followup

This fixes some of the issues reported by the QA script, but not all.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Rewrite atomicupdate file
Tomas Cohen Arazi [Wed, 25 Oct 2017 18:34:34 +0000 (15:34 -0300)]
Bug 7317: Rewrite atomicupdate file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (followup) Fix id and class on body tag
Magnus Enger [Wed, 25 Oct 2017 09:52:26 +0000 (11:52 +0200)]
Bug 7317: (followup) Fix id and class on body tag

The HTML body tag looked like this:
<body id="acq_suggestion" class="acq">
Probably an overlooked copypasta. This patch changes it to:
<body id="illrequests" class="ill">
This should not have any visual side effects.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Adjust packages koha-conf.xml
Tomas Cohen Arazi [Tue, 24 Oct 2017 17:16:02 +0000 (14:16 -0300)]
Bug 7317: Adjust packages koha-conf.xml

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Original sign off message:
It's impossible to give a test plan for this...
I have implemented a "plugin" for Norwegian ILL (based on NCIP):
https://github.com/Libriotech/koha-illbackend-nncipp
Several issues have been discovered while writing the plugin, and
Alex has fixed them along the way. Currently I do not know about
any funcional issues, and I am happy to sign off.

Update:
I have applied the new patchset and done some exploratory testing,
using the Dummy backend. Everything seems to be fine after the
patches were re-arranged and with the followups from Tomas.
All tests pass.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (followup) Migrate endpoint to OpenAPI
Tomas Cohen Arazi [Mon, 23 Oct 2017 18:34:01 +0000 (15:34 -0300)]
Bug 7317: (followup) Migrate endpoint to OpenAPI

This patch moves the current endpoint implementation from Swagger2 to
the OpenAPI plugin.

It also takes advantage of the overloaded Koha::Illrequest::TO_JSON method
which has now the option to embed what's needed for the REST api.

The path spec is adjusted to fit OpenAPI, and some minor fixes are
applied:
- Missing 'metadata' query param
- 'ill' permissions should be required instead of 'borrowers'
- Full test coverage

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Overload Koha::Illrequest::TO_JSON
Tomas Cohen Arazi [Tue, 24 Oct 2017 16:43:51 +0000 (13:43 -0300)]
Bug 7317: Overload Koha::Illrequest::TO_JSON

This patch implements an overloaded TO_JSON method, that introduces
the option to (selectively) embed information required on the REST
api.

Tests are included for the new method.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: (QA folowup) 404 if module is disabled (intranet)
Tomas Cohen Arazi [Mon, 23 Oct 2017 18:33:17 +0000 (15:33 -0300)]
Bug 7317: (QA folowup) 404 if module is disabled (intranet)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Interlibrary loans framework for Koha.
Alex Sassmannshausen [Fri, 3 Feb 2017 15:58:35 +0000 (16:58 +0100)]
Bug 7317: Interlibrary loans framework for Koha.

This Commit is at the heart of adding an interlibrary loans framework
for Koha.  The framework does not prescribe a particular workflow.
Instead it provides a general framework that can be extended &
implemented by individual backends whose responsibility it is to
implement a specific workflow.

The module is largely self-sufficient: it adds new tables to the Koha
database and touches only a few files in the Koha source tree.

Primarily, we add our files to the Makefile and the koha-conf.xml,
define ill paths for the REST API, and introduce links from the main
intranet, opac pages & user permissions.

Outside of this we simply add new files & functionality.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7317: Add SQL templates & sysprefs.
Alex Sassmannshausen [Thu, 22 Sep 2016 14:20:14 +0000 (16:20 +0200)]
Bug 7317: Add SQL templates & sysprefs.

* installer/data/mysql/atomicupdate/ill_tables.sql: New file.
* installer/data/mysql/kohastructure.sql: Add tables.
* installer/data/mysql/sysprefs.sql: Add sysprefs.
* installer/data/mysql/userflags.sql: Add userflags.
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref:
  Add sysprefs to UI.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18882: (follow-up) DBRev 17.06.000.027
Jonathan Druart [Wed, 8 Nov 2017 17:34:13 +0000 (14:34 -0300)]
Bug 18882: (follow-up) DBRev 17.06.000.027

No idea how I did that...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18894: (QA follow-up) POD changes
Marcel de Rooy [Fri, 3 Nov 2017 07:50:08 +0000 (08:50 +0100)]
Bug 18894: (QA follow-up) POD changes

Add limit parameter to POD section.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18894: Add ability to limit the number of messages sent by process_message_queue...
Kyle M Hall [Wed, 5 Jul 2017 14:33:16 +0000 (10:33 -0400)]
Bug 18894: Add ability to limit the number of messages sent by process_message_queue.pl at a time

Having the ability to limit the number of messages sent by process_message_queue.pl on a single run would be very useful for controlling home many messages are sent at a given time. This can help prevent too many messages being sent out at once and getting flagged as a spammer.

Test Plan:
1) Apply this patch
2) Generate some number of messages in the message queue
3) Run process_message_queue.pl with the new --limit option,
   set limit to a number smaller than the number of pending messages
4) After the script has run, check the database and note that only
   a number of pending messages were sent, and that the remaining amount
   of pending messages is the original amount less the number specified
   as the limit

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19537: (QA follow-up) Consistent structures
Marcel de Rooy [Fri, 3 Nov 2017 07:24:15 +0000 (08:24 +0100)]
Bug 19537: (QA follow-up) Consistent structures

The subfield_loop structure should contain things like:
$VAR1 = {
          'marc_subfield' => 'v',
          'marc_values' => [
                             'form'
                           ]
        };

This patches replaces the list by an array ref to restore consistency,
although Template Toolkit does not really care. Both work.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19537: Correct addition of source subfield from authorities
Nick Clemens [Fri, 27 Oct 2017 10:43:03 +0000 (10:43 +0000)]
Bug 19537: Correct addition of source subfield from authorities

To test:
1 - Find or create a subject authority
2 - Define 008/11 as 's' or 'r'
3 - Add 2nd indicator '7' to main heading
4 - Open or create a bibliographic record
5 - Link to the authority created above
6 - Subfield $2 is not set
7 - Apply patch
8 - Repeat linking, subfield $2 should be set

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18882: DBIC Schema changes
Jonathan Druart [Wed, 8 Nov 2017 16:33:40 +0000 (13:33 -0300)]
Bug 18882: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18882: DBRev 17.06.000.027
Jonathan Druart [Wed, 8 Nov 2017 16:31:06 +0000 (13:31 -0300)]
Bug 18882: DBRev 17.06.000.027

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18882: (QA follow-up) Ensure stats with no or undef location are set to NULL...
Kyle M Hall [Fri, 30 Jun 2017 14:37:14 +0000 (10:37 -0400)]
Bug 18882: (QA follow-up) Ensure stats with no or undef location are set to NULL in db

Confirm that only NULL or a string are in the location field of the
statistics table. Test with two items, one with shelving location set,
and one without it set.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18882: Add location code to statistics table for checkouts and renewals
Kyle M Hall [Thu, 29 Jun 2017 15:10:18 +0000 (11:10 -0400)]
Bug 18882: Add location code to statistics table for checkouts and renewals

Some libraries wish to track what the current location of items was at the time they were checked out. This will help libraries track which physical locations in the library patrons are more likely to check out a given book from.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Check out an item that has a location set
4) Renew that item
5) View the checkout and renewal in the statistics table,
   verify each has the location column populated correctly

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19420: (QA Follow-up) Change in error reporting affects upload.pl
Marcel de Rooy [Mon, 6 Nov 2017 10:28:46 +0000 (11:28 +0100)]
Bug 19420: (QA Follow-up) Change in error reporting affects upload.pl

The change from the first patch requires a similar change in upload.pl
when a few error codes are passed to the template.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by deleting a temporary file manually and downloading or deleting
the file from the upload search results.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19420: (Follow-up) Add errors on other pages
Nick Clemens [Fri, 3 Nov 2017 10:33:00 +0000 (10:33 +0000)]
Bug 19420: (Follow-up) Add errors on other pages

Fix error array (add '0' value)
Update errors on other places using upload.js

Eventually these should all be using the same code in a js file

upload.tt already dealt with these errors, but has diff code, made it
work with new error syntax

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Removed the added js comment in upload.tt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19420: (QA Follow-up) Fix test, correct POD
Marcel de Rooy [Fri, 3 Nov 2017 09:19:57 +0000 (10:19 +0100)]
Bug 19420: (QA Follow-up) Fix test, correct POD

The test needs the code level in the error hash now.
And POD is adjusted accordingly.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19420: Improve display of errors from failure of uploading file during stage...
Nick Clemens [Thu, 19 Oct 2017 10:39:23 +0000 (10:39 +0000)]
Bug 19420: Improve display of errors from failure of uploading file during stage import

To test:
1 - sudo chown www-data:www-data /tmp/koha_kohadev_upload/ (or your
                relevant dir and user)
2 - Attempt to stage a file
3 - Error message is: Upload status: Failed
4 - Apply patch
5 - Repeat upload
6 - Error is now: Failed - Directory is not writeable:
/tmp/koha_kohadev_upload
7 - Trigger the other errors if you can and note better responses

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 10748: DBRev 17.06.000.026
Jonathan Druart [Wed, 8 Nov 2017 16:28:50 +0000 (13:28 -0300)]
Bug 10748: DBRev 17.06.000.026

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 10748: (QA follow-up) Add comment in SIP's do_checkin
Marcel de Rooy [Mon, 6 Nov 2017 08:43:02 +0000 (09:43 +0100)]
Bug 10748: (QA follow-up) Add comment in SIP's do_checkin

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 10748: Add tests
Jonathan Druart [Fri, 3 Nov 2017 16:27:12 +0000 (13:27 -0300)]
Bug 10748: Add tests

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 10748: Add the ability to block return of lost items
Jonathan Druart [Wed, 4 Oct 2017 23:54:24 +0000 (20:54 -0300)]
Bug 10748: Add the ability to block return of lost items

Mimicking what does BlockReturnOfWithdrawnItems we can easily add a new
syspref to block return of lost items.
This patch adds BlockReturnOfLostItems, if set to 'Block' a item marked
as lost cannot be checked in.

Test plan:
1/ Set BlockReturnOfLostItems to 'Do not block'
2/ Check an item out to a patron
3/ Edit the item and mark it as lost (*)
4/ Check the item in
=> The item is checked in
5/ Edit the item and remove the lost status
6/ Check the item out again
7/ Edit the item and mark it as lost (*)
8/ Check the item in
=> The item is not checked in

(*) There are 2 ways to mark an item lost:
- From the item list view (/catalogue/moredetail.pl?biblionumber=42)
If you set the lost status from this form, the issue will be returned
Maybe this should be optional (?)

- From the edit items form (/cataloguing/additem.pl?biblionumber=42)
It is the form you must use to not mark the issue returned.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19176: (QA follow-up) few cosmetic changes
Jonathan Druart [Fri, 3 Nov 2017 16:50:27 +0000 (13:50 -0300)]
Bug 19176: (QA follow-up) few cosmetic changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19576: Remove extra 'use Koha::Biblios' statement
Mark Tompsett [Fri, 3 Nov 2017 13:58:28 +0000 (09:58 -0400)]
Bug 19576: Remove extra 'use Koha::Biblios' statement

Marcel noticed this while QA'ing another bug.

TEST PLAN
---------
Apply patch and confirm the page still loads and works as expected.
Run Koha QA Test tools

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 17989: (QA follow-up) Replace bad dots in SuggestionEngine_ExplodedTerms.t
Marcel de Rooy [Fri, 27 Oct 2017 05:49:51 +0000 (07:49 +0200)]
Bug 17989: (QA follow-up) Replace bad dots in SuggestionEngine_ExplodedTerms.t

SuggestionEngine_ExplodedTerms.t uses paths like /../.. or /.. in order
to find a template in opac-tmpl.
Sub badtemplatecheck does not like these paths.
Using Cwd::abs_path to resolve the situation (rel2abs does not).

Test plan:
Run again t/db_dependent/SuggestionEngine_ExplodedTerms.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 17989: Final changes
Marcel de Rooy [Wed, 25 Jan 2017 14:32:01 +0000 (15:32 +0100)]
Bug 17989: Final changes

[1] The template sco/printslip.tt is in the regular modules directory.
Should not be prefixed with a slash.

Test plan:
[1] Try to find another occurrence just like the one corrected in
    sco/printslip.pl where an absolute path is passed to gettemplate or
    get_template_and_user. I already tried several regex variations
    while git grepping template_name, but you may still find one..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Removed the changes for svc/members/search. Not needed.
Commit message adjusted accordingly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 17989: Resolve "verbatim paragraph in NAME section" warning in C4::Templates
Marcel de Rooy [Wed, 26 Jul 2017 11:14:13 +0000 (13:14 +0200)]
Bug 17989: Resolve "verbatim paragraph in NAME section" warning in C4::Templates

*** WARNING: Verbatim paragraph in NAME section at line 28 in file C4/Templates.pm

Test plan:
Run podchecker on C4::Templates and verify that the warning is resolved.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 17989: Include full path logic in _get_template_file
Marcel de Rooy [Wed, 25 Jan 2017 09:22:13 +0000 (10:22 +0100)]
Bug 17989: Include full path logic in _get_template_file

Similar to the full path test in sub themelanguage, this patch makes a
change in _get_template_file. This allows you to pass a template
outside the modules directory to get_template_and_user. (Note: the sub
badtemplatecheck already blocks bad paths.)

Especially, this would be helpful for plugins using templates. As can be
seen in Templates.pm, a change was made earlier to overwrite the filename
for a plugin in sub gettemplate. This exception can now be removed.

Also note the small change in Koha/Plugin/Base.pm; mbf_path is already
absolute and if we pass a full path, we do not need it. This allows use of
a regular Koha template or a shared template between plugins (as long as
badtemplatecheck allows the path).

What are the side-effects of this change?
[1] We should not pass absolute paths if we mean relative ones.
    A follow-up patch deals with one occurrence in the codebase.
    No regressions for regular use.
[2] Plugins can call get_template_and_user directly or go via get_template
    in Koha/Plugin/Base (absolute paths don't go via mbf_path).

Note: replaced two single quotes in Auth.pm to show template name in test
description.

Test plan:
[1] Open some page on OPAC or staff client to trigger a template.
[2] Run t/db_dependent/Auth.t to verify not allowing some bad templates.
[3] Run t/db_dependent/Templates.t to verify an absolute path.
[4] Run t/db_dependent/Plugins.t to verify using templates in a plugin.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 17989: Extend bad template check
Marcel de Rooy [Mon, 30 Jan 2017 08:24:22 +0000 (09:24 +0100)]
Bug 17989: Extend bad template check

The check is now extended by only allowing templates from the regular
Koha template directories and additional plugin directories as defined
in koha-conf.xml.

Note: In order to prevent an uninitialized warning on $theme from sub
themelanguage for a not-existing file, I added a trivial assignment. Will
get further attention in a follow-up.

Test plan:
[1] Run t/db_dependent/Auth.t
[2] Run t/db_dependent/Templates.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 17989: Centralize bad template check
Marcel de Rooy [Mon, 30 Jan 2017 07:43:45 +0000 (08:43 +0100)]
Bug 17989: Centralize bad template check

The bad template check in get_template_and_user can be removed, since
this check has been added in gettemplate on bug 18010.

The check moves here to a new sub in C4::Templates. And will be extended
in a follow-up.

Removed unused variable $path in gettemplatefile.

Test plan:
[1] Run t/db_dependent/Auth.t (get_template_and_user bad calls).
[2] Run t/db_dependent/Templates.t (bad call to gettemplate).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 7143: Update 'Koha development team' list
Jonathan Druart [Tue, 31 Oct 2017 16:25:13 +0000 (13:25 -0300)]
Bug 7143: Update 'Koha development team' list

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 7143: Make about.pl knows about the new epoch column
Jonathan Druart [Tue, 31 Oct 2017 16:09:47 +0000 (13:09 -0300)]
Bug 7143: Make about.pl knows about the new epoch column

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 7143: Add missing entries
Jonathan Druart [Tue, 31 Oct 2017 15:53:12 +0000 (12:53 -0300)]
Bug 7143: Add missing entries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 7143: Add a new "Epoch" column to the history.txt
Jonathan Druart [Tue, 31 Oct 2017 14:19:09 +0000 (11:19 -0300)]
Bug 7143: Add a new "Epoch" column to the history.txt

To allow sort easily. It also fix a few typo and remove 1 duplicated line

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19539: (follow-up) Fix column index shift in cirulation rules
Jonathan Druart [Mon, 30 Oct 2017 14:14:53 +0000 (11:14 -0300)]
Bug 19539: (follow-up) Fix column index shift in cirulation rules

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19539: Fix column index shift in cirulation rules
Tomas Cohen Arazi [Fri, 27 Oct 2017 14:12:57 +0000 (11:12 -0300)]
Bug 19539: Fix column index shift in cirulation rules

This patch fixes an index shift introduced by bug 18857 when it introduced
a new column.

To test:
- On the Circulation and fine rules page
- Empty the value of 'Current on-site checkouts allowed' and save
- Notice 'Unlimited' shows on the saved rule.
- Click edit
=> FAIL: the 'Unlimited' string displays instead of the empty string on the editing row.
- Apply this patch
- Re-open the circ rules page
- Click edit
=> SUCCESS: An empty string fills the 'Unlimited' fields
- Sign off :-D

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19176: Fix how t::lib::Dates::compare handle timezone
Julian Maurice [Mon, 30 Oct 2017 14:41:47 +0000 (14:41 +0000)]
Bug 19176: Fix how t::lib::Dates::compare handle timezone

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19176: followup - fix POD in t/lib/Dates.pm
Josef Moravec [Mon, 23 Oct 2017 22:29:24 +0000 (22:29 +0000)]
Bug 19176: followup - fix POD in t/lib/Dates.pm

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19176: Reduce the number of seconds to 5
Jonathan Druart [Mon, 23 Oct 2017 14:38:58 +0000 (11:38 -0300)]
Bug 19176: Reduce the number of seconds to 5

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19176: Compare the number of seconds when comparing dates in tests
Jonathan Druart [Fri, 25 Aug 2017 20:56:52 +0000 (17:56 -0300)]
Bug 19176: Compare the number of seconds when comparing dates in tests

  #   Failed test 'borrowers.updated_on should have been set to now on creating'
  #   at t/db_dependent/Patrons.t line 74.
  #          got: '2017-08-10T20:53:03'
  #     expected: '2017-08-10T20:53:04'
  # Looks like you failed 1 test of 17.
  [20:53:15] t/db_dependent/Patrons.t .....................................

The plan here is to compare the number of seconds between two dates.
If < 60 the dates are consired as identicals.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19021: Fix Inventory columns sorting
Fridolin Somers [Wed, 2 Aug 2017 08:35:49 +0000 (10:35 +0200)]
Bug 19021: Fix Inventory columns sorting

In inventory result page, items are shown in a JS DataTable.
For an inventory with barcode file second column is not sortable for no reason.
For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed.

This patch corrects by setting default sort order on callnumber column.

Test plan :
- perform inventory with barcode file
- look at result table
- table is sorted by callnumber
=> Without patch second column is not sortable
=> With patch all columns are sortable
- perform inventory without barcode file
- look at result table
=> Without patch first column show sort icon and table is not sorted by callnumber
=> With patch first column is not sortable and table is sorted by callnumber

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>