Skip to content

Incorrect initiatives count #10108

@heisam

Description

@heisam

Describe the bug

The displayed initiatives count is only corrrect until the pagination batch size is exceeded. If there are more than 20 initiatives, the counter will not surpass 20.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'initiatives index page'
  2. Create more than 20 initiatives (or whatever pagination batch size is configured)
  3. See counter only showing 20 initiatives

Expected behavior
The counter should display the total number of initiatives

Screenshots
Bildschirm­foto 2022-11-23 um 10 25 31

Additional context

The problem ist obvious in app/views/decidim/initiatives/initiatives/_count.html.erb:

Current code:

<%= t(".title", count: initiatives.to_a.count) %>

This should fix it:

<%= t(".title", count: ideas.total_count) %>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions