Repository navigation
fix #48 Render the execution duration with an overridable template - #132
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
@CleverAgeUiProcess/admin/field/duration.html.twigtemplate: rendersProcessExecution::duration()with the%H hour(s) %I min(s) %S sformat (translated in themessagesdomain, as before); the EasyAdminlabel/nulltemplate 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: thedurationfield uses this template. The$translatorconstructor argument (only used for this format) is no longer used: kept for BC, deprecated (PHPDoc), will be removed in 4.0. Its binding inconfig/services/controller.yamlis unchanged.rector.php:RemoveUnusedConstructorParamRectorskipped onProcessExecutionCrudController(it removed the deprecated argument); PHPStanconstructor.unusedParameterignored on its constructor.04-process_executions_and_logs.md): how to change the format, with an override example.Tests
ProcessExecutionCrudTest::testDuration: a finished execution displays00 hour(s) 00 min(s) 00 s, a running oneNull.Requirements
Breaking changes
$translatorargument ofProcessExecutionCrudController::__construct()is no longer used, it will be removed in 4.0.🤖 Generated with Claude Code