[openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)
Anton Khorev
notifications at github.com
Mon Jan 27 11:10:30 UTC 2025
@AntonKhorev commented on this pull request.
> @@ -44,6 +44,15 @@ def index
end
@issues, @newer_issues_id, @older_issues_id = get_page_items(@issues, :limit => @params[:limit])
+
+ @unique_reporters = @issues.each_with_object({}) do |issue, reporters|
+ user_ids = issue.reports.order(:created_at => :desc).map(&:user_id).uniq
+ reporters[issue.id] = {
+ :count => user_ids.size,
+ :users => User.where(:id => user_ids.first(3)).index_by(&:id).values_at(*user_ids.first(3))
```suggestion
:users => User.in_order_of(:id, user_ids.first(3))
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4990#pullrequestreview-2575144710
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4990/review/2575144710 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250127/f9c43749/attachment-0001.htm>
More information about the rails-dev
mailing list