Hi,
I've installed Project and Project Issue Tracking. The problem is that when I try to see issues for all projects (/project/issues) issues appear twice.
If the user has more roles, then the issues appear many more times each and I don't know what's happening. I will be grateful for any help.
Thank you.
Comments
Comment #1
mr.baileysComment #2
esiomarual commentedI've run the query and there are no duplicates in the database. In My issues (project/issues/user), issues appear only once.
The problem appear for all users, but not for the administrator.
I found the query that give the wrong result:
SELECT n.nid
FROM (SELECT DISTINCT ON (nid) * FROM node) n
INNER JOIN project_issues p ON p.nid = n.nid
INNER JOIN node_revisions r ON r.vid = n.vid
INNER JOIN users u ON p.assigned = u.uid
INNER JOIN node_access na ON na.nid = n.nid
WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all')
OR (na.gid = 3 AND na.realm = 'content_access_author')
OR (na.gid = 2 AND na.realm = 'content_access_rid')
OR (na.gid = 11 AND na.realm = 'content_access_rid')
OR (na.gid = 1 AND na.realm = 'job_view')
OR (na.gid = 1 AND na.realm = 'resume_view')
OR (na.gid = 3 AND na.realm = 'resume_owner')
OR (na.gid = 2 AND na.realm = 'workflow_access')
OR (na.gid = 11 AND na.realm = 'workflow_access')
OR (na.gid = 3 AND na.realm = 'workflow_access_owner')))
AND ( n.status = 1 AND ((p.sid = '1' OR p.sid = '2' OR p.sid = '4')))
ORDER BY n.changed DESC LIMIT 20 OFFSET 0
I think that the problem was because we have an workflow with the issues.
I've solve the problem modifying 2 queries in issues.inc (module/issues)
SELECT n.nid --> SELECT DISTINCT(n.nid), n.changed ....
SELECT count(n.nid) -->SELECT count(DISTINCT(n.nid)) ....
Comment #3
dww@esiomarual: Please don't edit your own comment to keep changing what you say. If you have something to add, do it in a new comment. Otherwise it's very difficult to follow what you're saying.
Comment #4
mr.baileys@esiomarual: It's almost never a good idea to edit the source files for a module directly. You will no longer be able to update your installation with newer versions of the module. If there is a bug in project_issue or another one of the modules you are using, it should be addressed via a patch.
Can you reproduce this problem on a clean installation? If so, please describe the steps you take to do so, including which modules (and versions) you install and what configuration changes you make.
Comment #5
drummClosing due to inactivity.