Jonathan Druart [Wed, 18 Oct 2017 16:59:56 +0000 (13:59 -0300)]
Bug 19487: Do not return an item if not checked out
To recreate:
1 - Manually add a lost fine to a ptron and include a barcode
2 - Attempt to write off the fine
3 - Internal server error
4 - Checkout an item and mark lost to checkin and fine
5 - Attempt to write off line
6 - Internal server error
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> 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 7b5c1fce5880f8592c5a9dbd40614a760bb2607e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 20 Oct 2017 14:49:38 +0000 (10:49 -0400)]
Bug 19495: Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml'
Bug 17898 provides a way of converting reports that use biblioitems.marcxml so that they will use biblio_metadata.metadata instead.
This only works with reports that do not refer to other columns in the biblioitems table. This is a known limitation. It means that we should be able to do a substitution of every occurrence of biblioitems with biblio_metadata, and every occurrence of marcxml with metadata.
Unfortunately, we're not doing a global replace, we're only replacing the first occurrence.
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Reports/Guided.t
David Kuhn [Tue, 6 Jun 2017 16:38:07 +0000 (09:38 -0700)]
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username
Allow patrons to enter either their library card number or user name in the "Log in" box for password recovery.
Most patrons at our library use their card number to log in and are unaware of what their userid is. However there are some who have set a
customized userid and would prefer to use that. This patch would allow either to be entered for password recovery.
To test:
1. Enable the password recovery feature.
2. In the OPAC, click on "Forgot you password?" link and enter a valid library card number.
3. The error message "No account found with the provided information" appears.
4. Apply the patch.
5. Repeat step 2. The recovery email is now sent.
Note: Moved patch from 16711 back here and re-tested. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e29163af4cde7ce33060716091726e6fa2eef65e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 28 Aug 2017 16:27:41 +0000 (16:27 +0000)]
Bug 19193: When displaying the fines of the guarantee on the guarantor account, price is not in correct format
1 - Have a patron with guarantees
2 - Charge some fines to the guarantees
3 - View the patron
4 - Fines are displayed unformatted
5 - Apply patch
6 - Refresh
7 - Fines should now be formatted correctly
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> 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 0d124e1bc322e6823c192c51effa0f3eecb2ac1f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Mark Tompsett [Mon, 21 Nov 2016 17:08:52 +0000 (12:08 -0500)]
Bug 17664: Silence non-zebra warnings in t/db_dependent/Search.t
TEST PLAN
---------
0) back up database
1) drop database; create database
2) run web installer
3) prove t/db_dependent/Search.t
-- the spammy warnings (other than zebra index warnings) may
already be fixed, but the mocked value was not realistic.
4) apply patch
5) prove t/db_dependent/Search.t
-- notice only zebra index warnings.
6) run qa test tools
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 5e63a3838102ee1fe8a1bc15640196ab611dbc89) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 2 Oct 2017 17:22:27 +0000 (14:22 -0300)]
Bug 19398: Format date of birth in circ patron search
When searching for a patron from the circulation tab, the results table
shows the date of birth unformatted.
Test plan:
Apply this patch, search for patrons in the circ tab and confirm that
the date of birth are correctly formatted according to the dateformat
syspref
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4edfc7900f6132c6771e4cfc820a5a3dc08d3e13) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 28 Sep 2017 20:31:04 +0000 (17:31 -0300)]
Bug 19386: Prevent t/db_dependent/SIP/Patron.t to fail randomly
Depending on the values used by TestBuilder, some tests from t/db_dependent/SIP/Patron.t can fail
# Failed test 'Not blocked without overdues when set to 'Don't block''
# at t/db_dependent/SIP/Patron.t line 55.
# got: '0'
# expected: '1'
# Failed test 'Not blocked without overdues when set to 'confirmation''
# at t/db_dependent/SIP/Patron.t line 61.
# got: '0'
# expected: '1'
# Failed test 'Not blocked without overdues when set to 'Block''
# at t/db_dependent/SIP/Patron.t line 67.
# got: '0'
# expected: '1'
Caused by this check in C4::SIP::ILS::Patron->new
110 for (qw(EXPIRED CHARGES CREDITS GNA LOST DBARRED NOTES)) {
111 ($flags->{$_}) or next;
[...]
115 if ($flags->{$_}->{noissues}) {
116 foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) {
117 $ilspatron{$toggle} = 0; # if we get noissues, disable everything
118 }
119 }
120 }
Test plan:
Execute several times (50x?) these tests.
Without this patch they may fail
With this patch they must never fail
Signed-off-by: David Bourgault <david.bourgault@inlibro.com> 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 6545cfe3f30789723b6f3c2e6e13af6e6c8e5fb9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 3 Oct 2017 22:20:18 +0000 (19:20 -0300)]
Bug 19405: Prevent api/v1/holds.t to fail randomly
DBD::mysql::st execute failed: Duplicate entry 'cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvn' for key 'userid' [for Statement "INSERT INTO `borrowers` ( `branchcode`, `categorycode`, `flags`, `surname`, `userid`) VALUES ( ?, ?, ?, ?, ? )" with ParamValues: 0='N2ElsY9', 1='Kk8G', 2=80, 3='Test Surname', 4='cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvnnbgezJqmxqwz'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
DBIx::Class::Storage::DBI::_dbh_execute(): Duplicate entry 'cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvn' for key 'userid' at /kohadevbox/koha/Koha/Object.pm line 121
[18:52:19] t/db_dependent/api/v1/holds.t
Reading the code I guess it happens if TestBuilder generates a userid with the size of borrowers.userid (75 chars). In that case the following lines are wrong:
Jonathan Druart [Tue, 3 Oct 2017 17:16:02 +0000 (14:16 -0300)]
Bug 19403: Prevent Circulation.t to fail randomly
Due to the number of test cases handle by CanBookBeIssued, Circulation.t
fails randomly. To prevent that it is better to set some values.
For instance if the patron is a statistical patron (category_type=X),
the subroutine will return a STATS flag.
This patch also adds a subroutine to the test file to display the keys
of $error, $question and $alert set by CanBookBeIssued.
It will be easier to track other random failures.
Aleisha Amohia [Wed, 7 Jun 2017 02:09:36 +0000 (02:09 +0000)]
Bug 16726: Clear text in syspref searchbox after submitting
To test:
1) Go to Admin -> search for a system preference
2) Notice your search stays in the search box (this is inconsistent with
search behaviour across Koha)
3) Apply patch and refresh page
4) Make another search
5) Confirm search still works as expected and search terms have been
cleared from search box
6) Confirm search terms show at the top of the results
Sponsored-by: Catalyst IT Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f10f6a19c53beb37e3ee0808ef6bb18bd88bef8a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Overview:
Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a)
This patch adds Select2 to authority editor
Steps to Reproduce:
In authority editor repeat field that has select subfield
Actual Results:
Field does not repeat (copy is not created).
Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function»
Expected Results:
Field will repeat (copy is created)
Additional Information:
Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor
Signed-off-by: Fridolin Somers <fridolin.somers@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 2f5a319b0a9f93dde7600decae5df989b842ca58) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 13 Sep 2017 12:06:50 +0000 (12:06 +0000)]
Bug 19307: Mock the AllowFineOverride preference to ensure expected result
To test:
1 - Set 'AllowFineOverride' to allow
2 - prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
3 - 1 test fails
4 - Apply patch
5 - prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
6 - All tests pass
7 - Set 'AllowFineOverride' to 'Don't allow'
8 - Tests should still pass
Signed-off-by: David Bourgault <david.bourgault@inlibro.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 1e2e1247c9bcd15514dc395be891a9a3607e5ea5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 19 Sep 2017 16:32:31 +0000 (13:32 -0300)]
Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables
Due to a bad rebase, the borrowers and deletedborrowers table structure
may different from a new install and upgraded install
For new installs, the order was: lang, login_attempts
For upgraded installs, it was lang, last_seen, login_attempts
After this patch, the order must be:
- last_seen
- lang
- login_attempts
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 e65ee89aae7802a31e47b5343c77f8a8a62d3a38)
Jonathan Druart [Thu, 14 Sep 2017 13:57:40 +0000 (10:57 -0300)]
Bug 19317: (bug 18966 follow-up) Remove leftover
Nothing important here, but this line should have been removed by bug
18966:
2177 # Update the fines
2178 $dbh->do(q|UPDATE accountlines SET issue_id = ? WHERE
issue_id = ?|, undef, $old_checkout->issue_id, $issue->issue_id);
The issue_id is now the same when moved from issues to old_issues. We do
not need to update the accountlines table.
No test plan here, you need to understand previous changes to validate
this patch.
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.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 0aec9e11d5fa355738cb3475ad72c4aad8efeafa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 14 Sep 2017 12:23:09 +0000 (12:23 +0000)]
Bug 19315: Use bibnum instead of biblionumber in routing-preview.pl and add item check
To test:
1 - Create a serial subscription attached to a record
2 - Receive some issues
3 - Edit the subscription
4 - Go to serails collection
5 - Try to print a routing list
6 - You may or may not get the right serial
7 - Additionally create a subscription attached to a bib with no items
8 - Try to print a routing list for this serial
9 - You will get 'Internal server error'
10 - Apply patch
11 - Print routing list for first serial
12 - You will always get the correct bib
13 - Print routing list for second serial
14 - You should no longer get an error
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> 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 285d72a023daab65626a3ba0f90e20ccfad45c95) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Aleisha Amohia [Wed, 30 Aug 2017 23:26:38 +0000 (23:26 +0000)]
Bug 16463: Replace discharge link with error message if user has checked out items
To test:
1) Ensure the useDischarge syspref is enabled
2) Check out an item to a borrower
3) Log in to the OPAC as this borrower
4) Click the 'ask for a discharge' link in the nav
5) Click the 'Ask for a discharge' link
6) Notice you cannot be discharged because you have checkouts
7) Apply the patch, click the 'ask for a discharge' link in the nav
8) Notice the link has been replaced with an appropriate error message
9) Attempt to force the discharge URL:
/cgi-bin/koha/opac-discharge?op=request
10) Notice the message and you cannot be discharged.
11) Confirm that when you check in your item, the discharge link shows
again and works as expected.
Sponsored-by: Catalyst IT 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 89528af3b089b2d17e3e7b212ea5608478f0ca84) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Aleisha Amohia [Tue, 29 Aug 2017 05:02:29 +0000 (05:02 +0000)]
Bug 19195: Preventing noisy warns when creating or editing a basket
To test:
1) Open the koha intranet error log
2) Go to Acquisitions -> Find or create a vendor
3) Create a new basket, filling all fields
4) Notice warns in error log
5) Edit this basket
6) Notice warns in error log
7) Apply patch
8) Create another basket, confirm warns do not show
9) Edit this basket, confirm warns do not show
Sponsored-by: Catalyst IT Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e98c178c081d4bb5673e6b04bf817b9c452cba8c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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>
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>
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>
Kyle M Hall [Fri, 6 Oct 2017 13:47:26 +0000 (09:47 -0400)]
Bug 19425: Adding orders from order file with multiple budgets per record triggers error
If you import an order file ( using MarcItemFieldsToOrder ) that has a different budget for each item to be ordered, you will get an error and a partially created basket. This is because Koha attempts to add the item to each order *for each budget*. This is clearly incorrect. Instead, we should be grouping items by budget and for each budget only adding those items that have a matching budget.
Test plan:
1) Do not apply this patch
2) Download the provided MARC record
3) Add the branchcode 'ALD' to your server
4) Add the ccode 'ACOL' to your server
5) Add the budget codes 'adultay' and 'branchay' to your server
6) Stage the order file
7) Create a basket, import the order file
8) No we have 3 records, 2 of them have 2 items each with different budget codes
9) Attempt to import, note the error
10) Apply this patch
11) Repeat steps 6-8, note the order completes and results in 5 order lines being added to the basket!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Christopher Kellermeyer <ckellermeyer@altadenalibrary.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
First step of test plan amended (not apply instead of apply).
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>
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>
When CircSidebar is activated, "Transferred items" table at
Circulation -> Transfers goes under the sidebar. This patch fixes the issue.
To test:
1. Enable CircSidebar system preference
2. Go to cgi-bin/koha/circ/branchtransfers.pl
3. Enter a barcode and click submit
4. Observe transferred items table under the circulation side bar
5. Apply patch
6. Enter a barcode and click submit
7. Observe transferred items is now correctly displayed
8. Also test with CircSidebar system preference deactivated
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 19374: (follow-up) Remove stray closing div tag
To test:
1. Apply first patch and validate the document e.g. here
https://validator.w3.org/#validate_by_input
2. Observe "Stray end tag div." error
3. Apply this patch and validate again
4. Observe no errors
5. Go through test plan from first patch to make sure things still look nice
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 07764f2b3114e5ccb72f7737e316d2cda3ad5068) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Josef Moravec [Tue, 19 Sep 2017 07:13:53 +0000 (07:13 +0000)]
Bug 19329: Update IntranetSlipPrinterJS system preference description.
Test plan:
0) Apply the patch
1) Go to administration -> system preferences -> staff client
2) Read the description by IntranetSlipPrinterJS and confirm it's right
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 c7b2d9bcf37dcded7cba49b1e520a0234850adf7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
Bug 18374: (QA follow-up) Remove warning in Elasticsearch/Search.pm
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cfa1aac9554ea9cba09aec30a4b1f85c09cb5f63) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 3 Apr 2017 18:30:44 +0000 (14:30 -0400)]
Bug 18374: Respect QueryAutoTruncate syspref in Elasticsearch
This patchset adds a subroutine '_truncate_terms' to the ES QueryParser.
If QueryAutoTruncate is enabled this function will be called for any
search to add wildcard '*' to all terms
To test:
1 - Enable Elasticsearch and have some records indexed
2 - Search for partial terms
3 - Note they fail unless '*' is appended
4 - Apply patch, leave QueryAutoTruncate disabled
5 - Note partial term searches still fail
6 - Enable QueryAutoTruncate
7 - Note partial term searches succeed
8 - Do some regular and advanced searches to make sure results are as
expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4c4d982ae45a3763fd70faedf1bbac225213de19) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 6 Apr 2017 18:27:50 +0000 (14:27 -0400)]
Bug 18374: QueryAutoTruncate unit tests
To test:
1 - Apply just this patch - should fail
2 - Apply the other patch - should pass
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8b3d53db08a5d27a22df338ea4c3c2426992c12a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 12 Sep 2017 16:57:47 +0000 (16:57 +0000)]
Bug 19296: Allow all tax processing to happen in C4::Acquisition::populate_order_with_prices
To test:
1 - Create an order file that includes prices and items
(MarcFieldsToOrder)
2 - Stage the file
3 - Set vendor to 'prices exclude tax'
4 - Open a basket and add from the file
5 - View the items in the basket
6 - Prices are reduced by the tax rate and tax is calculated to return
prices to the value in the file
7 - Apply patch
8 - Repeat steps 1-6
9 - Prices should now calculate correctly
10 - Repeat with 'MarcItemFieldsToOrder'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d8b89eead0c7576a295679b3ef3bb90e7dec8283) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Aleisha Amohia [Tue, 29 Aug 2017 21:21:00 +0000 (21:21 +0000)]
Bug 19180: [FOLLOW-UP] Renaming all instances of 'name' variable to 'booksellername'
... when referring to the name of the vendor.
To test:
1) Confirm vendor shows on webpage title (tab name)
2) Confirm vendor shows in breadcrumbs
3) Confirm vendor shows in heading when viewing basket ('Basket x (1) for
vendor')
Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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 06b602b0976e2a8d53ff31f95a2213cbeb98e9cb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Aleisha Amohia [Sun, 27 Aug 2017 23:00:15 +0000 (23:00 +0000)]
Bug 19180: Add vendor name to breadcrumbs when closing an order
To test:
1) Go to Acquisitions
2) Find a vendor and a basket
3) Click 'Close basket' button
4) Notice that on confirmation page, breadcrumbs are missing vendor
5) Apply patch and refresh page
6) Vendor name should now show
7) Confirm link to vendor works 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 438a3dea0c8ef1a5adcec58d8b97474d14ccca9b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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>
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>
Jon Knight [Mon, 21 Aug 2017 15:04:20 +0000 (15:04 +0000)]
Bug 19068: Add quantity field to the opac suggestions form
This enhancement just exposes the quantity field to the OPAC suggestions
form to permit the end user to enter this if they wish. The librarians
can of course override this quantity when they process the suggestion.
Test Plan (assuming using kohadevbox VM):
1) apply patch and turn on purchase suggestions
2) Go to http://localhost:8080/cgi-bin/koha/opac-suggestions.pl?op=add
and notice that there is now a quantity field available.
3) Make a purchasing suggestion using this form, including a quantity.
4) Log in as a member of library staff and go to Home › Acquisitions ›
Suggestions
5) Confirm that the previously entered suggestion is there, and that the
correct quantity appears in the "Acquisition information" section.
6) Edit the purchasing suggestion, change the quantity, save it and
check that the new quantity appears in the suggestion.
I've popped an ID attribute of "opac-suggestion-quantity" to the
surrounding <li> so that CSS can easily make this optional field
disappear (as suggested by cait on IRC).
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6eebfe5fe02be3c2ab3285b58cf50fac980cb302) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
Marcel de Rooy [Mon, 26 Jun 2017 10:51:59 +0000 (12:51 +0200)]
Bug 17380: Do not allow Default template in merge form
This patch makes the following changes:
[1] Removes Default from the template list. We should not merge with the
Default framework, since it does not have a reporting tag.
[2] Rearranges the error section in the template. It is confusing to have
two error sections in this template. The error CANNOT_MOVE is not used.
The error FRAMEWORK_NOT_SELECTED is replaced by WRONG_FRAMEWORK.
[3] Do not allow to merge a record with itself.
[4] Check if the merge reference record still contains any MARC tags.
[5] Additional polishing: Simplify passing frameworks to template. Remove
an unused Koha::Authority::Types->search. Remove obsolete POD header
for functions from the script.
Test plan:
[1] Select two authorities to merge. Verify that you cannot select Default
anymore as framework for the reference record.
[2] Reproduce error WRONG_COUNT by adding another authid=999 in the URL
after you selected two authority records for merging.
[3] Remove the third authid from the URL and change the first or second
authid into an unexisting record id. You should generate an Internal
Server Error. The log should show the exception message.
[4] Merge two authorities. Deselect all MARC tags. Should trigger the
error EMPTY_MARC in the template.
[5] Select the same authority record twice for merging. Should trigger the
error DESTRUCTIVE_MERGE in the template.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 87773a6d661f122a52b34f6c67255424c335e297) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 17380: Graceful resolution of missing reporting tag in merge
Altough this patch deals with a mostly hypothetical case and this report
makes it practically impossible anymore to merge with records in the
Default framework (having no reporting tag), we can make the code of
sub merge still a bit more robust here.
If you would merge biblio records from one authtype to another and the new
framework would not have a reporting tag, before this patch the result would
be data loss. Merge would handle this request as a delete. This patch makes
merge handle it differently: instead of clearing the biblio records, it
keeps $a and $9 in order to make a future corrective merge possible.
Note: The additional condition on line 1468 for $tags_using_authtype
makes sure that we do not select all fields when the authtype should
unexpectedly be empty string (Default). This prevents crashing on
a "Control fields do not have subfields" error.
Test plan:
[1] Run t/db_dependent/Authorities/Merge.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 434162c1756b16b5fc715fd1cb762aaf8aff7b2b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Mon, 26 Jun 2017 11:41:56 +0000 (13:41 +0200)]
Bug 17380: Do not use GuessAuthTypeCode in MetadataRecord::Authority
If we got an authtypecode from the database and this value is not NULL
since the table column does not allow it, there is no need to call
GuessAuthTypeCode for empty string (read: Default framework) in the
sub get_from_authid.
Furthermore, we remove three Koha::MetadataRecord::Authority->new calls.
They are useless, since we do not pass a record. It just generates:
No record passed at authorities/merge.pl line 96.
Can't bless non-reference value at Koha/MetadataRecord/Authority.pm line 66.
Instead we throw an ObjectNotFound exception.
Test plan:
[1] Run t/db_dependent/Koha_Authority.t
[2] Interface will be tested in the following patches.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db35492c795540d6c3b10f7cba18698aeb84a816) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 23 Feb 2017 09:02:57 +0000 (10:02 +0100)]
Bug 17380: Add some checks around Authorities::Types->find
Resolves:
Use of uninitialized value $biblio_fields in scalar chop at authorities/detail.pl line 212.
Can't call method "authtypetext" on an undefined value at authorities/detail.pl line 216.
Can't call method "authtypecode" on an undefined value at authorities/detail.pl line 180.
NOTE: Some of these problems have actually been resolved now by bugs 18801
and 18811, but it is still better imo to have these checks.
Test plan:
[1] Verify unchanged behavior. Search for some authorities on authorities.pl
and click on the details of a record.
[2] Open an authorities detail page and change the authid in the URL to a
not existing number. Instead of an internal server error, you should see
a message like "The authority record you requested does not exist".
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e631f418a3fafa485b650f0975ee0d06e366884) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
Trivial changes to silence qa tools on POD warnings for Subfields and Tags.
Note: Since Subfield and Tag only contain one sub which is considered as
private by Pod::Coverage, these modules are listed as unrated (no public
symbols defined) and trigger a FAIL on pod coverage in qa tools. This fail
can be ignored.
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 562435e767c99670dd9fb8935a2ed483b7a61930) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Fri, 23 Jun 2017 05:59:04 +0000 (07:59 +0200)]
Bug 18811: Atomic update to print warning at upgrade time
The warning encourages people to run the auth_show_hidden_data script
to check for data in hidden fields and adjust their frameworks.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f45fc4d10b84dfbd8040d12484553db8c87ec45a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 22 Jun 2017 13:39:41 +0000 (15:39 +0200)]
Bug 18811: Add a script for checking authority data in hidden fields
If you edit an authority record while having data in hidden fields or
subfields, that data will be lost now.
This script can help you to unhide some fields and prevent data loss.
Test plan:
[1] Add a PERSO_NAME record. Fill e.g. 100b.
[2] Hide 100b in the PERSO_NAME framework.
[3] Run auth_show_hidden_data.pl and verify that it reports 100b in
the PERSO_NAME framework.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 15dee475180ac362e182e1708d1c8b1b1e25e635) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 22 Jun 2017 11:42:38 +0000 (13:42 +0200)]
Bug 18811: Add Koha Objects for authority tags and subfields
Trivial copy and paste activity.
Will be used in a later patch.
No test plan needed.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ca8f8b4cd91fac4acb6e2338720b8e0a82bce0b0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 15 Jun 2017 10:30:27 +0000 (12:30 +0200)]
Bug 18811: Change visibility checks in authorities.pl
The check is now <=-4 or >=5, but the framework uses 0 for Show all and
-5 for Hide all. (Note that sql installer scripts also use 8.)
When modifying an authority, the script also showed hidden fields when
filled, since it did not check the hidden field but only the tab field.
NOTE: The proposed solution restores consistency, but will remove hidden
fields from the MARC record.
Test plan:
[1] Set field 942a to Show all in an authority framework.
[2] Open a new record in this framework and verify that you see 942a.
[3] Edit an existing record in this framework and verify again.
[4] Set field 942a now to Hide all in this framework.
[5] Open a new record in this framework and verify that 942a is hidden.
[6] Edit an existing record in this framework and verify again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7e222bb0796196f1e466b73d909fd28d529cab75) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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>
The IncludeSeeFromInSearches system preference is designed so that 'See from' headings from the authorities are included when you search in the catalog.
That means that you could find an author not only by the name printed on the book, but for example also by their pseudonym or a different spelling of their name.
Test plan:
- Activate IncludeSeeFromInSearches
- Catalog an authority for a person
- main heading in 100
- see from headings in 400
- Catalog a bibliographic record and link it to the authority
- Make sure the record is indexed
- Verify that the record can be found searching for the main heading
- Verify that the record can be found searching for the see from headings
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Yet another reason to get rid of all this functions from this script.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 10b5e1ee049605ae6a0614214a7dab76e20e0ca5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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>
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>
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>
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>
Nick Clemens [Sat, 8 Apr 2017 03:09:05 +0000 (23:09 -0400)]
Bug 18318: Unicode support for Elasticsearch
You must install the icu plugin for elasticsearch
https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-icu.html
Once installed, apply this patch
Reindex your data, deleting the existing indexes
perl /home/vagrant/kohaclone/misc/search_tools/rebuild_elastic_search.pl
-d
Find (or add) some titles with accented characters
Verify that a search for the exact character or the unaccented version
works
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1404654d65baccacb2928f59171ec6f41d9b653b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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
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>
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>