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

Article list ordering is slightly messed up #223

Open
hexjelly opened this issue Apr 28, 2021 · 0 comments
Open

Article list ordering is slightly messed up #223

hexjelly opened this issue Apr 28, 2021 · 0 comments
Labels
bug Something isn't working infrastructure

Comments

@hexjelly
Copy link
Contributor

hexjelly commented Apr 28, 2021

My fault 🤭
Currently it is ordering articles by publishedAt, then _createdAt. This does not work very well as it is now, since it will first show all the ones with publishedAt, then if an article is missing the publishedAt (old articles when it was not a required field), it will show up after all the ones with publishedAt present, even if it's newer.

I think that is what is happening, by just having a quick look at another PR surrounding the articles... maybe worth a second look to make sure I'm not making stuff up 😬

What needs to be done

Probably a "migration" where we update every article without a publishedAt would be the best, because it would be good to have it for all articles anyway. E.g. go through every article, if it does not have a publishedAt, set it to be the same as the article's _createdAt. It could be fixed in the code as well, but I think it would be better to do it this way.

@hexjelly hexjelly added the bug Something isn't working label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant