]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 18999: (QA followup) ModReceiveOrder expects a hashref
Tomas Cohen Arazi [Fri, 29 Sep 2017 14:29:24 +0000 (11:29 -0300)]
Bug 18999: (QA followup) ModReceiveOrder expects a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2b343df13e6d154296cf968cb709aa910c58f336)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 388ced2e7472ccde5e8f3764d37d0d6c18480e34)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18999: Modified SQL query in GetBudgetSpent() in C4/Budgets.pm
Alex Buckley [Sat, 22 Jul 2017 19:19:44 +0000 (19:19 +0000)]
Bug 18999: Modified SQL query in GetBudgetSpent() in C4/Budgets.pm

Removed the SQL select condition 'AND closedate IS NOT NULL' because
this was not returning shippingcost values and it does not exist in the
SQL query to return the shipping cost in spent.pl

Also removed the retrieval of shipping cost and the associated addition
of item(s) cost and shipping cost in GetBudgetOrdered() in C4/Budgets.pm
to prevent the shipping costs being subtracted off the fund total twice

Test plan:
1. Go to Acquisition and create a currency, budget (make this value of
100), fund ( make this the value of 50), vendor (if
neccessary)

2. Create a basket and click 'Add to basket'

3. Add 2 items with the vendor price of 10

4. Click 'Receive shipment' and write in the shipment cost of 6

5. Click 'Finish receiving' and go back to Acquisitions

6. Notice the spent column value is 0.00 but if you click on the value then
the spent.pl page is displayed and shows that the shipment cost was 6.00

7. On the acquisition page also notice that the ordered column value is 26.00

8. Click on the name of the fund and notice the spent column value is
0.00 in the fund page table

9. Apply patch

10. Refresh acquisition page and notice that 6.00 is the value in the
Spent column and 20.00 is the value in the ordered column. Both of which
match the subtotal of the full-list tables displayed when you click on these
values

11. Also notice the spent value in the fund page table is 6.00

12 Observe the changes to GetBudgetSpent() and GetBudgetOrdered() C4/Budgets.pm and check they make sense

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.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 caef98c7f64e02bba996c4da4f862bb55a86171a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19b3041fb8bee95c320a909afd45f57b707ff2c2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18999: (QA followup) Minor fixes for tests
Alex Buckley [Sat, 16 Sep 2017 07:52:25 +0000 (07:52 +0000)]
Bug 18999: (QA followup) Minor fixes for tests

Removed unneccessary declaration of $budget and changed
Koha::Acquisition::Order->new->insert into
Koha::Acquisition::Order->new->store as requested in tester feedback

Test plan:
1. Go into your koha-shell

2. set the PERL5LIB variable

3. Run t/db_dependent/Budgets.t

All tests should pass

Sponsored-by: Catalyst IT
Signed-off-by: Josef Moravec <josef.moravec@gmail.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 90c5391b349a339b3f1fea1ebfeb044cfa76c8a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8250e0f69a069ae2a43f52135e0a6d4daf259dfc)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18999: Add regression tests
Alex Buckley [Fri, 18 Aug 2017 15:16:55 +0000 (15:16 +0000)]
Bug 18999: Add regression tests

Added regression test for GetBudgetSpent() and GetBudgetOrdered() into
the t/db_dependent/Budgets.t

Test plan:
1. Go into your koha-shell

2. set the PERL5LIB variable

3. Run t/db_dependent/Budgets.t

All tests should pass

Sponsored-by: Catalyst IT
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Josef Moravec <josef.moravec@gmail.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 776692f31167f32c1621168249a9ebfea2accc96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2df9a4c0e0793065ce6787d683a68bef72075ff6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19135: Restore AllowHoldsOnPatronsPossessions behaviour
Kyle M Hall [Thu, 20 Jul 2017 18:28:20 +0000 (14:28 -0400)]
Bug 19135: Restore AllowHoldsOnPatronsPossessions behaviour

Bug caused by
  commit bc39f0392bbebaad4c083f81308f652a325be042
  Bug 14695 - Add ability to place multiple item holds on a given record per patron

Test Plan:
1) Set AllowHoldsOnPatronsPossessions to "Don't"
2) Check out an item to a patron
3) Place a hold on that item for the same patron
4) Note you are allowed to with no alert
5) Delete the hold
6) Apply this patch
7) Place a hold on that item for the same patron
8) Note you recieve an alert now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.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 46ff8df19544e3e7c16a4e3f21b3b14bc043dd88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4d22af870d1051d963cab31169a7f536864e56b0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05
Marcel de Rooy [Thu, 5 Oct 2017 08:41:33 +0000 (10:41 +0200)]
Bug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05

