Error 1052 (23000): Column 'title' in WHERE is ambiguous #525

Closed
opened 2025-11-01 20:58:08 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @sentry[bot] on GitHub (Jun 24, 2025).

Originally assigned to: @kolaente on GitHub.

Sentry Issue: API-OSS-1R

*mysql.MySQLError: Error 1052 (23000): Column 'title' in WHERE is ambiguous
*fmt.wrapError: could not fetch tasks, error was 'Error 1052 (23000): Column 'title' in WHERE is ambiguous', sql: 'SELECT DISTINCT `tasks`.*, `task_positions`.`position` FROM `tasks` LEFT JOIN `task_positions` ON task_positions.task_id = tasks.id AND task_positions.project_view_id = ? LEFT JOIN `task_relations` ON tasks.id = task_relations.task_id and task_relations.relation_kind = 'parenttask' LEFT JOIN `tasks` `parent_tasks` ON task_relations.other_task_id = parent_tasks.id WHERE (tasks.project_id IN (?)) AND (title LIKE ? OR description LIKE ?) AND (task_relations.id IS NULL OR (parent_tasks.project_id != tasks.project_id)) ORDER BY tasks.`index` IS NULL, tasks.`index` desc, tasks.`index` IS NULL, tasks.`index` desc, task_positions.`position` IS NULL, task_positions.`position` asc, tasks.`id` IS NULL, tasks.`id` asc LIMIT 50', values: [599 89 %labels health% %labels health%]
*echo.HTTPError: code=500, message=Internal Server Error, internal=could not fetch tasks, error was 'Error 1052 (23000): Column 'title' in WHERE is ambiguous', sql: 'SELECT DISTINCT `tasks`.*, `task_positions`.`position` FROM `tasks` LEFT JOIN `task_positions` ON task_positions.task_id = tasks.id AND task_positions.project_view_id = ? LEFT JOIN `task_relations` ON tasks.id = task_relations.task_id and task_relations.relation_kind = 'parenttask' LEFT JOIN `tasks` `parent_tasks` ON task_relations.other_task_id = parent_tasks.id WHERE (tasks.project_id IN (?)) AND (title LIKE ? OR description LIKE ?) AND (task_relations.id IS NULL OR (parent_tasks.project_id != tasks.project_id)) ORDER BY tasks.`index` IS NULL, tasks.`index` desc, tasks.`index` IS NULL, tasks.`index` desc, task_positions.`position` IS NULL, task_positions.`position` asc, tasks.`id` IS NULL, tasks.`id` asc LIMIT 50', values: [599 89 %labels health% %labels health%]
  File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 153, in 1
  File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 151, in setupSentry.func1
...
(2 additional frame(s) were not displayed)
Originally created by @sentry[bot] on GitHub (Jun 24, 2025). Originally assigned to: @kolaente on GitHub. Sentry Issue: [API-OSS-1R](https://vikunja.sentry.io/issues/6706101374/?referrer=github_integration) ``` *mysql.MySQLError: Error 1052 (23000): Column 'title' in WHERE is ambiguous *fmt.wrapError: could not fetch tasks, error was 'Error 1052 (23000): Column 'title' in WHERE is ambiguous', sql: 'SELECT DISTINCT `tasks`.*, `task_positions`.`position` FROM `tasks` LEFT JOIN `task_positions` ON task_positions.task_id = tasks.id AND task_positions.project_view_id = ? LEFT JOIN `task_relations` ON tasks.id = task_relations.task_id and task_relations.relation_kind = 'parenttask' LEFT JOIN `tasks` `parent_tasks` ON task_relations.other_task_id = parent_tasks.id WHERE (tasks.project_id IN (?)) AND (title LIKE ? OR description LIKE ?) AND (task_relations.id IS NULL OR (parent_tasks.project_id != tasks.project_id)) ORDER BY tasks.`index` IS NULL, tasks.`index` desc, tasks.`index` IS NULL, tasks.`index` desc, task_positions.`position` IS NULL, task_positions.`position` asc, tasks.`id` IS NULL, tasks.`id` asc LIMIT 50', values: [599 89 %labels health% %labels health%] *echo.HTTPError: code=500, message=Internal Server Error, internal=could not fetch tasks, error was 'Error 1052 (23000): Column 'title' in WHERE is ambiguous', sql: 'SELECT DISTINCT `tasks`.*, `task_positions`.`position` FROM `tasks` LEFT JOIN `task_positions` ON task_positions.task_id = tasks.id AND task_positions.project_view_id = ? LEFT JOIN `task_relations` ON tasks.id = task_relations.task_id and task_relations.relation_kind = 'parenttask' LEFT JOIN `tasks` `parent_tasks` ON task_relations.other_task_id = parent_tasks.id WHERE (tasks.project_id IN (?)) AND (title LIKE ? OR description LIKE ?) AND (task_relations.id IS NULL OR (parent_tasks.project_id != tasks.project_id)) ORDER BY tasks.`index` IS NULL, tasks.`index` desc, tasks.`index` IS NULL, tasks.`index` desc, task_positions.`position` IS NULL, task_positions.`position` asc, tasks.`id` IS NULL, tasks.`id` asc LIMIT 50', values: [599 89 %labels health% %labels health%] File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 153, in 1 File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 151, in setupSentry.func1 ... (2 additional frame(s) were not displayed) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#525