select 1 from bt_bugs b where b.bug_id = :one_bug_id and b.project_id = :package_id select role_id from workflow_roles where workflow_id = :workflow_id and short_name = 'resolver'