Files
orderPRO/.paul/phases/47-shipment-created-automation/47-01-SUMMARY.md
Jacek Pyziak ad9087d5e4 feat(47-shipment-created-automation): immediate shipment automation trigger
Phase 47 complete:

- add event shipment.created triggered immediately after shipment creation

- add action update_shipment_status with real-change guard and chain-safe emit

- update automation UI/options, docs, and PAUL state artifacts
2026-03-28 13:24:20 +01:00

2.1 KiB

phase, plan, status, completed
phase plan status completed
47-shipment-created-automation 01 completed 2026-03-28

Phase 47 Plan 01 Summary

Result

  • Dodano nowe zdarzenie automatyzacji shipment.created (UI: Utworzenie przesylki).
  • Trigger shipment.created jest uruchamiany od razu po sukcesie tworzenia przesylki:
    • ShipmentController::create() (provider API),
    • ShipmentController::createManual() (reczny numer przesylki).
  • Dodano nowy typ akcji automatyzacji update_shipment_status (UI: Zmiana statusu przesylki).
  • AutomationService wykonuje aktualizacje delivery_status tylko przy realnej zmianie, zapisuje activity log i emituje shipment.status_changed z kontekstem zmiany.

Acceptance Criteria

  • AC-1: Pass
  • AC-2: Pass
  • AC-3: Pass
  • AC-4: Pass

Verification

  • C:\xampp\php\php.exe -l src/Modules/Automation/AutomationController.php PASS
  • C:\xampp\php\php.exe -l src/Modules/Automation/AutomationService.php PASS
  • C:\xampp\php\php.exe -l src/Modules/Shipments/ShipmentController.php PASS
  • C:\xampp\php\php.exe -l src/Modules/Shipments/ShipmentPackageRepository.php PASS
  • C:\xampp\php\php.exe -l src/Modules/Cron/CronHandlerFactory.php PASS
  • C:\xampp\php\php.exe -l routes/web.php PASS
  • C:\xampp\php\php.exe -l resources/views/automation/form.php PASS
  • C:\xampp\php\php.exe -l resources/views/automation/index.php PASS
  • rg -n "shipment\.created|update_shipment_status|shipment_status_key|automation_shipment_status_updated" src resources public routes PASS
  • sonar-scanner PASS (analysis successful): https://sonar.project-pro.pl/dashboard?id=orderPRO

Manual Checkpoint

  • UAT checkpoint wykonany i zatwierdzony przez uzytkownika (approved).

Files

  • src/Modules/Automation/AutomationController.php
  • src/Modules/Automation/AutomationService.php
  • src/Modules/Cron/CronHandlerFactory.php
  • src/Modules/Shipments/ShipmentController.php
  • src/Modules/Shipments/ShipmentPackageRepository.php
  • routes/web.php
  • resources/views/automation/form.php
  • resources/views/automation/index.php
  • public/assets/js/modules/automation-form.js
  • DOCS/ARCHITECTURE.md
  • DOCS/TECH_CHANGELOG.md
  • DOCS/todo.md