]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 21038: Reserves should be holds
Owen Leonard [Mon, 16 Jul 2018 18:41:13 +0000 (18:41 +0000)]
Bug 21038: Reserves should be holds

This patch corrects the text of the warning about discharges cancelling
holds.

To test, apply the patch and view the discharge for a patron who has
holds:

 - "Borrower" is changed to "patron"
 - "reserves" is changed to "holds"
 - "canceled" (18 instances in the templates) is changed to "cancelled"
   (51 instances).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8202f95ad7001a5046f9f40e6322406b253ba3ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 585a10e070136b231d88b8ff4099b4085a2b656c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21141: Handle non-existent itemnumbers in batch item modification/deletion
Jonathan Druart [Mon, 6 Aug 2018 18:26:49 +0000 (15:26 -0300)]
Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion

The itemnumber list passed from a file in the batch item
modification/deletion tools is not tested.
Like barcodes we should make sure they refer to a valid items in the DB.

Test plan:
- Create a file with barcodes, itemnumbers and random lines
- Use the batch item modification and deletion tools with this file
You should see a table with a list of invalid barcodes and itemnumbers.

Without this patch you got the following error:
Can't call method "title" on an undefined value at
/home/vagrant/kohaclone/tools/batchMod.pl line 580

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>
(cherry picked from commit e8e29d3140007b9b92d97ed2f1df7445c6eeb4f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 54d960cb86b91bb21cc7c92e1feef9970faaf8a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19500: Add missing span for 'other'
Jonathan Druart [Fri, 17 Aug 2018 16:20:04 +0000 (13:20 -0300)]
Bug 19500: Add missing span for 'other'

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 717cb3f893e33a1f54299abbd81a5f9bc339a225)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9520e771374d5416595b182608209639f23b6b1b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19500: (QA follow-up) Add spans to ease translation
Katrin Fischer [Sun, 12 Aug 2018 19:42:30 +0000 (19:42 +0000)]
Bug 19500: (QA follow-up) Add spans to ease translation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a0d775b9cce90b6a029bd92eb3971383a05f55e2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f024667a0e32e8fc754c1bebfbaed6df82548e12)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19500: Make module names on letters overview page translatable
Katrin Fischer [Fri, 10 Aug 2018 22:54:11 +0000 (22:54 +0000)]
Bug 19500: Make module names on letters overview page translatable

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

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e9480937ae0a4bb901330138e1760d690d5f548)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1015a6e416ce99ca6060583085a25ea183d99017)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20994: Fix capitaization "Save to Lists"
Katrin Fischer [Wed, 8 Aug 2018 20:28:29 +0000 (20:28 +0000)]
Bug 20994: Fix capitaization "Save to Lists"

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d5296743a4b4e6e6004bdb68926a3584e55435e4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit acba1272764455af6164daa8e9246561b7b41bd3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoRevert "Bug 21353: Display checkboxes to merge patron even if cannot manage lists"
Fridolin Somers [Wed, 3 Oct 2018 13:41:59 +0000 (15:41 +0200)]
Revert "Bug 21353: Display checkboxes to merge patron even if cannot manage lists"

This reverts commit 63ab79d6e478d42f13ac48f62828a1059dff1aad.

6 years agoRevert "Bug 21353: (follow-up) same check for select/clear all links"
Fridolin Somers [Wed, 3 Oct 2018 13:41:49 +0000 (15:41 +0200)]
Revert "Bug 21353: (follow-up) same check for select/clear all links"

This reverts commit 3ef1e4ac01ceadc2721449b668dc0da376b6f3c0.

6 years agoBug 5458: DBRev 17.11.10.001
Nick Clemens [Wed, 26 Sep 2018 16:17:06 +0000 (16:17 +0000)]
Bug 5458: DBRev 17.11.10.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5becc84f5f2e8f82b765b5ebf3f87a84d89cfd8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d0affd28266fb9e7461521c703dd640e19c82b99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
(cherry picked from commit c59ef0452ccbae17de3b839da4fa2c9f7f6b2e6f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 892492cbda442564a33b1abdf374d43c024de22c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit eec74a2cd1847a859b4fab37c42882ba192ee560)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c5bb4d6529f9dcd2457639c8b7735dfc7001d244)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit cc3bc2920744e35256b45b784c9788a64fe6dd04)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f019c89c18733c0e0220f41012a06c3b39df595)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit a62742f4260425af8e69a88822b7affc9cc93c68)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 43b671ac858e9ae63b3ce8e74e555a41600bc383)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit d415e51180cac0152c2ab0f95e846b196883f42e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fe4c609d3224f3f71e4a000e2f7857efbefb71ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit bf908a5f07ffbd492c42483aace120dae8316048)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 28a404bc3124cb45863db8872cb0ee7c839fda5d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit d60b0a2e4d3359c127f1e801db9e35dd217f8790)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ffbd4d22e134ba9c1af511dcb0a56a4473f1a789)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit c6a26d2c9e767623c7bc0698297bbc165301e7ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c088efd6c959d12dd8c1743e3eeb9f12d41a77e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit db683b285cfb31deb9dbdafbc5a18e0b471ffa65)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 75b0e7a0787d82caa987afc67206fad2b5811e4c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 78124100ec6708de99bea3e4e181da3897130d0e)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a54c1b9a1ca86dcab11e4008727221edc42eb69a)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 7de47202f2876892524c8b68de962c0776f32881)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9f306898886efe1c2a29f2b622885ec1dfa4fe9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18635: Unit tests
Nick Clemens [Fri, 19 May 2017 01:07:11 +0000 (21:07 -0400)]
Bug 18635: Unit tests

I also adjust a few tests that assume value of $nb_of_patrons to not
rely on existing datas

To test:
1 - Apply this patch only
2 - Prove t/db_dependent/Koha/Patrons.t
3 - Tests fail
4 - Apply other patch
5 - Tests pass

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ac0f3b880a4220317ddde107c508c32f75b09aa1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e2d4b26a43e54d7e97a4da03cc294486d7c7922)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoUpdate release notes for 17.11.10 release v17.11.10
Fridolin Somers [Mon, 24 Sep 2018 14:15:04 +0000 (16:15 +0200)]
Update release notes for 17.11.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoIncrement version for 17.11.10 release
Fridolin Somers [Mon, 24 Sep 2018 14:10:00 +0000 (16:10 +0200)]
Increment version for 17.11.10 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoMerge remote-tracking branch 'translate/17.11.10-translate-20180924' into 17.11.x
Fridolin Somers [Mon, 24 Sep 2018 14:08:49 +0000 (16:08 +0200)]
Merge remote-tracking branch 'translate/17.11.10-translate-20180924' into 17.11.x

6 years agoBug 21288: correct DBRev 17.11.09.003
Fridolin Somers [Mon, 24 Sep 2018 14:05:35 +0000 (16:05 +0200)]
Bug 21288: correct DBRev 17.11.09.003

6 years agoTranslation updates for Koha 17.11.10
Koha translators [Mon, 24 Sep 2018 14:02:25 +0000 (11:02 -0300)]
Translation updates for Koha 17.11.10

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>
(cherry picked from commit cf5a92461835725fe44bb726c98bcfbf909dfdc8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 145eef6a9037b93cd8902f0a77582fcadbf517bc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 7a84297ac4b29f4bdaf1bc4d01def71eb924d4fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ad16c9f5b20525303eb631107883cb37e36de8cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 60788555b3d79902ccef9f20cf76d4c764efcba0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c28d8f0600806f9930d115b2fdbccc21f5e86436)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21288: DBRev 18.05.03.002
Nick Clemens [Sat, 15 Sep 2018 21:44:05 +0000 (21:44 +0000)]
Bug 21288: DBRev 18.05.03.002

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 11e513f83f0c5fdd0d47de14b7c09635faf58ae4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 44ce16d0069fdff7b487753277c11d368a083ccb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit cb406f72b0266c97ac904754cc9637035000f5ca)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40536fedd39a0a22c3e93a00721b573d66392e09)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit a6f8eac4edb6463d8ff16928d6f2cddcf4dfbfc2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 06f0209840d290bb1a7340f4b1af8d55e932f7c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit b0ef7174fe601bbf39408e455365ea563949b4bb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 31db0813d36f21a0c898b75841a3e34364619a84)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 2d6cf8bd7a0e290c8bb947ed1880f1e906d0e74c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9f221f9ae8b16846bd3b9b35b19d4b5434050f95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 83e515820abb6e2fa8ddf30f61b3f4972a48ed10)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 903b880f330026d476d761901a2099972159a94c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 030047da428521c248868e3ee5d655afd3bed05b)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7fe692bf0ec4dd6744c81c068c400927ccc0c54d)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit bf7082f854a1db9eb5b7eb77e5f450d018d8e07b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ee2d5ae04dc4c5fed9f09c9067c3de0037cdba8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 331af8521b5fba4b5553c182888a4017b2ce9c3a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 89f6aacecc787affd07856d6c092f21bacab7993)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 418c65d2e28eb6a2c9e3bb56505918434cf5f04c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1c58af16bedfe8502c0afb83912b2e4661871b93)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21267: Set X-FORWARDED-PROTO https if required
Tomas Cohen Arazi [Fri, 24 Aug 2018 13:45:52 +0000 (10:45 -0300)]
Bug 21267: Set X-FORWARDED-PROTO https if required

This patch makes the apache configuration for the reverse proxy
(required for Plack) so it sets the X-FORWARDED-PROTO header correctly
for Plack::Middleware::ReverseProxy to use it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Since we actually resolve 19799 now (Changing language on OPAC redirects
back to homepage), I will move that code to a new enh report.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 302dd7bf8233ebf640bfde82fc050f8b08b2757c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ee1eec9d255e3a9341c9e17558d6d1f835add5ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21168: Handle deleted checked-in items on checking in
Jonathan Druart [Fri, 10 Aug 2018 20:02:38 +0000 (17:02 -0300)]
Bug 21168: Handle deleted checked-in items on checking in

circ/returns.pl generates a server error when attempting to checkin an item while
the list of previously-returned items contains an item that has been deleted.
Error text: Can't call method "biblio" on an undefined value at /usr/share/koha/intranet/cgi-bin/circ/returns.pl line 606.

Test plan:
- checkout two items
- checkin item1
- on a separate tab, delete item1
- on the original tab (which still shows item1 in the list of Checked-In Items), attempt to check in item2
=> No error appears

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 823c76cdc58b7b80b365a4f313fed3462f0df720)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a87364d0ffbf906a4888f5d6d66e1a74cf280f58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21231: BlockReturnofLostItems does not prevent lost items being found
Kyle M Hall [Thu, 16 Aug 2018 11:11:17 +0000 (07:11 -0400)]
Bug 21231: BlockReturnofLostItems does not prevent lost items being found

When the syspref BlockReturnOfLostItems is set to Block, the item is blocked from being returned, but is still considered found -- it's set to lost=0 and a refund is applied to the patron (if circ rules allow). The item can then be checked in a second time and returned as it is no longer lost.

Test Plan:
1) Set an item to lost
2) Set BlockReturnOfLostItems to Block
3) Check the lost item in
4) Checkin  message should say item is lost and cannot be returned
5) Check lost status of item, it should remain unchanged

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ca2430480eaa4338b3e4aed766589b1406565d69)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3af501884e136454bca1c5a78c1a6b56e876f6be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21231: Add Unit Test
Kyle M Hall [Thu, 16 Aug 2018 11:10:43 +0000 (07:10 -0400)]
Bug 21231: Add Unit Test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 44d7063209137696d0c844ff82880a973029e534)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1bb7e7c0167be0feffc86b574620c5fc65120993)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20984: Add 300$f to display
Joy Nelson [Fri, 22 Jun 2018 20:48:25 +0000 (13:48 -0700)]
Bug 20984: Add 300$f to display

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

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a122a5333445299da8a01e47a65b25f733e6ce7c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 516d156bb2aec724e429414f7053e3a2f8fffda1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17625: adding subfields f and g to XSLT display
Joy Nelson [Fri, 22 Jun 2018 18:56:11 +0000 (11:56 -0700)]
Bug 17625: adding subfields f and g to XSLT display

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

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Cab Vinton <bibliwho@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fe9c6450979b5b7fd05821dd22c523ea6d10d3cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7a53a3defe45099f02c0bbb4d077e01303feca38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21150: add the biblionumber to the output
Jonathan Druart [Tue, 7 Aug 2018 14:14:54 +0000 (11:14 -0300)]
Bug 21150: add the biblionumber to the output

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 76141a352ed5ff8c9541c0d4b1c99e22e5339add)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bacb859d1c637b7d9d32b2205c97cc00557e9888)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21150: Search for item types inconsistencies
Jonathan Druart [Fri, 3 Aug 2018 17:59:33 +0000 (14:59 -0300)]
Bug 21150: Search for item types inconsistencies

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6fd1a8c11484e8c1cd771aea0c6ac98a2ab18f40)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41b06b411c3ad2a5006980507c344c568357c752)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20509: Add to script documentation
Katrin Fischer [Tue, 31 Jul 2018 16:23:43 +0000 (16:23 +0000)]
Bug 20509: Add to script documentation

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9b73cc22890aadae0fa6afd9d82d5109cc47fd80)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7ba665179bb35a3ddf940f506e5dfed06f11b346)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20509: Search for not defined authority codes
Jonathan Druart [Wed, 27 Jun 2018 18:35:57 +0000 (15:35 -0300)]
Bug 20509: Search for not defined authority codes

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9558a118dacd74b77c27f63fc41611945aeff052)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c2387c58f1a4d2ed2fd1180957871634ae5f93ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to...
Josef Moravec [Wed, 27 Jun 2018 20:27:09 +0000 (20:27 +0000)]
Bug 21011: (follow-up) Fix pod, fix missing homebranch condition, change mode to executable

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5892ab07118b04a8071b49c40b441df326e15f07)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5ec194dfa9a1198bf5578bd3c7fac613da529f3c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21011: Search for items with not defined homebranch and/or holdingbranch
Jonathan Druart [Wed, 27 Jun 2018 18:32:56 +0000 (15:32 -0300)]
Bug 21011: Search for items with not defined homebranch and/or holdingbranch

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

This script will help people catching these migration issues.

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7d47bb311827298ddc30297bbd388e8f8905db48)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b5b74454cd0c5f8cb5b46ac60ca94b37e1503fc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20631: Remove unused RemoveLostItem from C4::Accounts
Katrin Fischer [Wed, 8 Aug 2018 20:34:32 +0000 (20:34 +0000)]
Bug 20631: Remove unused RemoveLostItem from C4::Accounts

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

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

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

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ccfa48f6ee8ec44d1621874383b10f68d939f34)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8b1944bbd876d2928536b0c457922eb71e9aa54b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20504: Fix lang attribute in html tag on systempreferences page
Katrin Fischer [Thu, 9 Aug 2018 17:46:09 +0000 (17:46 +0000)]
Bug 20504: Fix lang attribute in html tag on systempreferences page

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

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 56c50a66169f956584050a8630a71cfa7d5984cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 32b01b264277a77dbb79133f5af8eeecbe64d997)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 7996: (QA follow-up) Remove unnecessary permission check view logs template
Katrin Fischer [Mon, 20 Aug 2018 07:04:37 +0000 (07:04 +0000)]
Bug 7996: (QA follow-up) Remove unnecessary permission check view logs template

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3484db7187ca4ca62a617d9362b8c64c37f60cfd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b1aa841e1ed21dc300dc188aa76fd57b33044c95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 7996: Correct wrong permissions for modification log
Nick Clemens [Fri, 17 Aug 2018 11:07:41 +0000 (11:07 +0000)]
Bug 7996: Correct wrong permissions for modification log

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a750ebdbd994ef2a793e632eea4e35bbc7f1ec6d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8b3095f7d533bd2151d710085259f29349faf5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19511: Local cover images not centered in table column in staff client search...
Owen Leonard [Thu, 26 Jul 2018 15:36:24 +0000 (15:36 +0000)]
Bug 19511: Local cover images not centered in table column in staff client search results

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

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

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

Tested and confirmed local cover images are appearing quite nicely now.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit afa51869c39e1a450314a6d13098571566cc241c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 683589ec9556d65c9995125c962ce7c471495937)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21144: DBRev 17.11.09.002
Nick Clemens [Tue, 21 Aug 2018 11:49:55 +0000 (11:49 +0000)]
Bug 21144: DBRev 17.11.09.002

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit df06587b763de2acd2d4e1afa3da8ad1841f7577)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4ee626a6f362bbf96342613b7f64f1b0e3b2503e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21144: Add ROADTYPE to default authorised values categories
Katrin Fischer [Thu, 2 Aug 2018 00:19:42 +0000 (02:19 +0200)]
Bug 21144: Add ROADTYPE to default authorised values categories

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 266d7b5fa844b512cf68f4b08d6c07474c2ccc42)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6c099d4360060829a230eeb243333182346d3d59)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21142: Open uploaded files in utf-8 - batch mod/del
Jonathan Druart [Fri, 17 Aug 2018 15:07:55 +0000 (12:07 -0300)]
Bug 21142: Open uploaded files in utf-8 - batch mod/del

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

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f5f31679bf260d17e996fbe8e2e77f695ac7ddfc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0d7ba4634ad795703cbb97e371e07ae9252a6c53)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21238: Prevent TemplateToolkit.t to fail on slow servers
Jonathan Druart [Thu, 16 Aug 2018 15:29:43 +0000 (12:29 -0300)]
Bug 21238: Prevent TemplateToolkit.t to fail on slow servers

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

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

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

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

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d24d77d495a56e76046907ab19e9474cab28169c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fba97f0772ad6fd40b359e626ce9fb82f3d92182)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21230: Prevent Reserves.t to fail randomly
Jonathan Druart [Wed, 15 Aug 2018 15:21:38 +0000 (12:21 -0300)]
Bug 21230: Prevent Reserves.t to fail randomly

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

We should call AddReserve instead.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c957b52ef8bba734043157445470bedc36feae5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c359d56f25a0b346b71a3fd8700b07e4713640d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20795: Inform the user about this change, add to pod
Jonathan Druart [Wed, 1 Aug 2018 14:22:14 +0000 (11:22 -0300)]
Bug 20795: Inform the user about this change, add to pod

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e97f6ab9be6108cbe4d61ea8dd4b876527bd67ba)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40bfb7913da164f03ff44956218a8e314f87aeba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20795: Pass incrreased verbosity to zebra rebuild script
Nick Clemens [Sun, 20 May 2018 14:44:45 +0000 (14:44 +0000)]
Bug 20795: Pass incrreased verbosity to zebra rebuild script

To test:
1 - Run koha-rebuild-zebra with multiple '-v'
2 - Note no increased verbosity
3 - Apply patch
4 - Run the updated koha-rebuild-zebra script with multiple '-v'
5 - Note increased verbosity

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>
(cherry picked from commit 1dfb177d3fff713185bcb0aa86517ef40629fedc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dbdd2b56303be0fab287d861dbd9007bf554f9d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21164: Fix alignment on new basket form in acquisitions
Owen Leonard [Mon, 6 Aug 2018 18:15:10 +0000 (18:15 +0000)]
Bug 21164: Fix alignment on new basket form in acquisitions

This patch removes some unnecessary "&nbsp;"'s from the template for
creating a new basket in acquisitions. This fixes the alignment on the
form fields.

To test, apply the patch and go to Acquisitions -> Vendor -> New basket.
All the form fields should be correctly left-aligned with each other.

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2280877fdd9685aecff0b144319ca3bffc39b78a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5fe28bf39877440025e2a7ee1b2db1054be47852)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21185: Incorrect title tag on tags review page
Owen Leonard [Wed, 8 Aug 2018 16:45:28 +0000 (16:45 +0000)]
Bug 21185: Incorrect title tag on tags review page

This patch corrects the title tag on the tags review page.

To test, apply the patch and go to Tools -> Tags. The page title
(probably shown in the browser tab) should start with "Koha ->" instead
of "Home ->".

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad0f90b797c77b853ff61501310892282f582988)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 718af573c158412e1dc24308d2e1129b70cef861)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19390: Make jQuery selector more specific, so OPAC view link can open in new tab
Katrin Fischer [Fri, 10 Aug 2018 17:18:39 +0000 (17:18 +0000)]
Bug 19390: Make jQuery selector more specific, so OPAC view link can open in new tab

The OPAC view link in the staff result list already had a target="_blank",
but it didn't work, because of the JavaScript for the result list browser
in staff.

The JavaSript code was looking for the links to the detail page in staff
and this also selected the link to the detail page in OPAC. By changing
detail.pl to \detail.pl opac-detail.pl will no longer be selected.

To test:
- Search in the staff interface
- Click "OPAC view" links in staff result lists
- Click "OPAC view' links in detai page
- Verify both now open in a new tab
- Click other links and test that navigation (previous, next,
  return to results) works as expected
- Inside the staff client, you should see something like
  searchid=scs_1533922927978 added to the URLs

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 880afc9035c752bb6fbea0ad5505d8730462ce2c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bed533eb345b91cb9e0e019a37ebb201dcb94726)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18635: Koha::Patron->guarantees() should return results alphabetically
Nick Clemens [Fri, 19 May 2017 01:08:22 +0000 (21:08 -0400)]
Bug 18635: Koha::Patron->guarantees() should return results alphabetically

