Update Group in the work items

This commit is contained in:
ray chen 2025-12-04 22:01:50 +00:00 committed by azure-sdk
parent bd2e0f09ff
commit 7a220586b6

View File

@ -238,7 +238,7 @@ function FindLatestPackageWorkItem($lang, $packageName, $outputCommand = $true,
return $latestWI
}
function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $true, $includeClosed = $false, $ignoreReleasePlannerTests = $true, $tag = $null)
function FindPackageWorkItem($lang, $packageName, $version, $groupId = $null, $outputCommand = $true, $includeClosed = $false, $ignoreReleasePlannerTests = $true, $tag = $null)
{
$key = BuildHashKeyNoNull $lang $packageName $version
if ($key -and $packageWorkItems.ContainsKey($key)) {
@ -253,6 +253,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr
$fields += "System.Tags"
$fields += "Custom.Language"
$fields += "Custom.Package"
$fields += "Custom.Group"
$fields += "Custom.PackageDisplayName"
$fields += "System.Title"
$fields += "Custom.PackageType"
@ -282,6 +283,9 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr
if ($packageName) {
$query += " AND [Package] = '${packageName}'"
}
if ($groupId) {
$query += " AND [Group] = '${groupId}'"
}
if ($version) {
$query += " AND [PackageVersionMajorMinor] = '${version}'"
}
@ -513,6 +517,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
return
}
$pkgName = $pkg.Package
$pkgGroupName = $pkg.Group
$pkgDisplayName = $pkg.DisplayName
$pkgType = $pkg.Type
$pkgNewLibrary = $pkg.New
@ -523,6 +528,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
$fields = @()
$fields += "`"Language=${lang}`""
$fields += "`"Package=${pkgName}`""
$fields += "`"Group=${pkgGroupName}`""
$fields += "`"PackageDisplayName=${pkgDisplayName}`""
$fields += "`"PackageType=${pkgType}`""
$fields += "`"PackageTypeNewLibrary=${pkgNewLibrary}`""
@ -540,6 +546,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
if ($lang -ne $existingItem.fields["Custom.Language"]) { $changedField = "Custom.Language" }
if ($pkgName -ne $existingItem.fields["Custom.Package"]) { $changedField = "Custom.Package" }
if ($pkgGroupName -ne $existingItem.fields["Custom.Group"]) { $changedField = "Custom.Group" }
if ($verMajorMinor -ne $existingItem.fields["Custom.PackageVersionMajorMinor"]) { $changedField = "Custom.PackageVersionMajorMinor" }
if ($pkgDisplayName -ne $existingItem.fields["Custom.PackageDisplayName"]) { $changedField = "Custom.PackageDisplayName" }
if ($pkgType -ne [string]$existingItem.fields["Custom.PackageType"]) { $changedField = "Custom.PackageType" }