Commit b4392018bc1f9bf6a2f7dfe70b488856ad3a3897 [Bug 12478: make things using SimpleSearch use the new version] changed sub FindDuplicateAuthority and replaced this call (from 3.22.x) in 16.05 (pushed April 2016):
    my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] );

The new call does unfortunately not include the authorityserver:
    my ($error, $results, $total_hits) = $searcher->simple_search_compat( $query, 0, 1 );
Simple_search_compat redirects to C4/Search/SimpleSearch and SimpleSearch assumes a biblioserver if no server is passed.

This effectively makes FindDuplicateAuthority useless since we will no longer find duplicates and we could see an error like this in the log:
    16:51:42-04/10 zebrasrv(51) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @and @attr 1=authtype PERSO_NAME @attr 1=Heading Moerenhout

The fix is obviously trivial.

Test plan:
[1] Go to Authorities.
[2] Add a new authority PERSO_NAME with 100a Moerenhout.
[3] Repeat step 2. Verify that you get the duplicate authority warning.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 56500e8e676782155c5717e8db9786af394252d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2ffe76350ee6373dc27ba8ac098a468875c2f4fb)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 15173: Restore SubfieldsToAllowForRestrictedEditing
Jonathan Druart [Tue, 16 Aug 2016 14:12:07 +0000 (15:12 +0100)]
Bug 15173: Restore SubfieldsToAllowForRestrictedEditing

Bug 7673 introduced SubfieldsToAllowForRestrictedEditing but bug 12176
broke it assuming that only selects were impacted by this feature.

Test plan:
Go back on bug 7673 and confirm that
SubfieldsToAllowForRestrictedEditing is working as expected with this
patch applied.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
For clarification, the item fields that are entered in
SubfieldsToAllowForRestrictedEditing should EXCLUDE the desired
fields you want to disable.

Test plan (updated to test the scenario in the bug Description):
1. Create a patron with only the following permissions:
    - catalogue (Required for staff login)
    - editcatalogue -> edit_catalogue
    - editcatalogue -> edit_items
    - editcatalogue -> edit_items_restricted
2. Navigate to Administration -> Global system preferences -> Cataloging
    -> Record Structure -> SubfieldsToAllowForRestrictedEditing
3. In the input field for SubfieldsToAllowForRestrictedEditing enter in
    all the 952 fields EXCEPT the ones desired to be disabled. In this
    case, we want to disallow editing of 952$2, 952$a, 952$b, 952$e, 952$h,
    and 952$o so we enter the following into the
    SubfieldsToAllowForRestrictedEditing (without quotes) "952$0 952$1
    952$3 952$4 952$5 952$7 952$8 952$c 952$d 952$f 952$g 952$i 952$j
    952$p 952$t 952$u 952$v 952$w 952$x 952$y 952$z"
4. Click Save all Cataloging preferences
5. Login to the staff client as the created restricted editing patron
6. Edit an item
7. Note that all fields except for the ones excluded from the syspref
    are editable

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c84d03c582976cb590c62b25d59505b982a71d97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b7140dcd50a69396856cd5f66d9fcd74c579407d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 16204: Show friendly error message if trying to edit record which no longer exists
Aleisha Amohia [Wed, 30 Aug 2017 04:36:50 +0000 (04:36 +0000)]
Bug 16204: Show friendly error message if trying to edit record which no longer exists

To test:
1) Create a record
2) Click Edit -> Edit record. open this in another tab
3) Delete the record in the original tab
4) Refresh the edit form in the other tab. Notice the software error
5) Apply patch and refresh page
6) There should be a nice error message with the form fields and buttons
hidden. Confirm links work as expected.

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 17c5b76597b9a356bc215a3682d7293e307fcc46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1766d21389a104948aba639921d987674cba3d6b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 15644 - City dropdown default selection when modifying a patron matches only...
Owen Leonard [Thu, 8 Jun 2017 16:01:32 +0000 (16:01 +0000)]
Bug 15644 - City dropdown default selection when modifying a patron matches only on city

This patch modifies the include files which contain the form fields for
city, state, zipcode, etc. shown on the patron entry screen. The files
are modified so that the city/state/zip <select> preselects a value
based on city, state, and zipcode matching the values in the
corresponding text fields.

To test, confirm that the bug's steps to reproduce are fixed:

- Enter two cities via Administration -> Patrons and circulation
  -> Cities and towns:
    Springfield, MA 01101
    Springfield, VT 05156
