turbot/servicenow
steampipe plugin install servicenow

Table: servicenow_sn_chg_rest_change_task - Query ServiceNow Change Tasks using SQL

ServiceNow Change Tasks are a part of the Change Management process in ServiceNow, where each task represents a set of actions required to implement a change in the IT infrastructure. These tasks are created as part of a Change Request and are assigned to various teams for implementation. They help in breaking down the change into manageable tasks and tracking the progress of each task separately.

Table Usage Guide

The servicenow_sn_chg_rest_change_task table provides insights into Change Tasks within ServiceNow Change Management. As an IT Operations Manager, explore task-specific details through this table, including task status, assigned team, and associated metadata. Utilize it to track the progress of each change task, identify bottlenecks, and ensure timely completion of changes in the IT infrastructure.

Examples

What is the state_name distribution of change tasks in the servicenow_sn_chg_rest_change_task table?

Analyze the distribution of change tasks across various states in the Servicenow platform. This is useful to identify which states have the most change tasks, thereby providing insights into areas that may require more attention or resources.

select
state_name,
count(*) as count
from
servicenow_sn_chg_rest_change_task
group by
state_name
order by
count desc;
select
state_name,
count(*) as count
from
servicenow_sn_chg_rest_change_task
group by
state_name
order by
count desc;

How many change tasks have been created by each user in the servicenow_sn_chg_rest_change_task table?

Analyze the distribution of task creation in your system to understand the workload and productivity of each user. This could be useful for assessing individual contributions or identifying potential bottlenecks in your workflow.

select
sys_created_by,
count(*) as count
from
servicenow_sn_chg_rest_change_task
group by
sys_created_by;
select
sys_created_by,
count(*) as count
from
servicenow_sn_chg_rest_change_task
group by
sys_created_by;

How many change tasks have been assigned to each assignment group in the servicenow_sn_chg_rest_change_task table?

Analyze the distribution of assigned tasks among different groups in your service management system. This can help in understanding workload distribution and identifying any potential bottlenecks or uneven task allocation.

select
assignment_group_name,
count(*) as count
from
servicenow_sn_chg_rest_change_task
group by
assignment_group_name;
select
assignment_group_name,
count(*) as count
from
servicenow_sn_chg_rest_change_task
group by
assignment_group_name;

How many change tasks have been assigned to each user and what is their average priority?

Explore the distribution of task assignments and understand the average priority level assigned to each user. This can help in assessing workload and task importance in a team.

select
assigned_to_name,
count(*) as num_tasks_assigned,
avg(priority) as avg_priority
from
servicenow_sn_chg_rest_change_task
group by
assigned_to_name;
select
assigned_to_name,
count(*) as num_tasks_assigned,
avg(priority) as avg_priority
from
servicenow_sn_chg_rest_change_task
group by
assigned_to_name;

How many change tasks have been completed by each user in the last 30 days?

Discover the productivity of each user by counting the number of tasks they have completed in the last 30 days. This is beneficial in assessing individual performance and identifying high-performing team members.

select
assigned_to_name,
count(*) as num_tasks_completed
from
servicenow_sn_chg_rest_change_task
where
state = 3
and sys_updated_on >= now() - interval '30 days'
group by
assigned_to_name;
select
assigned_to_name,
count(*) as num_tasks_completed
from
servicenow_sn_chg_rest_change_task
where
state = 3
and sys_updated_on >= datetime('now', '-30 days')
group by
assigned_to_name;