To test:
1 - Add the same guarantor to a number of patrons, ensuring random order
alphabetically
2 - View the guarantors record, note unordered list of guarantees
3 - Apply patch
4 - Guarantees are alphabetical

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fe6cb85c5580b582a0047769d88be23757df0ef5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 74a2565c99dc92e390950c7ce340202efba2161c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21033: Remove few warns in acqui/basket.pl
Marcel de Rooy [Tue, 3 Jul 2018 13:52:05 +0000 (15:52 +0200)]
Bug 21033: Remove few warns in acqui/basket.pl

Resolve (line numbers based on 16.11.x):
Use of uninitialized value in hash element at acqui/basket.pl line 337.
Use of uninitialized value in hash element at acqui/basket.pl line 338.
Use of uninitialized value in hash element at acqui/basket.pl line 340.
Use of uninitialized value in hash element at acqui/basket.pl line 342.
Use of uninitialized value in hash element at acqui/basket.pl line 344.

Argument "" isn't numeric in multiplication (*) at koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt line 486.
Argument "" isn't numeric in multiplication (*) at koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt line 591.

Test plan:
If you have older acq data, you may have records in aqorders with field
tax_rate_on_ordering is NULL. These orders will trigger the above warns.
If you do not have, you could simulate by setting this field to NULL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit af82a1d59709d02b767613539146b59fa10c3ab3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9a6ed1c852c00644349597e59a369bef5a19d9a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21035: Handle new lines when running reports
Jonathan Druart [Wed, 4 Jul 2018 18:05:25 +0000 (15:05 -0300)]
Bug 21035: Handle new lines when running reports

See https://metacpan.org/pod/Text::CSV_XS#Embedded-newlines

Test plan:

1) Choose two items, say barcode '123' and '456'
2) Change the public note on 123 to read

Line1
Line2

(I.e. type 'Line1', then press Enter, type 'Line2' and click update).
3) Change the public note on 456 to read

Public note has one and only one line.

Click update.
4) Create a report with the followng query:

select barcode, itemnotes from items where barcode in ( '123', '456' )

Let's say that this is report number 10.

5) run ./misc/cronjobs/runreport.pl --format=csv REPORT_ID:

=> You should see both lines

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f16fb888f132703063f0591e329d72d065f4b1d9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4fd18a7df711f5a59f459234ec186b175ee05eb6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour
David Cook [Mon, 30 Jul 2018 04:35:40 +0000 (14:35 +1000)]
Bug 21131: Remove the TinyMCE.isDirty() check that caused unexpected behaviour

When using the WYSIWYG editor for system preferences, the editor only
updates the textarea element if the content is different from the
original content. This means if you change a system preference and
then change it back to the original content, the textarea will have
the 2nd last change you made.

This patch removes the TinyMCE.isDirty() check, which was responsible
for comparing the original and changed content. Every input/keydown/dragend
or TinyMCE command will cause the textarea element to be updated and
trigger the input event which causes the "modified" class to be added
to the element, so that the system preference can be saved.

__TEST PLAN__

_Before applying_
0. Change "UseWYSIWYGinSystemPreferences" to "Show"
1. Change "opaccredits" to "123a"
2. Click "Save all OPAC preferences"
3. Reload the page
4. Change "opaccredits" to "123"
5. Change "opaccredits" to "123a"
6. Click "Save all OPAC preferences"
7. Reload the page
8. Note that "opaccredits" says "123"

_Apply the patch_

_After applying_
1. Change "opaccredits" to "123a"
2. Change "opaccredits" to "123"
3. Click "Save all OPAC preferences"
4. Reload the page
5. Note that "opaccredits" says "123" (and not "123a")
6. Change "opaccredits" to "1234"
7. Click "Save all OPAC preferences"
8. Reload the page
9. Note that "opaccredits" says "1234"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f4cf075fbea353a5cbf11aaead37c92eac8179b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1dfa4318262a908b1df9d8d2454c15a39c84416c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19291: Make breadcrumbs for OPAC search history consistent with other patron...
Owen Leonard [Fri, 27 Jul 2018 17:22:54 +0000 (17:22 +0000)]
Bug 19291: Make breadcrumbs for OPAC search history consistent with other patron account pages

This patch adds the logged-in patron's name to the search history page's
breadcrumb navigation.

To test, apply the patch and view the OPAC search history page with no
user logged in. The breadcrumbs should read:

- Home ->  Search history

Log in and return to the search history page. The breadcrumbs should
read:

- Home -> Owen Leonard -> Your search history

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=21137

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ff3987c023a658e63e46ea8601666916287c8ec5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fe9888e1ab5aa67c4b52efb1dbca5290e9c3dfd7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21056: Add another flush later
Jonathan Druart [Tue, 31 Jul 2018 15:14:54 +0000 (12:14 -0300)]
Bug 21056: Add another flush later

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5abcd3312adc02a14465a0781f735b8494d60f42)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 88a2c8886c4cf37e6dff00cffd26674d6ac548e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21056: Changing the logged in library can fail sporadically
Kyle M Hall [Mon, 9 Jul 2018 18:05:29 +0000 (14:05 -0400)]
Bug 21056: Changing the logged in library can fail sporadically

We are getting reports that sometimes changing the logged in library via selectbranchprinter.pl sometimes appears to fail. Flushing the session after updating the branch appears to fix this.

Test Plan:
1) Change your logged in library repeatedly. Hopefully ( sort of ) it will fail to change.
   You may want to try various browsers.
2) Apply this patch
3) Note the change no longer fails

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 76a06a7050643add32f4cbccbdc2fb00f66f5485)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0a5dabc27174d5b77783f81c59248f5da8b37c79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required...
Owen Leonard [Thu, 2 Aug 2018 13:46:31 +0000 (13:46 +0000)]
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields

This patch adds some CSS to target mandatory fields on the add item
screen which are styled by the Select2 plugin.

To test you must have at least one item field marked mandatory and
linked to an authorized value.

Open the add item form for an existing record. Try to submit the form
without making a selection in the mandatory dropdown. You should get an
alert warning you that you have empty mandatory fields, and the field
should be highlighted in yellow.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 62aacb5865719e27224bf8f1963de1888d2ca05d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9bb74effa31053c685902df48714a61c18d3c6d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21075: Unit tests
Nick Clemens [Fri, 13 Jul 2018 15:13:31 +0000 (15:13 +0000)]
Bug 21075: Unit tests

prove -v t/db_dependent/Reserves/AutoUnsuspendReserves.t

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e5865ee4feaca3ca5575ce45d11fc88d88dc43d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 77f2da8fb26e68fa87d2858fc1dfc9f223e24821)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21075: AutoUnsuspendHolds should unsuspend holds <= today
Nick Clemens [Fri, 13 Jul 2018 14:45:55 +0000 (14:45 +0000)]
Bug 21075: AutoUnsuspendHolds should unsuspend holds <= today

To recreate:
 1 - Place a hold in your system
 2 - Set that hold (or all holds) to expire today
    update reserves set suspend_until=CONCAT( CURDATE()," 00:00:00");
 3 - Run misc/cronjobs/holds/auto_unsuspend_holds.p
 4 - Note the hold is sitll suspended
 5 - Visit /cgi-bin/koha/reserve/request.pl for the book with the hold
 6 - Note the suspend date is tomorrow (and cannot be set to today]
 7 - Click update holds - the date in db is now set to tomorrow
 8 - Reset to today
 9 - Apply patch
10 - Run the cron again
11 - Visit the page and note hold is unsuspended

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c0f7aed84d663029b2f1b37ce0391b5a40b10b97)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9e67cff276297fe52e2f8c58ab559758ad5043f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: (follow-up) Floating toolbars - Remove unecessary height
Jonathan Druart [Wed, 15 Aug 2018 17:21:47 +0000 (14:21 -0300)]
Bug 21139: (follow-up) Floating toolbars - Remove unecessary height

Found where QAing bug 20935, we actually want the hidden toolbar to be
the exact same height as the visible one.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 592905a4d2d41a1a7b757c48fbac8fc6f025bf9b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 514939a8046cb82a66cfb3966a14020e846face3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: No table in toolbar
Jonathan Druart [Wed, 1 Aug 2018 16:18:47 +0000 (13:18 -0300)]
Bug 21139: No table in toolbar

We do not need this selector, we will not have a table in the toolbar

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 40577065b60ab87330f1fc0c3e6bbe52f2373e6c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 71adb4380c101b10ddbda95be32806052e75d0d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbar - Resize toolbar on window resize
Jonathan Druart [Wed, 1 Aug 2018 15:34:29 +0000 (12:34 -0300)]
Bug 21139: Floating toolbar - Resize toolbar on window resize

Prior to this patch the toolbar was not resized when the window was
resized

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ecf4da7d49357832b77ee087d968e071ab46b93)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5eecc789af216e56638525961a8c25dd9677c9db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbar - Remove horizontal scrollbar on resize
Jonathan Druart [Wed, 1 Aug 2018 15:31:01 +0000 (12:31 -0300)]
Bug 21139: Floating toolbar - Remove horizontal scrollbar on resize

To test:
- add/edit a patron
- resize the window
=> Without this patch a horizontal scrollbar appears when resized
shorter

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5520f3e019f38cbd2ea75be0a13806f68a2f515)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 106ad2d6f01e6bdcf79b54791a437ae31746a059)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbars - Remove unecessary height
Jonathan Druart [Wed, 1 Aug 2018 15:28:54 +0000 (12:28 -0300)]
Bug 21139: Floating toolbars - Remove unecessary height

This patch remove some pixels under the toolbar, they were used by the
hidden element.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2588811ef249f0996527e952e4ef5307c1834a71)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d0d2a35585b6563148178d41545db09dcc8c007)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21139: Floating toolbar - Remove dup id
Jonathan Druart [Wed, 1 Aug 2018 15:28:37 +0000 (12:28 -0300)]
Bug 21139: Floating toolbar - Remove dup id

We should not have twice the same id, we always use fixFloat() on an
element with an id and then duplicate this element.
The id must be changed (just in case)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 77196e91402cdb59242f80e596f1812d238923c2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit af2ccb13e3001f388a320a0619e22871429e09b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21099: Reposition floating toolbars earlier
Jonathan Druart [Fri, 20 Jul 2018 15:59:16 +0000 (12:59 -0300)]
Bug 21099: Reposition floating toolbars earlier

To recreate:
- Go to the advanced search form
- scrolldown to position the toolbar on top of the window
- scrollup

https://screenshots.firefox.com/NnkFg3iOXqLPxfkd/pro.kohadev.org

The toolbar should have been repositioned earlier

Test plan:
Edit a patron
- scrolldown
- scrollup
- unfold the form in the header (tab "Search patrons", link "[+]")
- scrolldown
- scrollup
Advanced search
scrolldown
scrollup

You should notice the difference with and without this patch

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 68e735b10151d7b70187fa7f9d4ecb2b94b34e6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0d349fba89697bf58d86a9b26d8ebc385d1a8417)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21048: (QA follow-up) Fix authorized value statuses in filter
Marcel de Rooy [Fri, 27 Jul 2018 07:42:06 +0000 (09:42 +0200)]
Bug 21048: (QA follow-up) Fix authorized value statuses in filter

If you select an authorized value status in the filter, you want to keep
it too just like normal statuses as CHECKED.
The variable selected_status was not filled. The minimal fix is adding that
template variable in the script. Note that suggestion.STATUS is out of scope
within a loop using suggestion as loop var.

Note: Adding a regular status like CHECKED as an authorized value with
same code but another description works, but is kind of confusing ;) Not
in the scope of this report though.

Test plan:
Select an authval status in the filter. Apply the filter and verify again
that it is still selected under Suggestion information.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b1e8193a84a8df6d70ad8de16dadb8c4301a706b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f5121183d9049a82645797e18028d600e11a2476)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21048: Fix display of suggestion's status (SUGGEST_STATUS)
Jonathan Druart [Wed, 11 Jul 2018 21:23:49 +0000 (18:23 -0300)]
Bug 21048: Fix display of suggestion's status (SUGGEST_STATUS)

When a suggestion's status is set to a customized value (AV
SUGGEST_STATUS), the description is not always displayed correctly.

Test plan:
- Create different values for the AV SUGGEST_STATUS
- Create several suggestions
- Change the status using the SUGGEST_STATUS values
- Edit the suggestion and change again the status
- View the suggestions for a given patron
(members/purchase-suggestions.pl?borrowernumber=XX), the statuses must
displayed correctly

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b25c063f950076234cf7bb4a496921983a7cc23f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e81fdb07c68fb80bc497190dfd2dd15f24491447)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21031: Apache Rewrite rules don't work for API when using anything but Debian...
David Cook [Tue, 3 Jul 2018 09:04:50 +0000 (19:04 +1000)]
Bug 21031: Apache Rewrite rules don't work for API when using anything but Debian package Plack configuration

The Rewrite rules for Apache don't work unless you're using
debian/templates/apache-shared-opac-plack.conf or
debian/templates/apache-shared-intranet-plack.conf.

This patch fixes the Rewrite rules for the non-Plack Debian
Apache configuration templates as well as the standard
Apache configuration file that comes with Koha.

__BEFORE APPLYING__
1. Visit /api/v1/app.pl/api/v1/spec on your git dev install
2. This should display a large page of JSON
3. Visit /api/v1/spec on your git dev install
4. This should generate a 404 error

__APPLY PATCH__

__AFTER APPLYING__
5. Visit /api/v1/app.pl/api/v1/spec on your git dev install
6. This should display a large page of JSON
7. Visit /api/v1/spec on your git dev install
8. This should display a large page of JSON (identical to
the one from earlier steps)

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA with few notes posted separately to Bugzilla.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c6b50f0bac092779f93033c8a3f002cb8722d7d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 11b6ad197ab279aca89944001a9751a492bdb573)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21094: Syndetics: always use https instead of http
Owen Leonard [Thu, 19 Jul 2018 16:57:42 +0000 (16:57 +0000)]
Bug 21094: Syndetics: always use https instead of http

This patch removes the 'using_https' check in OPAC templates in calls to
Syndetics resources. Instead, https is always used.

To test, apply the patch and enable Syndetics-related preferences. View
the following pages in the OPAC:

- Bibliographic detail page
  - Browse shelf section of the bibliographic detail page
- Search results
- List contents
- Recent comments
  - Recent comments RSS
- User summary page
  - Circulation history

NOTE: I tested with made-up Syndetics credentials. This means my changes
didn't make the template explode, but it doesn't confirm conclusively
that the resources work.

Signed-off-by: John Doe <you@example.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e0548cc1a7a924731bd414fec2f7917f044040a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 40cf253a0df46613340b301a8ce600de2e680a1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21077: Fix database documentation for statistics.type
Katrin Fischer [Sun, 15 Jul 2018 17:27:03 +0000 (19:27 +0200)]
Bug 21077: Fix database documentation for statistics.type

There's a typo for 'locause', this should be 'localuse'.
Also, 'Credit*' is never used.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b89cbf6a473e71597bc051d88c2152531648ad8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc490f7d86c182047a55f875d0db9081fe974996)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21134: Correctly throw the exception in Koha::Patron::Modification->approve
Jonathan Druart [Tue, 31 Jul 2018 15:43:54 +0000 (12:43 -0300)]
Bug 21134: Correctly throw the exception in Koha::Patron::Modification->approve

koha_1       |     # Looks like you planned 20 tests but ran 9.
koha_1       |
koha_1       | #   Failed test 'approve tests'
koha_1       | #   at t/db_dependent/Koha/Patron/Modifications.t line
259.
koha_1       | [Something went wrong]# Looks like your test exited with
255 just after 5.
koha_1       | [21:13:47] t/db_dependent/Koha/Patron/Modifications.t
.....................

"Something went wrong" should never been thrown,
Koha::Patron::Modification->approve raises $@, but it's not defined, it
should raise $_ instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e99cfbca7e904b7664163838a334c487c94e462)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c6133753ed661902a9ec3cce14190c7d3d683ef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21097: Missing optgroup closing tag in orderreceive.tt
David Cook [Fri, 20 Jul 2018 08:13:49 +0000 (18:13 +1000)]
Bug 21097: Missing optgroup closing tag in orderreceive.tt

There is a missing optgroup closing tag in orderreceive.tt. It doesn't
actually cause any display issues (at least in modern browsers), but
it's invalid markup, so this patch fixes it.

