Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>fr.insee.pearljam</groupId>
<artifactId>pearljam-back-office</artifactId>
<version>5.13.8</version>
<version>5.13.9</version>
<name>Pearl-Jam-Back-Office</name>
<description>Back-office services for PearlJam</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,17 @@ private CommunicationRequest getNewCommunicationRequest(CommunicationRequestCrea
.findCommunicationTemplate(campaignId, communicationRequestToCreate.communicationTemplateId())
.orElseThrow(CommunicationTemplateNotFoundException::new);

// Correcting clock desynchronization from frontend retrieved creation timestamp (for initialization status)
// in case ready status is set before initialization status
// by setting creation timestamp right before ready one
long timestampDelta = communicationRequestToCreate.creationTimestamp() - readyTimestamp;
long creationTimestamp = timestampDelta >= 0 ? readyTimestamp - 1 : communicationRequestToCreate.creationTimestamp();

if(!communicationTemplate.medium().equals(CommunicationMedium.LETTER)) {
return CommunicationRequest.create(
campaignId,
communicationRequestToCreate.communicationTemplateId(),
communicationRequestToCreate.creationTimestamp(),
creationTimestamp,
readyTimestamp,
communicationRequestToCreate.reason());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ void testPutSurveyUnitDetail() throws Exception {
"emitter": "INTERVIEWER",
"status": [
{
"date": 1721903754305,
"date": 1719324511999,
"status": "INITIATED"
},
{
Expand Down