]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 17278: Use available limit when requesting zebra when ccl query is used
Jonathan Druart [Mon, 3 Oct 2016 09:45:13 +0000 (10:45 +0100)]
Bug 17278: Use available limit when requesting zebra when ccl query is used

When a ccl query is used, the buildQuery subroutine does not handle
the available limit (not an index).
This available limit is handle later in the subroutine.
This affect the author links on the detail page for instance (an=xx).
A much better solution would be to keep an 'available' zebra index up-to-date.

Test plan:
(OPAC or staff interface, it does not matter)
- Launch a search, click on a result and then on an author link to
  launch another query (an:xx)
- Limit to available items without the 'facet'
=> Without this patch you won't get any results
=> With this patch applied you should get relevant result (regarding the
known bugs 16970, 13715, 13658, 5463, etc.)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
6 years agoRevert "Bug 14637: Fix add patron category under MySQL 5.7 - tests"
Mason James [Mon, 13 Nov 2017 14:38:19 +0000 (03:38 +1300)]
Revert "Bug 14637: Fix add patron category under MySQL 5.7 - tests"

This reverts commit f75437546fcfbbd931e9577dc428f9c52ed13beb.

6 years agoRevert "Bug 14637: Fix add patron category under MySQL 5.7"
Mason James [Mon, 13 Nov 2017 14:38:16 +0000 (03:38 +1300)]
Revert "Bug 14637: Fix add patron category under MySQL 5.7"

This reverts commit 047c31b4246bb5eb0f20238355190f9535dc4721.

6 years agoRevert "Bug 14637: Followup - Fix number of tests due to rebase"
Mason James [Mon, 13 Nov 2017 14:38:10 +0000 (03:38 +1300)]
Revert "Bug 14637: Followup - Fix number of tests due to rebase"

This reverts commit 783d5ea02e677fe00e8b3f7ad43d801a9a87de38.

7 years agoRevert "Bug 18996: [16.11.x] Handle data corruption from old_issues at SIP checkin" v16.05.18
Mason James [Wed, 25 Oct 2017 00:41:56 +0000 (13:41 +1300)]
Revert "Bug 18996: [16.11.x] Handle data corruption from old_issues at SIP checkin"

This reverts commit 722c26c4ef16074624f0606233a1671509289bd6.

7 years agoRevert "Bug 18996: [16.11.x] Resolve an uninitialized warning from ILS/Item.pm"
Mason James [Wed, 25 Oct 2017 00:41:54 +0000 (13:41 +1300)]
Revert "Bug 18996: [16.11.x] Resolve an uninitialized warning from ILS/Item.pm"

This reverts commit 6977e2200daa8f1a8cf7dd6d2bf2650ee346d313.

7 years agoRevert "Bug 18996: [16.11.x] Add checkin subtest in SIP/Message.t"
Mason James [Wed, 25 Oct 2017 00:41:28 +0000 (13:41 +1300)]
Revert "Bug 18996: [16.11.x] Add checkin subtest in SIP/Message.t"

This reverts commit 40e2970eeebdc8b05ea10b7e0159faa2a3fa80bc.

7 years agoRevert "Bug 18996: [16.11.x] [QA Follow-up] Remove global variables from Message.t"
Mason James [Wed, 25 Oct 2017 00:41:22 +0000 (13:41 +1300)]
Revert "Bug 18996: [16.11.x] [QA Follow-up] Remove global variables from Message.t"

This reverts commit 29260299c314bee90980f105baa345072fc35f84.

7 years agoRevert "Bug 18996: [16.11.x] use Koha::OldIssues instead of Koha::Old::Checkouts"
Mason James [Wed, 25 Oct 2017 00:41:06 +0000 (13:41 +1300)]
Revert "Bug 18996: [16.11.x] use Koha::OldIssues instead of Koha::Old::Checkouts"

This reverts commit f7199ade29131803652e8d8fba7996ed6484383a.

7 years agoBug 19117: [16.05.x] paycollect.pl is vulnerable for CSRF attacks
Mason James [Wed, 25 Oct 2017 00:10:43 +0000 (13:10 +1300)]
Bug 19117: [16.05.x] paycollect.pl is vulnerable for CSRF attacks

7 years agoAdd release notes for Koha 16.05.18
Mason James [Tue, 24 Oct 2017 08:30:35 +0000 (21:30 +1300)]
Add release notes for Koha 16.05.18

7 years agoIncrement version for 16.05.18 release
Mason James [Tue, 24 Oct 2017 07:09:12 +0000 (20:09 +1300)]
Increment version for 16.05.18 release

7 years agoTranslation updates for Koha 16.05.18
Mason James [Tue, 24 Oct 2017 07:05:54 +0000 (20:05 +1300)]
Translation updates for Koha 16.05.18

7 years agoBug 19333: Fix XSS in opac-shelves
Jonathan Druart [Mon, 18 Sep 2017 17:53:41 +0000 (14:53 -0300)]
Bug 19333: Fix XSS in opac-shelves

category is send back to the template, it must be escaped

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19117: Add CSRF protection to paycollect.pl
Jonathan Druart [Wed, 4 Oct 2017 20:49:51 +0000 (17:49 -0300)]
Bug 19117: Add CSRF protection to paycollect.pl

Security bug, trivial changes, no need to provide procedure for script
kiddies.

Test plan:
Pay fines using the different options from the "Pay fines" tab.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18956: Fix empty to in message queue
Mark Tompsett [Wed, 13 Sep 2017 03:44:19 +0000 (03:44 +0000)]
Bug 18956: Fix empty to in message queue

Follow the test plan in comment #20.
Also tweaked string, because it was really 'or' before too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended text in added comment.
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18956: [QA Follow-up] Resolve a CGI::Param in list context warn
Marcel de Rooy [Fri, 8 Sep 2017 06:53:37 +0000 (08:53 +0200)]
Bug 18956: [QA Follow-up] Resolve a CGI::Param in list context warn

From the plack-error.log:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_masterclone_opac_opac_2dpassword_2drecovery_2epl line 129, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18956: Prevent leaking during password recovery
Mark Tompsett [Fri, 25 Aug 2017 19:09:38 +0000 (15:09 -0400)]
Bug 18956: Prevent leaking during password recovery

TEST PLAN
---------

It is assumed you have set the OpacResetPassword to 'allowed',
and likely in combination with OpacPasswordChange to 'Allowed'.

