Files
dolibarr/htdocs/core/modules/import
VIAL-GOUTEYRON Quentin 23f9aeded0 NEW Add CSV/XLSX import mode to disable triggers execution (refactoring of import, while preserving legacy SQL compatibility) (#37367)
* Add support for optimized import trigger modes and bulk processing

Introduced new features and optimizations for the import module:
- **Trigger Modes**: Added `strict_line` (default, triggers per row) and `fast_bulk` (triggers aggregate events for bulk imports).
- **Simulation Mode**: Implemented a simulation flag to enable preview of imports without executing triggers.
- **Trigger Cache/Optimization**: Added caching for trigger objects and hook-resolved actions, enhancing performance during legacy SQL imports.
- **Bulk Trigger Stats**: Integrated stats tracking for bulk operations (insert/update) by table, facilitating analytical insight during bulk imports.
- **Extended Trigger Logic**: Enhanced trigger handling:
  - Dynamically resolved actions based on context (table, operation, object class).
  - Introduced hooks for custom import trigger actions.
  - Provided fallback mechanisms for unmapped table-element relationships.
- **Compatibility**: Maintained compatibility with legacy strict-line mode using object-based trigger execution.

These updates improve import performance, scalability, and flexibility while maintaining robust backward compatibility.

* fix

* fix

* refacto

* precommit

* retour

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-27 16:35:36 +01:00
..