Subversion Repositories DevTools

Rev

Rev 151 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 151 Rev 165
Line 10... Line 10...
10
'   3) Functions/Subs that are used extennally, are name decorated PUBLIC_
10
'   3) Functions/Subs that are used extennally, are name decorated PUBLIC_
11
'
11
'
12
'
12
'
13
'
13
'
14
%>
14
%>
-
 
15
<!--#include file="release_changed.asp"-->
15
<%
16
<%
16
Dim AutoBuildPermissionDenied
17
Dim AutoBuildPermissionDenied
17
Dim ManualBuildPermissionDenied
18
Dim ManualBuildPermissionDenied
18
Dim RaiseWIPExists
19
Dim RaiseWIPExists
19
 
20
 
Line 67... Line 68...
67
' than the original singular context. Being relocated here allows them to be used in the additional "Bulk Release" context.
68
' than the original singular context. Being relocated here allows them to be used in the additional "Bulk Release" context.
68
'=============================================================================================================================
69
'=============================================================================================================================
69
 
70
 
70
'-----------------------------------------------------------------------------------------------------------------------------
71
'-----------------------------------------------------------------------------------------------------------------------------
71
' USED to approve a pending merge operation. Used internally by the bulk release operation
72
' USED to approve a pending merge operation. Used internally by the bulk release operation
72
Sub PRIVATE_ApproveMerge ( NNrtag_id, NNpv_id )
73
Sub PRIVATE_ApproveMerge ( NNrtag_id, NNpv_id, op)
73
   On Error Resume Next
74
   On Error Resume Next
74
   objEH.ErrorRedirect = TRUE
75
   objEH.ErrorRedirect = TRUE
75
 
76
 
76
   OraDatabase.Parameters.Add "PV_ID",   NNpv_id,    ORAPARM_INPUT, ORATYPE_NUMBER
77
   OraDatabase.Parameters.Add "PV_ID",   NNpv_id,    ORAPARM_INPUT, ORATYPE_NUMBER
77
   OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER
78
   OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER
Line 87... Line 88...
87
   objEH.CatchORA ( OraSession )
88
   objEH.CatchORA ( OraSession )
88
 
89
 
89
   OraDatabase.Parameters.Remove "PV_ID"
90
   OraDatabase.Parameters.Remove "PV_ID"
90
   OraDatabase.Parameters.Remove "RTAG_ID"
91
   OraDatabase.Parameters.Remove "RTAG_ID"
91
   OraDatabase.Parameters.Remove "USER_ID"
92
   OraDatabase.Parameters.Remove "USER_ID"
-
 
93
 
-
 
94
   If Not objEH.LastOraFailed Then
-
 
95
      Dim objRC: Set objRC = New ReleaseChanged
-
 
96
      Dim mode
-
 
97
      If op = "A" Then
-
 
98
        mode = enumRELEASE_CHANGE_MODE_PKG_ADDED
-
 
99
      ElseIf op = "S" Then
-
 
100
        mode = enumRELEASE_CHANGE_MODE_PKG_REMOVED
-
 
101
      End If
-
 
102
      Call objRC.Run_ReleaseChanged(NNrtag_id,NNpv_id,mode,true)
-
 
103
      Set objRC = Nothing
-
 
104
   End If
-
 
105
 
92
End Sub
106
End Sub
93
 
107
 
94
'-----------------------------------------------------------------------------------------------------------------------------
108
'-----------------------------------------------------------------------------------------------------------------------------
95
' USED to approve a pending merge operation. Used externally from the _approve_merge.asp file, loaded when the btnApproveMerge
109
' USED to approve a pending merge operation. Used externally from the _approve_merge.asp file, loaded when the btnApproveMerge
96
' action button is pressed.
110
' action button is pressed.
97
Sub PUBLIC_ApproveMerge ( NNrtag_id, NNpv_id )
111
Sub PUBLIC_ApproveMerge ( NNrtag_id, NNpv_id )
-
 
112
   Dim op: op = ""
-
 
113
   If PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, NNpv_id, "A") Then
-
 
114
     op = "A"
-
 
