Bug #31773
closedTasks view fails for non-admin with PG::SyntaxError: ERROR: syntax error at or near "\'1,6,4,3,5\'"
Description
b'Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1921150 \n\n*Description of problem:*\nViewing the tasks page as non admin user with cloned manager role that has organizations assigned fails in ui with:\n\nCould not receive data: Request failed with status code 500\n\nprodlog (attached) shows:\n\n[I|app|f5671e24] Backtrace for \'Action failed\' error (ActionView::Template:: Error): PG::SyntaxError: ERROR: syntax error at or near "\'1,6,4,3,5\'"\n f5671e24 | LINE 9: ...foreman_tasks_locks_taxonomy5f5e24.resource_id IN \'1,6,4,3,5...\n f5671e24 | ^\n\n*Version-Release number of selected component (if applicable):*\n\nSatellite 6.8 snap 10\n\n*How reproducible:*\nalways\n\n*Steps to Reproduce:*\n1. Have a satellite with mutliple orgs\n2. Clone a manager role, assign it to all or some orgs\n3. Create a user, assign the role to it, assign it to one or more of the role\'s orgs\n4. Log in as the user or impersonate, navigate to Monitor > Tasks\n\n*Actual results:*\nNo tasks listed, above errors shown\n\n*Expected results:*\nTasks viewed as exoected\n\n*Additional info:*\nSeems to be related to org assignment in cloned role, using the default manager role or using a cloned role with no org assigned doesn\'t produce this issue'
Updated by Adam Ruzicka almost 4 years ago
- Subject changed from b'Tasks view fails for non-admin with PG::SyntaxError: ERROR: syntax error at or near "\'1,6,4,3,5\'"' to Tasks view fails for non-admin with PG::SyntaxError: ERROR: syntax error at or near "\'1,6,4,3,5\'"
Alternative steps to reproduce:
1) run foreman-rake console
2) Enter ForemanTasks::Task.search_for("organization_id ^ (1)").first
Note:
Searching by taxonomies on tasks still uses a custom external method, which doesn't handle queries with IN well.
Updated by The Foreman Bot almost 4 years ago
- Status changed from New to Ready For Testing
- Assignee set to Adam Ruzicka
- Pull request https://github.com/theforeman/foreman-tasks/pull/606 added
Updated by The Foreman Bot almost 4 years ago
- Fixed in Releases foreman-tasks-3.1.0 added
Updated by Adam Ruzicka almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 6cc246f1b44f62bf1010df807dd0d35872c8aad7.
Updated by Adam Ruzicka almost 4 years ago
- Target version set to foreman-tasks-3.1.0
Updated by Adam Ruzicka almost 4 years ago
- Target version changed from foreman-tasks-3.1.0 to foreman-tasks-3.0.4
- Fixed in Releases foreman-tasks-3.0.4 added
- Fixed in Releases deleted (
foreman-tasks-3.1.0)
Updated by The Foreman Bot almost 4 years ago
- Pull request https://github.com/theforeman/foreman-tasks/pull/612 added
Updated by Adam Ruzicka almost 4 years ago
- Status changed from Closed to Ready For Testing
- Target version changed from foreman-tasks-3.0.4 to foreman-tasks-4.0.0
- Fixed in Releases deleted (
foreman-tasks-3.0.4)
Updated by Adam Ruzicka almost 4 years ago
- Fixed in Releases foreman-tasks-4.0.0 added
Updated by Adam Ruzicka almost 4 years ago
- Status changed from Ready For Testing to Closed
- Fixed in Releases foreman-tasks-3.0.5 added
Updated by Adam Ruzicka almost 4 years ago
- Has duplicate Bug #29446: Allow searching for tasks by taxonomies using IN added