[Bug 19871] New: Use new exceptions Koha::Exceptions::Object:: DuplicateID and FKConstraint
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Bug ID: 19871 Summary: Use new exceptions Koha::Exceptions::Object::DuplicateID and FKConstraint Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: josef.moravec@gmail.com QA Contact: testopia@bugs.koha-community.org There are some reference of DBIx::Class:Exception in our code, they should be updated to use new Koha::Exceptions from bug 19828. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |19828 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19828 [Bug 19828] Koha::Object->store should catch DBIC exceptions and raise Koha::Exceptions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #1 from Josef Moravec <josef.moravec@gmail.com> --- Affected files: Koha/Patron/Modification.pm Koha/REST/V1/Acquisitions/Vendors.pm Koha/REST/V1/Cities.pm koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Bug 19871 depends on bug 19828, which changed state. Bug 19828 Summary: Koha::Object->store should catch DBIC exceptions and raise Koha::Exceptions https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19828 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186634 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186634&action=edit Bug 19871: Add centralized DBIx::Class exception translation system This introduces a reusable exception translation utility that eliminates code duplication and provides consistent handling of DBIx::Class exceptions throughout the codebase. New Components: - Koha::Schema::Util::ExceptionTranslator: Core utility class for translating DBIx::Class exceptions to Koha-specific exceptions - Koha::Schema: Enhanced with safe_do() and translate_exception() methods for convenient access to centralized exception handling - Comprehensive unit tests covering all translation scenarios Benefits: - Eliminates ~90 lines of duplicated exception handling code - Centralizes maintenance of exception translation logic - Provides consistent error messages and exception types - Makes it easier to extend support for additional database engines - Follows the pattern suggested in existing FIXME comments Exception Types Handled: - Foreign key constraint violations → Koha::Exceptions::Object::FKConstraint - Duplicate key violations → Koha::Exceptions::Object::DuplicateID - Invalid data type values → Koha::Exceptions::Object::BadValue - Enum data truncation → Koha::Exceptions::Object::BadValue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186635 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186635&action=edit Bug 19871: Use centralized exception translation in Koha::Item::add_to_bundle Replace duplicated DBIx::Class exception handling code with the new centralized exception translation system introduced in the previous commit. This change: - Eliminates ~40 lines of duplicated exception handling code - Uses the new Koha::Schema::translate_exception() method - Maintains identical exception behavior and error messages - Addresses the FIXME comment requesting this refactoring The add_to_bundle method now uses consistent exception translation with the rest of the codebase, reducing maintenance burden and ensuring consistent error handling patterns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40445 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40445 [Bug 40445] Point of Sale reconciliation input during daily summaries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|tomascohen@gmail.com |martin.renvoize@openfifth.c | |o.uk CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186634|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186644&action=edit Bug 19871: Add centralized DBIx::Class exception translation system This introduces a reusable exception translation utility that eliminates code duplication and provides consistent handling of DBIx::Class exceptions throughout the codebase. New Components: - Koha::Schema::Util::ExceptionTranslator: Core utility class for translating DBIx::Class exceptions to Koha-specific exceptions - Koha::Schema: Enhanced with safe_do() and translate_exception() methods for convenient access to centralized exception handling - Comprehensive unit tests covering all translation scenarios Benefits: - Eliminates ~90 lines of duplicated exception handling code - Centralizes maintenance of exception translation logic - Provides consistent error messages and exception types - Makes it easier to extend support for additional database engines - Follows the pattern suggested in existing FIXME comments Exception Types Handled: - Foreign key constraint violations → Koha::Exceptions::Object::FKConstraint - Duplicate key violations → Koha::Exceptions::Object::DuplicateID - Invalid data type values → Koha::Exceptions::Object::BadValue - Enum data truncation → Koha::Exceptions::Object::BadValue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186635|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186645&action=edit Bug 19871: Use centralized exception translation in Koha::Item::add_to_bundle Replace duplicated DBIx::Class exception handling code with the new centralized exception translation system introduced in the previous commit. This change: - Eliminates ~40 lines of duplicated exception handling code - Uses the new Koha::Schema::translate_exception() method - Maintains identical exception behavior and error messages - Addresses the FIXME comment requesting this refactoring The add_to_bundle method now uses consistent exception translation with the rest of the codebase, reducing maintenance burden and ensuring consistent error handling patterns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186646 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186646&action=edit Bug 19871: Move FK constraint deletion handling to centralized exception translation Move the FK constraint deletion exception handling from Koha::Object::delete to the centralized ExceptionTranslator utility. This consolidates all DBIx::Class exception translation logic in one place and simplifies the Object delete method. Changes: - Add FK constraint deletion pattern matching to ExceptionTranslator - Remove manual exception handling from Koha::Object::delete - Add test coverage for FK constraint deletion translation - Simplify Object delete method to use centralized translation The centralized system now handles both FK constraint scenarios: - Child row constraint failures (add/update operations) - Parent row constraint failures (delete operations) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186647 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186647&action=edit Bug 19871: Update virtualshelf templates to use Koha exceptions instead of DBIx::Class::Exception Replace DBIx::Class::Exception handling in shelf templates with specific Koha exception types that are now provided by the centralized exception translation system. Template changes: - Replace 'DBIx::Class::Exception' case with specific Koha exception handlers - Add user-friendly error messages for FKConstraint, DuplicateID, and BadValue - Improve error presentation with descriptive text instead of raw database errors This provides better user experience by showing meaningful error messages instead of technical database exception details. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186648&action=edit Bug 19871: Update Koha::Patron::Modification to use centralized exception handling Replace manual DBIx::Class::Exception handling in the approve() method with the centralized exception translation system while preserving domain-specific exception behavior. Changes: - Use $schema->safe_do() for database operations with automatic exception translation - Wrap safe_do in try/catch to convert any exception to domain-specific Patron::Modification exception - Simplify exception handling logic while maintaining the same API contract - Remove manual DBIx::Class::Exception type checking This maintains backward compatibility by always throwing Koha::Exceptions::Patron::Modification exceptions as before, but leverages the centralized system for consistent database exception handling. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186649 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186649&action=edit Bug 19871: Move enum data truncation handling to centralized exception translation Complete the migration of enum data truncation exception handling from Koha::Object to the centralized ExceptionTranslator utility. This eliminates the last remaining manual DBIx::Class exception handling in Object code. Changes: - Add optional object parameter to ExceptionTranslator->translate_exception() - Update Schema wrapper methods to accept and pass object parameter - Enhance enum truncation handling to extract actual property values when object is available - Remove manual enum exception handling from Koha::Object::store() - Add comprehensive test coverage for enum handling with and without object context - Maintain contextual warning behavior for store() operations The centralized system now handles ALL DBIx::Class exception scenarios: - FK constraint failures (add/update and delete operations) - Duplicate key violations - Invalid data type values - Enum data truncation with actual property values This completes the centralization effort while providing better error reporting than the previous manual approach. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186650&action=edit Bug 19871: (QA follow-up) Replace symbolic refs with proper mock object class Replace 'no strict refs' usage with a proper TestObject package to avoid Perl::Critic violations while maintaining the same test functionality. The mock object now uses standard OOP patterns instead of symbolic references for method creation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #11 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- I really love this. Great job! My only doubt is the explicit call in the catch in Koha::Item: ``` $schema->translate_exception($_); ``` I'd expect a `->rethrow` or similar instead. This is great stuff! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186644|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189305&action=edit Bug 19871: Add centralized DBIx::Class exception translation system This introduces a reusable exception translation utility that eliminates code duplication and provides consistent handling of DBIx::Class exceptions throughout the codebase. New Components: - Koha::Schema::Util::ExceptionTranslator: Core utility class for translating DBIx::Class exceptions to Koha-specific exceptions - Koha::Schema: Enhanced with safe_do() and translate_exception() methods for convenient access to centralized exception handling - Comprehensive unit tests covering all translation scenarios Benefits: - Eliminates ~90 lines of duplicated exception handling code - Centralizes maintenance of exception translation logic - Provides consistent error messages and exception types - Makes it easier to extend support for additional database engines - Follows the pattern suggested in existing FIXME comments Exception Types Handled: - Foreign key constraint violations → Koha::Exceptions::Object::FKConstraint - Duplicate key violations → Koha::Exceptions::Object::DuplicateID - Invalid data type values → Koha::Exceptions::Object::BadValue - Enum data truncation → Koha::Exceptions::Object::BadValue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186645|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189306&action=edit Bug 19871: Use centralized exception translation in Koha::Item::add_to_bundle Replace duplicated DBIx::Class exception handling code with the new centralized exception translation system introduced in the previous commit. This change: - Eliminates ~40 lines of duplicated exception handling code - Uses the new Koha::Schema::translate_exception() method - Maintains identical exception behavior and error messages - Addresses the FIXME comment requesting this refactoring The add_to_bundle method now uses consistent exception translation with the rest of the codebase, reducing maintenance burden and ensuring consistent error handling patterns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186646|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189307 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189307&action=edit Bug 19871: Move FK constraint deletion handling to centralized exception translation Move the FK constraint deletion exception handling from Koha::Object::delete to the centralized ExceptionTranslator utility. This consolidates all DBIx::Class exception translation logic in one place and simplifies the Object delete method. Changes: - Add FK constraint deletion pattern matching to ExceptionTranslator - Remove manual exception handling from Koha::Object::delete - Add test coverage for FK constraint deletion translation - Simplify Object delete method to use centralized translation The centralized system now handles both FK constraint scenarios: - Child row constraint failures (add/update operations) - Parent row constraint failures (delete operations) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186647|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189308 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189308&action=edit Bug 19871: Update virtualshelf templates to use Koha exceptions instead of DBIx::Class::Exception Replace DBIx::Class::Exception handling in shelf templates with specific Koha exception types that are now provided by the centralized exception translation system. Template changes: - Replace 'DBIx::Class::Exception' case with specific Koha exception handlers - Add user-friendly error messages for FKConstraint, DuplicateID, and BadValue - Improve error presentation with descriptive text instead of raw database errors This provides better user experience by showing meaningful error messages instead of technical database exception details. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186648|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189309 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189309&action=edit Bug 19871: Update Koha::Patron::Modification to use centralized exception handling Replace manual DBIx::Class::Exception handling in the approve() method with the centralized exception translation system while preserving domain-specific exception behavior. Changes: - Use $schema->safe_do() for database operations with automatic exception translation - Wrap safe_do in try/catch to convert any exception to domain-specific Patron::Modification exception - Simplify exception handling logic while maintaining the same API contract - Remove manual DBIx::Class::Exception type checking This maintains backward compatibility by always throwing Koha::Exceptions::Patron::Modification exceptions as before, but leverages the centralized system for consistent database exception handling. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186649|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189310 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189310&action=edit Bug 19871: Move enum data truncation handling to centralized exception translation Complete the migration of enum data truncation exception handling from Koha::Object to the centralized ExceptionTranslator utility. This eliminates the last remaining manual DBIx::Class exception handling in Object code. Changes: - Add optional object parameter to ExceptionTranslator->translate_exception() - Update Schema wrapper methods to accept and pass object parameter - Enhance enum truncation handling to extract actual property values when object is available - Remove manual enum exception handling from Koha::Object::store() - Add comprehensive test coverage for enum handling with and without object context - Maintain contextual warning behavior for store() operations The centralized system now handles ALL DBIx::Class exception scenarios: - FK constraint failures (add/update and delete operations) - Duplicate key violations - Invalid data type values - Enum data truncation with actual property values This completes the centralization effort while providing better error reporting than the previous manual approach. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186650|0 |1 is obsolete| | --- Comment #18 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189311 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189311&action=edit Bug 19871: (QA follow-up) Replace symbolic refs with proper mock object class Replace 'no strict refs' usage with a proper TestObject package to avoid Perl::Critic violations while maintaining the same test functionality. The mock object now uses standard OOP patterns instead of symbolic references for method creation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #19 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189312&action=edit Bug 19871: Make exception handling more explicit in add_to_bundle Replace the implicit exception translation call with an explicit safe_do pattern that clearly shows exceptions are rethrown. Changes: - Use $schema->safe_do() wrapper for automatic exception translation - Add explicit $_->rethrow() in catch block for clarity - Follow the same pattern used in Koha::Patron::Modification::approve() - Make control flow more obvious to future maintainers This change maintains identical behavior while improving code clarity by making it explicit that the catch block never returns normally. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #20 from Chris Cormack <chris@bigballofwax.co.nz> --- Automatic patch test results: â ï¸ The patch applies with fuzzy option (ignoring whitespace). This may indicate minor conflicts that need to be resolved. Details: Patch applies with fuzzy option (ignoring whitespace) This is an automated message from the patch testing system. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189305|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189306|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189307|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189308|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189309|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189310|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189311|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189312|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #21 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190353 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190353&action=edit Bug 19871: Add centralized DBIx::Class exception translation system This introduces a reusable exception translation utility that eliminates code duplication and provides consistent handling of DBIx::Class exceptions throughout the codebase. New Components: - Koha::Schema::Util::ExceptionTranslator: Core utility class for translating DBIx::Class exceptions to Koha-specific exceptions - Koha::Schema: Enhanced with safe_do() and translate_exception() methods for convenient access to centralized exception handling - Comprehensive unit tests covering all translation scenarios Benefits: - Eliminates ~90 lines of duplicated exception handling code - Centralizes maintenance of exception translation logic - Provides consistent error messages and exception types - Makes it easier to extend support for additional database engines - Follows the pattern suggested in existing FIXME comments Exception Types Handled: - Foreign key constraint violations → Koha::Exceptions::Object::FKConstraint - Duplicate key violations → Koha::Exceptions::Object::DuplicateID - Invalid data type values → Koha::Exceptions::Object::BadValue - Enum data truncation → Koha::Exceptions::Object::BadValue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #22 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190354&action=edit Bug 19871: Use centralized exception translation in Koha::Item::add_to_bundle Replace duplicated DBIx::Class exception handling code with the new centralized exception translation system introduced in the previous commit. This change: - Eliminates ~40 lines of duplicated exception handling code - Uses the new Koha::Schema::translate_exception() method - Maintains identical exception behavior and error messages - Addresses the FIXME comment requesting this refactoring The add_to_bundle method now uses consistent exception translation with the rest of the codebase, reducing maintenance burden and ensuring consistent error handling patterns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #23 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190355&action=edit Bug 19871: Move FK constraint deletion handling to centralized exception translation Move the FK constraint deletion exception handling from Koha::Object::delete to the centralized ExceptionTranslator utility. This consolidates all DBIx::Class exception translation logic in one place and simplifies the Object delete method. Changes: - Add FK constraint deletion pattern matching to ExceptionTranslator - Remove manual exception handling from Koha::Object::delete - Add test coverage for FK constraint deletion translation - Simplify Object delete method to use centralized translation The centralized system now handles both FK constraint scenarios: - Child row constraint failures (add/update operations) - Parent row constraint failures (delete operations) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #24 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190356&action=edit Bug 19871: Update virtualshelf templates to use Koha exceptions instead of DBIx::Class::Exception Replace DBIx::Class::Exception handling in shelf templates with specific Koha exception types that are now provided by the centralized exception translation system. Template changes: - Replace 'DBIx::Class::Exception' case with specific Koha exception handlers - Add user-friendly error messages for FKConstraint, DuplicateID, and BadValue - Improve error presentation with descriptive text instead of raw database errors This provides better user experience by showing meaningful error messages instead of technical database exception details. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #25 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190357 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190357&action=edit Bug 19871: Update Koha::Patron::Modification to use centralized exception handling Replace manual DBIx::Class::Exception handling in the approve() method with the centralized exception translation system while preserving domain-specific exception behavior. Changes: - Use $schema->safe_do() for database operations with automatic exception translation - Wrap safe_do in try/catch to convert any exception to domain-specific Patron::Modification exception - Simplify exception handling logic while maintaining the same API contract - Remove manual DBIx::Class::Exception type checking This maintains backward compatibility by always throwing Koha::Exceptions::Patron::Modification exceptions as before, but leverages the centralized system for consistent database exception handling. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #26 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190358 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190358&action=edit Bug 19871: Move enum data truncation handling to centralized exception translation Complete the migration of enum data truncation exception handling from Koha::Object to the centralized ExceptionTranslator utility. This eliminates the last remaining manual DBIx::Class exception handling in Object code. Changes: - Add optional object parameter to ExceptionTranslator->translate_exception() - Update Schema wrapper methods to accept and pass object parameter - Enhance enum truncation handling to extract actual property values when object is available - Remove manual enum exception handling from Koha::Object::store() - Add comprehensive test coverage for enum handling with and without object context - Maintain contextual warning behavior for store() operations The centralized system now handles ALL DBIx::Class exception scenarios: - FK constraint failures (add/update and delete operations) - Duplicate key violations - Invalid data type values - Enum data truncation with actual property values This completes the centralization effort while providing better error reporting than the previous manual approach. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190359&action=edit Bug 19871: (QA follow-up) Replace symbolic refs with proper mock object class Replace 'no strict refs' usage with a proper TestObject package to avoid Perl::Critic violations while maintaining the same test functionality. The mock object now uses standard OOP patterns instead of symbolic references for method creation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #28 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 190360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190360&action=edit Bug 19871: Make exception handling more explicit in add_to_bundle Replace the implicit exception translation call with an explicit safe_do pattern that clearly shows exceptions are rethrown. Changes: - Use $schema->safe_do() wrapper for automatic exception translation - Add explicit $_->rethrow() in catch block for clarity - Follow the same pattern used in Koha::Patron::Modification::approve() - Make control flow more obvious to future maintainers This change maintains identical behavior while improving code clarity by making it explicit that the catch block never returns normally. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190353|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190354|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190355|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190356|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190357|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190358|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190359|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190360|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #29 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191265 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191265&action=edit Bug 19871: Add centralized DBIx::Class exception translation system This introduces a reusable exception translation utility that eliminates code duplication and provides consistent handling of DBIx::Class exceptions throughout the codebase. New Components: - Koha::Schema::Util::ExceptionTranslator: Core utility class for translating DBIx::Class exceptions to Koha-specific exceptions - Koha::Schema: Enhanced with safe_do() and translate_exception() methods for convenient access to centralized exception handling - Comprehensive unit tests covering all translation scenarios Benefits: - Eliminates ~90 lines of duplicated exception handling code - Centralizes maintenance of exception translation logic - Provides consistent error messages and exception types - Makes it easier to extend support for additional database engines - Follows the pattern suggested in existing FIXME comments Exception Types Handled: - Foreign key constraint violations → Koha::Exceptions::Object::FKConstraint - Duplicate key violations → Koha::Exceptions::Object::DuplicateID - Invalid data type values → Koha::Exceptions::Object::BadValue - Enum data truncation → Koha::Exceptions::Object::BadValue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #30 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191266&action=edit Bug 19871: Use centralized exception translation in Koha::Item::add_to_bundle Replace duplicated DBIx::Class exception handling code with the new centralized exception translation system introduced in the previous commit. This change: - Eliminates ~40 lines of duplicated exception handling code - Uses the new Koha::Schema::translate_exception() method - Maintains identical exception behavior and error messages - Addresses the FIXME comment requesting this refactoring The add_to_bundle method now uses consistent exception translation with the rest of the codebase, reducing maintenance burden and ensuring consistent error handling patterns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #31 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191267 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191267&action=edit Bug 19871: Move FK constraint deletion handling to centralized exception translation Move the FK constraint deletion exception handling from Koha::Object::delete to the centralized ExceptionTranslator utility. This consolidates all DBIx::Class exception translation logic in one place and simplifies the Object delete method. Changes: - Add FK constraint deletion pattern matching to ExceptionTranslator - Remove manual exception handling from Koha::Object::delete - Add test coverage for FK constraint deletion translation - Simplify Object delete method to use centralized translation The centralized system now handles both FK constraint scenarios: - Child row constraint failures (add/update operations) - Parent row constraint failures (delete operations) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #32 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191268 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191268&action=edit Bug 19871: Update virtualshelf templates to use Koha exceptions instead of DBIx::Class::Exception Replace DBIx::Class::Exception handling in shelf templates with specific Koha exception types that are now provided by the centralized exception translation system. Template changes: - Replace 'DBIx::Class::Exception' case with specific Koha exception handlers - Add user-friendly error messages for FKConstraint, DuplicateID, and BadValue - Improve error presentation with descriptive text instead of raw database errors This provides better user experience by showing meaningful error messages instead of technical database exception details. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #33 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191269 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191269&action=edit Bug 19871: Update Koha::Patron::Modification to use centralized exception handling Replace manual DBIx::Class::Exception handling in the approve() method with the centralized exception translation system while preserving domain-specific exception behavior. Changes: - Use $schema->safe_do() for database operations with automatic exception translation - Wrap safe_do in try/catch to convert any exception to domain-specific Patron::Modification exception - Simplify exception handling logic while maintaining the same API contract - Remove manual DBIx::Class::Exception type checking This maintains backward compatibility by always throwing Koha::Exceptions::Patron::Modification exceptions as before, but leverages the centralized system for consistent database exception handling. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #34 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191270 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191270&action=edit Bug 19871: Move enum data truncation handling to centralized exception translation Complete the migration of enum data truncation exception handling from Koha::Object to the centralized ExceptionTranslator utility. This eliminates the last remaining manual DBIx::Class exception handling in Object code. Changes: - Add optional object parameter to ExceptionTranslator->translate_exception() - Update Schema wrapper methods to accept and pass object parameter - Enhance enum truncation handling to extract actual property values when object is available - Remove manual enum exception handling from Koha::Object::store() - Add comprehensive test coverage for enum handling with and without object context - Maintain contextual warning behavior for store() operations The centralized system now handles ALL DBIx::Class exception scenarios: - FK constraint failures (add/update and delete operations) - Duplicate key violations - Invalid data type values - Enum data truncation with actual property values This completes the centralization effort while providing better error reporting than the previous manual approach. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #35 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191271&action=edit Bug 19871: (QA follow-up) Replace symbolic refs with proper mock object class Replace 'no strict refs' usage with a proper TestObject package to avoid Perl::Critic violations while maintaining the same test functionality. The mock object now uses standard OOP patterns instead of symbolic references for method creation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #36 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 191272 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191272&action=edit Bug 19871: Make exception handling more explicit in add_to_bundle Replace the implicit exception translation call with an explicit safe_do pattern that clearly shows exceptions are rethrown. Changes: - Use $schema->safe_do() wrapper for automatic exception translation - Add explicit $_->rethrow() in catch block for clarity - Follow the same pattern used in Koha::Patron::Modification::approve() - Make control flow more obvious to future maintainers This change maintains identical behavior while improving code clarity by making it explicit that the catch block never returns normally. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #37 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Just another rebase to keep it applying -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |OpenFifth list of Sponsors| |<https://openfifth.co.uk> Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191265|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191266|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191267|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191268|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191269|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191270|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191271|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191272|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #38 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193105 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193105&action=edit Bug 19871: Add centralized DBIx::Class exception translation system This introduces a reusable exception translation utility that eliminates code duplication and provides consistent handling of DBIx::Class exceptions throughout the codebase. New Components: - Koha::Schema::Util::ExceptionTranslator: Core utility class for translating DBIx::Class exceptions to Koha-specific exceptions - Koha::Schema: Enhanced with safe_do() and translate_exception() methods for convenient access to centralized exception handling - Comprehensive unit tests covering all translation scenarios Benefits: - Eliminates ~90 lines of duplicated exception handling code - Centralizes maintenance of exception translation logic - Provides consistent error messages and exception types - Makes it easier to extend support for additional database engines - Follows the pattern suggested in existing FIXME comments Exception Types Handled: - Foreign key constraint violations → Koha::Exceptions::Object::FKConstraint - Duplicate key violations → Koha::Exceptions::Object::DuplicateID - Invalid data type values → Koha::Exceptions::Object::BadValue - Enum data truncation → Koha::Exceptions::Object::BadValue Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #39 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193106 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193106&action=edit Bug 19871: Use centralized exception translation in Koha::Item::add_to_bundle Replace duplicated DBIx::Class exception handling code with the new centralized exception translation system introduced in the previous commit. This change: - Eliminates ~40 lines of duplicated exception handling code - Uses the new Koha::Schema::translate_exception() method - Maintains identical exception behavior and error messages - Addresses the FIXME comment requesting this refactoring The add_to_bundle method now uses consistent exception translation with the rest of the codebase, reducing maintenance burden and ensuring consistent error handling patterns. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #40 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193107 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193107&action=edit Bug 19871: Move FK constraint deletion handling to centralized exception translation Move the FK constraint deletion exception handling from Koha::Object::delete to the centralized ExceptionTranslator utility. This consolidates all DBIx::Class exception translation logic in one place and simplifies the Object delete method. Changes: - Add FK constraint deletion pattern matching to ExceptionTranslator - Remove manual exception handling from Koha::Object::delete - Add test coverage for FK constraint deletion translation - Simplify Object delete method to use centralized translation The centralized system now handles both FK constraint scenarios: - Child row constraint failures (add/update operations) - Parent row constraint failures (delete operations) Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #41 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193108 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193108&action=edit Bug 19871: Update virtualshelf templates to use Koha exceptions instead of DBIx::Class::Exception Replace DBIx::Class::Exception handling in shelf templates with specific Koha exception types that are now provided by the centralized exception translation system. Template changes: - Replace 'DBIx::Class::Exception' case with specific Koha exception handlers - Add user-friendly error messages for FKConstraint, DuplicateID, and BadValue - Improve error presentation with descriptive text instead of raw database errors This provides better user experience by showing meaningful error messages instead of technical database exception details. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #42 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193109 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193109&action=edit Bug 19871: Update Koha::Patron::Modification to use centralized exception handling Replace manual DBIx::Class::Exception handling in the approve() method with the centralized exception translation system while preserving domain-specific exception behavior. Changes: - Use $schema->safe_do() for database operations with automatic exception translation - Wrap safe_do in try/catch to convert any exception to domain-specific Patron::Modification exception - Simplify exception handling logic while maintaining the same API contract - Remove manual DBIx::Class::Exception type checking This maintains backward compatibility by always throwing Koha::Exceptions::Patron::Modification exceptions as before, but leverages the centralized system for consistent database exception handling. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #43 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193110 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193110&action=edit Bug 19871: Move enum data truncation handling to centralized exception translation Complete the migration of enum data truncation exception handling from Koha::Object to the centralized ExceptionTranslator utility. This eliminates the last remaining manual DBIx::Class exception handling in Object code. Changes: - Add optional object parameter to ExceptionTranslator->translate_exception() - Update Schema wrapper methods to accept and pass object parameter - Enhance enum truncation handling to extract actual property values when object is available - Remove manual enum exception handling from Koha::Object::store() - Add comprehensive test coverage for enum handling with and without object context - Maintain contextual warning behavior for store() operations The centralized system now handles ALL DBIx::Class exception scenarios: - FK constraint failures (add/update and delete operations) - Duplicate key violations - Invalid data type values - Enum data truncation with actual property values This completes the centralization effort while providing better error reporting than the previous manual approach. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #44 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193111&action=edit Bug 19871: (QA follow-up) Replace symbolic refs with proper mock object class Replace 'no strict refs' usage with a proper TestObject package to avoid Perl::Critic violations while maintaining the same test functionality. The mock object now uses standard OOP patterns instead of symbolic references for method creation. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #45 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193112&action=edit Bug 19871: Make exception handling more explicit in add_to_bundle Replace the implicit exception translation call with an explicit safe_do pattern that clearly shows exceptions are rethrown. Changes: - Use $schema->safe_do() wrapper for automatic exception translation - Add explicit $_->rethrow() in catch block for clarity - Follow the same pattern used in Koha::Patron::Modification::approve() - Make control flow more obvious to future maintainers This change maintains identical behavior while improving code clarity by making it explicit that the catch block never returns normally. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|OpenFifth |OpenFifth list of Sponsors|<https://openfifth.co.uk> |<https://openfifth.co.uk>,B | |yWater Solutions | |<https://bywatersolutions.c | |om> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|OpenFifth |OpenFifth list of Sponsors|<https://openfifth.co.uk>,B |<https://openfifth.co.uk> |yWater Solutions | |<https://bywatersolutions.c | |om> | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42391 Status|Signed Off |Passed QA Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42391 [Bug 42391] Use DBIx::Class exception_action to translate exceptions at the source -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193105|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193106|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193107|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193108|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193109|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193110|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193111|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193112|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #46 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197443 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197443&action=edit Bug 19871: Add centralized DBIx::Class exception translation system This introduces a reusable exception translation utility that eliminates code duplication and provides consistent handling of DBIx::Class exceptions throughout the codebase. New Components: - Koha::Schema::Util::ExceptionTranslator: Core utility class for translating DBIx::Class exceptions to Koha-specific exceptions - Koha::Schema: Enhanced with safe_do() and translate_exception() methods for convenient access to centralized exception handling - Comprehensive unit tests covering all translation scenarios Benefits: - Eliminates ~90 lines of duplicated exception handling code - Centralizes maintenance of exception translation logic - Provides consistent error messages and exception types - Makes it easier to extend support for additional database engines - Follows the pattern suggested in existing FIXME comments Exception Types Handled: - Foreign key constraint violations → Koha::Exceptions::Object::FKConstraint - Duplicate key violations → Koha::Exceptions::Object::DuplicateID - Invalid data type values → Koha::Exceptions::Object::BadValue - Enum data truncation → Koha::Exceptions::Object::BadValue Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #47 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197444 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197444&action=edit Bug 19871: Use centralized exception translation in Koha::Item::add_to_bundle Replace duplicated DBIx::Class exception handling code with the new centralized exception translation system introduced in the previous commit. This change: - Eliminates ~40 lines of duplicated exception handling code - Uses the new Koha::Schema::translate_exception() method - Maintains identical exception behavior and error messages - Addresses the FIXME comment requesting this refactoring The add_to_bundle method now uses consistent exception translation with the rest of the codebase, reducing maintenance burden and ensuring consistent error handling patterns. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #48 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197445 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197445&action=edit Bug 19871: Move FK constraint deletion handling to centralized exception translation Move the FK constraint deletion exception handling from Koha::Object::delete to the centralized ExceptionTranslator utility. This consolidates all DBIx::Class exception translation logic in one place and simplifies the Object delete method. Changes: - Add FK constraint deletion pattern matching to ExceptionTranslator - Remove manual exception handling from Koha::Object::delete - Add test coverage for FK constraint deletion translation - Simplify Object delete method to use centralized translation The centralized system now handles both FK constraint scenarios: - Child row constraint failures (add/update operations) - Parent row constraint failures (delete operations) Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #49 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197446 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197446&action=edit Bug 19871: Update virtualshelf templates to use Koha exceptions instead of DBIx::Class::Exception Replace DBIx::Class::Exception handling in shelf templates with specific Koha exception types that are now provided by the centralized exception translation system. Template changes: - Replace 'DBIx::Class::Exception' case with specific Koha exception handlers - Add user-friendly error messages for FKConstraint, DuplicateID, and BadValue - Improve error presentation with descriptive text instead of raw database errors This provides better user experience by showing meaningful error messages instead of technical database exception details. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #50 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197447 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197447&action=edit Bug 19871: Update Koha::Patron::Modification to use centralized exception handling Replace manual DBIx::Class::Exception handling in the approve() method with the centralized exception translation system while preserving domain-specific exception behavior. Changes: - Use $schema->safe_do() for database operations with automatic exception translation - Wrap safe_do in try/catch to convert any exception to domain-specific Patron::Modification exception - Simplify exception handling logic while maintaining the same API contract - Remove manual DBIx::Class::Exception type checking This maintains backward compatibility by always throwing Koha::Exceptions::Patron::Modification exceptions as before, but leverages the centralized system for consistent database exception handling. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #51 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197448 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197448&action=edit Bug 19871: Move enum data truncation handling to centralized exception translation Complete the migration of enum data truncation exception handling from Koha::Object to the centralized ExceptionTranslator utility. This eliminates the last remaining manual DBIx::Class exception handling in Object code. Changes: - Add optional object parameter to ExceptionTranslator->translate_exception() - Update Schema wrapper methods to accept and pass object parameter - Enhance enum truncation handling to extract actual property values when object is available - Remove manual enum exception handling from Koha::Object::store() - Add comprehensive test coverage for enum handling with and without object context - Maintain contextual warning behavior for store() operations The centralized system now handles ALL DBIx::Class exception scenarios: - FK constraint failures (add/update and delete operations) - Duplicate key violations - Invalid data type values - Enum data truncation with actual property values This completes the centralization effort while providing better error reporting than the previous manual approach. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #52 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197449&action=edit Bug 19871: (QA follow-up) Replace symbolic refs with proper mock object class Replace 'no strict refs' usage with a proper TestObject package to avoid Perl::Critic violations while maintaining the same test functionality. The mock object now uses standard OOP patterns instead of symbolic references for method creation. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #53 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197450 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197450&action=edit Bug 19871: Make exception handling more explicit in add_to_bundle Replace the implicit exception translation call with an explicit safe_do pattern that clearly shows exceptions are rethrown. Changes: - Use $schema->safe_do() wrapper for automatic exception translation - Add explicit $_->rethrow() in catch block for clarity - Follow the same pattern used in Koha::Patron::Modification::approve() - Make control flow more obvious to future maintainers This change maintains identical behavior while improving code clarity by making it explicit that the catch block never returns normally. Sponsored-by: OpenFifth <https://openfifth.co.uk> Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #54 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197451 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197451&action=edit Bug 19871: (QA follow-up) Add missing POD for methods in touched files The QA tools flag all methods without POD in any touched file. This patch adds the missing POD for pre-existing methods that were flagged: - Koha::Item::_add_statistic - Koha::Object::_date_or_datetime_column_type - Koha::Object::_datetime_column_type - Koha::Object::_numeric_column_type - Koha::Object::_decimal_column_type - Koha::Object::_recursive_fixup - Koha::Object::_get_object_class - Koha::Object::DESTROY - Koha::Patron::Modification::_type (also fixes heading mismatch) Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #55 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197452 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197452&action=edit Bug 19871: (QA follow-up) Remove safe_do, use translate_exception directly The safe_do wrapper adds indirection without value: - In Patron::Modification::approve, every operation inside safe_do goes through Object::store or Object::delete, which already call translate_exception internally. The wrapper was translating already-translated exceptions. - In Item::add_to_bundle, the outer try/catch just called rethrow, making the safe_do + try/catch nesting a no-op. This follow-up removes safe_do and aligns both callers with the pattern already used by Object::store and Object::delete: call translate_exception directly in the catch block when raw DBIC operations are involved. Changes: - Remove safe_do from Koha::Schema (and its Try::Tiny import) - Flatten add_to_bundle to use translate_exception in its catch - Flatten Patron::Modification::approve to rely on Object::store - Remove safe_do test, adjust test count Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion --- Comment #56 from Jonathan Druart <jonathan.druart@gmail.com> --- Late QA review (sorry!) 1. Koha::Item_add_statistic calls C4::Stats 54 sub UpdateStats { 55 my $params = shift; 56 Koha::Statistic->new($params)->store; 57 } Well, then call Koha::Statistic directly and don't rely on C4? :) 2. Does it really make sense to have the new module under Koha::Schema? Especially using the catch-all and ambiguous "Util". Why not Koha::Exception::ExceptionTranslator? or under Koha::Exception::DBIX? 3. Also "Translator" is confusing (it's not about i18n). Suggestions: ExceptionConverter or ExceptionResolver? 4. +This utility is designed to be extended to support: +=item * Multiple database engines (PostgreSQL, SQLite, etc.) Didn't we abandon this idea? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #57 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- My thoughts: 1. C4::Stats in Koha::Item::_add_statistic This is out of scope for bug 19871. The _add_statistic call in Koha::Item is unrelated to the exception translation work — it just happens to be in the same file. Replacing C4::Stats::UpdateStats with Koha::Statistic->new($params)->store is a separate cleanup task. Worth doing, but not in this bug. 2. Util wasn't the best name, but I placed it under Schema as I felt it related directly to DBIC and was clear there.. honestly a bit annoyed that we go PQA after waiting 7 months then within seconds right at the end of a cycle ask for more changes. How about 'Koha::Exceptions::DBIC::Translator'.. but of course changing now will require the bugs on top of this to all be refactored. 3. It's translating exceptions.. so I think Translator makes sense. 4. OK, bad comment, I'll remove it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #58 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197489 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197489&action=edit Bug 19871: (QA follow-up) Remove misleading multi-DB engine POD Remove the FUTURE ENHANCEMENTS section that promised PostgreSQL and SQLite support, as multi-DB engine support has been abandoned. Replace the related FIXME with a simple comment noting the MySQL specificity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #59 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197490&action=edit Bug 19871: (QA follow-up) Move ExceptionTranslator to Koha::Exceptions::DBIC::Translator Rename Koha::Schema::Util::ExceptionTranslator to Koha::Exceptions::DBIC::Translator to place it under the established Koha::Exceptions namespace, which better reflects its purpose as an exception handling component rather than a schema utility. The convenience method on Koha::Schema is retained to keep the call-site API ($schema->translate_exception) unchanged. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42396 --- Comment #60 from Jonathan Druart <jonathan.druart@gmail.com> --- Yes I think we need a "don't look at this, Joubu" keyword. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42396 [Bug 42396] Replace C4::Stats::UpdateStats calls with Koha::Statistic->store -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197489|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197490|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #61 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #60)
Yes I think we need a "don't look at this, Joubu" keyword.
LOL. Your input is always valuable. There's a clear recurring timing issue. Can we move the discussion into bug 42391? I already refactored the core of this patchset there. I already cleaned the POD there. It is only missing a new placement for the exception mapper (?) class. I personally don't like the `Koha::Exceptions::*` namespace as it suggests it is an exception class (which is not). And I'd like to keep the helper class within the Koha::Schema context, as its domain is really DBIC. I didn't like the `Util` part, though. Maybe `Koha::Schema::ExceptionMapper` would be good enough. But as I said, can we move this conversation to the follow-up bug, which is the cherry on top for this enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 --- Comment #62 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19871 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #63 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- This will not be backported to 25.11.x due to it being deemed an enhancement or a dependancy not being met -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org