- Edit a patron choosing, Springfield VT, and save.
- Edit the patron again and confirm that the correct city is
  pre-selected.
- Confirm this result with all three different settings of the
  "AddressFormat" system preference.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 83704cb1fab33feb0262fdab99bccf0052243d14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8cd8df19480a3765e54c3dcfb4948b097e7ea5ad)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18742: (QA followup) Fix indentation
Julian Maurice [Fri, 1 Sep 2017 14:07:36 +0000 (16:07 +0200)]
Bug 18742: (QA followup) Fix indentation

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0ae70349809d51552e4297625db1382aa4e26dc5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b3884ec092cd80268fa2f484ab95984d434f1c78)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18742: Circulation statistics wizard no longer exports the total row
Nick Clemens [Wed, 7 Jun 2017 14:56:47 +0000 (10:56 -0400)]
Bug 18742: Circulation statistics wizard no longer exports the total row

To test:
- Run the circulation wizard
- Export to csv
- Note there is no total row
- Apply patch
- Export to csv
- Total row totally there!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ff22cb46a5f6a1f75422c2a90e1f80ccb05c30b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 30811a653eb2f5e6ab089094bbb9936756aa9a16)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19337: Make basic_workflow.t configurable through ENV
Tomas Cohen Arazi [Mon, 18 Sep 2017 18:58:15 +0000 (15:58 -0300)]
Bug 19337: Make basic_workflow.t configurable through ENV

This patch makes the basic_workflow.t selenium tests read ENV for the
following vars:

KOHA_USER
KOHA_PASS
KOHA_INTRANET_URL
SELENIUM_ADDR
SELENIUM_PORT

to properly configure the running environment. If absent, all variables
fallback to current behaviour:

KOHA_USER // 'koha'
KOHA_PASS // 'koha'
KOHA_INTRANET_URL (unchanged)
SELENIUM_ADDR // 'localhost'
SELENIUM_PORT // 4444

[*] Selenium defaults are documented on the Selenium::Remote::Driver docs.

Prerequisites:
Make sure you have a working environment for the Selenium tests:
- Run:
  $ sudo apt update
  $ sudo apt install xvfb firefox-esr

To test:
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar \
     -O /tmp/selenium.jar
 k$ SELENIUM_PATH=/tmp/selenium.jar
 k$ Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
 k$ DISPLAY=:1 java -jar $SELENIUM_PATH &
 k$ prove t/db_dependent/selenium/basic_workflow.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/db_dependent/selenium/basic_workflow.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 5bb19808bb23a01a257a0970bd7e2ae43fb5b3d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f2b53042bd94ae4427ad08f5c55944974458ded4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18584 - removed white space in C4/Accounts.pm
Dominic Pichette [Tue, 12 Sep 2017 14:13:58 +0000 (10:13 -0400)]
Bug 18584 - removed white space in C4/Accounts.pm

Test Plan:
    1-go to C4/Accounts.pm
    2-there should not be a trailing space at line 279.

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5400795a6651adc021801052fa0186747983b587)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d3f3512d3f480e3a7a36c3917e6748fef825d34f)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 12346: Display the correct number of pending patron modifications on the patron...
Jonathan Druart [Wed, 6 Sep 2017 14:23:10 +0000 (11:23 -0300)]
Bug 12346: Display the correct number of pending patron modifications on the patron module home page

Due to the way members-home.pl handles the variable $branch, the number
of patron modifications listed on members-home.pl may differ from the
number listed on mainpage.pl. When the librarian clicks this link, he or
she may see a different number than was listed, or none at all!

Test Plan:
0) Set IndependentBranchesPatronModifications = Yes
1) Create a number of modification request for BranchA
2) Log into the staff intranet with a patron without superlibrarian
permissions and set your branch to BranchB
3) Note the modifications alert to does not display on mainpage.pl
4) Click the "Patrons" link to take you to members-home.pl
5) Note the modifictions alert does display on this page
6) Apply this patch
7) Reload members-home.pl, note the alert no longer displays

QA notes: What was the point of the branch variable?

Followed test plan, patch worked as described. Also passed QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4efe251f353cb9eddd302b6214e1f4392620b395)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4f2dede23fe09d68f94276d8e26b58091c590c9e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18801: DBRev 16.11.13.001
Katrin Fischer [Sun, 29 Oct 2017 17:42:12 +0000 (18:42 +0100)]
Bug 18801: DBRev 16.11.13.001

7 years agoBug 18801: [Follow-up] Dbrev to repair bad auth type codes
Marcel de Rooy [Thu, 15 Jun 2017 13:47:21 +0000 (15:47 +0200)]
Bug 18801: [Follow-up] Dbrev to repair bad auth type codes

Test plan
Run updatedatabase.

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 aa03981e79a10bd5a032f13533d93f0b87bd37f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ed45e76bf928a5c929525b8f2795524ada217a1e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18801 - Merging authorities has an invalid 'Default' type in the merge framework...
Nick Clemens [Wed, 14 Jun 2017 13:19:10 +0000 (09:19 -0400)]
Bug 18801 - Merging authorities has an invalid 'Default' type in the merge framework selector

To test:
1 - Find two authorities and start a merge
2 - Leave the dropdown at 'Default'
3 - Merge records and note you get an error and can no longer view the
new record
4 - Check DB value of record authtypecode = 'Default'
5 - Apply patch
6 - Find two other authorities
7 - Merge leaving selector at default
8 - Success
9 - Check DB value of record authtypecode = ''

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 c1112236f908626b273f7dc950807ce2e085db2d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c7b47b3dfa689e8b746d188c648ad257feb678b6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19262: Remove xt/author/pod_spell.t
Jonathan Druart [Wed, 6 Sep 2017 13:42:28 +0000 (10:42 -0300)]
Bug 19262: Remove xt/author/pod_spell.t

If you run `prove xt/author/pod_spell.t` without having Test::Spelling installed, it will skip the tests.

If you install the lib-test-spelling-perl, the test will fail:
xt/author/pod_spell.t .. You said to run 0 tests at xt/author/pod_spell.t line 21.
xt/author/pod_spell.t .. Dubious, test returned 25 (wstat 6400, 0x1900)
No subtests run

This is because the call to all_pod_files_spelling_ok is expecting a path

If we try to fix it with adding "." as parameter, the tests will raise tone of errors.

Let's remove this file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 35e3de845c591958d66c6602940453f2a803a7ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8e09eaec4b7bcbeb66a4e33fbe1adb2fc976fcf)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoAdd release notes for Koha 16.11.13 v16.11.13
Katrin Fischer [Sun, 22 Oct 2017 22:58:11 +0000 (00:58 +0200)]
Add release notes for Koha 16.11.13

7 years agoMerge remote-tracking branch 'transl/16.11.13-translate-20171022' into 16.11.x
Katrin Fischer [Sun, 22 Oct 2017 22:39:38 +0000 (00:39 +0200)]
Merge remote-tracking branch 'transl/16.11.13-translate-20171022' into 16.11.x

7 years agoTranslation updates for Koha 16.11.13
root [Sun, 22 Oct 2017 22:34:24 +0000 (19:34 -0300)]
Translation updates for Koha 16.11.13

7 years agoIncrement version for 16.11.13 release
Katrin Fischer [Sun, 22 Oct 2017 22:31:19 +0000 (00:31 +0200)]
Increment version for 16.11.13 release

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: Katrin Fischer <katrin.fischer.83@web.de>
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: Katrin Fischer <katrin.fischer.83@web.de>
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: Katrin Fischer <katrin.fischer.83@web.de>
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: Katrin Fischer <katrin.fischer.83@web.de>
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: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19372: (bug 15801 follow-up) pass selected frameworkcode to the template
Jonathan Druart [Wed, 27 Sep 2017 15:54:18 +0000 (12:54 -0300)]
Bug 19372: (bug 15801 follow-up) pass selected frameworkcode to the template

Bug 15801 removes the 2 lines that were necessary to retrieve the
framework selected by the user and pass it to the template.
All bibliographic records created when adding an order to the basket
using an external source used the default framework.

Test plan:
Add an order to a basket from an external source
Select another framework than the default one
=> Without this patch, whatever the framework you picked, the default
one is used
=> With this patch applied the framework code you will pick will be used

Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 60a17c1b2b8582620fc94ab9eadd7e8336a5d1fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 13f9359dc3da8be011370327b20d9cd4f05ee490)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19366: Do not block patron's detail update if EmailMustBeUnique
Jonathan Druart [Wed, 27 Sep 2017 16:44:00 +0000 (13:44 -0300)]
Bug 19366: Do not block patron's detail update if EmailMustBeUnique

If the pref PatronSelfRegistrationEmailMustBeUnique is set ("consider"),
a patron is not allowed to register with an existing email address.
The existing code is wrong and reject a patron that is updating their
personal details with "This email address already exists in our
database.", even if the patron did not modify their email address.

This is caused by the query we made, we must search for patron with this
email address but who is not the current patron.

Test plan:
- Set PatronSelfRegistrationEmailMustBeUnique to "consider"
- Register a new patron with an existing email address
=> you should not be allowed
- Use a non-existent email address
=> You should be allowed
- Edit your patron details
- Modify some infos
=> Should pass
- Modify your email address with an existing one
=> You should not be allowed to do that

Followed test plan, patches worked 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 ae02cf97e469a17d3bdc9d5c7db702960fd620c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e23822b869ea66f63ce6c6027e418c79e3c7ba04)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 632e2ad51d2510a412224ded5e51a9f991d566b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 47223f0cad47913c15f4c9dacfbc0ed4682a8e2d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d34fae94995977b730e4bbfc11bdecaa3ce310a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1b8e2f600a51047191fca14bdaa19bca612887c9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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

(cherry picked from commit a2cc68e8b7a33dd7983c2125e32ba269777b8ace)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4ba051fd6eb54bbc3abf94d8f60b5543009cb32c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>
(cherry picked from commit 5c873a408f40fd1660d0b09c6de8c1ca2e252d11)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a2fd973b644c9956ce7c35bdc2fcdb7b0e71e45e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fed86d50420dcb3fb468c5743a1e370d075bc5e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c4112a744f38f2ae78db1828c20d98d512d6efb9)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e90874241808354777cc1c27ad3ad106ffdc7cd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aaf0d3dc474def89ffbb69548ebaf830109143b0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 19228: Trigger confirm delete when removing item from course
Aleisha Amohia [Thu, 31 Aug 2017 21:18:24 +0000 (21:18 +0000)]
Bug 19228: Trigger confirm delete when removing item from course

To test:
1) Enable UseCourseReserves syspref
2) Go to Course Reserves
3) Add a new course if you don't already have one
4) Add an item to the course
5) Click 'remove' to delete the item from the course
6) Notice the item deletes straight away with no confirmation prompt
7) Apply the patch
8) Repeat steps 4 and 5
9) Confirm the confirmation box pops up and works as expected

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 7aef2f3298b0348c2a3994e344e32e5bc41f1f07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 870f562e58c8327565b52d3b10f5a8ed2a000706)
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0c6538f033f43cde33d186561a93a197467bd9a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 11b73c1fa06c870a62640ffa8fd8f8610df5df18)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1417f83e8b8a57e70e9120244a36204cf4acb3c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e25bb0548d4ee69b9d79567a626fe91487386b71)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19081: Do not list plugins that have been uninstalled
Jonathan Druart [Mon, 28 Aug 2017 17:00:28 +0000 (14:00 -0300)]
Bug 19081: Do not list plugins that have been uninstalled

Under plack, can_load should not check if a package is in cache, but
reload it. Otherwise plugins that have been uninstalled will still get
listed.
The error raised by can_load must only be displayed if the plugin has
been removed.

Test plan:
1/ Upload a plugin
2/ Note the plugin is listed as installed
3/ Modify the package of the plugin to add a compilation error (use
'Foo' for instance)
4/ Reload the page
5/ The plugin is not listed and a warning appear in the logs
6/ Remove the compilation error and uninstall the plugin
7/ The plugin is no longer listed and no warning appear in the logs

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 19081: Remove useless $plugin_file variable

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d928038a523b7ef44257ddfe97c405173c9b3b2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 53c84ea289e73fa2f56711dd8dd8e7ebac591ae7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>
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

7 years agoBug 19116: Hold not set to waiting after transfer
Josef Moravec [Tue, 22 Aug 2017 08:58:11 +0000 (08:58 +0000)]
Bug 19116: Hold not set to waiting after transfer

Test plan:

0) Do not apply the patch
1) Place hold on item from another branch
2) Switch to that branch
3) Check them in at the other branch to set them into transport status (T)
4) Switch back to your homebranch
5) Check items in again, use the different confirm buttons and
    compare: Only "confirm and print" will be set to waiting, "confirm"
    remains in transport.
