Defect #8633

Pagination counts non visible issues

Added by Rodrigo Guerrero over 6 years ago. Updated about 6 years ago.

Status:ClosedStart date:2011-06-16
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:1.2.2
Resolution:Fixed Affected version:1.2.0

Description

When I see my list issues the projects (with various subproject) with filter status: all, in result show me

1 2 3 4 Next » (1-100/398) | Per page: 25, 50, 100

In first page show me 100 issues, the second show me 1 issue, the third and fourth show me: "No data to display"

Thanks

patch.diff Magnifier - count only issues of visible projects (465 Bytes) pasquale [:dedalus], 2011-07-23 13:28

pagination_fix_with_tests.patch Magnifier (1.3 KB) Etienne Massip, 2011-07-23 16:02


Related issues

Related to Redmine - Defect #8815: Invalid search results with paging Closed 2011-07-14
Related to Redmine - Defect #8943: Broken paginations on the view "all issues" page Closed 2011-07-29
Related to Redmine - Defect #9411: Number of issues closed / open in Roadmap include private... Closed 2011-10-12
Duplicated by Redmine - Defect #8848: Custom queries count, count also issue of archived projects Closed 2011-07-19

Associated revisions

Revision 6314
Added by Jean-Philippe Lang over 6 years ago

Fixed: pagination do not show total visible issue count (#8633).

Revision 7765
Added by Jean-Philippe Lang about 6 years ago

Merged r6314 from trunk (#8633).

History

#1 Updated by Etienne Massip over 6 years ago

Which Redmine version, any plugins, etc. ?

See SubmittingBugs for required details.

#2 Updated by Rodrigo Guerrero over 6 years ago

Information
  • Redmine version: 1.2.0.devel.5969
  • Database version: MySql 5.0.51a-3ubuntu5.5
  • Ruby version: ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01
  • Rails version: rails-2.3.11
Plugins:
  • Bulk Time Entry
  • Customer plugin
  • Redmine Graphs
  • Knowledgebase

#3 Updated by Etienne Massip over 6 years ago

  • Affected version (unused) set to 1.2.0
  • Affected version set to 1.2.0

#4 Updated by Jean-Baptiste Barth over 6 years ago

Strange, it shouldn't happen, but it's difficult to debug it without knowing the particularities of your database. If it doesn't contain top secret informations, you can send me a dump jeanbaptiste.barth [at] gmail.com, I'll see if I can reproduce and find out where the problem is.

#5 Updated by Jean-Baptiste Barth over 6 years ago

Just two things more :
  • please precise if it occurs only on some projects or on the cross-project view (and detailed steps to reproduce if needed)
  • if you send me the dump, please mention the URL to this issue in your email so it rings a bell for me

#6 Updated by Rodrigo Guerrero over 6 years ago

Jean-Baptiste Barth wrote:

Just two things more :
  • please precise if it occurs only on some projects or on the cross-project view (and detailed steps to reproduce if needed)
  • if you send me the dump, please mention the URL to this issue in your email so it rings a bell for me

Jean-Baptiste, the information is confidencial, so i can't send it. Structure the project is:

main project 1 (is being queried)
sub-project 1.1
sub-project 1.2
sub-project 1.3
sub-project 1.3.1 (archived)
sub-project 1.3.2
sub-project 1.3.3
sub-project 1.3.4 (archived)
sub-project 1.3.5 (archived)
sub-project 1.3.6
sub-project 1.3.7
sub-project 1.3.8 (archived)
sub-project 1.3.9 (archived)
sub-project 1.3.10
sub-project 1.3.11
sub-project 1.3.12
sub-project 1.4
sub-project 1.5
sub-project 1.6 (archived)
sub-project 1.7 (archived)
sub-project 1.8
sub-project 1.9

#7 Updated by Rodrigo Guerrero over 6 years ago

Jean, i can send more information? you need i execute any test?

Thank

Rodrigo

#8 Updated by Jean-Baptiste Barth over 6 years ago

It's ok, I'll have a look at it but maybe not right now. I already saw some problems counting paginated results, don't know if they're related.

#9 Updated by Rodrigo Guerrero over 6 years ago

Hi Jean-Baptiste, I update the last version and the problem persist. You have any patch to test?

Thank

#10 Updated by Etienne Massip over 6 years ago

Could you please try to remove (temporarily) your plugins and restart the application ?

#11 Updated by Rodrigo Guerrero over 6 years ago

Etienne Massip wrote:

Could you please try to remove (temporarily) your plugins and restart the application ?

Hi Etiene, I remove the plugins and the problem persist.

Show me:

1 2 3 4 Next » (1-100/347) | Per page: 25, 50, 100

but in the page 3 show me: "No data to display"

Plugins:

Migrating action_mailer_optional_tls...
Migrating acts_as_activity_provider...
Migrating acts_as_attachable...
Migrating acts_as_customizable...
Migrating acts_as_event...
Migrating acts_as_list...
Migrating acts_as_searchable...
Migrating acts_as_tree...
Migrating acts_as_versioned...
Migrating acts_as_watchable...
Migrating attachment_fu...
Migrating awesome_nested_set...
Migrating classic_pagination...
Migrating gravatar...
Migrating open_id_authentication...
Migrating prepend_engine_views...
Migrating rfpdf...
Migrating ruby-net-ldap-0.0.4...

#12 Updated by Etienne Massip over 6 years ago

  • Target version set to Candidate for next minor release

#13 Updated by Etienne Massip over 6 years ago

#8848 tell us it is due to archived projects.

#14 Updated by Etienne Massip over 6 years ago

Query#issue_count (source:/trunk/app/models/query.rb#L504) returns:

Issue.count(:include => [:status, :project], :conditions => statement)

Should be:

Issue.visible.count(:include => [:status, :project], :conditions => statement)

#15 Updated by pasquale [:dedalus] over 6 years ago

proposed patch

#16 Updated by Etienne Massip over 6 years ago

Same with tests issues_count and issues_count_with_archived_issues.

Please note that default test data includes issues which are not visible, so both tests would fail without the Query fix.

#17 Updated by Jean-Philippe Lang over 6 years ago

  • Subject changed from Problem with pagination to Pagination counts non visible issues
  • Status changed from New to Resolved
  • Target version changed from Candidate for next minor release to 1.2.2
  • Resolution set to Fixed

Patch applied in r6314, thanks.

#18 Updated by Rodrigo Guerrero over 6 years ago

thanks!!! my problem was resolved!

#19 Updated by claude g about 6 years ago

Can someone please create a link with #9411 (same bug but in roadmap with totals closed/open)? (Or cancel #9411 if it's corrected with this patch ?)

#20 Updated by Jean-Philippe Lang about 6 years ago

  • Status changed from Resolved to Closed

Merged in r7765.

Also available in: Atom PDF