diff --git a/src/Bundle/ChillMainBundle/Resources/views/Entity/CommentEmbeddable.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Entity/CommentEmbeddable.html.twig
index 1dcd9cbf7..5395df212 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Entity/CommentEmbeddable.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Entity/CommentEmbeddable.html.twig
@@ -40,10 +40,10 @@
{{ 'by_user'|trans ~ ' ' }}
{% endif %}
- {{ user|chill_entity_render_box(options['user']) }}
+ {{ user|chill_entity_render_box({'at_date': comment.date}) }}
{% endif %}
{% endif %}
-{{ closing_box|raw }}
\ No newline at end of file
+{{ closing_box|raw }}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig
index 2aec17cf9..0056c503d 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig
@@ -31,14 +31,14 @@
{{ 'By'|trans }}
- {{ step.previous.transitionBy|chill_entity_render_box }},
+ {{ step.previous.transitionBy|chill_entity_render_box({'at_date': step.previous.transitionAt }) }},
{{ step.previous.transitionAt|format_datetime('short', 'short') }}
{% else %}
{{ 'workflow.Created by'|trans }}
-
{{ step.entityWorkflow.createdBy|chill_entity_render_box }}
+
{{ step.entityWorkflow.createdBy|chill_entity_render_box({'at_date': step.entityWorkflow.createdAt}) }}
{{ 'Le'|trans }}
@@ -110,8 +110,8 @@
{% if entity_workflow.currentStep.destUserByAccessKey|length > 0 %}
{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :
- {% for u in entity_workflow.currentStep.destUserByAccessKey %}
- - {{ u|chill_entity_render_box }}
+ {% for u in entity_workflow.currentStepChained.destUserByAccessKey %}
+ - {{ u|chill_entity_render_box({'at_date': entity_workflow.currentStepChained.previous.transitionAt }) }}
{% endfor %}
{% endif %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig
index acbf97cf7..a3e2e24b9 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig
@@ -42,7 +42,7 @@
{% if step.transitionBy is not null %}
- {{ step.transitionBy|chill_entity_render_box }}
+ {{ step.transitionBy|chill_entity_render_box({'at_date': step.transitionAt}) }}
{% endif %}
@@ -76,7 +76,7 @@
{{ 'workflow.Users allowed to apply transition'|trans }} :
{% for u in step.destUser %}
- - {{ u|chill_entity_render_box }}
+ - {{ u|chill_entity_render_box({'at_date': step.previous.transitionAt}) }}
{% endfor %}
{% endif %}
@@ -85,7 +85,7 @@
{{ 'workflow.Users put in Cc'|trans }} :
{% for u in step.ccUser %}
- - {{ u|chill_entity_render_box }}
+ - {{ u|chill_entity_render_box({'at_date': step.previous.transitionAt}) }}
{% endfor %}
{% endif %}
@@ -103,7 +103,7 @@
{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :
{% for u in step.destUserByAccessKey %}
- - {{ u|chill_entity_render_box }}
+ - {{ u|chill_entity_render_box({'at_date': step.previous.transitionAt}) }}
{% endfor %}
{% endif %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig
index 2ba893910..71d1efcf1 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig
@@ -3,7 +3,7 @@
{% if step.previous is not null %}
{{ 'By'|trans ~ ' : ' }}
- {{ step.previous.transitionBy|chill_entity_render_box }}
+ {{ step.previous.transitionBy|chill_entity_render_box({'at_date': step.previous.transitionAt }) }}
{{ 'Le'|trans ~ ' : ' }}
@@ -12,19 +12,19 @@
{{ 'workflow.For'|trans ~ ' : ' }}
- {% for d in step.destUser %}{{ d|chill_entity_render_string }}{% if not loop.last %}, {% endif %}{% endfor %}
+ {% for d in step.destUser %}{{ d|chill_entity_render_string({'at_date': step.previous.transitionAt}) }}{% if not loop.last %}, {% endif %}{% endfor %}
{{ 'workflow.Cc'|trans ~ ' : ' }}
- {% for u in step.ccUser %}{{ u|chill_entity_render_string }}{% if not loop.last %}, {% endif %}{% endfor %}
+ {% for u in step.ccUser %}{{ u|chill_entity_render_string({'at_date': step.previous.transitionAt }) }}{% if not loop.last %}, {% endif %}{% endfor %}
{% else %}
{{ 'workflow.Created by'|trans ~ ' : ' }}
- {{ step.entityWorkflow.createdBy|chill_entity_render_box }}
+ {{ step.entityWorkflow.createdBy|chill_entity_render_box({'at_date': step.entityWorkflow.createdAt }) }}
{{ 'Le'|trans ~ ' : ' }}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php
index 46dbd00cc..2d924eb4d 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php
@@ -54,7 +54,7 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz
$data['transitionPreviousBy'] = $this->normalizer->normalize(
$previous->getTransitionBy(),
$format,
- $context
+ [...$context, UserNormalizer::AT_DATE => $previous->getTransitionAt()]
);
$data['transitionPreviousAt'] = $this->normalizer->normalize(
$previous->getTransitionAt(),
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php
index 99314ebdc..5e18fdd31 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php
@@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Serializer\Normalizer;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
+use Chill\MainBundle\Serializer\Normalizer\UserNormalizer;
use Chill\MainBundle\Workflow\Helper\MetadataExtractor;
use Symfony\Component\Serializer\Exception\ExceptionInterface;
use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
@@ -48,7 +49,7 @@ class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerA
$data['workflow'] = $this->metadataExtractor->buildArrayPresentationForWorkflow($workflow);
$data['current_place'] = $this->metadataExtractor->buildArrayPresentationForPlace($object);
$data['current_place_at'] = $this->normalizer->normalize($object->getCurrentStepCreatedAt(), 'json', ['groups' => ['read']]);
- $data['current_place_by'] = $this->normalizer->normalize($object->getCurrentStepCreatedBy(), 'json', ['groups' => ['read']]);
+ $data['current_place_by'] = $this->normalizer->normalize($object->getCurrentStepCreatedBy(), 'json', ['groups' => ['read'], UserNormalizer::AT_DATE => $object->getCurrentStepCreatedAt()]);
return $data;
}