An common request by people that use Case Tracker is to generate a list of cases that were created by or assigned to the current user.
At this moment this is only possible using Views OR in views 2.x or the new Sql OR capabilities in views 3.
So, this patch provides a new filter to use in that cases.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | casetracker-737200-2.patch | 4.87 KB | dagmar |
| #6 | casetracker-737200-1.patch | 4.45 KB | dagmar |
| #4 | casetracker-737200.patch | 2.34 KB | dagmar |
| #2 | casetracker-737200.patch | 2.36 KB | dagmar |
| casetracker-assigned-created.patch | 2.32 KB | dagmar |
Comments
Comment #1
dawehnerI'm not sure whether this is the best way todo it :)
I would have used
One big advantage of this approach is, that the code is better readable, because you can know, where the join goes to, see views_handler_filter_history_user_timestamp as example
Comment #2
dagmarSo, here is a new patch including the suggestions by dereine and merlinofchaos
Comment #3
dawehnerMinor code style issue :)
The rest looks fine.
Comment #4
dagmarThanks dereine
Comment #5
dawehnerFrom my views perspective this looks rtbc. But i didn't have tested the functionality
Comment #6
dagmarThis new patch includes an argument to allow user to get the uid from the url. Very useful if a Case view is embed into a profile page of a user.
Dereine, probably there is a better way to avoid to include "assign_to" in the argument handler, do you remember how to do that in the casetracker.views.inc?
Comment #7
dawehnerSry i don't know a method todo it, perhaps earl knows. Btw. for me the argument handler looks fine.
Comment #8
dagmarWell I have added exposed filter support. Maybe there is a better way to explain how it works, but for now is working properly.
Comment #9
RikiB commentedWorked perfect thanks. Just to reiterate:
Applied the patch here: http://drupal.org/node/737200#comment-2813496
Added the new Filter "Case Tracker: Case assigned to or created by current user" in the "casetracker_project_cases" view.
Set the new filter to only show posts Assigned or Created by me.
Win