select project_id from bt_bugs where bug_id = :bug_id select case_id from workflow_cases where object_id = :bug_id select notification_id from notifications where response_id = :bug_id update cr_items set live_revision = null, latest_revision = null where item_id = :bug_id select ba.action_id, ba.action as loop_action, ba.resolution, ba.actor as actor_user_id, actor.first_names as actor_first_names, actor.last_name as actor_last_name, actor.email as actor_email, ba.action_date, to_char(ba.action_date, 'YYYY-MM-DD HH24:MI:SS') as action_date_pretty, ba.comment_s, ba.comment_format from bt_bug_actions ba, cc_users actor where ba.bug_id = :bug_id and actor.user_id = ba.actor order by action_date select resolution from bt_bugs where bug_id = :object_id select c.maintainer from bt_components c, bt_bugs b where b.bug_id = :object_id and c.component_id = b.component_id select p.maintainer from bt_projects p, bt_bugs b where b.bug_id = :object_id and p.project_id = b.project_id select email_subject_name from bt_projects p, bt_bugs b where b.bug_id = :object_id and p.project_id = b.project_id exists (select 1 from workflow_case_assigned_actions aa, workflow_case_role_party_map wcrpm where aa.case_id = cas.case_id and aa.action_id = $action_id and wcrpm.case_id = aa.case_id and wcrpm.role_id = aa.role_id and wcrpm.party_id = :f_action_$action_id ) select k.heading, k.keyword_id, (select count(*) from bt_bugs b where b.component_id in (select cm.component_id from bt_keyword_component_map cm where cm.keyword_id in (select kk.keyword_id from cr_keywords kk where kk.parent_id = k.keyword_id))) as num_bugs from cr_keywords k where k.parent_id = :component_keyword_id