115
   ElseIf PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, NNpv_id, "S") Then
-
 
116
     op = "S"
-
 
117
   End If 
-
 
118
 
98
   ' validate before carrying out the merge
119
   ' validate before carrying out the merge
99
   If PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, NNpv_id, "A") OR PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, NNpv_id, "S") Then
120
   If op <> "" Then
100
      If PRIVATE_Is_Allowed_To_Approve_Merge(NNrtag_id) Then
121
      If PRIVATE_Is_Allowed_To_Approve_Merge(NNrtag_id) Then
101
         Call PRIVATE_ApproveMerge(parRtag_id, NNpv_id)
122
         Call PRIVATE_ApproveMerge(parRtag_id, NNpv_id, op)
102
      End If
123
      End If
103
   End If
124
   End If
104
End Sub
125
End Sub
105
 
126
 
106
'-----------------------------------------------------------------------------------------------------------------------------
127
'-----------------------------------------------------------------------------------------------------------------------------
Line 266... Line 287...
266
   ' return TRUE if operation was successful, else FALSE
287
   ' return TRUE if operation was successful, else FALSE
267
   If objEH.LastOraFailed Then
288
   If objEH.LastOraFailed Then
268
      PUBLIC_MakeRelease = FALSE
289
      PUBLIC_MakeRelease = FALSE
269
   Else
290
   Else
270
      PUBLIC_MakeRelease = TRUE
291
      PUBLIC_MakeRelease = TRUE
-
 
292
      Dim objRC: Set objRC = New ReleaseChanged
-
 
293
      Call objRC.Run_ReleaseChanged(NNrtag_id,NNpv_id,enumRELEASE_CHANGE_MODE_PKG_RELEASED,true)
-
 
294
      Set objRC = Nothing
271
   End If
295
   End If
272
 
296
 
273
End Function
297
End Function
274
 
298
 
275
 
299
 
Line 536... Line 560...
536
   For Each pvId In initialList
560
   For Each pvId In initialList
537
      If IsNumeric(pvId) Then
561
      If IsNumeric(pvId) Then
538
         ' Test to see if this PV_ID represents a pending SUBTRACTIVE merge operation, and proceed with it if permissions allow
562
         ' Test to see if this PV_ID represents a pending SUBTRACTIVE merge operation, and proceed with it if permissions allow
539
         If PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, pvId, "S") Then
563
         If PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, pvId, "S") Then
540
            If allowedToApproveMerge Then
564
            If allowedToApproveMerge Then
541
               Call PRIVATE_ApproveMerge(NNrtag_id, pvId)
565
               Call PRIVATE_ApproveMerge(NNrtag_id, pvId, "S")
542
            Else
566
            Else
543
               AutoBuildPermissionDenied   = TRUE
567
               AutoBuildPermissionDenied   = TRUE
544
               ManualBuildPermissionDenied = TRUE
568
               ManualBuildPermissionDenied = TRUE
545
            End If
569
            End If
546
         Else
570
         Else
Line 560... Line 584...
560
   ' effect upon the release.
584
   ' effect upon the release.
561
   For Each pvId In remainingList1
585
   For Each pvId In remainingList1
562
      ' Test to see if this PV_ID represents a pending ADDITIVE merge operation, and proceed with it if permissions allow
586
      ' Test to see if this PV_ID represents a pending ADDITIVE merge operation, and proceed with it if permissions allow
563
      If PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, pvId, "A") Then
587
      If PRIVATE_Is_A_Valid_Pending_Merge(NNrtag_id, pvId, "A") Then
564
         If allowedToApproveMerge Then
588
         If allowedToApproveMerge Then
565
            Call PRIVATE_ApproveMerge(NNrtag_id, pvId)
589
            Call PRIVATE_ApproveMerge(NNrtag_id, pvId, "A")
566
         Else
590
         Else
567
            AutoBuildPermissionDenied   = TRUE
591
            AutoBuildPermissionDenied   = TRUE
568
            ManualBuildPermissionDenied = TRUE
592
            ManualBuildPermissionDenied = TRUE
569
         End If
593
         End If
570
      Else
594
      Else