You will have two patrons: one with and another without
any email address entered. You will want to test this test plan
with both patrons.

$ git checkout -b bug_18956 origin/master

Prepend the following as understood between step sections:
opac -> forgot password and then enter...

correct login/cardnumber, it will email
delete from borrower_password_recovery;

correct email, it will email
delete from borrower_password_recovery;

correct login/cardnumber && correct email, it will email
delete from borrower_password_recovery;

wrong login/cardnumber && correct email, error page as expected
delete from borrower_password_recovery;

correct login/cardnumber && wrong email, error page as expected
delete from borrower_password_recovery;

wrong login/cardnumber && wrong email, error page as expected
delete from borrower_password_recovery;

submit empty -- INTERNAL SERVER ERROR?!
delete from borrower_password_recovery;

-- None of the above step sections displayed email.

correct login/cardnumber, it will email

correct login/cardnumber again, but it leaks email address!
delete from borrower_password_recovery;

correct email, it will email

correct email again, but it leaks login/cardnumber!
delete from borrower_password_recovery;

$ git bz apply 18956
-- choose interactive, and choose this counter patch.

repeat the same test set again
-- no leaks will occur, error message pages returned should
   be reasonable, code should read reasonably.

run koha qa test tools.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years ago[16.05.x] Small fixes for various tests
Mason James [Tue, 24 Oct 2017 03:19:54 +0000 (16:19 +1300)]
[16.05.x] Small fixes for various tests

7 years agoBug 19323: subscription edit permission issue
Fridolin Somers [Fri, 15 Sep 2017 09:12:01 +0000 (11:12 +0200)]
Bug 19323: subscription edit permission issue

If a librarian has edit_subscription but not create_subscription :
When trying to edit a subscription, after saving permission is denied.

This is because permissions in serials/subscription-add.pl depends on arg 'op' and on edit this arg starts with 'modify' but changes to 'modsubscription' when saving.

Test plan :
- Create a user with staff access
- Define its permissions on serials : only edit_subscription
- Edit a subscription
- Click 'Next'
- Click 'Test prediction pattern'
- Click 'Save subscription'
=> Without patch you get to page serials/subscription-add.pl with permission denied
=> With patch subscription is saved and you get to subscription details page

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 12bd6358cfe6c9348cb111d22f04097f7911babf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fe386c172496159198b34383c3080185de7ae0af)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19120: Leave cancelled ordered items alone when reopening basket
Mark Tompsett [Sat, 2 Sep 2017 01:23:20 +0000 (21:23 -0400)]
Bug 19120: Leave cancelled ordered items alone when reopening basket

TEST PLAN
---------
1) Apply first patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS
3) Apply this patch
4) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- SUCCESS!
5) run koha qa test tools

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19120: Add tests to reproduce the problem
Mark Tompsett [Sat, 2 Sep 2017 01:21:40 +0000 (21:21 -0400)]
Bug 19120: Add tests to reproduce the problem

TEST PLAN
---------
1) apply this patch
2) prove t/db_dependent/Acquisition/close_reopen_basket.t
   -- FAILS!
   -- This proves the test works.
3) run koha qa test tools

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19418: (bug 12833 follow-up) Add missing use statement
Alex Arnaud [Fri, 6 Oct 2017 07:19:15 +0000 (07:19 +0000)]
Bug 19418: (bug 12833 follow-up) Add missing use statement

Patron search fail on calling svc/members/search. This script
return a 500 error and the search stay on "Processing..."

Test plan:
  - Enable ExtendedPatronAttributes system preference,
  - make a standard search (search fields),
  - check the search works and it doesn't stick on "Processing..."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I do not recreate the issue, but the change make sense and the issue has
been raised by several people

(cherry picked from commit 9c208a44313ed1f4bd12f8c9d3b45c5f2d386c5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2d04c80b37cb2f37f9709b8bcfc6b9a4e4eaaae9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19350: Add tests
Jonathan Druart [Tue, 3 Oct 2017 15:15:30 +0000 (12:15 -0300)]
Bug 19350: Add tests

7 years agoBug 19350 - Holds without link in 773 trigger SQL::Abstract::puke
Dobrica Pavlinusic [Wed, 20 Sep 2017 14:01:16 +0000 (16:01 +0200)]
Bug 19350 - Holds without link in 773 trigger SQL::Abstract::puke

Test:
1. find bibio without items which has something in field 773
   (for us, it's article) but doesn't have 0 or 9 (host item entry)
2. click on hold in left menu
3. verify application error
4. apply patch and verify that it works

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19440: Existing calls need to be done in scalar context
Jonathan Druart [Mon, 9 Oct 2017 18:57:46 +0000 (15:57 -0300)]
Bug 19440: Existing calls need to be done in scalar context

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19440: Identify overlimit problems in XISBN tests
Tomas Cohen Arazi [Mon, 9 Oct 2017 18:36:41 +0000 (15:36 -0300)]
Bug 19440: Identify overlimit problems in XISBN tests

This patch makes C4::XISBN::get_xisbns() return an errors hashref
including information of the failing fetches from xisbn services.

It tackles the situation of XISBN, which in some cases returns 'overlimit'
errors.

The patch makes the relevant functions check if the response->{stat} string
is 'ok' and returns the string in $errors otherwise.

This only happens when in list context. This allows to fix the randomly failing
tests while keeping the current behaviour.

All this code should be rewritten. It does the job bug doesn't have problems handling
or reoprting. This is just a band aid.

To test:
- Make sure
 k$ prove t/db_dependent/XISBN.t
=> SUCCESS :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19165 - When adding from a staged file order discounts are not passed into C4...
Christophe Croullebois [Wed, 23 Aug 2017 07:57:30 +0000 (07:57 +0000)]
Bug 19165 - When adding from a staged file order discounts are not passed into C4::Acquisitions::populate_order_with_prices

Signed-off-by: Your Name <david.bourgault@inlibro.com>
7 years agoBug 18996: (followup) Fix tests count [16.11.x]
Tomas Cohen Arazi [Mon, 9 Oct 2017 19:20:49 +0000 (16:20 -0300)]
Bug 18996: (followup) Fix tests count [16.11.x]

This patch fixes a wrong tests count introduced on merging.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
7 years agoBug 18351: Able to delete budget with funds
Aleisha Amohia [Thu, 30 Mar 2017 04:15:54 +0000 (04:15 +0000)]
Bug 18351: Able to delete budget with funds

To test:
1) Create a budget, add a fund
2) Delete budget. Notice this is successful and triggers no warning
message etc.
3) Go to Funds. Notice the funds appear as if they are not there
4) Go into mysql and view the aqbudgetperiods table - notice the funds
are still there and are now inaccessible.
5) Apply patch
6) Create a budget, add a fund
7) Attempt to delete budget. Notice you can't click Delete button.
Confirm number of funds in hover message is correct.
8) Delete fund
9) Confirm you can now delete budget.

