if a user in the system is not the owner or the assigned or the creator then they can't see any issues! so here is the current sql code: CREATE PROCEDURE IssueTracker_Issue_GetIssuesByRelevancy @ProjectId Int, @Username NVarChar(255) AS DECLARE @UserId Int
SELECT @UserId = UserId FROM IssueTracker_Users WHERE Username = @Username SELECT * FROM IssueTracker_IssuesView WHERE ProjectId = @ProjectId AND Disabled = 0 AND (IssueCreatorId = @UserId OR IssueAssignedId = @UserId OR IssueOwnerId = @UserId) ORDER BY IssueID
Desc GO ------------------------- My version -------------------------- CREATE PROCEDURE IssueTracker_Issue_GetIssuesByRelevancy @ProjectId Int, @Username NVarChar(255) AS DECLARE @UserId Int SELECT @UserId = UserId FROM IssueTracker_Users WHERE Username =
@Username IF (select count(*) FROM IssueTracker_ProjectMembers where ProjectID=@ProjectID AND UserID=@UserID ) > 0 begin SELECT * FROM IssueTracker_IssuesView WHERE ProjectId = @ProjectId AND Disabled = 0 ORDER BY IssueID Desc end else begin SELECT * FROM
IssueTracker_IssuesView WHERE ProjectId = @ProjectId AND Disabled = 0 AND (IssueCreatorId = @UserId OR IssueAssignedId = @UserId OR IssueOwnerId = @UserId) ORDER BY IssueID Desc end GO my version will let any member of the project be "relevant" and see the
items. still missing: if the project admin is not a member he can't see any items? add amin to project or add a test for Is user the admin.
Member
1 Points
78 Posts
List issues for members of a project
Aug 02, 2004 01:08 PM|figuerres|LINK
None
0 Points
1418 Posts
Re: List issues for members of a project
Sep 15, 2004 02:53 PM|Sedgewick|LINK