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

pasqualle’s picture

Title: Project Issue Generator doesn't work with PostgreSQL? ( Query failed: ERROR: syntax error at or near...) » Problem with Project Issue Generator

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?

stodge’s picture

Looks like adding the permission to authenticated user worked.

Thanks