https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40777
Victor Grousset/tuxayo <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190261|0 |1 is obsolete| | --- Comment #34 from Victor Grousset/tuxayo <[email protected]> --- Created attachment 191603 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191603&action=edit Bug 40777: Introduce Koha::Database::DataInconsistency test plan: 1. Export a record with an item from the staff interface as MARCXML (Save > MARCXML). 2. Edit the file and remove the 952$a (home library) and 952$b (current library). 3. Delete the item and record in the staff interface. 4. Import the exported record and item from the MARCXML file: - Cataloging > Import > Stage for import . Settings > Format: MARCXML - Stage for import - View batch link on the job details page (assuming successfully staged) . New record framework: change to Books, Booklets, Workbooks 5. Turn on the browser developer tools and view the console. 6. Access the details page for the new record. 7. Note that you get: - A "Processing" dialog box on screen - A browser pop-up window/dialog box with: Something went wrong when loading the table. 500: Internal server error - Click OK - The console shows: . Failed to load resource: the server responded with a status of 500 (Internal Server Error) . Got 500 (Internal Server Error) . DataTables warning: table id=holdings_table - Ajax error. For more information about this error, please see https://datatables.net/tn/7 8. Run misc/maintenance/search_for_data_inconsistencies.pl, you get these result (the itemnumber may be different): == Not defined items.homebranch and/or items.holdingbranch == * Item with itemnumber=973 does not have home and holding library defined => Edit these items and set valid homebranch and/or holdingbranch (↑↑ don't do it, it's part of the message content) 9. Apply the patch. 10. Restart everything. 11. Refresh the details screen for the imported record. 12. You now get the same as step 7, but with added "Have a look at the "Audit" button in the toolbar" text in the browser pop-up dialog box: - A "Processing" dialog box on screen - A browser pop-up window/dialog box with: Something went wrong when loading the table. 500: Internal server error Have a look at the "Audit" button in the toolbar - Click OK - The console shows: . GET http[URL for the record....] 500 (Internal Server Error) . Got 500 (Internal Server Error) . DataTables warning: table id=holdings_table - Ajax error. For more information about this error, please see https://datatables.net/tn/7 13. Click on the Audit button. 14. You get a yellow box at the top of the record with: Errors found Item with itemnumber=973 does not have home and holding library defined (Note that there is still the "Processing" dialog box, you can edit the item by select the "Items" option in the sidebar menu and then edit the item details - the home and current library files will be auto-populated with the current library, Centerville with KTD) 15. Repeat step 8, you get the same results. 16. The tests pass: prove t/db_dependent/Koha/Database/DataInconsistency.t 17. Check the details page for another record that doesn't have any data issues - note the 'Audit' toolbar item, and if clicked should show a blue box at the top of the record with "No data inconsistency found." Signed-off-by: David Nind <[email protected]> Signed-off-by: Victor Grousset/tuxayo <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
