[Bug 6473] Test bug for Git-bz ✔ ❤ ★
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6473 --- Comment #448 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 190711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190711&action=edit [#36] Add iterative error handling for invalid QA contacts When a user enters an invalid QA contact email (e.g., a typo or non-existent user), the bug update would fail with a 404 error and the spinner would hang indefinitely. This commit adds comprehensive error handling with user search and iterative retry logic. Changes: - Added search_users() method to RestClient.pm to query Bugzilla's user API endpoint with authentication token - Added select_qa_contact() method to Edit.pm and Attach.pm that: * Extracts the local part of the invalid email (before @) * Searches for similar users whose emails begin with that pattern * Presents a numbered list of matching users for selection * Allows manual entry if no matches found - Implemented iterative retry loop in both Edit and Attach commands: * On 404 error, searches for similar users * User can select from results or enter a different email * If manually entered email also fails, searches again * Continues until successful update or user cancels * Properly stops spinner on each error before continuing Example flow: 1. User enters "martinrenvoize@theke.io" → 404 2. Searches for "martinrenvoize" → no results 3. User enters "martin.renvoize@theke.io" → 404 4. Searches for "martin.renvoize" → finds matches 5. User selects "martin.renvoize@openfifth.co.uk" → success This provides a much better user experience than the previous behavior of hanging indefinitely with no feedback. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org