Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key events ordering when publish date is exactly the same #27163

Open
georgeblahblah opened this issue May 17, 2024 · 0 comments
Open

Key events ordering when publish date is exactly the same #27163

georgeblahblah opened this issue May 17, 2024 · 0 comments
Labels
Rota Any issues that have come in as part of rota. Useful for the person on rota to track their work.

Comments

@georgeblahblah
Copy link
Contributor

We order key events based on their first published date (or created date if that isn't available). However, some live blogs have two key events with exactly the same first publish date, e.g:

~ % http "https://www.theguardian.com/politics/live/2024/may/17/keir-starmer-jeremy-hunt-rishi-sunak-conservatives-labour-uk-politics-live.json?dcr&page=with:block-6646453d8f086b5d4c8c0095&filterKeyEvents=false" | jq '.keyEvents[-2:] | .[] | {id, title: .title, blockFirstPublished: .blockFirstPublished }'
{
  "id": "6646453d8f086b5d4c8c0095",
  "title": "Welcome and opening summary …",
  "blockFirstPublished": 1715933187000
}
{
  "id": "66470c638f086b5d4c8c0610",
  "title": "Jeremy Hunt attempts to draw general election dividing line over tax",
  "blockFirstPublished": 1715933187000
}

However, the body blocks reveal a different ordering:

http "https://www.theguardian.com/politics/live/2024/may/17/keir-starmer-jeremy-hunt-rishi-sunak-conservatives-labour-uk-politics-live.json?dcr&page=with:block-6646453d8f086b5d4c8c0095&filterKeyEvents=false" | jq '.blocks[-2:] | .[] | {id,title,blockFirstPublished}'
{
  "id": "66470c638f086b5d4c8c0610",
  "title": "Jeremy Hunt attempts to draw general election dividing line over tax",
  "blockFirstPublished": 1715933187000
}
{
  "id": "6646453d8f086b5d4c8c0095",
  "title": "Welcome and opening summary …",
  "blockFirstPublished": 1715933187000
}

In this case, where the key events have an identical first published time, we should take the ordering from the body blocks.

@georgeblahblah georgeblahblah added the Rota Any issues that have come in as part of rota. Useful for the person on rota to track their work. label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rota Any issues that have come in as part of rota. Useful for the person on rota to track their work.
Projects
None yet
Development

No branches or pull requests

1 participant