Skip to content

Commit

Permalink
Fix bug 254 as suggested by issue creator (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
techlake authored Jun 16, 2023
1 parent af4b4ec commit c868df0
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions Scripts/Helpers/Build-ExemptionsPlan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -232,31 +232,34 @@ function Build-ExemptionsPlan {
}
else {
# One or more properties have changed
$splatTransformStrings = @( "id/Id" )
if (!$displayNameMatches) {
$splatTransformStrings = @( "id/Id" )
if (!$displayNameMatches) {
$changesStrings += "displayName"
$splatTransformStrings += "displayName/DisplayName"
}
if (!$descriptionMatches) {
$changesStrings += "description"
$splatTransformStrings += "description/Description"
}
$splatTransformStrings += "displayName/DisplayName"
}
if (!$descriptionMatches) {
$changesStrings += "description"
$splatTransformStrings += "description/Description"
}
if (!$policyDefinitionReferenceIdsMatches) {
$changesStrings += "referenceIds"
$splatTransformStrings += "policyDefinitionReferenceIds/PolicyDefinitionReferenceId"
}
if (!$metadataMatches) {
$changesStrings += "metadata"
$changesStrings += "metadata"
$splatTransformStrings += "metadata/Metadata"
}
}
if (!$exemptionCategoryMatches) {
$changesStrings += "exemptionCategory"
$splatTransformStrings += "exemptionCategory/ExemptionCategory"
}
if ($clearExpiration) {
$changesStrings += "exemptionCategory"
$splatTransformStrings += "exemptionCategory/ExemptionCategory"
}
if ($clearExpiration) {
$changesStrings += "clearExpiration"
$splatTransformStrings += "clearExpiration/ClearExpiration"
}
$splatTransformStrings += "clearExpiration/ClearExpiration"
}
elseif (!$expiresOnMatches) {
$changesStrings += "expiresOn"
$splatTransformStrings += "expiresOn/ExpiresOn"

$splatTransformStrings += "expiresOn/ExpiresOn"
}
$changesString = $changesStrings -join ","
$splatTransformString = $splatTransformStrings -join " "
Expand Down

0 comments on commit c868df0

Please sign in to comment.