Sponsored-by: Catalyst IT
Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 18351: [FOLLOW-UP] Some code fixes

See Comment 5. Ready to test.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 18351: [FOLLOW-UP] Code fix

See comment 10.
Ready for testing.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 18351: [FOLLOW-UP] Prevent deletion from forcing URL

This patch adds a check in the script for existing funds so that the
budget cannot be deleted when forcing the URL and has other small fixes.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 18351: [FOLLOW-UP] Prevent deletion if funds are added after clicking 'Delete' and before confirming delete

Followed test plan and patch works as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0ed469525fe16e36663c1f5266568beb5e27672d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2a9dc2e595d916e4fb94948871f665df06b7088b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19257: Prevent warn when reopening a basket
Aleisha Amohia [Tue, 5 Sep 2017 21:16:05 +0000 (21:16 +0000)]
Bug 19257: Prevent warn when reopening a basket

To test:
1) Go to Acquisitions, find a vendor and a basket (create if you don't
have either)
2) Close the basket
3) View the basket and reopen it
4) Notice the warn
5) Apply the patch and repeat steps 1-3
6) Notice the warn no longer shows and the basket is reopened as
expected

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6ed1513e5fe91772c1720963006bf8f04452416d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1677e56ecf1ea5f0ce2a408f1f11e931639e1d5)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19229: Return to course when cancelling out of edit form
Aleisha Amohia [Thu, 31 Aug 2017 21:25:28 +0000 (21:25 +0000)]
Bug 19229: Return to course when cancelling out of edit form

To test:
1) Ensure UseCourseReserves is enabled
2) Go to Course Reserves, create a course
3) Edit course
4) Click Cancel
5) Notice you are returned to the courses home page rather than returned
to the course
6) Apply patch
7) Go to edit course and click cancel again
8) Confirm you are returned to the course and that this feels like the
natural expectation.

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f55af2fc078a7d6a05238232bc276e6924307179)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ae405f61c8d4c04361267b500347a496a2ce7d58)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 17834: Make translation easier
Jonathan Druart [Wed, 6 Sep 2017 16:14:56 +0000 (13:14 -0300)]
Bug 17834: Make translation easier

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 17834: Change library news text for single-branch libraries
Aleisha Amohia [Thu, 20 Apr 2017 03:12:14 +0000 (03:12 +0000)]
Bug 17834: Change library news text for single-branch libraries

To test:
1) Log into OPAC, go to home page
2) Confirm that the text shows as 'RSS feed for (branchname) library
news' if single-branch library
3) Confirm text shows as normal for libraries with more than one branch

Sponsored-by: Catalyst IT
Signed-off-by: maricris <mlabancia@gmail.com>
Signed-off-by: anafe <anafeazuela@yahoo.com>
Signed-off-by: iflora <iflora@unimas.my>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19343: [16.11.X] Remove private lists with edit permission from search results
Marcel de Rooy [Tue, 3 Oct 2017 14:01:15 +0000 (16:01 +0200)]
Bug 19343: [16.11.X] Remove private lists with edit permission from search results

If the list is not shared, it should not be listed. We only need to remove
the allow_add line.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Conflicts:
Koha/Virtualshelves.pm

7 years agoBug 19343: [16.11.X] Add tests
Jonathan Druart [Tue, 3 Oct 2017 14:45:45 +0000 (11:45 -0300)]
Bug 19343: [16.11.X] Add tests

Conflicts:
t/db_dependent/Virtualshelves.t

7 years agoBug 14316: Clarify meaning of record number in Batch record modification tool
Katrin Fischer [Sat, 19 Aug 2017 08:22:44 +0000 (10:22 +0200)]
Bug 14316: Clarify meaning of record number in Batch record modification tool

Same change as the first patch, but for the batch record
modification tool.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 14316: Clarify meaning of record number in Batch record deletion tool
Katrin Fischer [Mon, 8 Jun 2015 00:03:34 +0000 (02:03 +0200)]
Bug 14316: Clarify meaning of record number in Batch record deletion tool

Changes the label from 'list of record numbers...' to
'List of biblionumbers or authority ids...' to make it
more clear to the user which kind of input is expected.

To test:
- Go to Tools > Batch record deletion
- Check the new description
- Decide if it's more clear or not

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18946 [QA Followup] - code cleanup
Kyle M Hall [Fri, 1 Sep 2017 12:41:51 +0000 (08:41 -0400)]
Bug 18946 [QA Followup] - code cleanup

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18946 - Change language from external web fails
Karam Qubsi [Tue, 18 Jul 2017 16:06:48 +0000 (00:06 +0800)]
Bug 18946 - Change language from external web fails

How to reproduce:
1. Get a multilingüal Koha like
http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=en
http://demo1.orex.es/cgi-bin/koha/opac-changelanguage.pl?language=es-ES

2. Copy that urls to any web page in an other domain -it must be in some
host - and try to link to the spanish or english version,it will keep you in the same position.

3. Apply this patch and try again , everything should work fine .

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18692 - intranet part
Lari Taskula [Wed, 31 May 2017 14:03:54 +0000 (17:03 +0300)]
Bug 18692 - intranet part

Fixes misplaced columns introduced by previous patch and adds the "-" for phone
transport type.

To test:
1. Set SMSSendDriver system preference on
2. Go to intranet messaging preferences
3. By default you should see checkboxes for all messages for SMS
4. Ensure columns are not misplaced (pushing one column too much to the right)
5. Delete sms method from one of the messages in message_transports table
6. Observe that "-" is displayed instead of checkbox for that message for SMS
7. Repeat same for TalkingTechItivaPhoneNotification system preference.
   By default it may not have transports in message_transports, so make sure
   to assign some in order to have the checkboxes visible.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18692 - same with syspref TalkingTechItivaPhone
