Posted by stodge on May 23, 2009 at 5:32pm
Jump to:
| Project: | Project issue tracking |
| Version: | 6.x-1.x-dev |
| Component: | Issues |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I tried to generate a number of issues using the project issue generator but I got the following:
warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near ")" LINE 1: ...users_roles ur ON u.uid = ur.uid WHERE ur.rid IN () ORDER BY... ^ in /var/www/includes/database.pgsql.inc on line 139.
user warning: query: SELECT u.uid FROM users u INNER JOIN users_roles ur ON u.uid = ur.uid WHERE ur.rid IN () ORDER BY RAND() LIMIT 100 in /var/www/sites/all/modules/project_issue/generate/project_issue_generate.inc on line 223.
No values for users could be found to use with automatically generated issues, so no issues were created.
warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near ")" LINE 1: ...users_roles ur ON u.uid = ur.uid WHERE ur.rid IN () ORDER BY... ^ in /var/www/includes/database.pgsql.inc on line 139.
user warning: query: SELECT u.uid FROM users u INNER JOIN users_roles ur ON u.uid = ur.uid WHERE ur.rid IN () ORDER BY RAND() LIMIT 100 in /var/www/sites/all/modules/project_issue/generate/project_issue_generate.inc on line 223.
No values for users could be found to use with automatically generated comments, so no issue comments were created.Is it compatible with postgres?
Comments
#1
bug:
.. WHERE ur.rid IN () ..corresponding code:
$allowed_roles = user_roles(FALSE, 'create project issues');..
$where = "WHERE ur.rid IN (". implode(', ', array_keys($allowed_roles)) .")";
there should be a check if any user role exists which have the 'create project issues' permission (so that array is not empty)
@stodge: can you try adding the 'create project issues' permission to "authenticated user" or any other user role?
#2
Looks like adding the permission to authenticated user worked.
Thanks