@@ -1114,7 +1114,7 @@ function Get-ReleasePlan-Link($releasePlanWorkItemId)
11141114 return $workItem [" fields" ]
11151115}
11161116
1117- function Get-ReleasePlansForCPEXAttestation ($releasePlanWorkItemId = $null , $targetServiceTreeId = $null )
1117+ function Get-ReleasePlansForCPEXAttestation ()
11181118{
11191119 $fields = @ ()
11201120 $fields += " Custom.ProductServiceTreeID"
@@ -1127,32 +1127,23 @@ function Get-ReleasePlansForCPEXAttestation($releasePlanWorkItemId = $null, $tar
11271127 $fieldList = ($fields | ForEach-Object { " [$_ ]" }) -join " , "
11281128
11291129 $query = " SELECT ${fieldList} FROM WorkItems WHERE [System.WorkItemType] = 'Release Plan'"
1130-
1131- if ($releasePlanWorkItemId ){
1132- $query += " AND [System.Id] = '$releasePlanWorkItemId '"
1133- } else {
1134- $query += " AND [System.State] = 'Finished'"
1135- $query += " AND [Custom.AttestationStatus] IN ('', 'Pending')"
1136- $query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
1137- $query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
1138- $query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
1139- $query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
1140- $query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
1141- $query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
1142- $query += " AND [Custom.ProductServiceTreeID] <> ''"
1143- $query += " AND [Custom.ProductLifecycle] <> ''"
1144- $query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
1145- }
1146-
1147- if ($targetServiceTreeId ){
1148- $query += " AND [Custom.ProductServiceTreeID] = '${targetServiceTreeId} '"
1149- }
1130+ $query += " AND [System.State] = 'Finished'"
1131+ $query += " AND [Custom.AttestationStatus] IN ('', 'Pending')"
1132+ $query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
1133+ $query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
1134+ $query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
1135+ $query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
1136+ $query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
1137+ $query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
1138+ $query += " AND [Custom.ProductServiceTreeID] <> ''"
1139+ $query += " AND [Custom.ProductLifecycle] <> ''"
1140+ $query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
11501141
11511142 $workItems = Invoke-Query $fields $query
11521143 return $workItems
11531144}
11541145
1155- function Get-TriagesForCPEXAttestation ($triageWorkItemId = $null , $targetServiceTreeId = $null )
1146+ function Get-TriagesForCPEXAttestation ()
11561147{
11571148 $fields = @ ()
11581149 $fields += " Custom.ProductServiceTreeID"
@@ -1167,25 +1158,16 @@ function Get-TriagesForCPEXAttestation($triageWorkItemId = $null, $targetService
11671158 $fieldList = ($fields | ForEach-Object { " [$_ ]" }) -join " , "
11681159
11691160 $query = " SELECT ${fieldList} FROM WorkItems WHERE [System.WorkItemType] = 'Triage'"
1170-
1171- if ($triageWorkItemId ){
1172- $query += " AND [System.Id] = '$triageWorkItemId '"
1173- } else {
1174- $query += " AND ([Custom.DataplaneAttestationStatus] IN ('', 'Pending') OR [Custom.ManagementPlaneAttestationStatus] IN ('', 'Pending'))"
1175- $query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
1176- $query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
1177- $query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
1178- $query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
1179- $query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
1180- $query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
1181- $query += " AND [Custom.ProductServiceTreeID] <> ''"
1182- $query += " AND [Custom.ProductLifecycle] <> ''"
1183- $query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
1184- }
1185-
1186- if ($targetServiceTreeId ){
1187- $query += " AND [Custom.ProductServiceTreeID] = '$targetServiceTreeId '"
1188- }
1161+ $query += " AND ([Custom.DataplaneAttestationStatus] IN ('', 'Pending') OR [Custom.ManagementPlaneAttestationStatus] IN ('', 'Pending'))"
1162+ $query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
1163+ $query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
1164+ $query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
1165+ $query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
1166+ $query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
1167+ $query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
1168+ $query += " AND [Custom.ProductServiceTreeID] <> ''"
1169+ $query += " AND [Custom.ProductLifecycle] <> ''"
1170+ $query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
11891171
11901172 $workItems = Invoke-Query $fields $query
11911173 return $workItems
0 commit comments