Skip to content

Commit a812c13

Browse files
email bug fix
1 parent fe6bee8 commit a812c13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Standards/Push-CIPPDriftManagement.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ function Push-CippDriftManagement {
3131
Status = $_.status
3232
}
3333
}
34-
$GenerateEmail = New-CIPPAlertTemplate -format 'html' -data $Data -CIPPURL $CIPPURL -Tenant $Item.tenant -InputObject 'driftStandard'
34+
$Data | Add-Member -MemberType NoteProperty -Name 'CIPPAction' -Value @('driftManagement')
35+
$GenerateEmail = New-CIPPAlertTemplate -format 'html' -data $Data -CIPPURL $CIPPURL -Tenant $Item.tenant -InputObject 'driftStandard' -AuditLogLink $drift.standardId
3536
$CIPPAlert = @{
3637
Type = 'email'
3738
Title = $GenerateEmail.title

Modules/CIPPCore/Public/New-CIPPAlertTemplate.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function New-CIPPAlertTemplate {
3131
$Title = "CIPP Alert - Standard Drift Detected for $($Tenant)"
3232
$DataHTML = ($Data | ConvertTo-Html | Out-String).Replace('<table>', ' <table class="table-modern">')
3333
$IntroText = "<p>You've setup your instance to receive alerts when a tenant is drifting away from your standard. This seems to have happened! We've found the following deviations. </p>$dataHTML"
34-
$ButtonUrl = "$CIPPURL/cipp/logs"
34+
$ButtonUrl = "$CIPPURL/tenant/standards/manage-drift?tenantFilter=$($Tenant)&templateId=$($AuditLogLink)"
3535
$ButtonText = 'Investigate and remediate deviations'
3636
$AfterButtonText = 'Click the button above to go to the logbook and investigate the deviations. You can also use the standards page to remediate the deviations.'
3737
}

0 commit comments

Comments
 (0)