Fridolin Somers [Thu, 1 Jun 2017 15:22:42 +0000 (17:22 +0200)]
Bug 18692 - same with syspref TalkingTechItivaPhone

Fixes misplaced columns introduced by previous patch and adds the "-" for phone
transport type.

To test:
1. Set SMSSendDriver system preference on
2. Go to intra and OPAC messaging preferences
3. By default you should see checkboxes for all messages for SMS
4. Ensure columns are not misplaced (pushing one column too much to the right)
5. Delete sms method from one of the messages in message_transports table
6. Observe that "-" is displayed instead of checkbox for that message for SMS
7. Repeat same for TalkingTechItivaPhoneNotification system preference.
   By default it may not have transports in message_transports, so make sure
   to assign some in order to have the checkboxes visible.

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

Signed-off-by: Michael Andrew Cabus <michael@bywatersolutons.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18692 - When SMS is enabled the OPAC messaging table is misaligned
Fridolin Somers [Mon, 29 May 2017 14:32:18 +0000 (16:32 +0200)]
Bug 18692 - When SMS is enabled the OPAC messaging table is misaligned

Bug 6726 had corrected the fact that when SMS is enabled the messaging table is missing a column.
Bug 6458 has broken this.
The SMS column is missing an else case with cell containing only "-" like other columns.

Test plan :
- set SMSSendDriver preference empty
- go to OPAC patron messaging
- column SMS should not be visible
- set SMSSendDriver preference not empty
- go to OPAC patron messaging
- column SMS appears with checkboxes

Signed-off-by: Michael Andrew Cabus <michael@bywatersolutons.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18636: Sysprefs: Add explanation for conflict autonumbernum / BorrowerMandatoryFields
Marc Véron [Wed, 9 Aug 2017 07:46:02 +0000 (09:46 +0200)]
Bug 18636: Sysprefs: Add explanation for conflict autonumbernum / BorrowerMandatoryFields

This patch adds a note to the system preferences autonembernum and
BorrowerMandatoryFields regarding a conflict if automembernum is on
and BorrowerMandatoryFields contains cardnumber.

To reproduce issue: See initial comment.

To test:
- Apply patch
- Verify that in system preferences note appears with both prefs
  automembernum and BorrowerMandatoryFields

Followed test plan, works as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 65bce82b1fb32d3d98fe4d4ef1e1738a97749632)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 07695e8de40c55f2837ae81b5e35b8e11656f272)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16485: collection column in Item search is always empty
Marc Véron [Tue, 27 Jun 2017 16:50:44 +0000 (18:50 +0200)]
Bug 16485: collection column in Item search is always empty

This patch fills the column 'Collection' in item search from the item values.

To test:
- Go to item search
- Reproduce issue from initial comment
- Apply patch
- Verify that the column 'Collection' is filled

Still to do, but outside of my datatable skills:
Filter by drop down in the column header does a substring search.
Example: Filter for 'Fiction" returns both 'Fiction' and 'Non-fiction' items.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6c1504cfdb301cb0f9f3a14b5db31a63f5c3b0a5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 74752502b309ddec4311a4311a3481bf54061187)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19024 Do not unset order cancelled status on basket close
Colin Campbell [Wed, 2 Aug 2017 16:12:44 +0000 (17:12 +0100)]
Bug 19024 Do not unset order cancelled status on basket close

On closing a basket, status is updated to ordered for orders not
completed. However the operation  was resetting the status for
cancelled as well as new orders.
While display is correct from the basket view (it checks the
cancellation date). The status in the acquisitions tab from the
catalogue view reverts erroneously to ordered.

This patch adds cancelled to the statuses not updated on basket
close.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19024 Fix some infelicities of phrasing in test messages
Colin Campbell [Tue, 15 Aug 2017 10:44:12 +0000 (11:44 +0100)]
Bug 19024 Fix some infelicities of phrasing in test messages

The test messages were awkwardly phrased, re phrase them to
sound more natuaral. Patch is cosmetic (grammar) only

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19024: Add tests
Jonathan Druart [Wed, 9 Aug 2017 19:09:32 +0000 (16:09 -0300)]
Bug 19024: Add tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 9857: Fix failing tests
Jonathan Druart [Fri, 1 Sep 2017 19:20:18 +0000 (16:20 -0300)]
Bug 9857: Fix failing tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 9857: Fix failing test
Jonathan Druart [Fri, 1 Sep 2017 19:20:18 +0000 (16:20 -0300)]
Bug 9857: Fix failing test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 9857 - Follow-up - Fix for searches with su= or su:
Katrin Fischer [Fri, 18 Aug 2017 08:36:59 +0000 (08:36 +0000)]
Bug 9857 - Follow-up - Fix for searches with su= or su:

When the initial search is su=.../su:... the links was
not constructed correctly. With this change, it should
be the case.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 9857: Did you mean? uses wrong punctuation in search links
Katrin Fischer [Fri, 4 Dec 2015 00:17:50 +0000 (01:17 +0100)]
Bug 9857: Did you mean? uses wrong punctuation in search links

The link changes the search links generated by the plugins
from an=authid to an:authid, as suggested by Jared on the
bug report.

- Turn on the AuthorityFile und ExplodedTerms  plugins
  for the OPAC from the "Did you mean" section of the
  administration module
- Search a term in your OPAC where one or several
  authorities exist.
  A last name or a place name might work well.
- Verify that there are suggestions displayed on top of
  your result list.
- Verify that the link created is something like:
  /cgi-bin/koha/opac-search.pl?q=an=14084
- Apply patch.
- Verify the link has changed a little and still works
  correctly:
  /cgi-bin/koha/opac-search.pl?q=an:14084

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18621: Added in value attribute to dateexpiry field
Alex Buckley [Tue, 11 Jul 2017 22:09:48 +0000 (10:09 +1200)]
Bug 18621: Added in value attribute to dateexpiry field

Test plan:
1. Create a patron category with the dateexpiry value of 29/9/2017

2. Create a patron user from that patron category (which I'll refer to as patron A) with the date
expiry value of 1/10/2017 and submit the form

3. Notice that the manual dateexpiry you have submitted is correctly
displayed

4. Create a duplicate patron with the same firstname and surname and
patron A, and set the date expiry value of 1/10/2017 and submit the form

5. The form displays a duplicate patron message. Notice that the dateexpiry input box is empty now

6. Select the new member (not a duplicate member) option in the
messagebox

7. The form successfully submits and notice that the date expiry value
displayed is that of the patron category (i.e. it is 29/9/2017) not the
dateexpiry value of 1/10/2017 that you manually set for this patron

8. Apply patch

9. Repeat step 4

10. The form displays a duplicate patron message. Notice the dateexpiry input box still
contains the value you entered which is 1/10/2017. Select the new member
(not a duplicate member) option in the messagebox

11. The form successfully submits and notice that the date expiry value
displayed is 1/10/2017 that you manually set for this patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 515e62992893b72c54a34311088a9442a37d8138)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 60b6d736ee306198af83e1a1482ff89280a05e7b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18812 - SIP Patron status does not respect OverduesBlockCirc
Nick Clemens [Thu, 15 Jun 2017 15:07:03 +0000 (11:07 -0400)]
Bug 18812 - SIP Patron status does not respect OverduesBlockCirc

To test:
1 - Set 'OverduesBlockCirc' to block
2 - Find or create a patron with overdues
3 - Perform a SIP patron lookup on that patron
misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL
--patron {userid or cardnumber} --password {pass} -m patron_information
4 - Note the first character of response is a ' '
5 - Apply patch
6 - Restart memcached, apache, and plack
7 - Perform SIP patron lookup
8 - Note the first character of response is 'Y'
9 - prove t/db_dependent/SIP/Patron.t
10 - Test should return green

Signed-off-by: Chris Kirby <chris.kirby@ilsleypubliclibrary.org>
Works as advertised

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ff4f0858950c37eeede38b2f067841602b97d7ba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4b360f1371a56268458b62e5c8c68da853b4e52d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19007 - Allow paypal payments via debit or credit card again
Kyle M Hall [Mon, 31 Jul 2017 13:18:15 +0000 (09:18 -0400)]
Bug 19007 - Allow paypal payments via debit or credit card again

A recent change in Paypal has removed the previous default option of paying via debit or credit card without an account. To bring this option back, we need to send an additional parameter to the PayPal API.

Test Plan:
1) Enable paypal for your Koha instance
2) Ensure you are not logged in to PayPal
3) Attempt to pay a fine via PayPal
4) Not the the "Pay with Debit or Credit Card" option is missing
5) Apply this patch
6) Refresh opac-account.pl
7) Attempt to make a payment via PayPal again
8) Note the option "Pay with Debit or Credit Card" is now available

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: George Williams <gwilliams@nekls.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 15924 - Coce not enabled on lists
Nick Clemens [Fri, 26 Feb 2016 14:46:45 +0000 (14:46 +0000)]
Bug 15924 - Coce not enabled on lists

To test:
Enable Coce and disable other image services
Load a list and not there are no covers
Apply patch
Load a list and note there are covers

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 85b963d11fb5d8674ca6b0ec60821663f9d8cf19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 669b6839eab456f36ed7c65a7a97fa7b386ab4e6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19335: Fix 00-merge-conflict-markers.t when dockerised
Jonathan Druart [Mon, 18 Sep 2017 17:23:54 +0000 (14:23 -0300)]
Bug 19335: Fix 00-merge-conflict-markers.t when dockerised

This does not make sense, but fix a bug (why?)
Without this patch, the tests failed on po files:

[17:14:26] t/00-merge-conflict-markers.t .. Failed 1/1 subtests
Test Summary Report
-------------------
t/00-merge-conflict-markers.t (Wstat: 9 Tests: 0 Failed: 0)
  Non-zero wait status: 9
  Parse errors: Bad plan.  You planned 1 tests but ran 0.
Result: FAIL

Note that this is not related to bug 19227.

if the ^>>>>>> and ^<<<<<< matches are done on the same line, the test fail
As saw it failed on *-pref.po files
  misc/translator/po/kn-Knda-pref.po
  misc/translator/po/ja-Jpan-JP-pref.po
  misc/translator/po/nl-BE-pref.po
  misc/translator/po/sr-Cyrl-pref.po

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0d03f143e25f498de780d2ddd1972c3be7947519)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bdfec37ab66f9c72f86adc7d6045bc83b5a92d88)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19227: Reduce the number of tests run by 00-merge-conflict-markers.t
Jonathan Druart [Thu, 31 Aug 2017 14:47:11 +0000 (11:47 -0300)]
Bug 19227: Reduce the number of tests run by 00-merge-conflict-markers.t

The number of tests on jenkins is sometimes confusing:

https://jenkins.koha-community.org/job/Koha_Master_D8/lastCompletedBuild/testReport/(root)/t_00_merge_conflict_markers_t/

shows that 00-merge-conflict-markers.t ran 10,751 tests, 124 less than
the previous run. However 124 files have not been removed from the
codebase!

I suggest to count only 1 test for all files.

Moreover files from blib and cover_db are counted, they should be
excluded.

Test plan:
  prove t/00-merge-conflict-markers.t
must return green

echo ">>>>>>>" >> mainpage.pl
and run the test again
It should now fail

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18794: Fix test ListMetadataFormats in OAI/Server.t
Jonathan Druart [Thu, 5 Oct 2017 20:42:21 +0000 (17:42 -0300)]
Bug 18794: Fix test ListMetadataFormats in OAI/Server.t

This test may fail on slow servers, it compares the response date with
'now', but both can differ a bit.

https://jenkins.koha-community.org/job/Koha_Master_D8/198/consoleFull

   Failed test 'ListMetadataFormats'
   at t/db_dependent/OAI/Server.t line 150.
     Structures begin differing at:
          $got->{responseDate} = '2017-06-12T14:31:51Z'
     $expected->{responseDate} = '2017-06-12T14:31:50Z'

7 years agoBug 18871: Make patron list name a link to view contents of list
Aleisha Amohia [Wed, 28 Jun 2017 00:40:00 +0000 (00:40 +0000)]
Bug 18871: Make patron list name a link to view contents of list

The link is the same as the 'Add patrons' button in Actions dropdown,
but requires one less click, and makes finding the contents of the list
more obvious.

To test:
1) Go to Tools -> Patron lists
2) Create a patron list if you haven't already
3) Confirm that clicking the name of the list takes you to the correct
list and shows the expected content.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d51059807690797aa4d16b0c0dd2932235a3b683)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e570915729b6b8e02e22b0cfdff4440b75815d26)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18781: Translatability: Get rid of exposed tt directives in openlibrary-readapi.inc
Marc Véron [Mon, 12 Jun 2017 07:07:28 +0000 (09:07 +0200)]
Bug 18781: Translatability: Get rid of exposed tt directives in openlibrary-readapi.inc

The file koha-tmpl/opac-tmpl/bootstrap/en/includes/openlibrary-readapi.inc
exposes template directives to translation. The only string that should
appear in .po from this file is "Open Library: "

To test:
- Apply patch
- Verify that code changes make sense
- Bonus test: create a new language 'aa-AA', verify in aa-AA-opac-bootstrap.po
  that there is only the following string for openlibrary-readapi.inc:
msgid "Open Library: "
msgstr ""

NOTE: Followed a test plan similar to bug 18776 comment 3

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 23cc8b39682fea7b0a9150933c65c34ef22d23dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 861fa8c8db8bd8bbd6281863d5029d55675f359c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18780: Translatability: Get rid of exposed tt directive in masthead-langmenu.inc
Marc Véron [Mon, 12 Jun 2017 06:41:41 +0000 (08:41 +0200)]
Bug 18780: Translatability: Get rid of exposed tt directive in masthead-langmenu.inc

The file opac-tmpl/bootstrap/en/includes/masthead-langmenu.inc exposes following tt directive to translators:

"[%% IF ( ( opaclanguagesdisplay ) && ( ! one_language_enabled ) && "
"( languages_loop ) && ( OpacLangSelectorMode == 'both' || "
"OpacLangSelectorMode == 'top') ) %%] "

This patch fixes it.

To test:
- Apply patch
- Verify that language selector in OPAC (top of the page) works as expected
- Bonus test: create a new language 'aa-AA', verify that line above does not
show up in aa-AA-opac-bootstrap.po

NOTE: Followed a test plan similar to bug 18776 comment 3

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 255cadeb772d63b06f77146c95b8d6e4b31d5836)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e0adbc10c09c25310f79fec55518fb5df50ad040)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18779: Translatability: Get rid of exposed tt directives in authorities-search...
Marc Véron [Mon, 12 Jun 2017 06:20:56 +0000 (08:20 +0200)]
Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search-results.inc (OPAC)

The file opac-tmpl/bootstrap/en/includes/authorities-search-results.inc
exposes template directives to translation where translators should not
be confronted with.

Example:
"[%% PROCESS showreference heading=seeals.heading linkType='seealso' "
"type=seeals.type authid=seeals.authid %%] "

To test:
- Apply patch
- Verify that Authority search in OPAC works as before
- Bonus test: create a new language 'aa-AA', verify that line above
  does not show up in aa-AA-opac-bootstrap.po

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 331320f93a5ef5293c3bcad80b9554ddea0196b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4dc640244651c584347b01f35f2cb25b6369a638)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt
Marc Véron [Sun, 11 Jun 2017 14:54:28 +0000 (16:54 +0200)]
Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt

The file opac-advsearch.tt exposes template directives to translation where translators should not be confronted with.
Example in po file:
"[%% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype')."
"size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and "
"OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) "
"%%] "

To test:
- Apply patch
- Verify that advanced search in OPAC behaves as before
- Create a new translation for a 'language' aa-AA (perl translate create aa-AA)
- Verify that template directives ar no longer exposed in aa-AA-opac-bootstrap.po

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae684fc9491102ba0b560ca6f414a325e763b31a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b1bce06e515e22482ca555b85da19f965b475f5f)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18754: [QA Follow-up] Tiny corrections
Marcel de Rooy [Fri, 4 Aug 2017 14:44:51 +0000 (16:44 +0200)]
Bug 18754: [QA Follow-up] Tiny corrections

Converted one INCLUDE directive to PROCESS; we are not changing variables here. (The PROCESS directive is slightly faster than INCLUDE because it avoids the need to localise (i.e. copy) the variable stash before processing the template.)

Removed one vim inserted letter i.

Error in [% IF ( XISBN.publicationyear ) _ ', ' _ XISBN.publicationyear %][% END %] The concatenation became part of the condition.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ff591f2c77a2a3c1de4a0e7167ccfeba08c2f128)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 78e527129b0b547eff7311c3f25a4b1f679d2a97)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt
Marc Véron [Fri, 9 Jun 2017 13:43:36 +0000 (15:43 +0200)]
Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt

The file opac-detail.tt exposes a lot of template directives to translation where translators should not be confronted with.

Some examples from po file are:

$[% SUBFIELD.code %] [% SUBFIELD.value %]

%s [%% INCLUDE \"openlibrary-readapi.inc\" bib = { normalized_isbn => "
"normalized_isbn, lccn => lccn, normalized_oclc => normalized_oclc } %%]

See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END "
"%]

To test:
- Apply patch
- Do a search in OPAC that has more than 1 results
- Go to the detail page of one of the items found
- Verify that the details display as before and that you can
  browse the results with Previous and Next
- In staff client, change OPACXSLTDetailsDisplay from 'default' to
  empty for "no xslt" and repeat steps above
- In staff client, set HTML5MediaEnabled to 'OPAC' or 'OPAC and staff client'
- Verify that media catalogued in field 856 still work
- Create a new translation for a 'language' aa-AA (perl translate create aa-AA)
- Verify that template directives ar no longer exposed in aa-AA-opac-bootstrap.po

Followed test plan which works as intended

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 752aef4593f1aa2d64700bf9738e7e03907eb1cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 65e09b28dbbe43772b9104ffcafa1f81441c4d70)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18687: Translatability: abbr tag should not contain lang attribute
Marc Véron [Sun, 28 May 2017 07:34:21 +0000 (09:34 +0200)]
Bug 18687: Translatability: abbr tag should not contain lang attribute

In manage-marc-import.tt, we have an abbreviation:

<abbr title="Differences between the original biblio and the imported" lang="en">Diff</abbr>

In translations (e.g. German), the line appears as follows:
<abbr title="Unterschiede zwischen Originaltitelsatz und importiertem Titelsatz" lang="en">Diff</abbr>

The lang attribute is wrong here, it is still "en".
The text language is the same as defined at the top of the page - or with other
words, the lang tag is superfluous.

This patch removes it.

To test:
Verify that code change makes sense.

