1143:
1144: -- Uniqueness check for task number
1145: x_err_stage := 'check uniqueness for task number '|| x_task_number;
1146: status_code :=
1147: pa_task_utils.check_unique_task_number(x_project_id,
1148: x_task_number,
1149: null);
1150: if ( status_code = 0 ) then
1151: x_err_code := 40;
1165: x_err_stage :=
1166: 'check create subtask for parent task '|| x_parent_task_id;
1167:
1168: --Bug 2947492 The following call is modified to pass params by notation.
1169: pa_task_utils.check_create_subtask_ok(x_task_id => x_parent_task_id,
1170: x_err_code => x_err_code,
1171: x_err_stage => x_err_stage,
1172: x_err_stack => x_err_stack);
1173:
1178:
1179: -- get wbs level for parent task id
1180: x_err_stage :=
1181: 'get wbs level for parent task '|| x_parent_task_id;
1182: x_wbs_level := pa_task_utils.get_wbs_level(x_parent_task_id);
1183: if (x_wbs_level is null) then
1184: x_err_code := 50;
1185: x_err_stage := 'PA_WBS_LEVEL_NOT_FOUND';
1186: return;
1193:
1194: -- get top task id for parent task id
1195: x_err_stage :=
1196: 'get top task id for parent task '|| x_parent_task_id;
1197: x_top_task_id := pa_task_utils.get_top_task_id(x_parent_task_id);
1198: if (x_top_task_id is null) then
1199: x_err_code := 60;
1200: x_err_stage := 'PA_TASK_ID_NOT_FOUND';
1201: return;
1581: -- Fix for Bug # 4513291. Moved this up before appending x_err_stack -- old_stack := x_err_stack;
1582:
1583: -- 4201927
1584: IF x_bulk_flag = 'N' THEN
1585: pa_task_utils.check_delete_task_ok(
1586: x_task_id => x_task_id,
1587: x_validation_mode => x_validation_mode, -- bug 2947492
1588: x_err_code => x_err_code,
1589: x_err_stage => x_err_stage,
2017: --Bug 14213218 End
2018:
2019: -- get parent task id
2020: x_err_stage := 'get parent task id for task '|| x_task_id;
2021: x_parent_task_id := pa_task_utils.get_parent_task_id(x_task_id);
2022:
2023: if ( x_parent_task_id < 0 ) then -- Oracle error
2024: x_err_code := x_parent_task_id;
2025: return;
2027:
2028: if (x_parent_task_id is not null ) then
2029: -- Check if task is last child
2030: x_err_stage := 'check last child for '|| x_task_id;
2031: status_code := pa_task_utils.check_last_child(x_task_id);
2032:
2033: if ( status_code = 1 ) then
2034: -- set parent task's chargeable_flag to 'Y
2035: x_err_stage := 'update parent task chargeable flag';