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

Incorrect FB# sorting now that Apple has passed FB10000000. New items are on page 24, not 1. #52

Open
bradtchapman opened this issue May 26, 2022 · 3 comments

Comments

@bradtchapman
Copy link

I just added an FB with 8 digits that starts with 1001 and it isn't on page 1, but way down on page 24. I also found other FB#'s down there that appear to have been opened recently.

If the "date" field isn't populated consistently by users, can you still ensure that FB's are sorted by date when it was added to the OpenRadar database, instead of using a pure alphanumeric sort? Otherwise, FB10027879 comes before FB264382.

See screenshot. Thanks!

Screen Shot 2022-05-25 at 5 35 40 PM

@futuretap
Copy link

I suggest either to sort numerically or by submission date. Just this small change would make Open Radar immediately useful again!

@Artoria2e5
Copy link

Artoria2e5 commented Feb 14, 2024

Right now it is pretty alnum:

radars = db.GqlQuery("select * from Radar order by number desc").fetch(PAGESIZE,(int(number)-1)*PAGESIZE)

The db has a column called number_intvalue that we can use to sort by value:

number_intvalue = db.IntegerProperty()

There is one big "INVALID" entry out there though. No idea how it got there; probably it won't get a number_intvalue.
image

@Artoria2e5
Copy link

Artoria2e5 commented Feb 15, 2024

Ah yikes, the number (actually a string) sorting thing is forced by #43/#44, just changing it back won't work. I guess we can add an additional property (column) so we can use two properties in order by: order by is_fb desc, number_intvalue desc.

I don't know what kind of sorcery is required to change table shape in GQL. There's also a bunch of deprecation notices on the Python 2 GQL documentation I don't want to look at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants