http://drupal.org/sandbox/rocketeerbkw/1074022

I have created 2 issues in my sandbox, but the project page (linked above) still shows 0. I wasn't sure what kind of caching was used so I waited 2 days after creating the issues before reporting.

CommentFileSizeAuthor
#7 project_issue-1077880.patch1.72 KBblackdog
#3 issues.png4.34 KBchi

Comments

chi’s picture

Priority: Normal » Major

Subscribe

dww’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Closed (works as designed)

It's showing 2 issues now. There's pretty extensive block caching on d.o in general, and for this block in particular (since it's displayed a lot and has a lot of somewhat unfortunate queries in it). It's not meant to be a real-time monitoring system, but a general summary for people evaluating if they want to use your project or not. If you want to see exactly what's happening in your queue at all times, see http://drupal.org/project/issues/1074022 ... ;)

Cheers,
-Derek

chi’s picture

StatusFileSize
new4.34 KB

Thanks. But it confuses.
Peaple will not click the project issues link if they see that issues are empty.

dww’s picture

Title: Sandbox project page does not show correct number of issues » Issue count on project pages is cached for too long
Category: support » bug
Status: Closed (works as designed) » Active

Upon further inspection, it appears this is being cached for a full week. I agree that's a bug. Basically, the cache ID for this block was changed at #988188: Restrict access to the (expensive) issue statistics pages but the places that are supposed to invalidate the cache weren't updated to account for the change in cache ID. :(

So, if you grep for 'project_issue_cockpit_block:' in project_issue/includes, you'll find two places that are trying to invalidate the cache, and those need to be fixed to try both project_issue_cockpit_block:[01]:$project_nid (the 0 vs 1 in the middle is the new thing added at #988188.

dww’s picture

Title: Issue count on project pages is cached for too long » Block of issue counts on project pages is not invalidated when it should be

More accurate title about the actual bug...

Josh The Geek’s picture

blackdog’s picture

Status: Active » Needs review
StatusFileSize
new1.72 KB

How about this?

gerhard killesreiter’s picture

Status: Needs review » Reviewed & tested by the community

josh_k and I looked at this and think it is good to go.

sreynen’s picture

Title: Block of issue counts on project pages is not invalidated when it should be » Block cache of issue counts on project pages is not invalidated when it should be

Changing title to make this a little easier to find.

jthorson’s picture

Do we have an ETA for implementation on d.o?

Also, duplicate of #1075098: "Issue count" not updating on projects, so be sure to close both issues off once it's been activated.

kylebrowning’s picture

Services project claims it has 24 Issues open when in fact theres about 14. The count has not gone up or down for about 2 weeks now and I have definitely been closing tickets.

dww’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +needs drupal.org deployment

Wow, neither killes nor josh_k noticed that the cache IDs in the patch still don't match what's being set. ;)

$cid = 'project_issue_cockpit_block:' . (user_access('access issue statistics') ? '1' : '0') . ':' . $node->nid;

vs. the code in the patch, e.g.:

+      cache_clear_all('project_issue_cockpit_block:0'. $pid, 'cache');

Fixed it, committed to master, and pushed upstream:

http://drupal.org/commitlog/commit/1894/2efe0ee708c46de71dcaef8a5609ef55...

Now we just need to deploy this...

dww’s picture

Issue tags: -needs drupal.org deployment

Deployed.

Status: Fixed » Closed (fixed)

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