Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 14610 revised staff-global.css so that the "holdcount" class was
renamed "number_box." That's good. It's good to have something more
generic since the class is used in multiple places.
The problem is that there are still several instances of the "holdcount"
class in the templates which should have been updated at the same time
to say "number_box." Those instances are now unstyled.
Test Plan:
1) Apply this patch
2) Check that the holds count on catalogue/detail.pl is styled
3) Check that the patron modifications count on members/member.pl is styled
4) Check that the pending comments count on tools/tools-home.pl is styled
5) Check that the pending tags count on tools/tools-home.pl is styled
Signed-off-by: Chris Kirby <christopherlawrencekirby@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Nick Clemens [Tue, 8 Nov 2016 17:26:36 +0000 (17:26 +0000)]
Bug 17590 - Exporting reports as CSV with 'delimiter' SysPref set to 'tabulation' creates files with 't' as separator
To test:
Set 'delimiter' system preference to 'tabs'
Export a report as csv
Open the file in text editor and note fields separated by character 't'
Apply patch
Export report as CSV
Open file in text editor and note tabs are used to separate fields
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
tabs now, no errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Owen Leonard [Fri, 4 Nov 2016 13:34:12 +0000 (09:34 -0400)]
Bug 17545 [Revised] Make "Add biblio" not hidden by language chooser
This alternate patch changes the menu direction so that it "drops" up
instead of down. This avoids the problem of overlapping or being hidden
by the language chooser.
The disadvantage of this patch is that it is not global. However, I
think it's a better long-term solution to the problem.
To test, apply the patch and follow the issue description:
- Make sure more than one language is active for the staff client, so
that the language chooser bar shows at the bottom of each page
- Do one or more Z39.50 searches, to make sure you have some records in
the reservoir
- Go to "Cataloging" and do a "Catalog search", so that the reservoir is
searched. Make sure your search is broad enough that some results from
the reservoir is shown "below the fold"
- Scroll to the last result and click on the "Actions" menu
The direction of the menu should be up instead of down.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Popup menus on the cataloging search page now pop up instead
of down, which means they avoid being hidden by the language
chooser. Mission accimplished!
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 27 Oct 2016 14:15:57 +0000 (14:15 +0000)]
Bug 17513: Create GRANT for user@localhost in koha-create
See the bug description for the details.
Test plan:
Use this script to create a new koha installation, using MariaDB
You should not display
"user koha_kohadev doesn't have enough privilege on database koha_kohadev "
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirm that this still works (with MySQL).
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Fri, 18 Nov 2016 08:23:16 +0000 (08:23 +0000)]
Bug 17657: Fix locations of item types images
Koha::ItemType->image_location takes the interface in parameter or
default to OPAC.
From the item types admin page, we need to specify the intranet
interface to retrieve the correct image's url
Test plan:
Go on the item types admin page, see the source of the page and find the
image' urls.
=> Without this patch, they point to the OPAC
=> With this patch, the location is correct
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 17 Nov 2016 16:08:00 +0000 (16:08 +0000)]
Bug 17654: Add tests to enforce swagger definition files integrity
The swagger definition error we found on bug 17651 should have been
caught earlier with tests.
Now we are testing for nullable columns.
QA: Have a look at the FIXME
Test plan:
Apply without 17651 (revert if already pushed)
The tests won't pass
On top of 17651 the tests will pass
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes t/db_dependent/Circulation* create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Circulation*
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation*
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes t/db_dependent/Acquisition/CancelReceipt.t create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Acquisition/CancelReceipt.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Acquisition/CancelReceipt.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Katrin Fischer [Mon, 10 Nov 2014 19:23:45 +0000 (20:23 +0100)]
Bug 12359: Add HidePatronName functionality to the holds queue
This changes the Holds Queue page to not show the patron's name
and phone number, but only the cardnumber, when HidePatronName
is set to 'Don't show'
This also changes the link to the patron account to use
the borrowernumber instead of the cardnumber, which seems
more consistent.
Fixes a tiny capitalization error: Only item...
To test:
- Look at the holds queue page with holds displayed
- Toggle HidePatronName system preference and observe the change
- Make sure the link works correctly
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Rebased 2016-10-16
Signed-off-by: Chris Kirby <christopherlawrencekirby@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Wed, 24 Aug 2016 11:13:48 +0000 (11:13 +0000)]
Bug 14736 - AllowRenewalIfOtherItemsAvailable slows circulation down in case of a record with many items and many holds
If the AllowRenewalIfOtherItemsAvailable sys pref is set to allow, and a
borrower has an item checked out that has many items {30+} AND many
holds {70+) on it, loading the checkouts table for this borrower takes
FOREVER to load. The load time takes forever, because of the
factoring that happens to determine if an item is truly
available for renewal.
This patch swaps the use of GetMemberDetails for GetMember
and reorders the subroutine calls to check each items' renewability
from fastest to slowest.
In a test case, the results of pre patch were:
Start of loop: 2016-08-24T11:05:14
End of loop: 2016-08-24T11:05:29
Resulting in 15 seconds being spent in the loop
Post patch results were:
Start of loop: 2016-08-24T11:08:43
End of loop: 2016-08-24T11:08:48
Resulting in only 5 seconds being spent in the loop!
Test Plan:
1) Apply this patch
2) Note there are no changes in functionality for the renewals column of
the patron checkouts table.
If you wish to go further and test the performance benefit:
1) Create a record with 50 items and 100 holds ( 50 waiting, 50 unfilled )
2) Check out one of the waiting holds to a patron
3) Time the amount of time it takes for the checkouts table to load
4) Apply this patch
5) Repeat step 3, you should see an improvement in load time
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 29 Sep 2016 15:08:36 +0000 (16:08 +0100)]
Bug 17377: ES - Take control fields into account
There is a bug in Koha::SearchEngine::Elasticsearc::Search->json2marc, it
assumes that the MARC::Field constructor always takes >= 5 parameters.
This assumption is wrong for control fields, to create a control field you
need to call the constructor with:
MARC::Field->new($tag, $value);
Note that I got "Too much data for control field" in the _warning value of my
MARC::Field because too many parameters were passed, and the value was undef.
That broke the result search links (on the staff interface) for DB with
biblio.biblionumber mapped with 001.
Other bugs will certainly be fixed by this patch.
For instance I got:
GetMarcBiblio called with undefined biblionumber at /home/koha/src/opac/opac-search.pl line 664.
GetCOinSBiblio called with undefined record at /home/koha/src/opac/opac-search.pl line 665.
in my logs, with this patch I don't get them anymore.
Test plan:
You can try to recreate the different issues and confirm than this patch
fixes them.
Or just run the tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 29 Sep 2016 15:41:53 +0000 (16:41 +0100)]
Bug 17377: Add tests for json2marc
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 20 Sep 2016 10:40:13 +0000 (11:40 +0100)]
Bug 17323: Column search_history.time cannot be null
When doing a search, with SearchHistory pref switched on:
DBD::mysql::st execute failed: Column 'time' cannot be null [for Statement "
INSERT INTO search_history(
userid, sessionid, query_desc, query_cgi, type, total, time
) VALUES(
?, ?, ?, ?, ?, ?, ?
)
" with ParamValues: 0="7874", 1='12338a0bd8da63e32c79ee84f8493a07', 2="kw,wrdl: d", 3='q=d', 4='biblio', 5=6104, 6=undef] at C4/Search/History.pm line 34.
Since MySLQ 5.7, undef does not mean "the default value".
To let the DBMS set the default value (CURRENT_TIMESTAMP), the parameter should not be passed
Test plan:
OPAC+Intranet, swith the 2 SearchHistory syspref on
Do a search
=> Without this patch, you will get an error in the log and the row will not be inserted in the table.
=> With this patch, everything must go fine
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Not verified with MySQL 5.7. But this looks good to me.
Works under Jessie.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 17 Nov 2016 15:12:01 +0000 (15:12 +0000)]
Bug 17651: borrowers.updated_on can be null - swagger def
The swagger file does not consider borrowers.updated_on as a nullable
value, it should
Test plan:
0/ Do not apply this patch
1/ update borrowers set updated_on=null;
2/ prove t/db_dependent/api/v1/patrons.t
=> Fail
3/ Apply this patch
4/ prove t/db_dependent/api/v1/patrons.t
=> green
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes t/db_dependent/Circulation/GetIssues.t create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Circulation/GetIssues.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation/GetIssues.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All test pass successfuly
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 19 Oct 2016 13:14:41 +0000 (14:14 +0100)]
Bug 17431: Create the object we need instead of assuming something exists
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Lari Taskula [Wed, 19 Oct 2016 12:18:02 +0000 (15:18 +0300)]
Bug 17431: (follow-up) Fix issuingrules
Issuingrules could had prevented holds.t from passing with error tooManyReserves.
This patch sets issuingrules at the beginning of the test to make sure reserves
are allowed.
To test:
1. Apply patch & Run t/db_dependent/api/v1/holds.t
2. Observe test pass
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Lari Taskula [Wed, 12 Oct 2016 11:29:26 +0000 (14:29 +0300)]
Bug 17431: Fix failing test t/db_dependent/api/v1/holds.t
This patch fixed failing test for t/db_dependent/api/v1/holds.t which was broken
after Bug 14695.
$ perl t/db_dependent/api/v1/holds.t
...
not ok 42 - similar match for JSON Pointer "/error"
# Failed test 'similar match for JSON Pointer "/error"'
# at t/db_dependent/api/v1/holds.t line 291.
# 'Reserve cannot be placed. Reason: itemAlreadyOnHold'
# doesn't match '(?^u:tooManyReserves)'
# Looks like you failed 1 test of 42.
not ok 4 - Test endpoints with permission
To test:
1. Run t/db_dependent/api/v1/holds.t and observe it fail.
2. Apply patch.
3. Run the test again and observe it pass.
Signed-off-by: Marc <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes t/db_dependent/Members/IssueSlip.t create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Members/IssueSlip.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Members/IssueSlip.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All test pass successfuly
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Test Plan:
1) prove t/db_dependent/Exporter/Record.t fails
2) Apply this patch
3) prove t/db_dependent/Exporter/Record.t succeeds!
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Indeed the patron categories plugin now returns a
Koha::Patron::Categories object and does not set a 'selected' flag.
We do not need this flag (`git grep Categories.all **/*.tt` to trust me)
Note that this patch also add a patron category to make the test passes
even if no category exist.
Test plan:
prove t/db_dependent/Template/Plugin/Categories.t
should return green
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 15 Nov 2016 16:07:35 +0000 (16:07 +0000)]
Bug 17633: Do not call set_preference from tests
If memcached is running, the pref's value will be set in cache, what we
do not want.
t/db_dependent/Context.t and t/db_dependent/sysprefs.t are exceptions
for obvious reasons.
Test plan:
Make sure all these tests still pass
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 16 Nov 2016 09:49:20 +0000 (09:49 +0000)]
Bug 17641: Fix t/Biblio/Isbd.t
On commit cadf5aea814636ccccd85fcc38aa30f751d779c0
Bug 11592: MARCView and ISBD followup
The prototype of C4::Biblio::GetISBDView has been changed to take a
hashref in parameter.
But the tests have not been updated
Test plan:
prove t/Biblio/Isbd.t
should return green
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=17637 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 16 Nov 2016 07:44:03 +0000 (07:44 +0000)]
Bug 17637: Fix tests Auth_with_ldap.t
Koha::Patron->delete create a transaction and so we need to use
txn_begin to have nested txn
DBD::mysql::db begin_work failed: Already in a transaction
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 15 Nov 2016 15:49:00 +0000 (15:49 +0000)]
Bug 17599: Make the tests pass
If you run TooMany or MultiplePerRecord.t after
t/db_dependent/Circulation/Returns.t (for instance) and that you are
running memcached, item-level_itypes will be 0.
These tests assume that the pref is 1
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
If OpacRenewalAllowed is enabled, the following error message is
displayed:
Template process failed: undef error - The method is_expired is not
covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.
The is_expired and BlockExpiredPatronOpacActions methods did not exist
for the Koha::Patron object. These 2 values were returned by
GetMemberDetails.
To fix this, we need bug 17579 which introduces the
Koha::Patron->is_expired method and also bug 17604 for the
Koha::Patron->effective_BlockExpiredPatronOpacActions.
Test Plan:
1) Check out an item for a patron
2) Enable OpacRenewalAllowed
3) Log in as that patron, go to opac-user.pl
4) Note the error
5) Apply this patch
6) Reload opac-user.pl
7) Page should now load!
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 9 Nov 2016 13:23:54 +0000 (13:23 +0000)]
Bug 17579: Make sure we are testing the real life
Without this patch, the tests are not testing the same things as what
happens on the interface.
We need to refresh the object to make sure the date set into dateexpiry
is the one in DB.
Without this patch, ->is_expired test a datetime object, with this patch
it compares with a date oject
Without the changes made in Koha::Patron->is_expired, a patron which has
a dateexpiry set to today was marked as expired on the interface. This
is a change in the behavior, what this refactoring does not want to do.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 7 Nov 2016 17:12:58 +0000 (17:12 +0000)]
Bug 17579: Add the Koha::Patron->is_expired
This new method will be handy for further uses
Test plan:
prove t/db_dependent/Koha/Patrons.t
should return green
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Fri, 4 Nov 2016 15:05:08 +0000 (15:05 +0000)]
Bug 17555: Add Koha::Patron->category
We need to use the DBIx::Class relationship to retrieve the patron
category.
It is more convenient to have a Koha::Patron->category method to
retrieve the category of a given patron.
Test plan:
Make sure that the tests in t/db_dependent/Koha/Patron* return green
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Mark Tompsett [Wed, 14 Sep 2016 19:14:02 +0000 (15:14 -0400)]
Bug 15690: Hardcoded 16 is uncool
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Followed test plan in comment #7, works as expectd. Signed-off-by: Marc <veron@veron.ch> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 13 Sep 2016 14:43:50 +0000 (15:43 +0100)]
Bug 15690: CardnumberLength should not be bigger than 16
borrowers.cardnumber is a varchar(16), so CardnumberLength should not
have a max > 16
Test plan:
Test different value in CardnumberLength ("20", "20,30", "40,")
Edit a patron a make sure the text display under the cardnumber input is
correct
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marc <veron@veron.ch> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes the patron swagger definition match the DB schema.
To test:
- Run:
$ prove t/db_dependent/api/v1/swagger/definitions.t
=> FAIL: 'lastseen' field is not declared in the swagger definition
- Apply the patch
- Run:
$ prove t/db_dependent/api/v1/swagger/definitions.t
=> SUCCESS: Tests pass!
- Sigh off :-D
Jonathan Druart [Tue, 8 Nov 2016 14:43:46 +0000 (14:43 +0000)]
Bug 17582: Fix authority framework edition
Step to recreate:
Admin>Authority types > Actions > Marc structure
Test plan
Confirm that this patch fixes the issue
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fix the issue, no errors.
Can edit auth marc structure
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17567: Make populate_db.pl initialize ES mappings
To test:
- Have a clean install, no DB
- Run populate_db.pl:
$ sudo koha-shell kohadev
k$ cd kohaclone
k$ misc/devel/populate_db.pl
- Go to
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
=> FAIL: No mappings
- Delete the DB and create an empty one:
$ mysql -uroot
> DROP DATABASE koha_kohadev; CREATE DATABASE koha_kohadev;
> GRANT ALL PRIVILEGES ON koha_kohadev.* TO
'koha_kohadev'@'localhost';
- Run populate_db.pl:
$ sudo koha-shell kohadev
k$ cd kohaclone
k$ misc/devel/populate_db.pl
- Go to
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
=> SUCCESS: There are mappings!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes t/db_dependent/Patron/Borrower_Discharge.t create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Patron/Borrower_Discharge.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Patron/Borrower_Discharge.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes t/db_dependent/Circulation/IsItemIssued.t create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Circulation/IsItemIssued.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation/IsItemIssued.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17575: (followup) Remove missing fine type warnings
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17575: Remove itemtype-related warnings from Circulation.t
To test:
- Run:
$ prove t/db_dependent/Circulation.t
=> FAIL: Lots of warnings
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation.t
=> SUCCESS: All green and no itemtype warnings
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17574: Remove itemtype-related warnings from LocalHoldsPriority.t
To test:
- Run:
$ prove t/db_dependent/Holds/LocalHoldsPriority.t
=> FAIL: Tests raise lots of warnings
- Apply the patch
- Run:
$ prove t/db_dependent/Holds/LocalHoldsPriority.t
=> SUCCESS: Tests pass, and no warnings!
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17573: Remove itemtype-related warnings from DecreaseLoanHighHolds.t
To test:
- Run:
$ prove t/db_dependent/DecreaseLoanHighHolds.t
=> FAIL: Lots of warnings
- Apply the patch
- Run:
$ prove t/db_dependent/DecreaseLoanHighHolds.t
=> SUCCESS: All green and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes the tests use t::lib::TestBuilder instead of
hardcoding values.
Test plan:
- Run:
$ prove t/db_dependent/Circulation/issue.t
=> SUCCESS: All tests return green with and without the patch
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17572: Remove itemtype-related warnings from issue.t
This patch makes t/db_dependent/Circulation/issue.t create
good sample data for its tests. It does so by creating a random
itemtype.
To test:
- Run
$ prove t/db_dependent/Circulation/issue.t
=> FAIL: lots of warnings about "item-level_itypes set but no itemtype
set for item"
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation/issue.t
=> SUCCESS: Tests are green, and no warnings.
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Josef Moravec [Fri, 11 Nov 2016 11:23:40 +0000 (11:23 +0000)]
Bug 17558: QA followup - use TestBuilder for creating patron
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Fridolin Somers [Mon, 7 Nov 2016 15:07:01 +0000 (16:07 +0100)]
Bug 17420 - record export fails when itemtype on biblio - followup
Same as previous patch for misc/export_records.pl.
Test plan :
- Use syspref item-level_itypes = biblio record
- Run misc/export_records.pl
=> Without patch you get an error : DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in 'where clause' ...
=> With patch you get a correct export file
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Export Ok, no errors.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Fridolin Somers [Mon, 10 Oct 2016 14:46:04 +0000 (16:46 +0200)]
Bug 17420 - record export fails when itemtype on biblio
In Tools, Export data, you can export with a filter on item type.
When item type is on biblio record, you get the error :
export.pl: DBIx::Class::ResultSet::next(): Unknown column 'biblioitems.itemtype' in 'where clause' at /home/koha/src/Koha/Objects.pm line 150
Looks like its because this code use to be a SQL Select and is now a DBIx call :
C4::Context->preference('item-level_itypes')
? ( 'items.itype' => $itemtype )
: ( 'me.itemtype' => $itemtype )
This patch corrects by using "me.itemtype"
Test plan :
- Use syspref item-level_itypes = biblio record
- Go to Tools > Export data : /cgi-bin/koha/tools/export.pl
- Select an item type
- Click on "Export biblio records"
=> Without patch you get an error 500
=> With patch you get a correct export file
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fix the issue, no errors.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Nick Clemens [Fri, 26 Aug 2016 15:04:12 +0000 (15:04 +0000)]
Bug 17204: Rancor Z39.50 search fails under plack
MetaSearcher.pm forks children to handle searching each server. When the
process waits for the children it never continues.
The simplest solution here is to exclude the metasearcher service from
running under plack
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 7 Nov 2016 10:25:57 +0000 (10:25 +0000)]
Bug 17562: Fix Acquisition.t
I find these tests too much complicated and decided to remove them.
They depends on the number of fields in the DB and any time we change
this table we need to update the tests.
As I don't understand the tests, I prefer to simply remove them, they
don't seem very useful.
Feel free to provide a counter patch if you think we should keep them.
Test plan:
prove t/db_dependent/Acquisition.t
should return green
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This tests should be removed as this patch does.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 7 Nov 2016 10:55:06 +0000 (10:55 +0000)]
Bug 17563: Fix Acquisition/CancelReceipt.t
Test plan:
prove t/db_dependent/Acquisition/CancelReceipt.t
should return green
Confirm that the changes made by
commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
Bug 13321: Rename variables
was wrong for the budget_id var and that this patch reverts it
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
ModReceiveOrder takes now a 'order' parameter and is mandatory.
This new test file has been added after the first submission of bug
13321 and has not been updated during the rebases.
Test plan:
prove t/db_dependent/Acquisition/OrderUsers.t
should return green
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Fridolin Somers [Tue, 4 Oct 2016 10:36:11 +0000 (12:36 +0200)]
Bug 17394 - exporting checkouts with items selects without items in combo-box
In checkouts table, the is an export form (when some exports syspref are enabled).
When selecting some checkouts and selecting "ISO2709 with items" in export format combo-box, clicking on "Export" will select "ISO2709 without items" in the export format combo-box.
This is quite strange.
Its because the form as 2 inputs with same name and id "output_format" : an hidden input (the wanted arg for tools/export.pl) and a select (the export format combo-box).
So an action meant on the hidden input impacts the select.
This patch corrects by changing id and name of the export format combo-box : issues-table-output-format
TEST plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "ISO2709 with items" in export format combo-box
- Click on "Export"
=> Without patch, the export format combo-box changes to "ISO2709 without items"
=> With patch, the export format combo-box does not changes
- Check the export file contains the items
- Check exports "ISO2709 without items" and "CSV" are OK
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
radiuscz [Mon, 31 Oct 2016 22:24:42 +0000 (23:24 +0100)]
Bug 17521: Added missing age limit check
Following patron modification partial editor had no age constraint
checking:
/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=3&step=3
Test plan:
1) Apply the patch
2) Open profile of a patron
3) Click Edit under "Library use": http://prntscr.com/d1ghim
4) Change category to an invalid one (eg. Adult instead of Kid)
5) Error saying "Patron's age is incorrect for their category." should
be displayed.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Fri, 4 Nov 2016 13:49:57 +0000 (13:49 +0000)]
Bug 17552: Continue revert and add tests to highlight the problem
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 2 Nov 2016 09:36:53 +0000 (09:36 +0000)]
Bug 17535: Fix search for reports by keywords
The commit cf9031711282f4be23e4a639797d0fd178940e1f
Bug 14435: Add the ability to store result's report
introduced a regression when searching for reports by keywords.
It also breaks tests in t/db_dependent/Reports/Guided.t
It's caused by the missing join on saved_reports.
The error says DBD::mysql::db selectall_arrayref failed: Unknown column
'report' in 'where clause'
Test plan:
Confirm that the tests are fixed and that you are able to search for
reports using the "keyword" input
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Fri, 21 Oct 2016 07:01:30 +0000 (07:01 +0000)]
Bug 17476: Add a way to bypass dt_from_string processing time for slow servers
We already change this value from 1 to 2 but apparently it's not enough
So let's switch it back to on and add a flag (env var SLOW_SERVER) and skip these tests
if set
Test plan:
prove t/DateUtils.t
and
SLOW_SERVER=1 prove t/DateUtils.t
should return green
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Fri, 4 Nov 2016 09:19:01 +0000 (09:19 +0000)]
Bug 17548: Fix step 1 of memberentry
This bug has been highlighted by bug 15407.
The date limit check on the category code did not work on step 1. But
after bug 15407 the script crashes with
Can't call method "dateofbirthrequired" on an undefined value at
/home/vagrant/kohaclone/members/memberentry.pl line 311.
Test plan:
- Edit "step 1" information of a patron (first 'Edit' on a patron detail
page).
- Save
=> Without this patch it BOOMs
=> With this patch, the info should be correctly saved
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Mon, 31 Oct 2016 11:15:02 +0000 (11:15 +0000)]
Bug 17494: Prevent duplicate tokens from getting stored
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 27 Oct 2016 08:04:30 +0000 (10:04 +0200)]
Bug 17494: Make sure the same verification token won't be generated twice
Well, this patch does not enforce the unique constraint but mimic what
is already done in C4::ImportExportFramework and Koha::Upload where
md5_hex is used.
Test plan:
Have a look at the code and confirm that it adds more randomness to the
hashed string
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Wed, 11 May 2016 14:19:41 +0000 (14:19 +0000)]
Bug 16493: acq matching on title and author
When you order from a staged file you're getting duplicate warnings that
are inaccurate. For example, when you order a file of 50 DVDs for
example and they don't have ISBNs they're matching on the books. And
then you have to order them one by one.
This patch replaces the use of FindDuplicates with Koha's match point
system. This means you can select from the same match points defined
and used in the batch record importer, or you can opt to skip matching
altogether!
Test Plan:
1) Import a record with a title, isbn and author.
2) Delete the from the record and stage it again
3) Attempt to add it to a basket via the staged record
4) You should note the gives you the "No records imported" message
5) Apply this patch
6) Create a matcher for ISBN
7) Create a matcher for Author/Title
8) Attempt to add the record to your basket using the ISBN matcher
8) Koha should find no match and import the record to the basket
9) Stage the record again
10) Attempt to add the record to your basket using the Title/Author matcher
11) You should recieve the "No records imported" message.
Signed-off-by: Barbara Fondren <bfondren@roundrocktexas.gov> Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To test:
1. Set patron category "S" with enrolmentfee 1
2. perl t/db_dependent/Reserves.t
3. Observe following errors:
not ok 59 - Bug 14464 - No fines at beginning
ok 60 - Bug 14464 - 1st reserve correctly created
ok 61 - Bug 14968 - Keep found column from reserve
not ok 62 - Bug 14464 - No fines after cancelling reserve with no charge configured
ok 63 - Bug 14464 - 2nd reserve correctly created
not ok 64 - Bug 14464 - No fines after cancelling reserve with no charge desired
ok 65 - Bug 14464 - 1st reserve correctly created
not ok 66 - Bug 14464 - Fine applied after cancelling reserve with charge desired and configured
4. Apply patch
5. perl t/db_dependent/Reserves.t
6. Observe test pass
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Lari Taskula [Wed, 2 Nov 2016 13:05:28 +0000 (15:05 +0200)]
Bug 17539: Fix Already in a transaction error
perl t/db_dependent/Reserves.t
1..72
ok 1 - use C4::Reserves;
ok 2 - CheckReserves Test 1
...
ok 52 - Reserve in waiting status cant be canceled
ok 53 - Reserving an ageRestricted Biblio without a borrower dateofbirth succeeds
DBD::mysql::db begin_work failed: Already in a transaction at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1489.
DBD::mysql::db begin_work failed: Already in a transaction at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1489.
at /usr/share/perl5/DBIx/Class/Schema.pm line 1080.
...
Koha::Object::store('Koha::Patron=HASH(0x9e43b20)') called at
/home/ubuntu/kohaclone/C4/Members.pm line 542
C4::Members::ModMember('borrowernumber', 658535, 'dateofbirth', '2001-11-02')
called at t/db_dependent/Reserves.t line 516
This patch fixes this issue by replacing dbh autocommit=0 with
txn_begin.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
1..72
ok 1 - use C4::Reserves;
ok 2 - CheckReserves Test 1
ok 3 - CheckReserves() include reserve_id in its response
ok 4 - CheckReserves Test 2
ok 5 - CheckReserves Test 3
ok 6 - GetReservesControlBranch returns item home branch when set to ItemHomeLibrary
ok 7 - GetReservesControlBranch returns patron home branch when set to PatronLibrary
ok 8 - Item is correctly waiting
ok 9 - Item is correctly priority 1
ok 10 - Item is correctly priority 2
ok 11 - GetWaiting got only the waiting reserve
ok 12 - GetWaiting got the reserve for the correct borrower
Undefined subroutine &C4::Circulation::GetItem called at /home/ubuntu/kohaclone/C4/Circulation.pm line 1853.
This patch fixes this error. The solution was to use C4::Reserves before C4::Items.
Also due to this edit, change use_ok to require_ok
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Hector Castro [Tue, 21 Jun 2016 19:24:20 +0000 (13:24 -0600)]
Bug 16792: Add Font Awesome Icon and mini button to Keyword to MARC mapping section
Improve Admin > Keyword to MARC mapping to fit with others interfaces in Koha.
This bug change "Delete" link with a mini-button and introduce the trash icon.
To test:
-Apply patch
-Goto Admin > Keyword to MARC mapping
-Select one framework
-Add some mappings
-Notice about the new button with trash icon
Bug 17544 - : Remove t::lib::Mocks dependency from populate_db.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 2 Nov 2016 11:54:12 +0000 (11:54 +0000)]
Bug 17540: (Bug 7216 followup) Fix tests for auth_values_input_www.t
This is caused by bug 17216 which modified the structure of the AV admin
page
Test plan:
prove t/db_dependent/www/auth_values_input_www.t
should return green
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>