View HLPDTEST.STATEGPS.T_WEEKLY_OPEN_CLOSED_ISSUES_V | Generated by SchemaSpy |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Analyzed at Sun Jan 17 01:06 IST 2021 |
View Definition:
select a.application_id,a.application_name PROJECT, wt.WORKFLOW_TYPE_NAME,
next_day(trunc(i.creation_date)-7,'Monday') TICKET_DATE,
'OPEN' STATUS,
i.instance_id INSTANCE_ID
from t_instances i, t_gps_applications a, t_gps_instances gi, t_gps_workflow_types wt, t_project_task pt
where
a.application_id = i.application_id
and a.visible_flag = 'true'
and gi.WORKFLOW_TYPE_ID = wt.WORKFLOW_TYPE_ID
and i.instance_id = gi.instance_id
and gi.active = 1
and pt.instance_id = i.instance_id
and pt.state_id = gi.current_state_id
union
select a.application_id,a.application_name PROJECT, wt.workflow_type_name,
next_day(trunc(gi.created_date)-7,'Monday') TICKET_DATE,
'CLOSED' STATUS,
gi.instance_id INSTANCE_ID
from t_gps_instances gi, t_gps_workflow_states ws, t_gps_applications a, t_gps_workflow_types wt,
t_gps_workflow_states ws1
where
gi.current_state_id = ws.state_id
and gi.WORKFLOW_TYPE_ID = wt.WORKFLOW_TYPE_ID
and gi.application_id = a.application_id
and a.visible_flag = 'true'
and ws.state_descriptor = 'Workflow End'
and gi.active = 1
-- newly added conditions to resolve issue if parent and child workflows has adjacent ends
and gi.from_state_id = ws1.state_id
and ws1.state_descriptor != 'Workflow'
-- End of newly added conditions
Possibly Referenced Tables/Views:
![]() ![]() |