[Koha-bugs] [Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 17 22:35:43 CET 2017


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

--- Comment #29 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
(In reply to Baptiste in comment 28)

Ah sorry I see what the issue is I accidentally missed some steps in the test
plan for this patch.

The ItemTypes.t unit test needs to be run after running the web installer
(installing libraries, categories and item types) but before adding/importing
any bibliographic records.

You were getting a duplicate entry error (which I have just replicated) by
having biblio record(s) in your Koha database before running this unit test and
so when a record with the primary key of 1 is inserted into the biblio table by
this unit test (a change I added to the ItemTypes.t unit test as part of this
patch) it throws an error because a biblio record with the primary key of 1
already exists.

Therefore a corrected test plan for attachment 59954 (Bug 17944 - Implemented a
subtest in the ItemTypes.t file for is_used function in ItemType.pm) is:

1. Apply patches of this bug
2. Restart memcached: sudo service memcached restart
3. Drop and recreate your Koha database 
4. Run through the Koha web installer making sure to select all data values for
installation
5. When the web installer has finished, in your terminal navigate to
t/db_dependent/Koha/
6. Start koha-shell: sudo koha-shell <instancename>
7. Run the ItemTypes.t unit test: prove -v ItemTypes.t
8. Notice all tests are successful, and notice that the last two outputs
show the is_used subtest gave successful results

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list