6) Apply the patch
7) Repeat 1-5 - now should work as expected - the hold is marked waiting
on "confirm" button too
8) Check the hold from the same branch, to make sure this doesn't add
regression

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 80fd5cd0dbfe8c5612325ca65251d36a97fcfc1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2a0dc0f1d28ad03dd48326caff120dfe3b3daacd)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19116: (followup) Add tests to highlight the problem in CheckReserves
Josef Moravec [Fri, 22 Sep 2017 08:40:56 +0000 (08:40 +0000)]
Bug 19116: (followup) Add tests to highlight the problem in CheckReserves

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a0c73b7bdafd21e19e0c1ba6a7ea222216d70500)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b3cd8c2def10285e2efb85bf88a47f315d80a8a5)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19116: Unit tests
Jonathan Druart [Mon, 4 Sep 2017 17:14:31 +0000 (14:14 -0300)]
Bug 19116: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 021d1d3714602be64609b9db82fd92e8bb1b42c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bc3bfeab37abf9e83b26ae4635595aa5fc5b93ea)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18897: Add skipping to t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
Mark Tompsett [Tue, 3 Oct 2017 02:00:57 +0000 (22:00 -0400)]
Bug 18897: Add skipping to t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t

Test Plan:
$ git fetch
$ git checkout -b bug_18897 origin/master
$ sudo apt-get remove libcatmandu-store-elasticsearch-perl
$ prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
-- nasty failure.
$ git bz apply 18897
-- apply all the patches
$ prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
-- nicer skip message
run the koha qa test tools

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2b4d0cb0b4e16b008ad9928a09259accfa1efc7a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18897: Skipping t/db_dependend/00-strict elastic search stuffs as needed
Mark Tompsett [Tue, 3 Oct 2017 01:50:01 +0000 (21:50 -0400)]
Bug 18897: Skipping t/db_dependend/00-strict elastic search stuffs as needed

Test Plan:
$ git fetch
$ git checkout -b bug_18897 origin/master
$ sudo apt-get remove libcatmandu-store-elasticsearch-perl
$ prove t/db_dependent/00-strict.t
-- nasty failure.
$ git bz apply 18897
-- interactive apply just the four patchs
$ prove t/db_dependent/00-strict.t
-- nicer skip message
run the koha qa test tools

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit faf651e514a1d2f5fa84df0c64556cc9962afc99)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18897: Use Module::Load::Conditional::can_load
Mark Tompsett [Fri, 1 Sep 2017 18:15:44 +0000 (14:15 -0400)]
Bug 18897: Use Module::Load::Conditional::can_load

Rather than rely on eval(), Jonathan Druart recommended in
comment #6 to use Use Module::Load::Conditional::can_load.
This addresses that concern.

TEST PLAN
---------
$ git fetch
$ git checkout -b bug_18897 origin/master
$ git bz apply 18897
$ sudo apt-get remove libcatmandu-store-elasticsearch-perl
...
$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t
-- Note that the message says the correct library is missing.
$ sudo apt-get install libcatmandu-store-elasticsearch-perl
-- Note it runs as expected.
run the koha qa test tools

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 088e332760b55c6f7a44097d8ab5d84003d8f0e0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18897: Improve error message
Mark Tompsett [Fri, 25 Aug 2017 11:38:06 +0000 (07:38 -0400)]
Bug 18897: Improve error message

Test Plan:
$ git fetch
$ git checkout -b bug_18897 origin/master
$ git bz apply 18897
-- interactive apply just the first patch
$ sudo apt-get remove libcatmandu-store-elasticsearch-perl
...
$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t
-- Note that the message says the wrong library is missing.
$ git bz apply 18897
-- interactive apply this patch
$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t
-- Note that the message says the correct library is missing.
run the koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a24ac206701bdde509baf47f005aa31bf42a1b6a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 18897: Koha_Elasticsearch_Indexer.t doesn't skip when ES module(s) not installed
Lee Jamison [Fri, 25 Aug 2017 11:18:15 +0000 (07:18 -0400)]
Bug 18897: Koha_Elasticsearch_Indexer.t doesn't skip when ES module(s) not installed

If Catmandu::Importer::MARC is not installed,
Koha_Elasticsearch_Indexer.t fails instead of skipping.
It should skip as ES is not currently mandatory.

Test Plan:
1. Run "prove t/db_dependent/Koha_Elasticsearch_Indexer.t"
   as koha-shell
2. Note failure on test 1/5 indicating module not installed.
3. Apply patch.
4. Re-run "prove t/db_dependent/Koha_Elasticsearch_Indexer.t"
5. Note test now skips.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6b6acf285f98a7da665eac6741cdfc87b089b57)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19385: Fix random t/Calendar.t failure - clear the cache before
Jonathan Druart [Thu, 28 Sep 2017 17:49:11 +0000 (14:49 -0300)]
Bug 19385: Fix random t/Calendar.t failure - clear the cache before

The cache 'exception_holidays' may be populated when we run these tests,
we need to clear it before the tests are run.

