creecros / Group_assign

Kanboard Plugin to Assign Tasks to Groups and multiple users
MIT License
62 stars 24 forks source link

Cannot use the filter allassignees:Username in PostgreSQL #82

Open PCunvik opened 1 year ago

PCunvik commented 1 year ago

Kanboard version: 1.2.30 PHP Version: 8.2.7 Group_assign version: 1.8.2 PostgreSQL version: 15.2

I added multiple people to a task and used the filter allassignees:Username as the database complains about the syntax: SQL: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "`"

It is this query that gives the error: (SELECT id FROM `groups` WHERE `groups`.name='petcun')

I saw that fix #70 fixed a bug in mysql where "groups" was a reserved word, I removed the fix and postgres didn't complain about the syntax anymore and it worked.

szjozsef commented 6 months ago

We have the exact same situation we had to remove the "`" characters form the query in order to make it compatible with PostgreSQL again