https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36309
David Nind <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163118|0 |1 is obsolete| | --- Comment #3 from David Nind <[email protected]> --- Created attachment 163124 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163124&action=edit Bug 36309: Make create_superlibrarian.pl output more useful In situations in which you are not familiar with all the Koha settings, and table structure, the fact this script just fails telling there's a broken FK is just not practical. We should capture those exceptions and display a useful message instead. This script does that. It adds some validations and some exception handling too. It prints a nice message about the bad value the user passed, and the valid values too! To test: 1. Run this on a fresh KTD: $ ktd --shell k$ perl misc/devel/create_superlibrarian.pl \ --userid tcohen \ --password tomasito \ --cardnumber 123456789 \ --categorycode POT \ --branchcode ATO => FAIL: It explodes with a MySQL exception message! 2. Apply this patch 3. Repeat 1 => SUCCESS: It tells you which value is wrong and what values you can pick to make the command work 4. Pick a valid value, and repeat => SUCCESS: Now the other value is wrong, a nice message is displayed! 5. Fix with a valid value and repeat => SUCCESS: Patron created! 6. Sign off :-D Signed-off-by: David Nind <[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/