Test plan:
  prove t/db_dependent/Circulation/CalcDateDue.t  t/Calendar.t

Without this patch, t/Calendar will fail with:
  #   Failed test 'Exception holiday is not a closed day test'
  #   at t/Calendar.t line 159.
  #          got: '1'
  #     expected: '0'
  # Looks like you failed 1 test of 38.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae86b7ca9ea60bba47d3a999ff13d6140cdc5e1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 02d518b334596ed585596c614ab31c0656901634)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19004: [QA Follow-up] No need to check item-level_itypes again
Marcel de Rooy [Mon, 28 Aug 2017 06:51:24 +0000 (08:51 +0200)]
Bug 19004: [QA Follow-up] No need to check item-level_itypes again

As Jonathan pointed out, GetItem already called effective_itemtype.
So we can just use $item->{itype} here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0e744d49b557e3401ae7b700b1410b022a4e851c)
(cherry picked from commit ad718868553f149d0e9ea9ec7b7718677bac6c5e)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19004: Adjust AddReturn for retrieving item type
Marcel de Rooy [Wed, 9 Aug 2017 14:30:03 +0000 (16:30 +0200)]
Bug 19004: Adjust AddReturn for retrieving item type

In the regular situation, you can get itemtype via biblio and then
biblioitem as well as via biblioitem (at least when item-level_itypes
is set to biblio).

But since Koha unfortunately defined two relations in item, one for
biblioitemnumber (the good one) and one for biblionumber (redundant),
TestBuilder (correctly) builds one biblioitem and two biblios.

If you item-level_itypes to biblio record, this will result in failing tests
when calling AddReturn (in this case Koha/Patrons.t).
It will crash on:
    Can't call method "itemtype" on an undefined value at C4/Circulation.pm line 1826.
Cause: AddReturn goes via the biblionumber to biblio and than to
biblioitems, and it does not find a biblioitem. (Not a fault from TestBuilder
but a database design problem.)

This patch makes a small change in AddReturn to retrieve the itemtype via
biblioitem. It actually is a shorter road than items->biblio->biblioitems.

Note: I do not test the Biblioitems->find call, since we already checked
the GetItem call before and we have a foreign key constraint.
I did not call $item->effective_itemtype since we still use GetItem; this
could be done later.

Adjusted Circulation/Returns.t too: If we add an item with TestBuilder and
we called AddBiblio before, we should link biblioitemnumber as well.

Test plan:
[1] Do not apply this patch yet.
[2] Set item-level_itypes to biblio record.
[3] Run t/db_dependent/Koha/Patrons.t. (It should fail.)
[4] Apply this patch.
[5] Run t/db_dependent/Koha/Patrons.t again.
[6] Run t/db_dependent/Circulation/Returns.t
[7] Git grep on AddReturn and run a few other tests calling it.
    Note: Bugs 19070/19071 address three tests that call AddReturn too.
[8] In the interface, check in a book.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Note: Bugs 19070 and 19071 are already pushed. The command in comment #4
      has all the tests successful.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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 0fc3f19605d3979333dc333237205b9bef6ab60b)
(cherry picked from commit fba32956691ec0b3295e75aa8554d1454cb29819)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19004: Patrons.t should create its own data for enrollment fees.
Marcel de Rooy [Sun, 30 Jul 2017 14:53:00 +0000 (16:53 +0200)]
Bug 19004: Patrons.t should create its own data for enrollment fees.

If the patron categories J, K, YA would not exist, Patrons.t would fail.

