Page MenuHomePhabricator

Pagination is not working on Aggregated reports page
Open, NormalPublic

Description

Pagination buttons don't appear.

Note: Not a problem for IEG Round 2 because it shows all of the 29 proposals in the list.

Details

Event Timeline

Niharika created this task.Oct 22 2015, 5:16 AM
Niharika raised the priority of this task from to Normal.
Niharika updated the task description. (Show Details)
Niharika moved this task to Backlog on the Wikimedia-IEG-grant-review board.
Niharika added a subscriber: Niharika.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 22 2015, 5:16 AM

The pagination buttons will actually be displayed if you add ?items=5 (or some other number less then the total number of proposals in the campaign), but it does not seem to work properly. The default limit is 50, so any campaign with more than 50 proposals will be broken for the purposes of reporting.

To recreate for local testing and fixing:

  • Create a campaign
  • Add a few proposals
  • Review those proposals
  • Run the Aggregated scores report
  • Change the URL to add ?items=1 to limit the report to 1 proposal per page

The likely cause is that there is no SQL_CALC_FOUND_ROWS statement in Wikimedia\IEGReview\Dao\Reports::aggregatedScores().

I am working on this task. For updates, I added the ?items=5 and various other numbers but the pagination button did not appear. So, I added the statement SQL_CALC_FOUND_ROWS in aggregatedScores(). The pagination button appeared but only in URLs containing ?items=2. The main report page still does not have pagination button.

I am working on this task. For updates, I added the ?items=5 and various other numbers but the pagination button did not appear. So, I added the statement SQL_CALC_FOUND_ROWS in aggregatedScores(). The pagination button appeared but only in URLs containing ?items=2. The main report page still does not have pagination button.

Then you need to poke around some more to find out where the problem is. Bryan was merely suggesting what could be the issue, it's up to you to actually fix it. :)

Nehajha claimed this task.Sep 20 2017, 3:19 PM

Hiii, I'm Dhara from India. I want to participate in outreachy round 15 for Wikimedia. So, can I take this issue and work on it as this is the microtask for the project on which I want to work.

Hi @Dharavihol, this task is assigned to @Nehajha (see comments and "Assigned to" above) and a patch is already linked.
I hope the maintainers can come up with more potential microtasks. :)

I added two more microtasks. Feel free to claim one, @Dharavihol.

@bd808 Can we close this task now? or is there anything else that needs to be added?

@bd808 Can we close this task now? or is there anything else that needs to be added?

It should get deployed to the testing server in Cloud VPS, verified as fixed there, and then deployed to prod. We usually wait for all those things before closing unless there is a parent tracking task for a deployment of multiple features/bug fixes.

I was gonna pull this on the VPS but I noticed it's not working - http://grantreview-dev.wmflabs.org I reset the proxy to the newer instance (grantreview-02) which was set up recently, according to logs. The older one wouldn't let me ssh in to vagrant, like what happened with the scholarships instance. The newer instance lets me ssh in although it doesn't let me restart apache. The apache logs don't have anything suspicious. @bd808 Any ideas off the top of your head on what could be wrong?
I can spin up another instance tomorrow if this one doesn't behave.