Schema for servicenow_sn_chg_rest_change_task

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
activebooleanIndicates whether the change task is active.
activity_duetextDue date for the activity associated with the change task.
additional_assignee_listtextAdditional users assigned to the change task.
approvaltextApproval associated with the change task.
approval_historytextApproval history of the change task.
approval_settextApproval set associated with the change task.
assigned_totextUser assigned to the change task.
assigned_to_nametextName of the user assigned to the change task.
assignment_grouptextAssignment group for the change task.
assignment_group_nametextName of the assignment group for the change task.
business_durationtextBusiness duration of the change task.
business_servicetextBusiness service associated with the change task.
calendar_durationtextCalendar duration of the change task.
change_requesttextChange request associated with the change task.
change_request_numbertextNumber of the change request associated with the change task.
change_task_typetextType of the change task.
close_codetextCode indicating the reason for closing the change task.
close_notestextNotes indicating the details of the closure of the change task.
closed_attimestamp with time zoneDate and time when the change task was closed.
closed_bytextUser who closed the change task.
cmdb_citextConfiguration item associated with the change task.
cmdb_ci_nametextName of the configuration item associated with the change task.
commentstextComments added to the change task.
comments_and_work_notestextComments and work notes added to the change task.
companytextCompany associated with the change task.
contact_typetextType of contact associated with the change task.
contracttextContract associated with the change task.
correlation_displaytextDisplay value of the correlation ID for the change task.
correlation_idtextCorrelation ID for the change task.
created_fromtextSource from which the change task was created.
delivery_plantextDelivery plan associated with the change task.
delivery_tasktextDelivery task associated with the change task.
descriptiontextDescription of the change task.
due_datetimestamp with time zoneDue date for the change task.
escalationbigintEscalation associated with the change task.
escalation_nametextName of the escalation associated with the change task.
expected_starttextExpected start date for the change task.
follow_uptextFollow-up details for the change task.
group_listtextList of groups associated with the change task.
impactbigintImpact of the change task.
instance_urltextThe ServiceNow instance URL.
knowledgebooleanIndicates whether the change task is based on knowledge.
locationtextLocation associated with the change task.
made_slabooleanIndicates whether the change task met the service level agreement (SLA).
numbertextNumber of the change task.
on_holdbooleanIndicates whether the change task is on hold.
on_hold_reasontextReason for placing the change task on hold.
opened_attimestamp with time zoneDate and time when the change task was opened.
opened_bytextUser who opened the change task.
ordertextOrder value of the change task.
parenttextParent change task of the current change task.
planned_end_datetimestamp with time zonePlanned end date for the change task.
planned_start_datetimestamp with time zonePlanned start date for the change task.
prioritybigintPriority of the change task.
reassignment_countbigintNumber of times the change task was reassigned.
rejection_gototextDestination for rejection in the change task workflow.
route_reasontextReason for routing the change task.
service_offeringtextService offering associated with the change task.
short_descriptiontextShort description of the change task.
skillstextSkills associated with the change task.
sla_duetextDue date for the service level agreement (SLA) associated with the change task.
sn_esign_documenttextElectronic signature document associated with the change task.
sn_esign_esignature_configurationtextElectronic signature configuration associated with the change task.
sp_connection_nametextSteampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statebigintState of the change task.
state_nametextName of the state of the change task.
sys_class_nametextClass name of the change task record.
sys_created_bytextUser who created the change task.
sys_created_ontimestamp with time zoneDate and time when the change task was created.
sys_domaintextDomain associated with the change task.
sys_domain_pathtextPath of the domain associated with the change task.
sys_idtextUnique system identifier for the change task.
sys_mod_countbigintNumber of times the change task was modified.
sys_tagstextTags associated with the change task.
sys_updated_bytextUser who last updated the change task.
sys_updated_ontimestamp with time zoneDate and time when the change task was last updated.
task_effective_numbertextEffective number of the change task.
time_workedtextAmount of time worked on the change task.
universal_requesttextUniversal request associated with the change task.
upon_approvaltextActions to be performed upon approval of the change task.
upon_rejecttextActions to be performed upon rejection of the change task.
urgencybigintUrgency of the change task.
user_inputtextUser input associated with the change task.
variablestextVariables associated with the change task.
watch_listtextUsers on the watch list for the change task.
wf_activitytextWorkflow activity associated with the change task.
work_endtimestamp with time zoneEnd time of the work performed for the change task.
work_notestextWork notes added to the change task.
work_notes_listtextWork notes associated with the change task.
work_starttextStart time of the work performed for the change task.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- servicenow

You can pass the configuration to the command with the --config argument:

steampipe_export_servicenow --config '<your_config>' servicenow_sn_chg_rest_change_task