Project

General

Profile

Actions

Bug #31773

closed

Tasks view fails for non-admin with PG::SyntaxError: ERROR: syntax error at or near "\'1,6,4,3,5\'"

Added by Adam Ruzicka about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Found in Releases:

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'


Related issues 1 (0 open1 closed)

Has duplicate foreman-tasks - Bug #29446: Allow searching for tasks by taxonomies using INDuplicateMaria AgaphontzevActions
Actions #1

Updated by Adam Ruzicka about 3 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.

Actions #2

Updated by The Foreman Bot about 3 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
Actions #3

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases foreman-tasks-3.1.0 added
Actions #4

Updated by Adam Ruzicka about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Adam Ruzicka about 3 years ago

  • Target version set to foreman-tasks-3.1.0
Actions #6

Updated by Adam Ruzicka about 3 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)
Actions #7

Updated by The Foreman Bot about 3 years ago

  • Pull request https://github.com/theforeman/foreman-tasks/pull/612 added
Actions #8

Updated by Adam Ruzicka about 3 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)
Actions #9

Updated by Adam Ruzicka about 3 years ago

  • Fixed in Releases foreman-tasks-4.0.0 added
Actions #10

Updated by Adam Ruzicka about 3 years ago

  • Status changed from Ready For Testing to Closed
  • Fixed in Releases foreman-tasks-3.0.5 added
Actions #11

Updated by Adam Ruzicka about 3 years ago

  • Has duplicate Bug #29446: Allow searching for tasks by taxonomies using IN added
Actions

Also available in: Atom PDF