[openstreetmap/openstreetmap-website] Order issue reports by id (PR #5786)

Anton Khorev notifications at github.com
Mon Mar 10 14:56:06 UTC 2025


Reports on `/issue/:id` weren't sorted in any particular order. This is usually unnoticeable because typically they come in the creation order from the db. But that doesn't always happen.

![image](https://github.com/user-attachments/assets/6222ec71-9e42-4b63-89fc-2f4da6690c7e)

This PR sorts the reports by id explicitly.

I don't know if we need an index on (issue_id, report_id). If there aren't many reports per issue, maybe not.

Same thing is probably required for issue comments.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5786

-- Commit Summary --

  * Order issue reports by id

-- File Changes --

    M app/controllers/issues/reporters_controller.rb (2)
    M app/controllers/issues_controller.rb (2)
    M app/models/issue.rb (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5786.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5786.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5786
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5786 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250310/6bc944cc/attachment.htm>


More information about the rails-dev mailing list