Passes QA test and the change is logical
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 03c7f9366c97d6402e1e16182d7a2ddbbe37eccb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9f96a3bb39c8fcb246a3caeeb2d7a24f46da7153)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19088: plugins-upload causes error log noise
Lee Jamison [Fri, 11 Aug 2017 18:58:53 +0000 (18:58 +0000)]
Bug 19088: plugins-upload causes error log noise

After uploading a plugin the error log indicates
use of uninitialized value in $op. This patch
silences the noise.

To test:
1) Set <enable_plugins> to 1 (one) in koha-conf.xml.
2) Set the UseKohaPlugins system preference to 'Enable'.
3) Navigate to Administration -> Manage plugins.
4) Install the test plugin KPZ file attached to this bug.
5) Notice the uninitialized value noise in the error log.
6) Uninstall the plugin (plack restart may be required if plack is
    enabled).
7) Apply patch.
8) Install the plugin again.
9) Notice no noise in the error log.
10) Run qa tools.
11) Run prove t/db_dependent/Plugins.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1076a0edf32b621da54c53ea71595885f7e14c38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cdcc0458b796aff59a50e0f5d4c7b7140682eacf)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19118 - Due to wrong variable name passed vendor name is not coming in browser...
Amit Gupta [Tue, 15 Aug 2017 16:51:37 +0000 (22:21 +0530)]
Bug 19118 - Due to wrong variable name passed vendor name is not coming in browser title bar

Test

1. Hit the page /cgi-bin/koha/acqui/supplier.pl?booksellerid=xx
   xx is a booksellerid
2. Apply the patch and reload the page.
3. You can see vendor name in browser title bar.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19126: Fix Members.t with IndependentBranches set
Marcel de Rooy [Wed, 16 Aug 2017 11:15:19 +0000 (13:15 +0200)]
Bug 19126: Fix Members.t with IndependentBranches set

If you enabled that pref, Members.t fails with:
t/db_dependent/Members.t .. 63/63 # Looks like you failed 15 tests of 63.

The first one is:
t/db_dependent/Members.t .. 32/63
   Failed test 'Staff patron not deleted from list'
   at t/db_dependent/Members.t line 304.

Bottle neck is GetBorrowersToExpunge. The results of that sub depend on the
state of this preference.
Trivially fixing it here by disabling the pref before the first call.

Test plan:
[1] Do not apply this patch yet. Enable IndependentBranches.
[2] Run Members.t and observe that it fails.
[3] Apply this patch. And run Members.t again. It should pass now.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 9409: (QA followup) Add --dbhost help to koha-create man page
Tomas Cohen Arazi [Fri, 11 Aug 2017 18:09:00 +0000 (15:09 -0300)]
Bug 9409: (QA followup) Add --dbhost help to koha-create man page

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 9409: Add --dbhost parameter and dbhost field
Mark Tompsett [Fri, 23 Jun 2017 01:46:50 +0000 (01:46 +0000)]
Bug 9409: Add --dbhost parameter and dbhost field

This allows setting the remote db host correctly for
request-db either with a command-line or passwd file.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18469: QA Follow-up
Nick Clemens [Fri, 7 Jul 2017 11:25:24 +0000 (11:25 +0000)]
Bug 18469: QA Follow-up

Restore datepicker class
Use Koha.Preference
Copy changes to moremember

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a66c0b1dd76a2fe08ed7ac189ad8a564372ab3a9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c26108afa776b9de93ebe7c334c0eeff8ea2ed98)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18469: Suspend all holds when specifying a date to resume hold does not keep...
Nick Clemens [Fri, 21 Apr 2017 14:08:27 +0000 (10:08 -0400)]
Bug 18469: Suspend all holds when specifying a date to resume hold does not keep date

Name of field had 'datepicker' embedded, this caused variable issue

To test:
 1 - Place several holds for a patron
 2 - Go to holds tab in circulation
 3 - Select a date for suspend all holds until
 4 - Suspend all holds
 5 - Note date is not used, suspended indefinitely
 6 - Apply patch
 7 - Resume all suspended holds
 8 - Select a date for suspend all holds until
 9 - Suspend all holds
10 - Note date is used

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a58745d9dbbf98c79f4c1a3e7cd40fb45425fc91)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fec723524cbd972b4788f34e105908697c43ea01)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19027 - Circulation rules: Better wording for standard rules for all libraries
Marc Véron [Wed, 2 Aug 2017 16:01:06 +0000 (18:01 +0200)]
Bug 19027 - Circulation rules: Better wording for standard rules for all libraries

In Home > Administration > Circulation and fine rules, the standard value for
"Select a library: All libraries" is confusing and leads to support cases.

Change wording to "Standard rules for all libraries".

To test:
- Apply patch
- Go to Home > Administration > Circulation and fine rules
- Verfiy that text in drop down 'Select a library' makes sense.

Followed test plan which works as intended. I agree with the wording it
is significantly clearer than previously
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18941 - C4::Budgets GetBudgetByCode should return active budgets over inactive...
Nick Clemens [Fri, 14 Jul 2017 11:25:42 +0000 (11:25 +0000)]
Bug 18941 - C4::Budgets GetBudgetByCode should return active budgets over inactive budgets

To test:
1 - Create an active budget
2 - Create an inactive budget
3 - Ensure they each have a fund with the same code
4 - Set MarcFieldsToOrder to get the budget_code from a marc field
5 - Stage a file using the duplicated code
6 - Add to a basket from the staged file
7 - Add the items
8 - Note funds are encumbered from the inactive budget
9 - Apply patch
10 - Repeat 5-8 with a new basket
11 - Note the active budget is now used

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 18941 - Unit tests
Nick Clemens [Fri, 14 Jul 2017 11:06:16 +0000 (11:06 +0000)]
Bug 18941 - Unit tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19071: Fix Members/IssueSlip.t
Marcel de Rooy [Thu, 10 Aug 2017 07:24:08 +0000 (09:24 +0200)]
Bug 19071: Fix Members/IssueSlip.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Members/IssueSlip.t line 44.

We do not need to delete all branches here.

Note: The test still needs attention for noisy userenv warns, but it should
pass now.

Test plan:
Run t/db_dependent/Members/IssueSlip.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19071: Fix Circulation/issue.t
Marcel de Rooy [Thu, 10 Aug 2017 07:13:44 +0000 (09:13 +0200)]
Bug 19071: Fix Circulation/issue.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Circulation/issue.t line 65.

Cause:
See also bug 19070.
We do not need to delete all branches here.

