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

--- Comment #448 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
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 "[email protected]" → 404
2. Searches for "martinrenvoize" → no results
3. User enters "[email protected]" → 404
4. Searches for "martin.renvoize" → finds matches
5. User selects "[email protected]" → 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.
_______________________________________________
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/

Reply via email to