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

Pager missing on Aggregate By Relationship civireport #25721

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

demeritcowboy
Copy link
Contributor

Overview

Pager is missing

Before

  1. Visit a site that has more than 50 distinct contacts that have at least one contribution each.
  2. Go to the Contribution Aggregate by Relationship civireport.
  3. Ignore the fact that the default column selections make you physically say out loud "what is this report showing?" and just look at the bottom. It will say 50 rows and there is no pager, but there should be a pager.

After

Pager works.

Technical Details

The way setPager() works is it looks at the last query that was run and asks mysql how many rows it was. But in this report the $this->_limit is needed in the query. So we need to have the query get the full number of rows before calling setPager.

Comments

FYI @yashodha you might have some interest.

@civibot
Copy link

civibot bot commented Mar 2, 2023

(Standard links)

@civibot civibot bot added the master label Mar 2, 2023
@eileenmcnaughton eileenmcnaughton merged commit 7118454 into civicrm:master Mar 3, 2023
@demeritcowboy
Copy link
Contributor Author

Thanks!

@demeritcowboy demeritcowboy deleted the history-report branch March 3, 2023 03:12
@yashodha
Copy link
Contributor

yashodha commented Mar 3, 2023

looks like @eileenmcnaughton beat me to this :)

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

Successfully merging this pull request may close these issues.

3 participants