select
p.id,
substr(p.created_by,0,2) user_avatar,
p.created event_date,
lower(p.created_by) user_name,
t.task_name event_title,
t.created created,
lower(t.created_by) owner,
null event_desc,
case status
when 'Open' then 'fa fa-clock-o'
when 'Closed' then 'fa fa-check-circle-o'
when 'On-Hold' then 'fa fa-exclamation-circle'
when 'Pending' then 'fa fa-exclamation-triangle'
end event_icon,
case status
when 'Open' then 'is-new'
when 'Closed' then 'is-removed'
when 'On-Hold' then 'is-updated'
when 'Pending' then 'is-updated'
end event_status,
status event_type,
'u-color-'||( ora_hash(p.created_by,44) + 1 ) user_color
from
eba_ut_chart_tasks t,
eba_ut_chart_projects p
where
t.project = p.id
order by p.created