You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When downloading the initial delivery report after sending a campaign, without navigating away from the campaign sending page, the download filename has invalid date in the filename.
I could not replicate the issue after refreshing the page, so all further report downloads have the expected filename.
To Reproduce
Steps to reproduce the behavior:
Create a SMS campaign and send out the campaign
Do not navigate away from the campaign sending page and wait for the delivery report to be ready
Click on 'Report' to download the file
Observe the filename in the download window
Expected behavior
There should be a valid date in the report filename.
Screenshots
The text was updated successfully, but these errors were encountered:
When sending a campaign for the first time, the `sentAt` field for the
in-memory representation of `Campaign` is still undefined. This causes
"invalid_Date" to appear in the filename of delivery reports.
Fix this by updating the `sentAt` field of the in-memory `Campaign` to
the current date when sending the campaign for the first time.
Fixes issue #1113
* fix(campaign): correct Date types to string
Even though sent_at, created_at, and status_updated_at are represented
as Dates in the backend, these fields will be serialized to an ISO
string which the frontend then receives.
Hence, correct the type definition of these fields.
* refactor(dashboard): refactor onModalConfirm to a util function
* fix(dashboard): update local sentAt when sending campaign
When sending a campaign for the first time, the `sentAt` field for the
in-memory representation of `Campaign` is still undefined. This causes
"invalid_Date" to appear in the filename of delivery reports.
Fix this by updating the `sentAt` field of the in-memory `Campaign` to
the current date when sending the campaign for the first time.
Fixes issue #1113
* fix(campaign): mark sentAt and statusUpdatedAt as possibly undefined
* chore: refactor campaign stats polling to a custom hook
Note: make `refreshCampaignStats` a memoized callback to satisfy the
useEffect dependencies.
* Revert "fix(dashboard): update local sentAt when sending campaign"
Instead, we'll get the actual sentAt from the source.
This reverts commit 2abf7b3.
* fix: fall back to the current date if sentAt is undefined
* fix: fetch finalized campaign details after campaign is sent
Describe the bug
When downloading the initial delivery report after sending a campaign, without navigating away from the campaign sending page, the download filename has invalid date in the filename.
I could not replicate the issue after refreshing the page, so all further report downloads have the expected filename.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be a valid date in the report filename.
Screenshots

The text was updated successfully, but these errors were encountered: