In D6, if tracker2 is enabled, it uses hook_views_data_alter() to swap out the handler for the 'uid_touch' filter and argument to use something based on the tracker2 tables instead of the default behavior from views.

It's a little more complicated now, since
- tracker2 is gone and the core tracker has the better performance qualities that tracker2 was written to solve
- we've now got a separate flag_tracker integration module

But, we need to do something here so that the "My issues" view honors the issues you're following (if you've got flag_tracker enabled and properly configured).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Assigned: Unassigned » dww

Since this is the last remaining hurdle for #1560010: [META] Port issue following functionality to D7 I'm assigning to myself.

First step is #1829734: Expose tracker data to views -- and the other views maintainers are already all over that. ;) They're not so psyched about *always* replacing the core uid_touch handler with the tracker-based one (for reasons I totally understand and support). So, we'll still have to do something about that. But, it shouldn't be too hard to get this working properly once that patch lands in views core. Worst case is we just have our default views conditionally check if tracker is enabled, and if so, reference the other handlers ourselves (we do that in D6, anyway, so that more of the fields are pulled from the tracker2 tables to optimize the queries). Or, maybe I'll publish a trivially tiny contrib for using the tracker-based uid_touch handler for all uid_touch handlers. Or something. Anyway, progress is definitely underway...

Meanwhile, I have a tentative date with nnewton to discuss D7 issue views on Saturday @ BADCamp. Of course, he's sad that we didn't port to Search API and do everything with a solr backend. I agree. That's really sad. Anyway, I'll report here (or perhaps at #949372: Port issue views to Search API so we can have a performant backend) based on the results of that conversation.

dww’s picture

Status: Active » Needs review
FileSize
863 bytes
5.76 KB

Assuming #1829734: Expose tracker data to views is going to land soon (which seems likely), here are two possible patches to fix our default 'My issues' view to make it tracker-aware.

Option A explicitly swaps out the argument handler for the default view. Bigger and uglier patch. Re-introduces the weirdness from D6 where our default views have conditional code and can't be directly just re-exported. Otherwise, probably a safer change.

Option B does what tracker2 does in D6 contrib: uses hook_views_data_alter() to swap out the handler for the existing 'uid_touch' argument and filter. Trivial patch. Doesn't touch default views. Works fine.

I'm leaning towards B. Any objections?

Thanks,
-Derek

redhatmatt’s picture

estimating 5 hours, confirming, testing, additional discussions. Very wide guess but need to give one nor take any time away from dww.

dww’s picture

Yay: #1829734: Expose tracker data to views is now in Views 7.x-3.x.

Any objections to B?

dww’s picture

Status: Needs review » Postponed
Issue tags: +16hr

Although we can fix this temporarily, we'll have to postpone this on #949372: Port issue views to Search API so we can have a performant backend and make sure it's still working after that. We'll need a whole different solution once that happens, and it might be more involved (e.g. making sure flag data can be included in the search api index of issues), especially since people aren't going to like lots of latency with this. Therefore, I just pushed the easiest version of this fix for now (B) but I'm upping the estimate on getting this working once #949372 is done to 2 days.

Note: For now, we'll have to push views 7.x-3.x-dev into bzr until 7.x-3.6 is out. However, Jenkins UI seems dead, so I can't do much of anything about that right now.

drumm’s picture

Assigned: dww » drumm
Status: Postponed » Active

Now we need to show Search API how to index who has flagged what. I believe this would be mostly "free" with Flag 3.x's entity integration, but we are on 7.x-2.1. I don't really want to do a potentially-major version upgrade on flag.

A SearchAPI integration like http://drupalcode.org/project/project_issue.git/blob/refs/heads/7.x-2.x:... should handle this.

drumm’s picture

Project: Project issue tracking » Drupal.org customizations
Version: 7.x-2.x-dev » 7.x-3.x-dev
Component: Views integration » Drupal 7 upgrade

The project_issue part of this is http://drupalcode.org/project/project_issue.git/commit/fd18432. Moving to drupalorg for indexing and using that in the view.

drumm’s picture

Status: Active » Fixed

http://drupalcode.org/project/drupalorg.git/commit/00008a6fab8979d4c7976... swaps out the views contextual filter to issue following.

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

  • Commit 00008a6 on 7.x-3.x, 7.x-3.x-dev by drumm:
    [#1828756] D7 views don't honor tracker and issue following