Skip to content

fix #48 Render the execution duration with an overridable template - #132

Merged
njoubert-cleverage merged 1 commit into
mainfrom
48
Oct 8, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
48

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #48

The duration format of the executions list was hard-coded in ProcessExecutionCrudController::configureFields() (formatValue() callback): changing it required overriding the controller.

Changes

  • New @CleverAgeUiProcess/admin/field/duration.html.twig template: renders ProcessExecution::duration() with the %H hour(s) %I min(s) %S s format (translated in the messages domain, as before); the EasyAdmin label/null template for a running execution (as before). The format can be changed by overriding the template (templates/bundles/CleverAgeUiProcessBundle/admin/field/duration.html.twig) or by translating the format.
  • ProcessExecutionCrudController: the duration field uses this template. The $translator constructor argument (only used for this format) is no longer used: kept for BC, deprecated (PHPDoc), will be removed in 4.0. Its binding in config/services/controller.yaml is unchanged.
  • rector.php: RemoveUnusedConstructorParamRector skipped on ProcessExecutionCrudController (it removed the deprecated argument); PHPStan constructor.unusedParameter ignored on its constructor.
  • Reference doc (04-process_executions_and_logs.md): how to change the format, with an override example.
  • CHANGELOG: The duration format should be defined in the template to avoid having to override the controller #48 entry (unreleased).

Tests

  • ProcessExecutionCrudTest::testDuration: a finished execution displays 00 hour(s) 00 min(s) 00 s, a running one Null.
  • 296 tests OK. PHPStan, PHP-CS-Fixer, Rector, Twig-CS-Fixer OK.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

  • None. Deprecation: the $translator argument of ProcessExecutionCrudController::__construct() is no longer used, it will be removed in 4.0.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 41abc0a into main Oct 8, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The duration format should be defined in the template to avoid having to override the controller

1 participant