en-US/about_AzDoProcessRule.help.txt

.NAME
    AzDoProcessRule
 
.SYNOPSIS
    DSC resource for managing rules on a work item type of an Azure DevOps inherited process.
 
.DESCRIPTION
    Manages a conditional rule on a work item type - the "when this, then that" logic that makes a
    field required in a particular state, sets a default, or restricts a transition.
 
.PARAMETER ProcessName
    Required - System.String
    The name of the inherited process.
 
.PARAMETER WorkItemTypeName
    Required - System.String
    The display name of the work item type.
 
.PARAMETER RuleName
    Key - System.String
    The name of the rule.
 
.PARAMETER Conditions
    Write - HashTable[]
    The conditions under which the rule applies.
 
.PARAMETER Actions
    Write - HashTable[]
    The actions the rule performs.
 
.PARAMETER IsDisabled
    Write - System.Boolean
    Whether the rule is disabled. This is the only way to switch off an inherited rule.
 
.EXAMPLE 1
 
This example makes a field required in a particular state.
 
Conditions and actions are written as the API models them, because the vocabulary is large
and grows between API versions.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoProcessRule 'SeverityRequiredWhenActive'
        {
            Ensure = 'Present'
            ProcessName = 'Contoso Agile'
            WorkItemTypeName = 'Incident'
            RuleName = 'Severity required when active'
            Conditions = @(
                @{ conditionType = 'when'; field = 'System.State'; value = 'Active' }
            )
            Actions = @(
                @{ actionType = 'makeRequired'; targetField = 'Custom.Severity' }
            )
        }
    }
}
 
.EXAMPLE 2
 
This example switches off a rule inherited from the parent process.
 
Inherited rules cannot be deleted - disabling is the supported way to turn one off.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoProcessRule 'DisableInheritedRule'
        {
            Ensure = 'Present'
            ProcessName = 'Contoso Agile'
            WorkItemTypeName = 'Bug'
            RuleName = 'Inherited rule name'
            IsDisabled = $true
        }
    }
}