Subversion Repositories DevTools

Rev

Rev 5957 | Rev 7022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5957 Rev 6184
Line 123... Line 123...
123
   'Case Else
123
   'Case Else
124
   '   DaemonInstructionRepeatString = "N/A"
124
   '   DaemonInstructionRepeatString = "N/A"
125
   'End Select
125
   'End Select
126
 
126
 
127
End Function
127
End Function
128
'--------------------------------------------------------------------------------------------
-
 
129
' Queries the database to get a comma-seperated list of op-codes for a given release, and
-
 
130
' converts them into a comma seperated list of operation names for display purposes
-
 
131
' This is used in _package_common.asp to provide visual indication to RM users that daemon
-
 
132
' instructions for the release have been created.
-
 
133
'--------------------------------------------------------------------------------------------
-
 
134
Function GetOpCodeListForRtagId( pretext, nRtag_id, posttext )
-
 
135
   Dim opCodeListString
-
 
136
   Dim opCodeList
-
 
137
   Dim opCodeStr
-
 
138
   GetOpCodeListForRtagId = ""
-
 
139
 
-
 
140
   On Error Resume Next
-
 
141
 
-
 
142
   objEH.TryORA ( OraSession )
-
 
143
 
-
 
144
   OraDatabase.Parameters.Add "OP_CODE_LIST", NULL, ORAPARM_OUTPUT, ORATYPE_VARCHAR2
-
 
145
 
-
 
146
   OraDatabase.ExecuteSQL _
-
 
147
   "BEGIN :OP_CODE_LIST := PK_BUILDAPI.daemon_ops_for_rtag("& nRtag_id & "); END;"
-
 
148
 
-
 
149
   objEH.CatchORA ( OraSession )
-
 
150
 
-
 
151
   opCodeListString  = OraDatabase.Parameters("OP_CODE_LIST").Value
-
 
152
 
-
 
153
   OraDatabase.Parameters.Remove "OP_CODE_LIST"
-
 
154
 
-
 
155
   If NOT IsNull(opCodeListString) AND opCodeListString <> "" Then
-
 
156
      opCodeList = Split(opCodeListString, ",")
-
 
157
      For Each opCodeStr In opCodeList
-
 
158
         If NOT IsNull(opCodeStr) AND opCodeStr <> "" Then
-
 
159
            GetOpCodeListForRtagId = GetOpCodeListForRtagId + DaemonInstructionOperationName(opCodeStr)
-
 
160
         End If
-
 
161
      Next
-
 
162
   End If
-
 
163
 
-
 
164
   If GetOpCodeListForRtagId <> "" Then
-
 
165
      GetOpCodeListForRtagId = pretext & GetOpCodeListForRtagId + posttext
-
 
166
   End If
-
 
167
End Function
-
 
168
'--------------------------------------------------------------------------------------------
-
 
169
' Queries the database to get a comma-seperated list of op-codes for a given release and package
-
 
170
' version, and converts them into a comma seperated list of operation names for display purposes
-
 
171
' This is used in _package_common.asp to provide visual indication to RM users that daemon
-
 
172
' instructions for the release and package version have been created.
-
 
173
'--------------------------------------------------------------------------------------------
-
 
174
Function GetOpCodeListForRtagIdAndPvId( pretext, nRtag_id, nPv_id, posttext )
-
 
175
   Dim opCodeListString
-
 
176
   Dim opCodeList
-
 
177
   Dim opCodeStr
-
 
178
 
-
 
179
   GetOpCodeListForRtagIdAndPvId = ""
-
 
180
 
-
 
181
   On Error Resume Next
-
 
182
 
-
 
183
   If (NOT IsNull(nRtag_id)) AND nRtag_id <> "" Then
-
 
184
 
-
 
185
      objEH.TryORA ( OraSession )
-
 
186
 
-
 
187
      OraDatabase.Parameters.Add "OP_CODE_LIST", NULL, ORAPARM_OUTPUT, ORATYPE_VARCHAR2
-
 
188
 
-
 
189
      If (NOT IsNull(nPv_id)) AND nPv_id <> "" Then
-
 
190
         OraDatabase.ExecuteSQL _
-
 
191
         "BEGIN :OP_CODE_LIST := PK_BUILDAPI.daemon_ops_for_rtag_pvid("& nRtag_id & "," & nPv_id & "); END;"
-
 
192
      Else
-
 
193
         OraDatabase.ExecuteSQL _
-
 
194
         "BEGIN :OP_CODE_LIST := PK_BUILDAPI.daemon_ops_for_rtag("& nRtag_id & "); END;"
-
 
195
      End If
-
 
196
 
-
 
197
      objEH.CatchORA ( OraSession )
-
 
198
 
-
 
199
      opCodeListString  = OraDatabase.Parameters("OP_CODE_LIST").Value
-
 
200
 
-
 
201
      OraDatabase.Parameters.Remove "OP_CODE_LIST"
-
 
202
 
-
 
203
      If NOT IsNull(opCodeListString) AND opCodeListString <> "" Then
-
 
204
         opCodeList = Split(opCodeListString, ",")
-
 
205
         For Each opCodeStr In opCodeList
-
 
206
            If NOT IsNull(opCodeStr) AND opCodeStr <> "" Then
-
 
207
               GetOpCodeListForRtagIdAndPvId = GetOpCodeListForRtagIdAndPvId + DaemonInstructionOperationName(opCodeStr)
-
 
208
            End If
-
 
209
         Next
-
 
210
      End If
-
 
211
 
-
 
212
   End If
-
 
213
 
-
 
214
   If GetOpCodeListForRtagIdAndPvId <> "" Then
-
 
215
      GetOpCodeListForRtagIdAndPvId = pretext & GetOpCodeListForRtagIdAndPvId + posttext
-
 
216
   End If
-
 
217
End Function
-
 
218
'--------------------------------------------------------------------------------------------
128
'--------------------------------------------------------------------------------------'--------------------------------------------------------------------------------------------
219
' Function to inform caller of whether the user is allowed to reset the daemon instructions
129
' Function to inform caller of whether the user is allowed to reset the daemon instructions
220
' in-progress flag
130
' in-progress flag
221
'--------------------------------------------------------------------------------------------
131
'--------------------------------------------------------------------------------------------
222
Function UserAllowedToResetInProgress
132
Function UserAllowedToResetInProgress
223
   UserAllowedToResetInProgress = True
133
   UserAllowedToResetInProgress = True
Line 235... Line 145...
235
'--------------------------------------------------------------------------------------------
145
'--------------------------------------------------------------------------------------------
236
Function HandleValidateDaemonInstructionError(nOpCode, retERRmsg, ByRef sErrorMsg)
146
Function HandleValidateDaemonInstructionError(nOpCode, retERRmsg, ByRef sErrorMsg)
237
   Dim s
147
   Dim s
238
 
148
 
239
   s = ""
149
   s = ""
240
 
-
 
-
 
150
'retERRmsg = "enum_MSG_BROKEN_DEPENDENCIES_FOUND"
241
   HandleValidateDaemonInstructionError = True
151
   HandleValidateDaemonInstructionError = True
242
 
152
 
243
   If NOT IsNull(retERRmsg) Then
153
   If NOT IsNull(retERRmsg) Then
244
      ' Exclusions -
154
      ' Exclusions -
245
      ' 1) Ignore "unit tests not supplied" error for ripple build package daemon instruction
155
      ' 1) Ignore "unit tests not supplied" error for ripple build package daemon instruction
Line 268... Line 178...
268
            s = "Some dependencies of this package are still not released. Release them first before trying to add a daemon instruction to this package."
178
            s = "Some dependencies of this package are still not released. Release them first before trying to add a daemon instruction to this package."
269
         Case Else
179
         Case Else
270
            s = "Correct any errors in the release notes, and try again."
180
            s = "Correct any errors in the release notes, and try again."
271
         End Select
181
         End Select
272
 
182
 
273
         sErrorMsg = "Cannot add this daemon instruction<br><br>" & s
183
         sErrorMsg = "Cannot add this daemon instruction<br>" & s
274
 
184
 
275
         HandleValidateDaemonInstructionError = False
185
         HandleValidateDaemonInstructionError = False
276
      End If
186
      End If
277
   End If
187
   End If
278
 
-
 
279
End Function
188
End Function
280
 
189
 
281
Function ValidateDaemonInstruction(nOpCode, nRtag_id, nPv_id)
190
Function ValidateDaemonInstruction(nOpCode, nRtag_id, nPv_id, ByRef sErrorMsg)
282
   Dim retERRmsg
191
   Dim retERRmsg
283
   Dim retALRTmsg
192
   Dim retALRTmsg
284
   Dim retParameters
193
   Dim retParameters
285
   Dim pkgType
194
   Dim pkgType
286
   Dim s
195
   Dim s
287
   Dim sErrorMsg
-
 
288
   s = ""
196
   s = ""
289
   pkgType = 0
197
   pkgType = 0
290
 
198
 
291
   ValidateDaemonInstruction = True
199
   ValidateDaemonInstruction = True
292
 
200
 
Line 300... Line 208...
300
      Call CheckRequirementsForMakePending ( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
208
      Call CheckRequirementsForMakePending ( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
301
      If IsNull(retERRmsg) Then
209
      If IsNull(retERRmsg) Then
302
         ' Check broken dependencies, missing dependencies, unofficial dependencies, bad package info, reason for version, unit test
210
         ' Check broken dependencies, missing dependencies, unofficial dependencies, bad package info, reason for version, unit test
303
         Call CheckRequirementsForMakeRelease( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
211
         Call CheckRequirementsForMakeRelease( nPv_id, nRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
304
      End If
212
      End If
-
 
213
 
-
 
214
      ' Process retERRmsg into an error message 
305
      ValidateDaemonInstruction = HandleValidateDaemonInstructionError(nOpCode,retERRmsg,sErrorMsg)
215
      ValidateDaemonInstruction = HandleValidateDaemonInstructionError(nOpCode,retERRmsg,sErrorMsg)
306
 
216
 
307
      If Not ValidateDaemonInstruction Then
-
 
308
        Call RaiseMsg(enum_MSG_ERROR, sErrorMsg)
-
 
309
      End If
-
 
310
   Case OP_CODE_1_TEST_BUILD_PACKAGE
217
   Case OP_CODE_1_TEST_BUILD_PACKAGE
311
      ValidateDaemonInstruction = True ' no validation checks for this instruction
218
      ValidateDaemonInstruction = True ' no validation checks for this instruction
312
 
219
 
313
   Case Else
220
   Case Else
-
 
221
 
314
      Call RaiseMsg(enum_MSG_ERROR, "Attempt to add an unknown daemon instruction")
222
      sErrorMsg = "Attempt to add an unknown daemon instruction type"
315
      ValidateDaemonInstruction = False
223
      ValidateDaemonInstruction = False
316
   End Select
224
   End Select
-
 
225
 
317
End Function
226
End Function
318
'------------------------------------------------------------------------------------------------------------------------------------------
227
'------------------------------------------------------------------------------------------------------------------------------------------
319
Function DaemonInstructionPreventsEditing(nRtag_id, nPv_id)
228
Function DaemonInstructionPreventsEditing(nRtag_id, nPv_id)
320
 
229
 
321
   Dim rsQry
230
   Dim rsQry