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).
Comment | File | Size | Author |
---|---|---|---|
#2 | 1828756-2a.pi-tracker-views.patch | 5.76 KB | dww |
#2 | 1828756-2b.pi-tracker-views.patch | 863 bytes | dww |
Comments
Comment #1
dwwSince 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.
Comment #2
dwwAssuming #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
Comment #3
redhatmatt CreditAttribution: redhatmatt commentedestimating 5 hours, confirming, testing, additional discussions. Very wide guess but need to give one nor take any time away from dww.
Comment #4
dwwYay: #1829734: Expose tracker data to views is now in Views 7.x-3.x.
Any objections to B?
Comment #5
dwwAlthough 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.
Comment #6
drummNow 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.
Comment #7
drummThe 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.
Comment #8
drummhttp://drupalcode.org/project/drupalorg.git/commit/00008a6fab8979d4c7976... swaps out the views contextual filter to issue following.