Instead of having separate views, which aren't as feature-rich (e.g. #376658: Project search box not auto-complete when browsing by tag, etc), why not just add an "Issue tags" filter to the regular advanced search views:
http://d6.drupal.org/project/issues/search
http://d6.drupal.org/project/issues/search/drupal
E.g.
http://d6.drupal.org/project/issues-term/346
becomes:
http://d6.drupal.org/project/issues/search?tag=drupal.org+upgrade
As with the "Search for" filter, we could do this conditionally if comment_alter_taxonomy is enabled (although I don't know how to programatically set the vid correctly in the default view -- might be easy, just haven't thought about that).
Thoughts?
(Marking this as a d.o upgrade issue since it's something we can now easily fix on d.o after the D6 ugprade since it's all views).
Comment | File | Size | Author |
---|---|---|---|
#5 | 389096-5.comment_alter_taxonomy.patch | 33.76 KB | dww |
#5 | 389096-5.project_issue_default_views.patch | 2.87 KB | dww |
#2 | 389096-2.comment_alter_taxonomy.patch | 29.58 KB | dww |
#2 | 389096-2.project_issue_default_views.patch | 2.23 KB | dww |
Comments
Comment #1
aclight CreditAttribution: aclight commentedI think that's a great idea. Unfortunately I won't have time to review or commit but feel free to do so yourself.
One potential problem: what if there were multiple vocabularies that were alterable on issues via CAT. How would the default view that comes with PI handle this? I guess it would just add them all to the view, right (though the issue of figuring out which vid to use could be problematic, as you point out).
Comment #2
dwwYes, we just add them all as separate filters. And it's easy to do so -- we just add a filter for every vocabulary that's applied to issue nodes. I think that's a sane default. Any site that's defining additional vocabs on issue nodes and they don't want exposed filters for them can remove the filters from their views.
Two patches:
- Add a private helper function to project_issue.views_default.inc to programatically add these exposed filters to the two advanced search views.
- Change comment_alter_taxonomy to fix the links when you click on one of those term links, it constructs the appropriate per-project advanced search URL to filter by the term, and remove *all* of the views integration. ;)
Any objections?
Comment #3
dwwAt dinner (with webchick and others), there was wide-spread desire for a linkrot-preventing menu item that redirects you to the right place. Guess I'll have to work on that...
Comment #4
starbow CreditAttribution: starbow commentedThis sounds like a great addition.
Comment #5
dwwThis adds the legacy redirect code to comment_alter_taxonomy. Tested pretty heavily locally. Deployed on d6.d.o for more testing. Behold:
Valid options:
http://d6.drupal.org/project/issues-term/346
http://d6.drupal.org/project/issues-term/drupal.org+upgrade
http://d6.drupal.org/project/issues-term/488
http://d6.drupal.org/project/issues/3060/term/346
http://d6.drupal.org/project/issues/drupal/term/346
http://d6.drupal.org/project/issues/drupal/term/drupal.org+upgrade
http://d6.drupal.org/project/issues/drupal/term/488
http://d6.drupal.org/project/issues/drupal/term/needs+documentation
http://d6.drupal.org/project/issues/drupal/term/needs%20documentation
...
Invalid terms:
http://d6.drupal.org/project/issues-term/100
http://d6.drupal.org/project/issues-term/zzz
http://d6.drupal.org/project/issues/3060/term/zzz
http://d6.drupal.org/project/issues/drupal/term/100
http://d6.drupal.org/project/issues/drupal/term/zzz
Invalid projects:
http://d6.drupal.org/project/issues/11/term/346
http://d6.drupal.org/project/issues/11/term/zzzz
http://d6.drupal.org/project/issues/droopal/term/zzzz
...
(Note, the last few of these display an unrelated bug: #396114: accessing /project/user gives page not found but shows project table (just no issues) which is really #406578: Replace hook_help() hacks with a cleaner solution for the dynamic headers on issue views)
Any complaints?
Comment #6
dwwComment #7
hunmonk CreditAttribution: hunmonk commentedfound a few very minor code clarity issues which have been corrected. tested at d6.d.o, and all seems to work perfectly.
Comment #8
aclight CreditAttribution: aclight commentedI'm still out of commission for the next few months. I just gave hunmonk and dww commit access. Unless Damien wants to review feel free to commit what you need to this module. I don't want to hold you up.
Comment #9
dwwCool, thanks aclight. Just committed to HEAD in both modules. I'll mark this fixed once it's deployed for real.
Comment #10
dwwhttp://drupal.org/project/issues-term/346 ;)