Test plan:
Run t/db_dependent/Circulation/issue.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19047: Fix AddBiblio call in ShelfBrowser.t
Jonathan Druart [Thu, 10 Aug 2017 18:06:39 +0000 (15:06 -0300)]
Bug 19047: Fix AddBiblio call in ShelfBrowser.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 19047: Fix AddBiblio call in Reserves.t
Marcel de Rooy [Mon, 7 Aug 2017 06:44:43 +0000 (08:44 +0200)]
Bug 19047: Fix AddBiblio call in Reserves.t

AddBiblio does not return a title; the biblioitemnumber is stored in the
title variable.
The variables for biblioitemnumber are not used and can be removed.

Test plan:
Run t/db_dependent/Reserves.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19013: (QA followup) Set guarantorid to NULL patron sample data
Tomas Cohen Arazi [Mon, 7 Aug 2017 14:04:51 +0000 (11:04 -0300)]
Bug 19013: (QA followup) Set guarantorid to NULL patron sample data

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19013: Fix borrowers.guarantorid in sammple_patrons.sql
Jonathan Druart [Mon, 31 Jul 2017 19:12:16 +0000 (16:12 -0300)]
Bug 19013: Fix borrowers.guarantorid in sammple_patrons.sql

That breaks randomly tests on Jenkins (Koha/Patrons.t)

It certainly affects data in other languages but I did not find a quick
and easy way to modify this file (replace all guarantorid values with
NULL)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Easy fix
Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19441: Remove ES-related tests
Jonathan Druart [Wed, 11 Oct 2017 13:50:18 +0000 (10:50 -0300)]
Bug 19441: Remove ES-related tests

16.05.x do not provided stable ES support, it will take us too much time
to keep these tests up-to-date.

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19441: Fix t/db_dependent/Biblio/TransformKohaToMarc.t
Jonathan Druart [Mon, 9 Oct 2017 21:32:18 +0000 (18:32 -0300)]
Bug 19441: Fix t/db_dependent/Biblio/TransformKohaToMarc.t

Koha::Caches and Koha::MarcSubfieldStructures do not exist in 16.05.x

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19441: Fix t/db_dependent/Biblio/Isbd.t
Jonathan Druart [Mon, 9 Oct 2017 21:27:23 +0000 (18:27 -0300)]
Bug 19441: Fix t/db_dependent/Biblio/Isbd.t

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19441: Fix AutomaticItemModificationByAge.t
Jonathan Druart [Mon, 9 Oct 2017 21:25:36 +0000 (18:25 -0300)]
Bug 19441: Fix AutomaticItemModificationByAge.t

Koha::Caches does not exist in 16.05.x

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19441: Fix AuthorisedValues.t
Jonathan Druart [Mon, 9 Oct 2017 21:23:58 +0000 (18:23 -0300)]
Bug 19441: Fix AuthorisedValues.t

Koha::AuthorisedValueCategor[y|ies] do not exist in 16.05.x

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoBug 19441: Fix xt/sample_notices.t
Jonathan Druart [Mon, 9 Oct 2017 21:21:03 +0000 (18:21 -0300)]
Bug 19441: Fix xt/sample_notices.t

fr-CA is not up-to-date:
- RESERVESLIP have been renamed with HOLD_SLIP
- PASSWORD_RESET and MEMBERSHIP_EXPIRY are not defined

Signed-off-by: Mason James <mtj@kohaaloha.com>
7 years agoIncrement version for 16.05.17 release v16.05.17
Mason James [Wed, 20 Sep 2017 06:34:31 +0000 (18:34 +1200)]
Increment version for 16.05.17 release

7 years agoAdd release notes for Koha 16.05.17
Mason James [Wed, 20 Sep 2017 06:54:33 +0000 (18:54 +1200)]
Add release notes for Koha 16.05.17

7 years agoTranslation updates for Koha 16.05.17
Mason James [Wed, 20 Sep 2017 06:48:30 +0000 (18:48 +1200)]
Translation updates for Koha 16.05.17

7 years agoRevert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - Add classes MarcSubfield...
Mason James [Wed, 20 Sep 2017 03:59:43 +0000 (15:59 +1200)]
Revert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - Add classes MarcSubfieldStructure[s]"

This reverts commit 99e7f928b1bdd7ca997c6ae403a691f90866eeb4.

7 years agoRevert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - add tests"
Mason James [Wed, 20 Sep 2017 03:59:35 +0000 (15:59 +1200)]
Revert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - add tests"

This reverts commit a53c3efd4c1773a609f2929a61b7324504cc18eb.

7 years agoRevert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - Add search_by_marc_field"
Mason James [Wed, 20 Sep 2017 03:59:27 +0000 (15:59 +1200)]
Revert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - Add search_by_marc_field"

This reverts commit c8fbb9c58bd72031b77d52327004ba441e71cdb9.

7 years agoRevert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - inventory"
Mason James [Wed, 20 Sep 2017 03:59:19 +0000 (15:59 +1200)]
Revert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - inventory"

This reverts commit a1b569f89eead58d274a6c75d2790bda94fc0c55.

7 years agoRevert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - (follow-up) inventory"
Mason James [Wed, 20 Sep 2017 03:59:11 +0000 (15:59 +1200)]
Revert "Bug 17249: Remove GetKohaAuthorisedValuesFromField - (follow-up) inventory"

This reverts commit 38cbc453e0cc4a509fe267e32f3903393f449d41.

7 years agoRevert "Bug 17249: Remove GetKohaAuthorisedValuesFromField"
Mason James [Wed, 20 Sep 2017 03:59:04 +0000 (15:59 +1200)]
Revert "Bug 17249: Remove GetKohaAuthorisedValuesFromField"

This reverts commit 65945e30f71fe353c995bab97a5b6a333326b570.

7 years agoRevert "Bug 17249: GetKohaAuthorisedValuesFromField - rm GetAuthValCodeFromField"
Mason James [Wed, 20 Sep 2017 03:58:54 +0000 (15:58 +1200)]
Revert "Bug 17249: GetKohaAuthorisedValuesFromField - rm GetAuthValCodeFromField"

This reverts commit 286b6f4e3e8db593fbe218ab08c622e5491ac44d.

7 years agoBug 19128: XSS - admin/authorised_values.tt
Jonathan Druart [Tue, 12 Sep 2017 13:35:10 +0000 (10:35 -0300)]
Bug 19128: XSS - admin/authorised_values.tt