Replies: 1 comment 3 replies
-
Also, looking though my code, I check a value properties.replacedBy as a way of knowing if an alert was updated. In the dataset right now for Virginia during this storm, with many updated alerts and a hundred or more entries in it total, not a single one specifies a replacedBy value. So perhaps something was changed that this is no longer being set. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There seems to be an oversight or issue with the alert API regarding updated alerts. From what I can tell, an alert that has been superseded and replaced by an updated alert has nothing in its status or entry to indicate that whatsoever. In other words you cannot determine it is no longer active via that alert's own data.
I believe what must be done is scan all entries for those with a messageType of Update, then look at references.identifier which specifies the original message(s) this one updates. Then consider those referenced messages as no longer active. This gets more complex when you have a chain of updates, one after the other after the other, and a single message can reference multiple other messages it updates, and a message can be updated by more than one other message as well.
Seems to me the status of the updated entry should indicate that fact. Or at least have an "updatedBy" field indicating which messages update it, and if that is set we know that message is no longer active.
Or am I missing something more obvious here?
Beta Was this translation helpful? Give feedback.
All reactions