@@ -225,7 +225,7 @@ function FindLatestPackageWorkItem($lang, $packageName, $groupId = $null, $outpu
225225 {
226226 if ($wi.fields [" Custom.Language" ] -ne $lang ) { continue }
227227 if ($wi.fields [" Custom.Package" ] -ne $packageName ) { continue }
228- if ($groupId -and $wi.fields [" Custom.Group " ] -ne $groupId ) { continue }
228+ if ($groupId -and $wi.fields [" Custom.GroupId " ] -ne $groupId ) { continue }
229229
230230 if (! $latestWI ) {
231231 $latestWI = $wi
@@ -258,7 +258,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $groupId = $null, $o
258258 $fields += " System.Tags"
259259 $fields += " Custom.Language"
260260 $fields += " Custom.Package"
261- $fields += " Custom.Group "
261+ $fields += " Custom.GroupId "
262262 $fields += " Custom.PackageDisplayName"
263263 $fields += " System.Title"
264264 $fields += " Custom.PackageType"
@@ -289,7 +289,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $groupId = $null, $o
289289 $query += " AND [Package] = '${packageName} '"
290290 }
291291 if ($groupId ) {
292- $query += " AND [Group ] = '${groupId} '"
292+ $query += " AND [GroupId ] = '${groupId} '"
293293 }
294294 if ($version ) {
295295 $query += " AND [PackageVersionMajorMinor] = '${version} '"
@@ -305,8 +305,8 @@ function FindPackageWorkItem($lang, $packageName, $version, $groupId = $null, $o
305305 foreach ($wi in $workItems )
306306 {
307307 $localKeyArgs = @ ($wi.fields [" Custom.Language" ], $wi.fields [" Custom.Package" ], $wi.fields [" Custom.PackageVersionMajorMinor" ])
308- if (! [string ]::IsNullOrWhiteSpace($wi.fields [" Custom.Group " ])) {
309- $localKeyArgs += $wi.fields [" Custom.Group " ]
308+ if (! [string ]::IsNullOrWhiteSpace($wi.fields [" Custom.GroupId " ])) {
309+ $localKeyArgs += $wi.fields [" Custom.GroupId " ]
310310 }
311311 $localKey = BuildHashKeyNoNull @localKeyArgs
312312 if (! $localKey ) {
@@ -474,10 +474,10 @@ function UpdatePackageWorkItemReleaseState($id, $state, $releaseType, $outputCom
474474
475475function FindOrCreateClonePackageWorkItem ($lang , $pkg , $verMajorMinor , $allowPrompt = $false , $outputCommand = $false , $relatedId = $null , $tag = $null , $ignoreReleasePlannerTests = $true )
476476{
477- $workItem = FindPackageWorkItem - lang $lang - packageName $pkg.Package - version $verMajorMinor - includeClosed $true - outputCommand $outputCommand - tag $tag - ignoreReleasePlannerTests $ignoreReleasePlannerTests - groupId $pkg.Group
477+ $workItem = FindPackageWorkItem - lang $lang - packageName $pkg.Package - version $verMajorMinor - includeClosed $true - outputCommand $outputCommand - tag $tag - ignoreReleasePlannerTests $ignoreReleasePlannerTests - groupId $pkg.GroupId
478478
479479 if (! $workItem ) {
480- $latestVersionItem = FindLatestPackageWorkItem - lang $lang - packageName $pkg.Package - outputCommand $outputCommand - tag $tag - ignoreReleasePlannerTests $ignoreReleasePlannerTests - groupId $pkg.Group
480+ $latestVersionItem = FindLatestPackageWorkItem - lang $lang - packageName $pkg.Package - outputCommand $outputCommand - tag $tag - ignoreReleasePlannerTests $ignoreReleasePlannerTests - groupId $pkg.GroupId
481481 $assignedTo = " me"
482482 $extraFields = @ ()
483483 if ($latestVersionItem ) {
@@ -525,8 +525,16 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
525525 Write-Host " Cannot create or update because one of lang, pkg or verMajorMinor aren't set. [$lang |$ ( $pkg.Package ) |$verMajorMinor ]"
526526 return
527527 }
528+
529+ # PackageProp object uses Group, while other places use GroupId, such as in work item fields and package csv files.
530+ $pkgGroupId = if ($pkg.PSObject.Properties.Name -contains " GroupId" ) {
531+ $pkg.GroupId
532+ } elseif ($pkg.PSObject.Properties.Name -contains " Group" ) {
533+ $pkg.Group
534+ } else {
535+ $null
536+ }
528537 $pkgName = $pkg.Package
529- $pkgGroupId = if ($pkg.PSObject.Properties.Name -contains " GroupId" ) { $pkg.GroupId } else { $pkg.Group }
530538 $pkgDisplayName = $pkg.DisplayName
531539 $pkgType = $pkg.Type
532540 $pkgNewLibrary = $pkg.New
@@ -537,7 +545,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
537545 $fields = @ ()
538546 $fields += " `" Language=${lang} `" "
539547 $fields += " `" Package=${pkgName} `" "
540- $fields += " `" Group =${pkgGroupId} `" "
548+ $fields += " `" GroupId =${pkgGroupId} `" "
541549 $fields += " `" PackageDisplayName=${pkgDisplayName} `" "
542550 $fields += " `" PackageType=${pkgType} `" "
543551 $fields += " `" PackageTypeNewLibrary=${pkgNewLibrary} `" "
@@ -555,7 +563,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
555563
556564 if ($lang -ne $existingItem.fields [" Custom.Language" ]) { $changedField = " Custom.Language" }
557565 if ($pkgName -ne $existingItem.fields [" Custom.Package" ]) { $changedField = " Custom.Package" }
558- if ($pkgGroupId -ne $existingItem.fields [" Custom.Group " ]) { $changedField = " Custom.Group " }
566+ if ($pkgGroupId -ne $existingItem.fields [" Custom.GroupId " ]) { $changedField = " Custom.GroupId " }
559567 if ($verMajorMinor -ne $existingItem.fields [" Custom.PackageVersionMajorMinor" ]) { $changedField = " Custom.PackageVersionMajorMinor" }
560568 if ($pkgDisplayName -ne $existingItem.fields [" Custom.PackageDisplayName" ]) { $changedField = " Custom.PackageDisplayName" }
561569 if ($pkgType -ne [string ]$existingItem.fields [" Custom.PackageType" ]) { $changedField = " Custom.PackageType" }
@@ -1045,7 +1053,7 @@ function UpdatePackageVersions($pkgWorkItem, $plannedVersions, $shippedVersions)
10451053function UpdateValidationStatus ($pkgvalidationDetails , $BuildDefinition , $PipelineUrl )
10461054{
10471055 $pkgName = $pkgValidationDetails.Name
1048- $groupId = $pkgValidationDetails.Group
1056+ $groupId = $pkgValidationDetails.GroupId
10491057 $versionString = $pkgValidationDetails.Version
10501058
10511059 $parsedNewVersion = [AzureEngSemanticVersion ]::new($versionString )
@@ -1295,7 +1303,7 @@ function Update-DevOpsReleaseWorkItem {
12951303
12961304 $packageInfo = [PSCustomObject ][ordered ]@ {
12971305 Package = $packageName
1298- Group = $groupId
1306+ GroupId = $groupId
12991307 DisplayName = $packageDisplayName
13001308 ServiceName = $serviceName
13011309 RepoPath = $packageRepoPath
0 commit comments