Derek,

project/issues/statistics shows EVERY single project! on Drupal.org, it creates hundreds of lines! use pager.
i use this page oftem on d.o to compare the evolution of ecommerce module and its always a pain.

regards,

massa

Comments

hunmonk’s picture

hunmonk’s picture

Title: General Statistics » add pager to project/issues/statistics
Category: bug » feature
brmassa’s picture

thanks for answering the issue. Finally someone spent some time on updating this modules issues.

i know about "project/issues/statistics/ecommerce". what i meant is compared the evolution of eCommerce AMONG other modules. By march, we used to be the second module with most issues, with more than 340 active modules and 450 open issues (including patches, postponed...). Now we are only the sixth. Its important for a project like eC, since we have more than 3 times the size of the CCK or Views modules.

regards,

massa

PS: and yes, your new issue title is far more precise.

brmassa’s picture

Guys,

i must say that: besides the pager, a Rank field (showing the order) is also a very good call.

regards,

massa

hunmonk’s picture

Title: add pager to project/issues/statistics » add pager/tablesorting to project/issues/statistics
Status: Active » Needs review
StatusFileSize
new7.54 KB

this patch handles the issues described at http://drupal.org/node/71175 -- was easier to handle them all in one place.

attached fixes some of the table funkiness at project/issues/statistics, and throws in a pager _and_ tablesorting to boot! this is what happens when you have extra time on the airplane ;)

note that the use of the tablesorting code is pretty funky, but it actually works like a charm for this rather unusual table.

aclight’s picture

Status: Needs review » Needs work
StatusFileSize
new8.55 KB

In testing I still see a few problems here:

A.) In the issue activity table, the alignment of the headings vs. the data themselves do not match in all cases. I'd recommend that all but the right most column be set as center alignment, and the left most column remains as left aligned. I think the same should be true for the project overview table--it's really hard to figure out which numbers line up with which column unless the screen is quite wide.

B.) The width of the statistics table for all issues is still too wide for the available space. I have to expand my browser window to about 1200 px wide before I can get the entire table in it. I know this is a problem in other places on d.o, but we might consider putting the table in a div and giving it horizontal scroll bars.

C.) The table sorting doesn't quite work right. If I click on a header for which zero projects have issues of that status, the table returned in the page load is empty. Also, if I click on a column header for which 1 or more project has 0 issues with that status, those projects are not returned in the table, even if there are fewer total projects than the number of projects necessary to cause the pager to create additional pages.

D.) I don't see that the pager works at all. I don't have 50 projects on my test site, but I changed line 413 to:

    if ($pager = theme('pager', 5, 0)) {

and I still am not getting the pager to show up.

The attached patch fixed A and B. I haven't done much with table sorting and paging yet, so I'll let you see if you can tackle C and D.

hunmonk’s picture

Status: Needs work » Needs review
StatusFileSize
new8.46 KB

C: this isn't easily fixable, because of the way we're bastardizing the tablesorting code to even get tablesorting in the first place (the first query is restricted on issue status, so we don't get any projects in that query that don't have at least one issue at that state). i'm willing to live with this slight idiosyncracy.

D: we needed a custom count query to fix this. attached patch seems to do the trick

aclight’s picture

Status: Needs review » Reviewed & tested by the community

Ok, the patch in #7 fixes the problems with D on my test site.

I did notice that my fix to B above causes a vertical scroll bar to sometimes appear in the div, even though a vertical scroll bar is never necessary. I don't have the css mojo to figure out how to fix this. I think an unwanted vertical scroll bar and a horizontal scroll bar when necessary is better than no scroll bars and an extremely wide table that overflows the available space, however. This behavior is in FF, btw. I haven't tested in other browsers.

So, if we're OK with the behavior I described above, then I'd call this RTBC. If we don't like the behavior and want to change it, then CNW.

For me, this is RTBC.

hunmonk’s picture

Status: Reviewed & tested by the community » Fixed

fixed in HEAD. i have no interest in backporting this. if somebody wants to, feel free to roll a patch and post it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.