[Home] [Help]
165: function get_task_name (x_task_id IN number) return varchar2
166: is
167: cursor c1 is
168: select name
169: from pa_proj_elements
170: where proj_element_id = x_task_id;
171:
172: l_task_name pa_proj_elements.name%type;
173:
168: select name
169: from pa_proj_elements
170: where proj_element_id = x_task_id;
171:
172: l_task_name pa_proj_elements.name%type;
173:
174: begin
175: open c1;
176: fetch c1 into l_task_name;
201: function get_task_number (x_task_id IN number) return varchar2
202: is
203: cursor c1 is
204: select element_number
205: from pa_proj_elements
206: where proj_element_id = x_task_id;
207:
208: l_task_number pa_proj_elements.element_number%type;
209:
204: select element_number
205: from pa_proj_elements
206: where proj_element_id = x_task_id;
207:
208: l_task_number pa_proj_elements.element_number%type;
209:
210: begin
211: open c1;
212: fetch c1 into l_task_number;
617:
618: --anuragag Bug 8566495 - No validation on task_id if the task is created through change management
619: if x_project_id is null then
620: select project_id into x_project_id
621: from pa_proj_elements
622: where proj_element_id = x_task_id
623: and task_status is not null;
624: end if;
625:
1978: end;
1979: */
1980: -- Start of code for Performance Fix 4903460
1981: -- All commented validations in this API for this perf fix are done in
1982: -- the following API : PA_PROJ_ELEMENTS_UTILS.perform_task_validations
1983:
1984: -- Added the following api call to get the project_id and pass it to perform_task_validations. Done for Bug#4964992
1985: l_project_id := pa_proj_tsk_utils.get_task_project_id(x_task_id);
1986: -- End of changes for Bug#4964992
1984: -- Added the following api call to get the project_id and pass it to perform_task_validations. Done for Bug#4964992
1985: l_project_id := pa_proj_tsk_utils.get_task_project_id(x_task_id);
1986: -- End of changes for Bug#4964992
1987:
1988: PA_PROJ_ELEMENTS_UTILS.perform_task_validations
1989: (
1990: p_project_id => l_project_id
1991: ,p_task_id => x_task_id
1992: ,x_error_code => x_err_code
2273: --Bug 3617393
2274: DECLARE
2275: CURSOR get_task_project_id(c_task_id IN NUMBER) IS
2276: SELECT project_id
2277: FROM pa_proj_elements
2278: WHERE proj_element_id = c_task_id;
2279: BEGIN
2280:
2281: x_err_stage := 'PA_PROJ_STRUC_MAPPING_UTILS.Check_Task_Has_Mapping'||x_task_id;
2281: x_err_stage := 'PA_PROJ_STRUC_MAPPING_UTILS.Check_Task_Has_Mapping'||x_task_id;
2282:
2283: -- Get project id
2284: x_err_stage := 'get project id of '|| x_task_id;
2285: --Bug 3617393 : Retrieve project id from pa_proj_elements rather than pa_tasks since
2286: --the data has already been deleted from pa_tasks in delete_project flow
2287: /*x_project_id :=
2288: pa_proj_tsk_utils.get_task_project_id(x_task_id);*/
2289: OPEN get_task_project_id(x_task_id);