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, 'fmMM/DDfm/YYYY') 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
insert into workflow_case_log_data
(entry_id, key, value)
select :entry_id, 'resolution', resolution
from bt_bugs
where bug_id = :object_id
select value
from workflow_case_log_data
where entry_id = :entry_id
and key = 'resolution'
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