DBA Data[Home] [Help]

APPS.AD_PATCH dependencies on AD_PATCH

Line 1: package body ad_patch as

1: package body ad_patch as
2: /* $Header: adphpchb.pls 120.12.12020000.3 2013/03/06 13:41:47 rraam ship $ */
3:
4: VER_SEPARATOR CONSTANT varchar2(1) := '.';
5: CURRENT_VIEW_SNP_NAME CONSTANT varchar2(12) := 'CURRENT_VIEW';

Line 27: 2/15/02 : app_short_name is moved from AD_BUGS to AD_PATCH_RUN_BUGS

23: With the snapshot project, and changes to the patch history data
24: model, the bug_status column is moved to ad_snapshot_bugfixes and hence
25: the query has to join on ad_snapshots,ad_snapshot_bugfixes and ad_bugs
26: tables.
27: 2/15/02 : app_short_name is moved from AD_BUGS to AD_PATCH_RUN_BUGS
28: due to AOL's requirement, since AOL doesn't always know
29: app_short_name to pass.
30: **************************************************************************/
31: function is_patch_applied (p_release_name in varchar2,

Line 365: from ad_patch_run_bug_actions

361: ret boolean := FALSE;
362:
363: cursor FILE_VER_CUR(p_file_id in ad_files.file_id%TYPE) is
364: select executed_flag
365: from ad_patch_run_bug_actions
366: where file_id = p_file_id
367: and patch_file_version_id in (select file_version_id
368: from ad_file_versions
369: where file_id = p_file_id

Line 444: cascade update AD_SNAPSHOT_BUGFIXES based on the values in AD_PATCH_RUN_BUGS.

440:
441:
442:
443: /*************************************************************************
444: cascade update AD_SNAPSHOT_BUGFIXES based on the values in AD_PATCH_RUN_BUGS.
445: - Don't update AD_SNAPSHOT_BUGFIXES at all if already set to the value
446: being updated.
447: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
448: as successful.

Line 450: as not successful if there are no rows in AD_PATCH_RUN_BUGS marked as

446: being updated.
447: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
448: as successful.
449: - When updating to unsuccessful, only mark row in AD_SNAPSHOT_BUGFIXES
450: as not successful if there are no rows in AD_PATCH_RUN_BUGS marked as
451: successful for the bug, product, and aru_release.
452: This routine updates AD_SNAPSHOT_BUGFIXES for given a patch_run_id and
453: a flag.
454: *************************************************************************/

Line 463: from AD_PATCH_RUN_BUGS

459: l_snapshot_id AD_SNAPSHOTS.snapshot_id%type;
460:
461: cursor BUG_ID_CUR is
462: select bug_id
463: from AD_PATCH_RUN_BUGS
464: where patch_run_id = p_patch_run_id;
465:
466: cursor FIND_SUCC_CUR(p_bug_id in ad_bugs.bug_id%type) is
467: select success_flag

Line 468: from AD_PATCH_RUN_BUGS

464: where patch_run_id = p_patch_run_id;
465:
466: cursor FIND_SUCC_CUR(p_bug_id in ad_bugs.bug_id%type) is
467: select success_flag
468: from AD_PATCH_RUN_BUGS
469: where patch_run_id <> p_patch_run_id
470: and bug_id = p_bug_id;
471:
472: no_update boolean := FALSE;

Line 495: and bugfix_id in (select bug_id from AD_PATCH_RUN_BUGS

491: begin
492: update AD_SNAPSHOT_BUGFIXES
493: set success_flag = p_flag
494: where snapshot_id = l_snapshot_id
495: and bugfix_id in (select bug_id from AD_PATCH_RUN_BUGS
496: where patch_run_id = p_patch_run_id);
497: exception when others then
498: g_errm := sqlerrm;
499: raise_application_error(-20001, g_errm ||

Line 537: cascade update AD_SNAPSHOT_BUGFIXES based on the values in AD_PATCH_RUN_BUGS.

533: end if;
534: end mark_patch_bug_in_snpbgfix;
535:
536: /*************************************************************************
537: cascade update AD_SNAPSHOT_BUGFIXES based on the values in AD_PATCH_RUN_BUGS.
538: - Don't update AD_SNAPSHOT_BUGFIXES at all if already set to the value
539: being updated.
540: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
541: as successful.

Line 543: as not successful if there are no rows in AD_PATCH_RUN_BUGS marked as

539: being updated.
540: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
541: as successful.
542: - When updating to unsuccessful, only mark row in AD_SNAPSHOT_BUGFIXES
543: as not successful if there are no rows in AD_PATCH_RUN_BUGS marked as
544: successful for the bug, product, and aru_release.
545: This routine updates AD_SNAPSHOT_BUGFIXES, given a patch_run, bug id.
546: *************************************************************************/
547: procedure mark_bug_in_snpbgfix(p_patch_run_id in number,

Line 557: from AD_PATCH_RUN_BUGS

553: l_snapshot_id AD_SNAPSHOTS.snapshot_id%type;
554:
555: cursor FIND_SUCC_CUR(p_bug_id in ad_bugs.bug_id%type) is
556: select success_flag
557: from AD_PATCH_RUN_BUGS
558: where patch_run_id <> p_patch_run_id
559: and bug_id = p_bug_id;
560:
561: no_update boolean := FALSE;

Line 623: cascading to ad_patch_run_bugs and ad_bugs. This procedure will use

619: end mark_bug_in_snpbgfix;
620:
621: /*****************************************************************************
622: Mark patch runs as successful or unsuccessful, in a given appl_top_id,
623: cascading to ad_patch_run_bugs and ad_bugs. This procedure will use
624: patch_run_id, which would be selected via another layer of sql report that
625: the user would run to list all patch_run_ids for a given patch_name,
626: appl_top_id and a date.
627: *****************************************************************************/

Line 639: update AD_PATCH_RUNS

635:
636: begin
637:
638: begin
639: update AD_PATCH_RUNS
640: set success_flag = p_flag, failure_comments = p_reason_text
641: where patch_run_id = p_patch_run_id;
642: exception when others then
643: g_errm := sqlerrm;

Line 647: 'in AD_PATCH_RUNS '||

643: g_errm := sqlerrm;
644: raise_application_error(-20001, g_errm ||
645: 'Error occurred in mark_patch_succ() '||
646: 'while trying to update success_flag '||
647: 'in AD_PATCH_RUNS '||
648: 'for patch_run_id = ' || p_patch_run_id);
649: end;
650:
651: begin

Line 652: update AD_PATCH_RUN_BUGS

648: 'for patch_run_id = ' || p_patch_run_id);
649: end;
650:
651: begin
652: update AD_PATCH_RUN_BUGS
653: set success_flag = p_flag, failure_comments = p_reason_text
654: where patch_run_id = p_patch_run_id;
655: exception when others then
656: g_errm := sqlerrm;

Line 660: 'in AD_PATCH_RUN_BUGS '||

656: g_errm := sqlerrm;
657: raise_application_error(-20001, g_errm ||
658: 'Error occurred in mark_patch_succ() '||
659: 'while trying to update success_flag '||
660: 'in AD_PATCH_RUN_BUGS '||
661: 'for patch_run_id = ' || p_patch_run_id);
662: end;
663:
664: mark_patch_bug_in_snpbgfix(p_appl_top_id,p_patch_run_id,p_flag);

Line 671: Go thru all the bug_id's for the given patch_run_id in ad_patch_run_bugs

667:
668:
669: /*************************************************************************
670: are_all_bugs_for_patch_succ(p_patch_run_id);
671: Go thru all the bug_id's for the given patch_run_id in ad_patch_run_bugs
672: to get all the bugs for a given patch and check if all the bugs have
673: success_flag set to 'Y' or 'N' and return true or false accordingly.
674: *************************************************************************/
675: function are_all_bugs_for_patch_succ(p_patch_run_id in

Line 676: ad_patch_runs.patch_run_id%TYPE)

672: to get all the bugs for a given patch and check if all the bugs have
673: success_flag set to 'Y' or 'N' and return true or false accordingly.
674: *************************************************************************/
675: function are_all_bugs_for_patch_succ(p_patch_run_id in
676: ad_patch_runs.patch_run_id%TYPE)
677: return boolean
678: is
679: l_flag varchar2(1);
680: begin

Line 684: from AD_PATCH_RUN_BUGS

680: begin
681:
682: begin
683: select success_flag into l_flag
684: from AD_PATCH_RUN_BUGS
685: where patch_run_id = p_patch_run_id
686: and success_flag = 'N';
687: exception
688: when no_data_found then

Line 701: unsuccessful and cascade to ad_patch_runs and ad_bugs in the following

697: end are_all_bugs_for_patch_succ;
698:
699: /*************************************************************************
700: Given a patch_run_id and a bug number, mark the bug as successful or
701: unsuccessful and cascade to ad_patch_runs and ad_bugs in the following
702: manner:
703: - update AD_PATCH_RUN_BUGS for the specified patch run and bug
704: - Also update AD_PATCH_RUNS in the following cases:
705: - if updating bug to successful and all other bugs for this patch run

Line 703: - update AD_PATCH_RUN_BUGS for the specified patch run and bug

699: /*************************************************************************
700: Given a patch_run_id and a bug number, mark the bug as successful or
701: unsuccessful and cascade to ad_patch_runs and ad_bugs in the following
702: manner:
703: - update AD_PATCH_RUN_BUGS for the specified patch run and bug
704: - Also update AD_PATCH_RUNS in the following cases:
705: - if updating bug to successful and all other bugs for this patch run
706: are successful and patch run marked as unsuccessful, update patch run
707: to successful.

Line 704: - Also update AD_PATCH_RUNS in the following cases:

700: Given a patch_run_id and a bug number, mark the bug as successful or
701: unsuccessful and cascade to ad_patch_runs and ad_bugs in the following
702: manner:
703: - update AD_PATCH_RUN_BUGS for the specified patch run and bug
704: - Also update AD_PATCH_RUNS in the following cases:
705: - if updating bug to successful and all other bugs for this patch run
706: are successful and patch run marked as unsuccessful, update patch run
707: to successful.
708: - if updating bug to unsuccessful and patch run marked

Line 711: AD_PATCH_RUN_BUGS.

707: to successful.
708: - if updating bug to unsuccessful and patch run marked
709: as successful, update patch run to unsuccessful.
710: - cascade update AD_BUGS as described above based on values in
711: AD_PATCH_RUN_BUGS.
712: *************************************************************************/
713:
714: procedure mark_bug_succ(p_patch_run_id in NUMBER ,
715: p_appl_top_id in number,

Line 746: update ad_patch_runs for the specified patch run and bug.

742: end;
743:
744:
745: /* Case I:
746: update ad_patch_runs for the specified patch run and bug.
747: */
748:
749: begin
750: update AD_PATCH_RUN_BUGS

Line 750: update AD_PATCH_RUN_BUGS

746: update ad_patch_runs for the specified patch run and bug.
747: */
748:
749: begin
750: update AD_PATCH_RUN_BUGS
751: set success_flag = p_flag, failure_comments = p_reason_text
752: where patch_run_id = p_patch_run_id and
753: bug_id = l_bug_id;
754: exception when others then

Line 759: 'in AD_PATCH_RUNS '||

755: g_errm := sqlerrm;
756: raise_application_error(-20001, g_errm ||
757: 'Error occurred in mark_bug_succ() '||
758: 'while trying to update case I success_flag '||
759: 'in AD_PATCH_RUNS '||
760: 'for patch_run_id = ' || p_patch_run_id);
761: end;
762:
763: /* Case II:

Line 764: update ad_patch_runs in the following manner.

760: 'for patch_run_id = ' || p_patch_run_id);
761: end;
762:
763: /* Case II:
764: update ad_patch_runs in the following manner.
765: 1.if updating bug to successful and all other bugs for this patch run
766: are successful and patch run marked as unsuccessful, update patch run
767: to successful.
768: */

Line 772: from AD_PATCH_RUNS

768: */
769:
770: begin
771: select success_flag into l_patch_succ
772: from AD_PATCH_RUNS
773: where patch_run_id = p_patch_run_id;
774: exception
775: when no_data_found then
776: /* bug 2770858 Do not rollback */

Line 785: update AD_PATCH_RUNS

781: are_all_bugs_for_patch_succ(p_patch_run_id) = TRUE and
782: l_patch_succ = 'N') then
783:
784: begin
785: update AD_PATCH_RUNS
786: set success_flag = p_flag, failure_comments = p_reason_text
787: where patch_run_id = p_patch_run_id;
788: exception when others then
789: g_errm := sqlerrm;

Line 793: 'in AD_PATCH_RUNS '||

789: g_errm := sqlerrm;
790: raise_application_error(-20001, g_errm ||
791: 'Error occurred in mark_bug_succ() '||
792: 'while trying to update case II success_flag '||
793: 'in AD_PATCH_RUNS '||
794: 'for patch_run_id = ' || p_patch_run_id);
795: end;
796:
797: -- case III. if updating bug to unsuccessful and patch run marked

Line 803: update AD_PATCH_RUNS

799:
800: elsif (p_flag = 'N' and l_patch_succ = 'Y') then
801:
802: begin
803: update AD_PATCH_RUNS
804: set success_flag = p_flag, failure_comments = p_reason_text
805: where patch_run_id = p_patch_run_id;
806: exception when others then
807: g_errm := sqlerrm;

Line 811: 'in AD_PATCH_RUNS '||

807: g_errm := sqlerrm;
808: raise_application_error(-20001, g_errm ||
809: 'Error occurred in mark_bug_succ() '||
810: 'while trying to update case III success_flag '||
811: 'in AD_PATCH_RUNS '||
812: 'for patch_run_id = ' || p_patch_run_id);
813: end;
814:
815: end if;

Line 819: -- above based on values in AD_PATCH_RUN_BUGS.

815: end if;
816:
817: -- Case IV:
818: -- cascade update AD_SNAPSHOT_BUGFIXES just like in mark_patch_succ
819: -- above based on values in AD_PATCH_RUN_BUGS.
820:
821: mark_bug_in_snpbgfix(p_patch_run_id,p_appl_top_id,l_bug_id,p_flag);
822:
823: end mark_bug_succ;

Line 834: 2/15/02 : app_short_name is moved from AD_BUGS to AD_PATCH_RUN_BUGS

830: - bug_number (eg., '1234567')
831: - application_status, the patch application status (e.g.,IMPLICITLY_APPLIED)
832: - appl_top_id, to know which appl_top, user is requesting patch status for.
833:
834: 2/15/02 : app_short_name is moved from AD_BUGS to AD_PATCH_RUN_BUGS
835: due to AOL's requirement, since AOL doesn't always know
836: app_short_name to pass.
837: *******************************************************************************/
838: procedure set_patch_status(p_release_name in varchar2,

Line 1070: end ad_patch;

1066: return(l_appl_top_id);
1067:
1068: end getAppltopID;
1069:
1070: end ad_patch;