Test plan:
[1] Remove one of these patron categories.
[2] Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.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 57427f7a10c887964fa4d4397c6ec238af2bc694)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2fdd3ef94a424d956fd6032662e6a69ddb81e511)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 327495b5e0ec4de47d20bd27d6a1c5b88e0be191)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3352a6ee9e7526e228f66ea420fd99709a601f82)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4934ee4a1601bd268a7153b7189387bb073dd11f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9f07f1493f9f44c7a7b691c79bf9215a76758670)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f1b0dae9a6055e8ba5e9a9638af32060c1e17e33)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 936ee4a1cf9dda6a5d8c1753c40b73b9720ed0bb)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48f54016a7accfc0cc43bf01cbac70a8482bc3f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 73f0c231bbd1c8a0b1d7c22d0a2fcb49a4811863)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bb31d99065c468fbec2443cd15894b03657a24d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c618b787bf98e6b9c8004694cfd066e936760191)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8fd0847c82adbcaf0af3285dd9cfc5e646ba6500)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 667a907aa73ab210ee05bc9ef73f8ab3bedbe6bf)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a932d05ace6500a3b67888aad1306e58cfa8014f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c5c174e834cad2110f45eec90b80441f2f4ec0f4)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2e9165001f69312255ad1b6706f040784460d5d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0679425b29b9bff8c16fff91b7351a2f9f89a045)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16c25a36988b47fb9fcbabd91fdace5f98f9caed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 68cd7787717a5831ed276fce65cc2845368a7c41)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7db6067dc4cc55bee771fedb31e2454b72123ac0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 342786ec9acbebe2aa85481d9f0f273dea8219ad)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 49778103ce528ccfc7fcc8be26bcae3b4ae7815b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66c568941bba29efc739f83dc3fb2cfb172d02ea)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 786deba62beb5a52a543af5415610e14f7d0a8c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 112116e45f4676aea3a63faa42b0e6a3e2456706)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d0e3891e251a6a11188d70a5480af0e44b8c1fb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 49d8426f5634aa6433f58ce5830d9f7729605364)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 19055: Remove C4::Reserves::GetReservesToBranch
Jonathan Druart [Mon, 7 Aug 2017 20:25:15 +0000 (17:25 -0300)]
Bug 19055: Remove C4::Reserves::GetReservesToBranch

This subroutine is no longer in used and can be removed

Test plan:
  git grep GetReservesToBranch
must not return any results

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9cc7268362219e39b22aebb03a83e013f467d93a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 319f5f67aaa056952ecc9a4500fa52627db4fdcc)
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 10311769d460a775aa8c8ee8a190836a8f2b1f1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5a132e1c3fb19d232b51e7ae68e468ddf81c6d8b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 14353 - Show 'damaged' and other status on the 'place holds' page in staff
Marc Véron [Sat, 18 Feb 2017 17:35:39 +0000 (18:35 +0100)]
Bug 14353 - Show 'damaged' and other status on the 'place holds' page in staff

This patch adds status 'Damaged' to 'Information' 'Status' in the items
table on 'Place hold' page.

To test:
- Apply patch
- In staff client, try to place an item level hold for items with 'Damaged'
  status.
- Verify that the status 'Damaged' appears in the column 'Information'.

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 8d08254b2202353517c16f34172cb92dcdd5befa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 58d775dda10f5191301a80a2b5c0b4a135213e5a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f8502b0d197bab4b4966e9e02253d30f7fcf29f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7394fc99fccff9bc8414147fe7fe9b9b6f2f422c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
7 years agoBug 19391: (bug 19128 follow-up) Fix failing tests from auth_values_input_www.t
Jonathan Druart [Fri, 29 Sep 2017 19:16:56 +0000 (16:16 -0300)]
Bug 19391: (bug 19128 follow-up) Fix failing tests from auth_values_input_www.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b6f8cf43698979914704dd08c45f11e6b8e406ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 90dffe1c68b00244c010e95a00a002f913a3f02a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 18777: Translatability: Get rid of exposed tt directives in opac-memberentry.tt
Marc Véron [Sun, 11 Jun 2017 18:16:46 +0000 (20:16 +0200)]
Bug 18777: Translatability: Get rid of exposed tt directives in opac-memberentry.tt

The file opac-memberentry.tt exposes template directives to translation where
translators should not be confronted with.

Example from po file:
"%s [%% UNLESS hidden.defined('B_address') && hidden.defined('B_address2') && "
"hidden.defined('B_city') && hidden.defined('B_state') && hidden."
"defined('B_zipcode') && hidden.defined('B_country') && hidden."
"defined('B_phone') && hidden.defined('B_email') && hidden."
"defined('contactnote') %%] "

To test:
- Apply patch
- Verify that advanced search in OPAC the page 'your personal details'
  behaves as before
- Verify that you can change values and submit an update request
- 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.p

NOTE: Followed 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 9ed4bdc87e92506ba4a51f92cc198f3c5ce282eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b17412da1b14dca4d42ed534482abdeff1c2fd2f)
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>
(cherry picked from commit ea886885d0efa0200cfa166453a4495692afc4d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e9af632d97f412d44fe4a11e97edd990b0d3ad1)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>
(cherry picked from commit 44a8fc5b9363eb27223f32e1150fb8fff6f55d08)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 916d564055502aac3d09e227d90a0f3f6d291cdd)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7efb871fa31869044045ccef0b37be438ba704ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 67462ae8704cd8a41a6939b5ee7c47010d9942e6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e4573d709936bbd7f454a26f073e2131aa9c8df3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e4995e5196621f8d9aa76301af68064e39fdac6a)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>