_TEST PLAN_
0. Add a budget and add a fund
1. Add a vendor
2. Add a basket
3. Add an order to a basket
4. Close the basket
5. Receive the order
6. Make sure the budget and fund both display when selecting the fund

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 12e18f91be2a26501fba502d5f1106d66b06caee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 881781240cf0c1a487da1d05732dab300d6e1be7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20974: Remove files left behind after removing Solr
Owen Leonard [Thu, 21 Jun 2018 13:37:35 +0000 (13:37 +0000)]
Bug 20974: Remove files left behind after removing Solr

Some files were left behind when Bug 12538 removed support for Solr.
This patch removes them.

To test, apply the patch and fail to observe the existence of these
files:

koha-tmpl/opac-tmpl/bootstrap/en/includes/search/facets.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/page-numbers.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/search/resort_form.inc

Perform a search in the OPAC to confirm that nothing broke.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad34ef74cdee0f204c03cdf88b1db775768a44fe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 517827fb9c2e69d58d8e9345ba2d259de08efded)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21064: Use undefined instead of undef
Nick Clemens [Thu, 12 Jul 2018 10:18:10 +0000 (10:18 +0000)]
Bug 21064: Use undefined instead of undef

To test:
1 - Load the advanced cataloging editor
2 - Refresh the page several times
3 - Check the JS console, you shoudl see an error:
    'undef is not defined'
4 - Apply patch
5 - Try again, should be no error

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 367f47c416fa9164ccb8d9e5f50772e5a516d6b7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f60c611972fe0442ee66f6ebf3a40f00bd11efcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21053: Encode URI characters in plugin 008
Jonathan Druart [Wed, 11 Jul 2018 21:55:06 +0000 (18:55 -0300)]
Bug 21053: Encode URI characters in plugin 008

A # (or &) at any position in 008 field of a bib record causes
all subsequent data in field to be overwritten with default values when
record is saved.

These characters need to be correctly encoded before being passed as
parameters of the url

To reproduce:
1. Find and edit a bib record which has an 008 which differs from the
default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current
values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after #

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bfdf896111849454ade806bf49f48f1de5f626be)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 512ee5d57617c63da90be09268a77a0317c9e886)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21076: Don't call autocomplete code after patron found
Nick Clemens [Fri, 13 Jul 2018 17:49:14 +0000 (17:49 +0000)]
Bug 21076: Don't call autocomplete code after patron found

To test:
1 - Enable article requests
2 - Search on staff client
3 - Click 'Request article'
4 - Find a patron
5 - View error in console
6 - Apply patch
7 - Reload
8 - Not error is gone

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5a9bad787458411c790d26b3b115fe3e7e2e0ab2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 50f4e8635056d7b664b846db91d48bf282fef949)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 8b806227c130e86712e3e5bda61520447c60671d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f45f3afdf67193ec849f72955b6de4fbeb17db0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 235654a3cfa5b6e323489408ddc7875281bb1f50)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 637469974c3290a43ac259642df0fefdfe2d369f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl
Mirko Tietgen [Tue, 22 May 2018 10:32:19 +0000 (12:32 +0200)]
Bug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl

libhttp-oai-perl in Stretch is 4.03 and broken. Koha depends on
libhttp-oai-perl << 4 for that reason. To make the installation of Koha
on Stretch as easy as possible, this patch adds the alternative
libhttp-oai-3.27-perl which we provide in the Koha repository.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 56813f5c90827df0fd89262917e7f9920f7d9175)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20437: Update debian/control
Mirko Tietgen [Tue, 15 May 2018 17:23:25 +0000 (19:23 +0200)]
Bug 20437: Update debian/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9b31bc2d27c6e045a6e7ea079778c47674c135db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20437: Force the dependency on HTTP::OAI < 4.0
Tomas Cohen Arazi [Fri, 16 Mar 2018 18:22:47 +0000 (15:22 -0300)]
Bug 20437: Force the dependency on HTTP::OAI < 4.0

Until HTTP::OAI is patched so it actually works, and bug 17704 fixes the API change Koha-side, we need to explicitly pull the right version. Otherwise people using Debian 9+ derived distros (Ubuntu 16.04+) are seeing production issues.

This implies packaging our custom libhttp-oai-perl distribution in the meantime.

This patch makes Koha require a version lower than 4.0.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 05ebfaf0c04cce35933f81e48de95b307da1c325)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20770: ILL loans OPAC form notes field allow arbitrary input
Andrew Isherwood [Tue, 15 May 2018 15:00:02 +0000 (16:00 +0100)]
Bug 20770: ILL loans OPAC form notes field allow arbitrary input

This patch addresses the lack of sanitization of the "notes" field on
the OPAC "View Interlibrary loan request" page.

To test:

- Apply the patch
- As an OPAC user, create an ILL request
- Navigate to the request's "View Interlibrary loan request" page
- Add the following note:

  Hello
  <h1>TESTING</h1>
  <script>alert('pwned');</script>

- Click "Submit modifications"
- TEST: Observe, when the page reloads, only the following is preserved in the
"Notes" textarea:

    Hello
    TESTING

- As a staff user, naviate to the ILL requests table
- Select "Manage request" for the request you created
- TEST: Observe that the Notes field only contains:

    Hello
    TESTING

- TEST: Observe that no Javascript alert is displayed

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 552873f7d466abee6919414b8d2f5e6c99f9a44f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc81442349cb07afe242607f2c40acb62e4e76fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>