| Line 655... |
Line 655... |
| 655 |
Call RaiseMsg( enum_MSG_PERMISSION_PROBLEMS_BULK_RELEASE & "?rtag_id="& request("rtag_id") & "&pv_id="& request("pv_id") & "", "" )
|
655 |
Call RaiseMsg( enum_MSG_PERMISSION_PROBLEMS_BULK_RELEASE & "?rtag_id="& request("rtag_id") & "&pv_id="& request("pv_id") & "", "" )
|
| 656 |
End If
|
656 |
End If
|
| 657 |
|
657 |
|
| 658 |
End Sub
|
658 |
End Sub
|
| 659 |
'-----------------------------------------------------------------------------------------------------------------------------
|
659 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
660 |
'=============================================================================================================================
|
| - |
|
661 |
' MAKING A BULK REJECT from a list of PV_IDs for a specified release
|
| - |
|
662 |
'
|
| - |
|
663 |
' This section contains the new "Bulk Reject' code. This function is tied to the use of the make bulk reject button.
|
| - |
|
664 |
'
|
| - |
|
665 |
'=============================================================================================================================
|
| 660 |
|
666 |
|
| - |
|
667 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
668 |
' This public function is called from the make_bulk_reject.asp file, loaded when a user presses the Make Bulk Reject
|
| - |
|
669 |
' button when viewing items on the Pending Tab of a release area.
|
| - |
|
670 |
'
|
| - |
|
671 |
' The function processes a list of PV_ID's that cam from the pending tab of a release, formed from each item whose checkbox
|
| - |
|
672 |
' was checked. There are 3 different types of item to deal with:
|
| - |
|
673 |
' 1) Subtractive merge operations
|
| - |
|
674 |
' 2) Additive merge operations
|
| - |
|
675 |
' 3) Manual/Auto build items
|
| - |
|
676 |
'
|
| - |
|
677 |
'
|
| - |
|
678 |
' Parameters:
|
| - |
|
679 |
' NNrtag_id The release area
|
| - |
|
680 |
' NN_pv_id_list A list of PV_IDs representing pending items to be approved for release or merge.
|
| - |
|
681 |
'
|
| - |
|
682 |
Sub PUBLIC_MakeBulkReject (NNrtag_id, NN_pv_id_list)
|
| - |
|
683 |
Dim initialList ' holds all items
|
| - |
|
684 |
Dim pvId
|
| - |
|
685 |
Dim allowedToApproveMerge
|
| - |
|
686 |
Dim errorSeen
|
| - |
|
687 |
|
| - |
|
688 |
' Init
|
| - |
|
689 |
errorSeen = 0
|
| - |
|
690 |
|
| - |
|
691 |
' determine in advance if user is allowed to approve merges
|
| - |
|
692 |
allowedToApproveMerge = PRIVATE_Is_Allowed_To_Approve_Merge(NNrtag_id)
|
| - |
|
693 |
|
| - |
|
694 |
If allowedToApproveMerge Then
|
| - |
|
695 |
' Remove any spaces and split the pv_id list into a string array
|
| - |
|
696 |
initialList = Split ( Replace(NN_pv_id_list, " ", "" ), "," )
|
| - |
|
697 |
For Each pvId In initialList
|
| - |
|
698 |
Call PRIVATE_MakeReject(NNrtag_id,pvId, errorSeen)
|
| - |
|
699 |
Next
|
| - |
|
700 |
If errorSeen <> 0 Then
|
| - |
|
701 |
Call RaiseMsg( enum_MSG_ERROR & "?rtag_id="& request("rtag_id") & "&pv_id="& request("pv_id"), _
|
| - |
|
702 |
"An error was encounted rejecting one or more of the packages.<p>Packages that have not been rejected are in the 'Pending' state." )
|
| - |
|
703 |
End If
|
| - |
|
704 |
Else
|
| - |
|
705 |
Call RaiseMsg( enum_MSG_ERROR & "?rtag_id="& request("rtag_id") & "&pv_id="& request("pv_id"), _
|
| - |
|
706 |
"You do not appear to have permissions to perform the Bulk Reject operation" )
|
| - |
|
707 |
End If
|
| - |
|
708 |
End Sub
|
| - |
|
709 |
|
| - |
|
710 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
711 |
' This public function is called from the make_bulk_reject.asp file, loaded when a user presses the Make Bulk Reject
|
| - |
|
712 |
' Private function to reject a package-version
|
| 661 |
|
713 |
|
| - |
|
714 |
|
| - |
|
715 |
Sub PRIVATE_MakeReject(NNrtag_id,NNpvId, ByRef NNerrorSeen)
|
| - |
|
716 |
objEH.TryORA ( OraSession )
|
| - |
|
717 |
On Error Resume Next
|
| - |
|
718 |
|
| - |
|
719 |
OraDatabase.Parameters.Add "PV_ID", NNpvId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| - |
|
720 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| - |
|
721 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| - |
|
722 |
|
| - |
|
723 |
OraDatabase.ExecuteSQL _
|
| - |
|
724 |
"BEGIN "&_
|
| - |
|
725 |
" PK_ENVIRONMENT.MAKE_REJECT ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
|
| - |
|
726 |
"END; "
|
| - |
|
727 |
|
| - |
|
728 |
objEH.CatchORA ( OraSession )
|
| - |
|
729 |
|
| - |
|
730 |
OraDatabase.Parameters.Remove "PV_ID"
|
| - |
|
731 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| - |
|
732 |
OraDatabase.Parameters.Remove "USER_ID"
|
| - |
|
733 |
|
| - |
|
734 |
End Sub
|
| - |
|
735 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 662 |
%>
|
736 |
%>
|