Skip to content
Open
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting to see a failureCode/message being set for these new statuses. e.g. for the FileQuarantined event we'd have a failurecode/message that says something about a virus being detected.

I don't see that in the story though - would be good to clarify that with TomH to see if it's covered by another story or should be in this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will catch up on Monday with Tom H to discuss this. We're happy for the ticket to progress in the time being until then.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ WITH vars AS (
e.time,
CASE
WHEN e.type LIKE '%.item.dequeued.%'
OR e.type LIKE '%.queue.digital.letter.read.%' THEN 'Digital'
WHEN e.type LIKE '%.print.letter.transitioned.%' THEN 'Print' ELSE NULL
OR e.type LIKE '%.queue.digital.letter.read.%'
OR e.type LIKE '%.pdm.resource.submission.rejected.%'
OR e.type LIKE '%.pdm.resource.retries.exceeded.%'
OR e.type LIKE '%.messages.request.rejected.%' THEN 'Digital'
WHEN e.type LIKE '%.print.letter.transitioned.%'
OR e.type LIKE '%.print.file.quarantined.%' THEN 'Print' ELSE NULL
END as communicationtype,
CASE
WHEN e.type LIKE '%.item.dequeued.%' THEN 'Unread'
WHEN e.type LIKE '%.queue.digital.letter.read.%' THEN 'Read'
WHEN e.type LIKE '%.pdm.resource.submission.rejected.%' THEN 'Failed'
WHEN e.type LIKE '%.pdm.resource.retries.exceeded.%' THEN 'Failed'
WHEN e.type LIKE '%.messages.request.rejected.%' THEN 'Failed'
WHEN e.type LIKE '%.print.file.quarantined.%' THEN 'Failed'
WHEN e.letterstatus = 'RETURNED' THEN 'Returned'
WHEN e.letterstatus = 'FAILED' THEN 'Failed'
WHEN e.letterstatus = 'DISPATCHED' THEN 'Dispatched'
Expand All @@ -31,11 +39,12 @@ WITH vars AS (
ORDER BY te.time DESC,
CASE
-- Digital Priority Order
WHEN te.communicationtype = 'Digital' AND te.status = 'Failed' THEN 3
WHEN te.status = 'Read' THEN 2
WHEN te.status = 'Unread' THEN 1
-- Print Priority Order
WHEN te.status = 'Returned' THEN 4
WHEN te.status = 'Failed' THEN 3
WHEN te.communicationtype = 'Print' AND te.status = 'Failed' THEN 3
WHEN te.status = 'Dispatched' THEN 2
WHEN te.status = 'Rejected' THEN 1 ELSE 0
END DESC
Expand All @@ -45,7 +54,8 @@ WITH vars AS (
te.communicationtype,
te.status
FROM "translated_events" AS te
where te.status IS NOT NULL
WHERE te.status IS NOT NULL
AND te.communicationtype IS NOT NULL
)
SELECT oe.messagereference as "Message Reference",
oe.time as "Time",
Expand Down
41 changes: 30 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading