Closed (fixed)
Project:
Storm
Version:
6.x-1.x-dev
Component:
Storm Task
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
7 Jan 2011 at 12:37 UTC
Updated:
15 Jan 2013 at 11:26 UTC
Jump to comment: Most recent file
Hi all,
I'm trying to set up a My Projects view that displays only projects the logged in user is assigned to.
I've set up content profiles and linked my Storm Persons with Drupal Users, no problem there.
The issue comes when I try to add the relationship in Views. I select Storm Person: Drupal User and the output I get is this:
LEFT JOIN user user_stormperson ON stormperson.user_uid = user_stormperson.
LEFT JOIN stormproject stormproject ON node.vid = stormproject.vid
which is kind of way wrong.
Seems like this would work but I have no idea how to make that happen.
LEFT JOIN node node_stormperson ON stormperson.user_uid = node_stormperson.uid
LEFT JOIN stormperson stormperson ON node.vid = stormperson.vid
suggestions?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | storm--1018448-6.patch | 776 bytes | juliangb |
Comments
Comment #1
juliangb commentedWould you be able to post an export of your view for testing please?
Comment #2
hdennen commentedHere you go. Let me know if I can help in any way.
-H
Comment #3
pyrello commentedsubscribing
Comment #4
pyrello commentedI am having a similar issue: I want to make a set of views show tasks, tickets, projects, etc that are assigned to a user. I am trying to do it by having a path, like /user/{username}/storm/task. I found that there is a relationship to connect a storm user to a drupal user, but I can't figure out how to implement this. Any help would be appreciated.
Sean Adams-Hiett
Web Geeks For Hire
http://www.webgeeksforhire.com/
Comment #5
minoroffense commentedShould that be "users" and not "user" in the join statement? There's no 'user' table. Would that not then allow the statement to turn into
In which case, there's a bug in stormperson.views.inc on line 148
Should read
Comment #6
juliangb commentedThis is as per #5.
Comment #7
vojvotkinja commentedHi!
Can you please explain how to create a view to display tasks or project that are assigned for logged in users? I'm busting my head over that all morning.
Thanks! :)
Comment #8
minoroffense commentedI haven't been able to do it without involving some PHP code in a default argument value. Not really the greatest way to do it.
The tricky part in all this is that Projects, Tasks, Tickets, whatever are nodes related to Teams or Person nodes. A person node is related to a project as well as a team can be related to a project. And lets not forget that an Organization can be a member of a team, which has Persons which can be related to a user...
But the current user is only related to a person directly. But a user can be related to a person which is part of a team which is assigned a task, ticket, etc...
Making Views do the complete series of joins (using relationships) to get that data isn't easy to wrap your head around (my brain hurts just writing about it). Let alone getting the views api to do what I want it to do. But hopefully changing up the Views definitions a little can make it easier. And if not, then a custom views filter handler might be in order.
Of course as long as juliangb is ok with the changes. It's his module after all.
Comment #9
juliangb commentedI'd like to get Storm to the point where a user can download and use views without any custom php code - however, this should be tackled in separate issues.
Comment #10
juliangb commentedCommitted to 2.x, retest on 1.x.
Comment #11
juliangb commented#6: storm--1018448-6.patch queued for re-testing.
Comment #12
juliangb commentedCommitted to 1.x.
Comment #13
vantuykom commentedcan u tell me how you have been able to do this with custom code and default arguments? I'm running out of time and really need this to work...
thank you very much
Comment #14
minoroffense commentedThis is what we currently use. It's not perfect as it doesn't take into consideration the tasks assigned to a Team or Organizations you belong to. I'd be careful using this on a large set of users. There's no caching and we haven't had more than 4 or 5 people using our projects site at once.
Essentially, use at own risk ;-)
P.S. To avoid filling the issue queue up with comments not directly related to the issue at hand, if you need help with the view, feel free to contact me using my drupal user.
Comment #16
karthikmca1987 commentedComment #17
kfritscheWhy is this issue re-opened?
Comment #18
juliangb commented