53: l_not_valid_flag := 'N';
54:
55: -- l_workitem_comment_code1 := 'GO_IA';
56: /***** Bookings End Date will be used as Due Date. This is available in Assignee hooks ***************
57: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
58: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
59: l_workitem_comment_code2 := 'PLAN_DUE_DT';
60: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
61: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
54:
55: -- l_workitem_comment_code1 := 'GO_IA';
56: /***** Bookings End Date will be used as Due Date. This is available in Assignee hooks ***************
57: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
58: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
59: l_workitem_comment_code2 := 'PLAN_DUE_DT';
60: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
61: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
62: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
56: /***** Bookings End Date will be used as Due Date. This is available in Assignee hooks ***************
57: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
58: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
59: l_workitem_comment_code2 := 'PLAN_DUE_DT';
60: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
61: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
62: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
63: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
64: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
57: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
58: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
59: l_workitem_comment_code2 := 'PLAN_DUE_DT';
60: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
61: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
62: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
63: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
64: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
65: l_workitem_comment_code2 := 'SCHD_DUE_DT';
59: l_workitem_comment_code2 := 'PLAN_DUE_DT';
60: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
61: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
62: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
63: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
64: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
65: l_workitem_comment_code2 := 'SCHD_DUE_DT';
66: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
67: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
60: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
61: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
62: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
63: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
64: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
65: l_workitem_comment_code2 := 'SCHD_DUE_DT';
66: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
67: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
68: -- l_due_date := null;
62: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
63: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
64: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
65: l_workitem_comment_code2 := 'SCHD_DUE_DT';
66: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
67: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
68: -- l_due_date := null;
69: -- l_workitem_comment_code2 := 'NULL_DUE_DT';
70: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
66: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
67: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
68: -- l_due_date := null;
69: -- l_workitem_comment_code2 := 'NULL_DUE_DT';
70: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
71: l_workitem_comment_code2 := 'SCHD_DUE_DT';
72: end if;
73: *****************************************************************************/
74: begin
74: begin
75: select importance_level
76: into l_importance_level
77: from jtf_task_priorities_vl
78: where task_priority_id = jtf_tasks_pub.p_task_user_hooks.task_priority_id;
79: exception when others then null;
80: end;
81:
82: if l_importance_level = 1 then
119: where (nvl(closed_flag, 'N') = 'Y'
120: or nvl(completed_flag, 'N') = 'Y'
121: or nvl(cancelled_flag, 'N') = 'Y'
122: or nvl(rejected_flag, 'N') = 'Y')
123: and task_status_id = jtf_tasks_pub.p_task_user_hooks.task_status_id;
124: EXCEPTION WHEN others THEN
125: begin
126: select 'SLEEP' into l_task_status
127: from jtf_task_statuses_vl
125: begin
126: select 'SLEEP' into l_task_status
127: from jtf_task_statuses_vl
128: where nvl(on_hold_flag, 'N') = 'Y'
129: and task_status_id = jtf_tasks_pub.p_task_user_hooks.task_status_id;
130: EXCEPTION WHEN others THEN
131: l_task_status := 'OPEN';
132: end;
133: end;
131: l_task_status := 'OPEN';
132: end;
133: end;
134:
135: if (jtf_tasks_pub.p_task_user_hooks.source_object_type_code is not null)
136: then
137:
138: BEGIN
139:
152:
153: Select ws_id
154: into l_ws_id2
155: from ieu_uwqm_work_sources_b
156: where object_code = jtf_tasks_pub.p_task_user_hooks.source_object_type_code
157: -- and nvl(not_valid_flag,'N') = 'N';
158: and nvl(not_valid_flag,'N') = l_not_valid_flag;
159: EXCEPTION
160: WHEN OTHERS THEN
242: l_tasks_data_list.extend;
243:
244: l_tasks_data_list(l_tasks_data_list.last) := SYSTEM.WR_TASKS_DATA_OBJ (
245: 'CREATE_TASK',
246: jtf_tasks_pub.p_task_user_hooks.task_id,
247: null,
248: jtf_tasks_pub.p_task_user_hooks.task_number,
249: jtf_tasks_pub.p_task_user_hooks.task_name,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
244: l_tasks_data_list(l_tasks_data_list.last) := SYSTEM.WR_TASKS_DATA_OBJ (
245: 'CREATE_TASK',
246: jtf_tasks_pub.p_task_user_hooks.task_id,
247: null,
248: jtf_tasks_pub.p_task_user_hooks.task_number,
249: jtf_tasks_pub.p_task_user_hooks.task_name,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
245: 'CREATE_TASK',
246: jtf_tasks_pub.p_task_user_hooks.task_id,
247: null,
248: jtf_tasks_pub.p_task_user_hooks.task_number,
249: jtf_tasks_pub.p_task_user_hooks.task_name,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
246: jtf_tasks_pub.p_task_user_hooks.task_id,
247: null,
248: jtf_tasks_pub.p_task_user_hooks.task_number,
249: jtf_tasks_pub.p_task_user_hooks.task_name,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
247: null,
248: jtf_tasks_pub.p_task_user_hooks.task_number,
249: jtf_tasks_pub.p_task_user_hooks.task_name,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
248: jtf_tasks_pub.p_task_user_hooks.task_number,
249: jtf_tasks_pub.p_task_user_hooks.task_name,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
249: jtf_tasks_pub.p_task_user_hooks.task_name,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
250: jtf_tasks_pub.p_task_user_hooks.task_type_id,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
251: jtf_tasks_pub.p_task_user_hooks.task_status_id,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
252: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
253: jtf_tasks_pub.p_task_user_hooks.owner_id,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
254: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
262: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
255: jtf_tasks_pub.p_task_user_hooks.source_object_id,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
262: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
263: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
256: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
262: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
263: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
264: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
257: jtf_tasks_pub.p_task_user_hooks.customer_id,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
262: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
263: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
264: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
265: null,
258: jtf_tasks_pub.p_task_user_hooks.date_selected,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
262: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
263: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
264: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
265: null,
266: null,
259: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
262: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
263: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
264: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
265: null,
266: null,
267: null);
260: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
261: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
262: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
263: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
264: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
265: null,
266: null,
267: null);
268:
277: l_owner_type_actual := 'RS_GROUP';
278: Select owner_id
279: into l_orig_grp_owner
280: from ieu_uwqm_items
281: where WORKITEM_PK_ID = jtf_tasks_pub.p_task_user_hooks.task_id
282: -- and workitem_obj_code = 'TASK'
283: and workitem_obj_code = l_workitem_obj_code
284: -- and owner_type_actual = 'RS_GROUP';
285: and owner_type_actual = l_owner_type_actual;
326: l_workitem_comment_code3,
327: null,
328: null);
329:
330: if jtf_tasks_pub.p_task_user_hooks.entity = 'TASK' then
331:
332: IEU_WR_PUB.CREATE_WR_ITEM(
333: p_api_version => 1.0,
334: p_init_msg_list => FND_API.G_TRUE,
333: p_api_version => 1.0,
334: p_init_msg_list => FND_API.G_TRUE,
335: p_commit => FND_API.G_FALSE,
336: p_workitem_obj_code => 'TASK',
337: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
338: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
339: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
340: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
341: p_priority_code => l_priority_code,
334: p_init_msg_list => FND_API.G_TRUE,
335: p_commit => FND_API.G_FALSE,
336: p_workitem_obj_code => 'TASK',
337: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
338: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
339: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
340: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
341: p_priority_code => l_priority_code,
342: p_due_date => l_due_date,
335: p_commit => FND_API.G_FALSE,
336: p_workitem_obj_code => 'TASK',
337: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
338: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
339: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
340: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
341: p_priority_code => l_priority_code,
342: p_due_date => l_due_date,
343: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
336: p_workitem_obj_code => 'TASK',
337: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
338: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
339: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
340: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
341: p_priority_code => l_priority_code,
342: p_due_date => l_due_date,
343: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
344: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
339: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
340: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
341: p_priority_code => l_priority_code,
342: p_due_date => l_due_date,
343: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
344: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
345: p_assignee_id => l_assignee_id,
346: p_assignee_type => l_assignee_type,
347: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
340: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
341: p_priority_code => l_priority_code,
342: p_due_date => l_due_date,
343: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
344: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
345: p_assignee_id => l_assignee_id,
346: p_assignee_type => l_assignee_type,
347: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
348: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
343: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
344: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
345: p_assignee_id => l_assignee_id,
346: p_assignee_type => l_assignee_type,
347: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
348: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
349: p_application_id => 690,
350: p_ieu_enum_type_uuid => 'TASKS',
351: p_work_item_status => l_task_status,
344: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
345: p_assignee_id => l_assignee_id,
346: p_assignee_type => l_assignee_type,
347: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
348: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
349: p_application_id => 690,
350: p_ieu_enum_type_uuid => 'TASKS',
351: p_work_item_status => l_task_status,
352: p_user_id => FND_GLOBAL.USER_ID,
457: l_object_code := 'TASK';
458: l_not_valid_flag := 'N';
459:
460: -- Set this variable as we require this for Task Asg processing
461: l_task_source_obj_type_code := jtf_tasks_pub.p_task_user_hooks.source_object_type_code;
462: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
463: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
464: l_workitem_comment_code2 := 'PLAN_DUE_DT';
465: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
458: l_not_valid_flag := 'N';
459:
460: -- Set this variable as we require this for Task Asg processing
461: l_task_source_obj_type_code := jtf_tasks_pub.p_task_user_hooks.source_object_type_code;
462: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
463: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
464: l_workitem_comment_code2 := 'PLAN_DUE_DT';
465: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
466: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
459:
460: -- Set this variable as we require this for Task Asg processing
461: l_task_source_obj_type_code := jtf_tasks_pub.p_task_user_hooks.source_object_type_code;
462: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
463: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
464: l_workitem_comment_code2 := 'PLAN_DUE_DT';
465: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
466: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
467: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
461: l_task_source_obj_type_code := jtf_tasks_pub.p_task_user_hooks.source_object_type_code;
462: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
463: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
464: l_workitem_comment_code2 := 'PLAN_DUE_DT';
465: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
466: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
467: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
468: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
469: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
462: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
463: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
464: l_workitem_comment_code2 := 'PLAN_DUE_DT';
465: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
466: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
467: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
468: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
469: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
470: l_workitem_comment_code2 := 'SCHD_DUE_DT';
464: l_workitem_comment_code2 := 'PLAN_DUE_DT';
465: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
466: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
467: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
468: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
469: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
470: l_workitem_comment_code2 := 'SCHD_DUE_DT';
471: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
472: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
465: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
466: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
467: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
468: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
469: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
470: l_workitem_comment_code2 := 'SCHD_DUE_DT';
471: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
472: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
473: -- l_due_date := null;
467: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
468: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
469: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
470: l_workitem_comment_code2 := 'SCHD_DUE_DT';
471: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
472: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
473: -- l_due_date := null;
474: -- l_workitem_comment_code2 := 'NULL_DUE_DT';
475: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
471: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
472: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
473: -- l_due_date := null;
474: -- l_workitem_comment_code2 := 'NULL_DUE_DT';
475: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
476: l_workitem_comment_code2 := 'SCHD_DUE_DT';
477: end if;
478:
479: begin
479: begin
480: select importance_level
481: into l_importance_level
482: from jtf_task_priorities_vl
483: where task_priority_id = jtf_tasks_pub.p_task_user_hooks.task_priority_id;
484: exception when others then null;
485: end;
486:
487: if l_importance_level < 5 then
507: end if;
508:
509: begin
510: select task_status_id into l_task_status_id from jtf_tasks_b
511: where task_id = jtf_tasks_pub.p_task_user_hooks.task_id;
512: end;
513:
514: begin
515: select 'CLOSE' into l_task_status
517: where (nvl(closed_flag, 'N') = 'Y'
518: or nvl(completed_flag, 'N') = 'Y'
519: or nvl(cancelled_flag, 'N') = 'Y'
520: or nvl(rejected_flag, 'N') = 'Y')
521: and task_status_id = jtf_tasks_pub.p_task_user_hooks.task_status_id;
522: l_status_id := 3;
523: EXCEPTION WHEN others THEN
524: begin
525: select 'SLEEP' into l_task_status
524: begin
525: select 'SLEEP' into l_task_status
526: from jtf_task_statuses_vl
527: where nvl(on_hold_flag, 'N') = 'Y'
528: and task_status_id = jtf_tasks_pub.p_task_user_hooks.task_status_id;
529: l_status_id := 5;
530: EXCEPTION WHEN others THEN
531: l_task_status := 'OPEN';
532: l_status_id := 0;
534: end;
535:
536: -- l_workitem_comment_code1 := 'GO_IA';
537:
538: if (jtf_tasks_pub.p_task_user_hooks.source_object_type_code is not null)
539: then
540:
541: BEGIN
542:
555:
556: Select ws_id
557: into l_ws_id2
558: from ieu_uwqm_work_sources_b
559: where object_code = jtf_tasks_pub.p_task_user_hooks.source_object_type_code
560: --and nvl(not_valid_flag,'N') = 'N';
561: and nvl(not_valid_flag,'N') = l_not_valid_flag;
562: EXCEPTION
563: WHEN OTHERS THEN
644: l_tasks_data_list.extend;
645:
646: l_tasks_data_list(l_tasks_data_list.last) := SYSTEM.WR_TASKS_DATA_OBJ (
647: 'UPDATE_TASK',
648: jtf_tasks_pub.p_task_user_hooks.task_id,
649: null,
650: jtf_tasks_pub.p_task_user_hooks.task_number,
651: jtf_tasks_pub.p_task_user_hooks.task_name,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
646: l_tasks_data_list(l_tasks_data_list.last) := SYSTEM.WR_TASKS_DATA_OBJ (
647: 'UPDATE_TASK',
648: jtf_tasks_pub.p_task_user_hooks.task_id,
649: null,
650: jtf_tasks_pub.p_task_user_hooks.task_number,
651: jtf_tasks_pub.p_task_user_hooks.task_name,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
647: 'UPDATE_TASK',
648: jtf_tasks_pub.p_task_user_hooks.task_id,
649: null,
650: jtf_tasks_pub.p_task_user_hooks.task_number,
651: jtf_tasks_pub.p_task_user_hooks.task_name,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
648: jtf_tasks_pub.p_task_user_hooks.task_id,
649: null,
650: jtf_tasks_pub.p_task_user_hooks.task_number,
651: jtf_tasks_pub.p_task_user_hooks.task_name,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
649: null,
650: jtf_tasks_pub.p_task_user_hooks.task_number,
651: jtf_tasks_pub.p_task_user_hooks.task_name,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
650: jtf_tasks_pub.p_task_user_hooks.task_number,
651: jtf_tasks_pub.p_task_user_hooks.task_name,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
651: jtf_tasks_pub.p_task_user_hooks.task_name,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
652: jtf_tasks_pub.p_task_user_hooks.task_type_id,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
653: jtf_tasks_pub.p_task_user_hooks.task_status_id,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
654: jtf_tasks_pub.p_task_user_hooks.task_priority_id,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
655: jtf_tasks_pub.p_task_user_hooks.owner_id,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
656: jtf_tasks_pub.p_task_user_hooks.owner_type_code,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
664: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
657: jtf_tasks_pub.p_task_user_hooks.source_object_id,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
664: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
665: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
658: jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
664: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
665: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
666: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
659: jtf_tasks_pub.p_task_user_hooks.customer_id,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
664: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
665: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
666: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
667: null,
660: jtf_tasks_pub.p_task_user_hooks.date_selected,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
664: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
665: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
666: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
667: null,
668: null,
661: jtf_tasks_pub.p_task_user_hooks.planned_start_date,
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
664: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
665: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
666: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
667: null,
668: null,
669: null);
662: jtf_tasks_pub.p_task_user_hooks.planned_end_date,
663: jtf_tasks_pub.p_task_user_hooks.scheduled_start_date,
664: jtf_tasks_pub.p_task_user_hooks.scheduled_end_date,
665: jtf_tasks_pub.p_task_user_hooks.actual_start_date,
666: jtf_tasks_pub.p_task_user_hooks.actual_end_date,
667: null,
668: null,
669: null);
670:
680: l_owner_type_actual := 'RS_GROUP';
681: Select owner_id
682: into l_orig_grp_owner
683: from ieu_uwqm_items
684: where WORKITEM_PK_ID = jtf_tasks_pub.p_task_user_hooks.task_id
685: -- and workitem_obj_code = 'TASK'
686: -- and owner_type_actual = 'RS_GROUP';
687: and workitem_obj_code = l_workitem_obj_code
688: and owner_type_actual = l_owner_type_actual;
711:
712: BEGIN
713:
714: /***** Bookings End Date will be used as Due Date. This is available in Assignee hooks ***************
715: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
716: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
717: l_workitem_comment_code2 := 'PLAN_DUE_DT';
718: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
719: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
712: BEGIN
713:
714: /***** Bookings End Date will be used as Due Date. This is available in Assignee hooks ***************
715: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
716: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
717: l_workitem_comment_code2 := 'PLAN_DUE_DT';
718: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
719: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
720: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
714: /***** Bookings End Date will be used as Due Date. This is available in Assignee hooks ***************
715: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
716: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
717: l_workitem_comment_code2 := 'PLAN_DUE_DT';
718: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
719: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
720: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
721: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
722: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
715: if jtf_tasks_pub.p_task_user_hooks.date_selected = 'P' then
716: l_due_date := jtf_tasks_pub.p_task_user_hooks.planned_end_date;
717: l_workitem_comment_code2 := 'PLAN_DUE_DT';
718: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
719: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
720: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
721: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
722: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
723: l_workitem_comment_code2 := 'SCHD_DUE_DT';
717: l_workitem_comment_code2 := 'PLAN_DUE_DT';
718: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
719: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
720: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
721: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
722: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
723: l_workitem_comment_code2 := 'SCHD_DUE_DT';
724: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
725: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
718: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'A' then
719: l_due_date := jtf_tasks_pub.p_task_user_hooks.actual_end_date;
720: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
721: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
722: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
723: l_workitem_comment_code2 := 'SCHD_DUE_DT';
724: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
725: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
726: -- l_due_date := null;
720: l_workitem_comment_code2 := 'ACTUAL_DUE_DT';
721: elsif jtf_tasks_pub.p_task_user_hooks.date_selected = 'S' then
722: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
723: l_workitem_comment_code2 := 'SCHD_DUE_DT';
724: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
725: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
726: -- l_due_date := null;
727: -- l_workitem_comment_code2 := 'NULL_DUE_DT';
728: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
724: elsif jtf_tasks_pub.p_task_user_hooks.date_selected is null then
725: -- Niraj Bug 4609285 Commented following 2 lines. Making default as Scheduled Date in case of Null value
726: -- l_due_date := null;
727: -- l_workitem_comment_code2 := 'NULL_DUE_DT';
728: l_due_date := jtf_tasks_pub.p_task_user_hooks.scheduled_end_date;
729: l_workitem_comment_code2 := 'SCHD_DUE_DT';
730: end if;
731: *****************************/
732:
755: l_wr_owner_type_actual,
756: l_wr_source_object_id,
757: l_wr_source_object_type_code
758: from ieu_uwqm_items
759: where workitem_pk_id = jtf_tasks_pub.p_task_user_hooks.task_id
760: -- and workitem_obj_code = 'TASK';
761: and workitem_obj_code = l_workitem_obj_code;
762:
763: l_count := 1;
768: when others then null;
769: END;
770:
771: -- Niraj: Added for bug 4220060
772: IF ((NVL(l_wr_party_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.customer_id, -1)) OR
773: (NVL(l_wr_owner_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_id, -1)) OR
774: (NVL(l_wr_title, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.task_name, '$%&*@')) OR
775: (NVL(l_wr_status_id, -1) <> NVL(l_status_id, -1)) OR
776: (NVL(l_wr_priority_id, -1) <> NVL(l_priority_id, -1)) OR
769: END;
770:
771: -- Niraj: Added for bug 4220060
772: IF ((NVL(l_wr_party_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.customer_id, -1)) OR
773: (NVL(l_wr_owner_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_id, -1)) OR
774: (NVL(l_wr_title, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.task_name, '$%&*@')) OR
775: (NVL(l_wr_status_id, -1) <> NVL(l_status_id, -1)) OR
776: (NVL(l_wr_priority_id, -1) <> NVL(l_priority_id, -1)) OR
777: (NVL(l_wr_owner_type_actual, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_type_code, '$%&*@')) OR
770:
771: -- Niraj: Added for bug 4220060
772: IF ((NVL(l_wr_party_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.customer_id, -1)) OR
773: (NVL(l_wr_owner_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_id, -1)) OR
774: (NVL(l_wr_title, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.task_name, '$%&*@')) OR
775: (NVL(l_wr_status_id, -1) <> NVL(l_status_id, -1)) OR
776: (NVL(l_wr_priority_id, -1) <> NVL(l_priority_id, -1)) OR
777: (NVL(l_wr_owner_type_actual, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_type_code, '$%&*@')) OR
778: (NVL(l_wr_source_object_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.source_object_id, -1)) OR
773: (NVL(l_wr_owner_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_id, -1)) OR
774: (NVL(l_wr_title, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.task_name, '$%&*@')) OR
775: (NVL(l_wr_status_id, -1) <> NVL(l_status_id, -1)) OR
776: (NVL(l_wr_priority_id, -1) <> NVL(l_priority_id, -1)) OR
777: (NVL(l_wr_owner_type_actual, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_type_code, '$%&*@')) OR
778: (NVL(l_wr_source_object_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.source_object_id, -1)) OR
779: (NVL(l_wr_source_object_type_code, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.source_object_type_code, '$%&*@')) OR
780: (NVL(l_wr_due_date, to_date('30-12-1000', 'DD-MM-RRRR')) <> NVL(l_due_date, to_date('30-12-1000', 'DD-MM-RRRR')))) THEN
781: l_update_task_reqd_flag := 'y';
774: (NVL(l_wr_title, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.task_name, '$%&*@')) OR
775: (NVL(l_wr_status_id, -1) <> NVL(l_status_id, -1)) OR
776: (NVL(l_wr_priority_id, -1) <> NVL(l_priority_id, -1)) OR
777: (NVL(l_wr_owner_type_actual, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_type_code, '$%&*@')) OR
778: (NVL(l_wr_source_object_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.source_object_id, -1)) OR
779: (NVL(l_wr_source_object_type_code, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.source_object_type_code, '$%&*@')) OR
780: (NVL(l_wr_due_date, to_date('30-12-1000', 'DD-MM-RRRR')) <> NVL(l_due_date, to_date('30-12-1000', 'DD-MM-RRRR')))) THEN
781: l_update_task_reqd_flag := 'y';
782: ELSE
775: (NVL(l_wr_status_id, -1) <> NVL(l_status_id, -1)) OR
776: (NVL(l_wr_priority_id, -1) <> NVL(l_priority_id, -1)) OR
777: (NVL(l_wr_owner_type_actual, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.owner_type_code, '$%&*@')) OR
778: (NVL(l_wr_source_object_id, -1) <> NVL(jtf_tasks_pub.p_task_user_hooks.source_object_id, -1)) OR
779: (NVL(l_wr_source_object_type_code, '$%&*@') <> NVL(jtf_tasks_pub.p_task_user_hooks.source_object_type_code, '$%&*@')) OR
780: (NVL(l_wr_due_date, to_date('30-12-1000', 'DD-MM-RRRR')) <> NVL(l_due_date, to_date('30-12-1000', 'DD-MM-RRRR')))) THEN
781: l_update_task_reqd_flag := 'y';
782: ELSE
783: l_update_task_reqd_flag := 'n';
785:
786: -- Start IF-1
787: if (l_update_task_reqd_flag = 'y') THEN
788: -- Start IF-2
789: if (jtf_tasks_pub.p_task_user_hooks.entity = 'TASK')
790: then
791: -- Start IF-3
792: if ((l_task_status = 'CLOSE') and (l_count = 0)) THEN
793: x_return_status := fnd_api.g_ret_sts_success;
817:
818: if (l_dist_from = 'GROUP_OWNED') and
819: (l_dist_to = 'INDIVIDUAL_ASSIGNED')
820: then
821: if jtf_tasks_pub.p_task_user_hooks.owner_type_code = 'RS_GROUP' then
822: begin
823: select c.resource_id, c.resource_type_code
824: into l_assignee_id, l_assignee_type
825: from jtf_task_assignments c
822: begin
823: select c.resource_id, c.resource_type_code
824: into l_assignee_id, l_assignee_type
825: from jtf_task_assignments c
826: where c.task_id = jtf_tasks_pub.p_task_user_hooks.task_id
827: and c.assignee_role = 'ASSIGNEE'
828: and c.resource_type_code not in ('RS_TEAM', 'RS_GROUP')
829: and c.resource_id in ( select resource_id
830: from jtf_rs_group_members
827: and c.assignee_role = 'ASSIGNEE'
828: and c.resource_type_code not in ('RS_TEAM', 'RS_GROUP')
829: and c.resource_id in ( select resource_id
830: from jtf_rs_group_members
831: where group_id = jtf_tasks_pub.p_task_user_hooks.owner_id
832: and nvl(delete_flag,'N') <> 'Y')
833: and c.last_update_date = (select max(a.last_update_date)
834: from jtf_task_assignments a,jtf_task_statuses_vl b
835: where a.task_id = jtf_tasks_pub.p_task_user_hooks.task_id
831: where group_id = jtf_tasks_pub.p_task_user_hooks.owner_id
832: and nvl(delete_flag,'N') <> 'Y')
833: and c.last_update_date = (select max(a.last_update_date)
834: from jtf_task_assignments a,jtf_task_statuses_vl b
835: where a.task_id = jtf_tasks_pub.p_task_user_hooks.task_id
836: and a.assignee_role = 'ASSIGNEE'
837: and a.assignment_status_id = b.task_status_id
838: and a.resource_type_code not in ('RS_TEAM', 'RS_GROUP')
839: and a.resource_id in ( select resource_id
837: and a.assignment_status_id = b.task_status_id
838: and a.resource_type_code not in ('RS_TEAM', 'RS_GROUP')
839: and a.resource_id in ( select resource_id
840: from jtf_rs_group_members
841: where group_id = jtf_tasks_pub.p_task_user_hooks.owner_id
842: and nvl(delete_flag,'N') <> 'Y')
843: and (nvl(b.closed_flag, 'N') = 'N'
844: and nvl(b.completed_flag, 'N') = 'N'
845: and nvl(b.cancelled_flag, 'N') = 'N'
883: p_api_version => 1.0,
884: p_init_msg_list => FND_API.G_TRUE,
885: p_commit => FND_API.G_FALSE,
886: p_workitem_obj_code => 'TASK',
887: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
888: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
889: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
890: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
891: p_priority_code => l_priority_code,
884: p_init_msg_list => FND_API.G_TRUE,
885: p_commit => FND_API.G_FALSE,
886: p_workitem_obj_code => 'TASK',
887: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
888: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
889: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
890: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
891: p_priority_code => l_priority_code,
892: p_due_date => l_due_date,
885: p_commit => FND_API.G_FALSE,
886: p_workitem_obj_code => 'TASK',
887: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
888: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
889: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
890: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
891: p_priority_code => l_priority_code,
892: p_due_date => l_due_date,
893: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
886: p_workitem_obj_code => 'TASK',
887: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
888: p_work_item_number => to_number(jtf_tasks_pub.p_task_user_hooks.task_number),
889: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
890: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
891: p_priority_code => l_priority_code,
892: p_due_date => l_due_date,
893: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
894: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
889: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
890: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
891: p_priority_code => l_priority_code,
892: p_due_date => l_due_date,
893: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
894: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
895: p_assignee_id => l_assignee_id,
896: p_assignee_type => l_assignee_type,
897: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
890: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
891: p_priority_code => l_priority_code,
892: p_due_date => l_due_date,
893: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
894: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
895: p_assignee_id => l_assignee_id,
896: p_assignee_type => l_assignee_type,
897: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
898: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
893: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
894: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
895: p_assignee_id => l_assignee_id,
896: p_assignee_type => l_assignee_type,
897: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
898: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
899: p_application_id => 690,
900: p_ieu_enum_type_uuid => 'TASKS',
901: p_work_item_status => l_task_status,
894: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
895: p_assignee_id => l_assignee_id,
896: p_assignee_type => l_assignee_type,
897: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
898: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
899: p_application_id => 690,
900: p_ieu_enum_type_uuid => 'TASKS',
901: p_work_item_status => l_task_status,
902: p_user_id => FND_GLOBAL.USER_ID,
913: p_api_version => 1.0,
914: p_init_msg_list => FND_API.G_TRUE,
915: p_commit => FND_API.G_FALSE,
916: p_workitem_obj_code => 'TASK',
917: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
918: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
919: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
920: p_priority_code => l_priority_code,
921: p_due_date => l_due_date,
914: p_init_msg_list => FND_API.G_TRUE,
915: p_commit => FND_API.G_FALSE,
916: p_workitem_obj_code => 'TASK',
917: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
918: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
919: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
920: p_priority_code => l_priority_code,
921: p_due_date => l_due_date,
922: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
915: p_commit => FND_API.G_FALSE,
916: p_workitem_obj_code => 'TASK',
917: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
918: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
919: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
920: p_priority_code => l_priority_code,
921: p_due_date => l_due_date,
922: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
923: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
918: p_title => jtf_tasks_pub.p_task_user_hooks.task_name,
919: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
920: p_priority_code => l_priority_code,
921: p_due_date => l_due_date,
922: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
923: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
924: p_assignee_id => l_assignee_id,
925: p_assignee_type => l_assignee_type,
926: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
919: p_party_id => jtf_tasks_pub.p_task_user_hooks.customer_id,
920: p_priority_code => l_priority_code,
921: p_due_date => l_due_date,
922: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
923: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
924: p_assignee_id => l_assignee_id,
925: p_assignee_type => l_assignee_type,
926: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
927: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
922: p_owner_id => jtf_tasks_pub.p_task_user_hooks.owner_id,
923: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
924: p_assignee_id => l_assignee_id,
925: p_assignee_type => l_assignee_type,
926: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
927: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
928: p_application_id => 690,
929: p_work_item_status => l_task_status,
930: p_user_id => FND_GLOBAL.USER_ID,
923: p_owner_type => jtf_tasks_pub.p_task_user_hooks.owner_type_code,
924: p_assignee_id => l_assignee_id,
925: p_assignee_type => l_assignee_type,
926: p_source_object_id => jtf_tasks_pub.p_task_user_hooks.source_object_id,
927: p_source_object_type_code => jtf_tasks_pub.p_task_user_hooks.source_object_type_code,
928: p_application_id => 690,
929: p_work_item_status => l_task_status,
930: p_user_id => FND_GLOBAL.USER_ID,
931: p_login_id => FND_GLOBAL.LOGIN_ID,
1010: begin
1011: select source_object_type_code
1012: into l_task_source_obj_type_code
1013: from jtf_tasks_b
1014: where task_id = jtf_tasks_pub.p_task_user_hooks.task_id;
1015:
1016: exception when others then
1017: l_task_source_obj_type_code := null;
1018: end;
1128: l_tasks_data_list.extend;
1129:
1130: l_tasks_data_list(l_tasks_data_list.last) := SYSTEM.WR_TASKS_DATA_OBJ (
1131: 'DELETE_TASK',
1132: jtf_tasks_pub.p_task_user_hooks.task_id,
1133: null,
1134: null,
1135: FND_API.G_MISS_CHAR,
1136: FND_API.G_MISS_NUM,
1163: l_owner_type_actual := 'RS_GROUP';
1164: Select owner_id
1165: into l_orig_grp_owner
1166: from ieu_uwqm_items
1167: where WORKITEM_PK_ID = jtf_tasks_pub.p_task_user_hooks.task_id
1168: -- and workitem_obj_code = 'TASK'
1169: -- and owner_type_actual = 'RS_GROUP';
1170: and workitem_obj_code = l_workitem_obj_code
1171: and owner_type_actual = l_owner_type_actual;
1198: begin
1199: select 'Y'
1200: into l_wi_exists
1201: from ieu_uwqm_items
1202: where workitem_pk_id = jtf_tasks_pub.p_task_user_hooks.task_id
1203: and workitem_obj_code = 'TASK';
1204: exception
1205: when others then
1206: l_wi_exists := 'N';
1216:
1217: begin
1218: select task_type_id, entity into l_task_type_id, l_entity
1219: from jtf_tasks_b
1220: where task_id = jtf_tasks_pub.p_task_user_hooks.task_id;
1221: exception when others then l_task_type_id := null;
1222: end;
1223:
1224: l_audit_trail_rec := SYSTEM.WR_AUDIT_TRAIL_NST();
1242: p_api_version => 1.0,
1243: p_init_msg_list => FND_API.G_TRUE,
1244: p_commit => FND_API.G_FALSE,
1245: p_workitem_obj_code => 'TASK',
1246: p_workitem_pk_id => jtf_tasks_pub.p_task_user_hooks.task_id,
1247: p_title => FND_API.G_MISS_CHAR,
1248: p_party_id => FND_API.G_MISS_NUM,
1249: p_priority_code => FND_API.G_MISS_CHAR,
1250: p_due_date => FND_API.G_MISS_DATE,
1274: end if;
1275:
1276: if (x_return_status = fnd_api.g_ret_sts_success)
1277: then
1278: l_del_task_id := jtf_tasks_pub.p_task_user_hooks.task_id;
1279: --insert into p_temp values ('del tsk id: '||l_del_task_id);
1280: end if;
1281:
1282: EXCEPTION WHEN OTHERS THEN
1609: exception
1610: when others then null;
1611: end;
1612:
1613: if (jtf_tasks_pub.p_task_user_hooks.task_status_id is not null)
1614: then
1615: l_tsk_sts_id := jtf_tasks_pub.p_task_user_hooks.task_status_id;
1616: end if;
1617:
1611: end;
1612:
1613: if (jtf_tasks_pub.p_task_user_hooks.task_status_id is not null)
1614: then
1615: l_tsk_sts_id := jtf_tasks_pub.p_task_user_hooks.task_status_id;
1616: end if;
1617:
1618: -- Get the Task Status based on task Status Id
1619: begin
2399: exception
2400: when others then null;
2401: end;
2402:
2403: if (jtf_tasks_pub.p_task_user_hooks.task_status_id is not null)
2404: then
2405: l_tsk_sts_id := jtf_tasks_pub.p_task_user_hooks.task_status_id;
2406: end if;
2407:
2401: end;
2402:
2403: if (jtf_tasks_pub.p_task_user_hooks.task_status_id is not null)
2404: then
2405: l_tsk_sts_id := jtf_tasks_pub.p_task_user_hooks.task_status_id;
2406: end if;
2407:
2408: -- Get the Task Status based on task Status Id
2409: begin
3127: exception
3128: when others then null;
3129: end;
3130:
3131: if (jtf_tasks_pub.p_task_user_hooks.task_status_id is not null)
3132: then
3133: l_tsk_sts_id := jtf_tasks_pub.p_task_user_hooks.task_status_id;
3134: end if;
3135:
3129: end;
3130:
3131: if (jtf_tasks_pub.p_task_user_hooks.task_status_id is not null)
3132: then
3133: l_tsk_sts_id := jtf_tasks_pub.p_task_user_hooks.task_status_id;
3134: end if;
3135:
3136: -- Get the Task Status based on task Status Id
3137: begin