ServiceNow DevOps change request state in Azure DevOps pipeline logs

  • Release version: Washingtondc
  • Updated August 1, 2024
  • 1 minute to read
  • View the change request state and the corresponding policy conditions in the Azure DevOps pipeline console logs whenever the state of a change request is updated.

    You can navigate to the console logs in your Azure DevOps pipeline to view the state of a change request when a change request is created or when the state of the change request is updated. The policy conditions associated with the change request state will also be evaluated and displayed in the logs. For example, if the DevOps Change Request Advanced Automation Policy is activated, the policy conditions will be evaluated and the corresponding decision made (auto-approve/auto-reject/manual-approval) will be displayed in the logs.

    The following change request details are displayed:
    • number
    • details
    • status
    • sys_id
    • type
    • risk
    • priority
    • changeState
    • plannedStartDate
    • plannedEndDate
    • changeRequestURL

    Change state in Azure DevOps pipeline console logs.

    Note:
    changeState is the state of the change request, and status is the status of the step execution.
    The logs for policy conditions will be displayed for the base system change flows as follows:
    • DevOps Model Change Policy: Only logs will be displayed on change creation and when the change state is updated.
    • DevOps Change Request Minimal Automation Policy: Logs along with change decision and policy conditions corresponding to the change decision will be displayed.
    • DevOps Change Request Advanced Automation Policy: Logs along with change decision and policy conditions corresponding to the change decision will be displayed.
    The change policy input and decision conditions are stored in the Decisions [sys_decision_question] table. Logs will be displayed if the following fields and operators are used as input for policy conditions:
    Fields
    • code_coverage
    • commits_without_work_item
    • integration_tests_failed
    • load_tests_failed
    • regression_tests_failed
    • num_of_outages_in_last_7_days
    • num_of_current_outages
    • num_of_open_incidents
    • total_num_of_commits
    • tests_passing_percent
    • risk
    • code_security
    • commits
    Operators
    • <=
    • >=
    • !=
    • =
    • <
    • >
    • ISNOTEMPTY
    • ISEMPTY
    • BETWEEN
    • ANYTHING
    • NSAMEAS
    • SAMEAS
    • GT_FIELD
    • LT_FIELD
    Note:
    If any field is modified in a change policy other than the base system fields, then those fields must be manually added to the flow for policy conditions to be evaluated.

    If a change request does not get created due to any issue, then the reason for the failure and the state is also logged in the console.

    Change failure reason in ADO pipeline console logs.

    Note:
    For Azure DevOps, if change receipt is enabled, the very first log may not be displayed onto the console. That is, when the change is created and is in the New state.