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.10 2007/12/14 13:09:05 diverma 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 356: from ad_patch_run_bug_actions

352: ret boolean := FALSE;
353:
354: cursor FILE_VER_CUR(p_file_id in ad_files.file_id%TYPE) is
355: select executed_flag
356: from ad_patch_run_bug_actions
357: where file_id = p_file_id
358: and patch_file_version_id in (select file_version_id
359: from ad_file_versions
360: where file_id = p_file_id

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

429:
430:
431:
432: /*************************************************************************
433: cascade update AD_SNAPSHOT_BUGFIXES based on the values in AD_PATCH_RUN_BUGS.
434: - Don't update AD_SNAPSHOT_BUGFIXES at all if already set to the value
435: being updated.
436: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
437: as successful.

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

435: being updated.
436: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
437: as successful.
438: - When updating to unsuccessful, only mark row in AD_SNAPSHOT_BUGFIXES
439: as not successful if there are no rows in AD_PATCH_RUN_BUGS marked as
440: successful for the bug, product, and aru_release.
441: This routine updates AD_SNAPSHOT_BUGFIXES for given a patch_run_id and
442: a flag.
443: *************************************************************************/

Line 452: from AD_PATCH_RUN_BUGS

448: l_snapshot_id AD_SNAPSHOTS.snapshot_id%type;
449:
450: cursor BUG_ID_CUR is
451: select bug_id
452: from AD_PATCH_RUN_BUGS
453: where patch_run_id = p_patch_run_id;
454:
455: cursor FIND_SUCC_CUR(p_bug_id in ad_bugs.bug_id%type) is
456: select success_flag

Line 457: from AD_PATCH_RUN_BUGS

453: where patch_run_id = p_patch_run_id;
454:
455: cursor FIND_SUCC_CUR(p_bug_id in ad_bugs.bug_id%type) is
456: select success_flag
457: from AD_PATCH_RUN_BUGS
458: where patch_run_id <> p_patch_run_id
459: and bug_id = p_bug_id;
460:
461: no_update boolean := FALSE;

Line 483: and bugfix_id in (select bug_id from AD_PATCH_RUN_BUGS

479: begin
480: update AD_SNAPSHOT_BUGFIXES
481: set success_flag = p_flag
482: where snapshot_id = l_snapshot_id
483: and bugfix_id in (select bug_id from AD_PATCH_RUN_BUGS
484: where patch_run_id = p_patch_run_id);
485: exception when others then
486: g_errm := sqlerrm;
487: raise_application_error(-20001, g_errm ||

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

521: end if;
522: end mark_patch_bug_in_snpbgfix;
523:
524: /*************************************************************************
525: cascade update AD_SNAPSHOT_BUGFIXES based on the values in AD_PATCH_RUN_BUGS.
526: - Don't update AD_SNAPSHOT_BUGFIXES at all if already set to the value
527: being updated.
528: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
529: as successful.

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

527: being updated.
528: - When updating to successful, just mark row in AD_SNAPSHOT_BUGFIXES
529: as successful.
530: - When updating to unsuccessful, only mark row in AD_SNAPSHOT_BUGFIXES
531: as not successful if there are no rows in AD_PATCH_RUN_BUGS marked as
532: successful for the bug, product, and aru_release.
533: This routine updates AD_SNAPSHOT_BUGFIXES, given a patch_run, bug id.
534: *************************************************************************/
535: procedure mark_bug_in_snpbgfix(p_patch_run_id in number,

Line 545: from AD_PATCH_RUN_BUGS

541: l_snapshot_id AD_SNAPSHOTS.snapshot_id%type;
542:
543: cursor FIND_SUCC_CUR(p_bug_id in ad_bugs.bug_id%type) is
544: select success_flag
545: from AD_PATCH_RUN_BUGS
546: where patch_run_id <> p_patch_run_id
547: and bug_id = p_bug_id;
548:
549: no_update boolean := FALSE;

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

606: end mark_bug_in_snpbgfix;
607:
608: /*****************************************************************************
609: Mark patch runs as successful or unsuccessful, in a given appl_top_id,
610: cascading to ad_patch_run_bugs and ad_bugs. This procedure will use
611: patch_run_id, which would be selected via another layer of sql report that
612: the user would run to list all patch_run_ids for a given patch_name,
613: appl_top_id and a date.
614: *****************************************************************************/

Line 626: update AD_PATCH_RUNS

622:
623: begin
624:
625: begin
626: update AD_PATCH_RUNS
627: set success_flag = p_flag, failure_comments = p_reason_text
628: where patch_run_id = p_patch_run_id;
629: exception when others then
630: g_errm := sqlerrm;

Line 634: 'in AD_PATCH_RUNS '||

630: g_errm := sqlerrm;
631: raise_application_error(-20001, g_errm ||
632: 'Error occurred in mark_patch_succ() '||
633: 'while trying to update success_flag '||
634: 'in AD_PATCH_RUNS '||
635: 'for patch_run_id = ' || p_patch_run_id);
636: end;
637:
638: begin

Line 639: update AD_PATCH_RUN_BUGS

635: 'for patch_run_id = ' || p_patch_run_id);
636: end;
637:
638: begin
639: update AD_PATCH_RUN_BUGS
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_RUN_BUGS '||

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_RUN_BUGS '||
648: 'for patch_run_id = ' || p_patch_run_id);
649: end;
650:
651: mark_patch_bug_in_snpbgfix(p_appl_top_id,p_patch_run_id,p_flag);

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

654:
655:
656: /*************************************************************************
657: are_all_bugs_for_patch_succ(p_patch_run_id);
658: Go thru all the bug_id's for the given patch_run_id in ad_patch_run_bugs
659: to get all the bugs for a given patch and check if all the bugs have
660: success_flag set to 'Y' or 'N' and return true or false accordingly.
661: *************************************************************************/
662: function are_all_bugs_for_patch_succ(p_patch_run_id in

Line 663: ad_patch_runs.patch_run_id%TYPE)

659: to get all the bugs for a given patch and check if all the bugs have
660: success_flag set to 'Y' or 'N' and return true or false accordingly.
661: *************************************************************************/
662: function are_all_bugs_for_patch_succ(p_patch_run_id in
663: ad_patch_runs.patch_run_id%TYPE)
664: return boolean
665: is
666: l_flag varchar2(1);
667: begin

Line 671: from AD_PATCH_RUN_BUGS

667: begin
668:
669: begin
670: select success_flag into l_flag
671: from AD_PATCH_RUN_BUGS
672: where patch_run_id = p_patch_run_id
673: and success_flag = 'N';
674: exception
675: when no_data_found then

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

684: end are_all_bugs_for_patch_succ;
685:
686: /*************************************************************************
687: Given a patch_run_id and a bug number, mark the bug as successful or
688: unsuccessful and cascade to ad_patch_runs and ad_bugs in the following
689: manner:
690: - update AD_PATCH_RUN_BUGS for the specified patch run and bug
691: - Also update AD_PATCH_RUNS in the following cases:
692: - if updating bug to successful and all other bugs for this patch run

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

686: /*************************************************************************
687: Given a patch_run_id and a bug number, mark the bug as successful or
688: unsuccessful and cascade to ad_patch_runs and ad_bugs in the following
689: manner:
690: - update AD_PATCH_RUN_BUGS for the specified patch run and bug
691: - Also update AD_PATCH_RUNS in the following cases:
692: - if updating bug to successful and all other bugs for this patch run
693: are successful and patch run marked as unsuccessful, update patch run
694: to successful.

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

687: Given a patch_run_id and a bug number, mark the bug as successful or
688: unsuccessful and cascade to ad_patch_runs and ad_bugs in the following
689: manner:
690: - update AD_PATCH_RUN_BUGS for the specified patch run and bug
691: - Also update AD_PATCH_RUNS in the following cases:
692: - if updating bug to successful and all other bugs for this patch run
693: are successful and patch run marked as unsuccessful, update patch run
694: to successful.
695: - if updating bug to unsuccessful and patch run marked

Line 698: AD_PATCH_RUN_BUGS.

694: to successful.
695: - if updating bug to unsuccessful and patch run marked
696: as successful, update patch run to unsuccessful.
697: - cascade update AD_BUGS as described above based on values in
698: AD_PATCH_RUN_BUGS.
699: *************************************************************************/
700:
701: procedure mark_bug_succ(p_patch_run_id in NUMBER ,
702: p_appl_top_id in number,

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

729: end;
730:
731:
732: /* Case I:
733: update ad_patch_runs for the specified patch run and bug.
734: */
735:
736: begin
737: update AD_PATCH_RUN_BUGS

Line 737: update AD_PATCH_RUN_BUGS

733: update ad_patch_runs for the specified patch run and bug.
734: */
735:
736: begin
737: update AD_PATCH_RUN_BUGS
738: set success_flag = p_flag, failure_comments = p_reason_text
739: where patch_run_id = p_patch_run_id and
740: bug_id = l_bug_id;
741: exception when others then

Line 746: 'in AD_PATCH_RUNS '||

742: g_errm := sqlerrm;
743: raise_application_error(-20001, g_errm ||
744: 'Error occurred in mark_bug_succ() '||
745: 'while trying to update case I success_flag '||
746: 'in AD_PATCH_RUNS '||
747: 'for patch_run_id = ' || p_patch_run_id);
748: end;
749:
750: /* Case II:

Line 751: update ad_patch_runs in the following manner.

747: 'for patch_run_id = ' || p_patch_run_id);
748: end;
749:
750: /* Case II:
751: update ad_patch_runs in the following manner.
752: 1.if updating bug to successful and all other bugs for this patch run
753: are successful and patch run marked as unsuccessful, update patch run
754: to successful.
755: */

Line 759: from AD_PATCH_RUNS

755: */
756:
757: begin
758: select success_flag into l_patch_succ
759: from AD_PATCH_RUNS
760: where patch_run_id = p_patch_run_id;
761: exception
762: when no_data_found then
763: /* bug 2770858 Do not rollback */

Line 772: update AD_PATCH_RUNS

768: are_all_bugs_for_patch_succ(p_patch_run_id) = TRUE and
769: l_patch_succ = 'N') then
770:
771: begin
772: update AD_PATCH_RUNS
773: set success_flag = p_flag, failure_comments = p_reason_text
774: where patch_run_id = p_patch_run_id;
775: exception when others then
776: g_errm := sqlerrm;

Line 780: 'in AD_PATCH_RUNS '||

776: g_errm := sqlerrm;
777: raise_application_error(-20001, g_errm ||
778: 'Error occurred in mark_bug_succ() '||
779: 'while trying to update case II success_flag '||
780: 'in AD_PATCH_RUNS '||
781: 'for patch_run_id = ' || p_patch_run_id);
782: end;
783:
784: -- case III. if updating bug to unsuccessful and patch run marked

Line 790: update AD_PATCH_RUNS

786:
787: elsif (p_flag = 'N' and l_patch_succ = 'Y') then
788:
789: begin
790: update AD_PATCH_RUNS
791: set success_flag = p_flag, failure_comments = p_reason_text
792: where patch_run_id = p_patch_run_id;
793: exception when others then
794: g_errm := sqlerrm;

Line 798: 'in AD_PATCH_RUNS '||

794: g_errm := sqlerrm;
795: raise_application_error(-20001, g_errm ||
796: 'Error occurred in mark_bug_succ() '||
797: 'while trying to update case III success_flag '||
798: 'in AD_PATCH_RUNS '||
799: 'for patch_run_id = ' || p_patch_run_id);
800: end;
801:
802: end if;

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

802: end if;
803:
804: -- Case IV:
805: -- cascade update AD_SNAPSHOT_BUGFIXES just like in mark_patch_succ
806: -- above based on values in AD_PATCH_RUN_BUGS.
807:
808: mark_bug_in_snpbgfix(p_patch_run_id,p_appl_top_id,l_bug_id,p_flag);
809:
810: end mark_bug_succ;

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

817: - bug_number (eg., '1234567')
818: - application_status, the patch application status (e.g.,IMPLICITLY_APPLIED)
819: - appl_top_id, to know which appl_top, user is requesting patch status for.
820:
821: 2/15/02 : app_short_name is moved from AD_BUGS to AD_PATCH_RUN_BUGS
822: due to AOL's requirement, since AOL doesn't always know
823: app_short_name to pass.
824: *******************************************************************************/
825: procedure set_patch_status(p_release_name in varchar2,

Line 1055: end ad_patch;

1051: return(l_appl_top_id);
1052:
1053: end getAppltopID;
1054:
1055: end ad_patch;