problem_task_info – List ServiceNow problem tasks

Retrieve information about ServiceNow problem tasks.

For more information, refer to the ServiceNow problem management documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/problem-management/concept/c_ProblemManagement.html.

New in version 1.3.0.

Examples

- name: Retrieve all problem tasks
  servicenow.itsm.problem_task_info:
  register: result

- name: Retrieve a specific problem task by its sys_id
  servicenow.itsm.problem_task_info:
    sys_id: 471bfbc7a9fe198101e77a3e10e5d47f
  register: result

- name: Retrieve problem tasks by number
  servicenow.itsm.problem_task_info:
    number: PTASK0007601
  register: result

- name: Retrieve problem tasks that do not contain SAP in its short description
  servicenow.itsm.problem_task_info:
    query:
      - short_description: NOT LIKE SAP
  register: result

- name: Retrieve new problem tasks assigned to abel.tuter or bertie.luby
  servicenow.itsm.problem_task_info:
    query:
      - state: = new
        assigned_to: = abel.tuter
      - state: = new
        assigned_to: = bertie.luby

See Also

See also

  • modules/servicenow.itsm.problem_task_module

  • modules/servicenow.itsm.problem_module

  • modules/servicenow.itsm.problem_info_module

Parameters

instance (optional)

ServiceNow instance information.

type: dict
client_id (optional)

ID of the client application used for OAuth authentication.

If not set, the value of the SN_CLIENT_ID environment variable will be used.

If provided, it requires client_secret.

type: str
client_secret (optional)

Secret associated with client_id. Used for OAuth authentication.

If not set, the value of the SN_CLIENT_SECRET environment variable will be used.

If provided, it requires client_id.

type: str
grant_type (optional)

Grant type used for OAuth authentication.

If not set, the value of the SN_GRANT_TYPE environment variable will be used.

type: str
default: password
choices: password, refresh_token
host (required)

The ServiceNow host name.

If not set, the value of the SN_HOST environment variable will be used.

type: str
password (optional)

Password used for authentication.

If not set, the value of the SN_PASSWORD environment variable will be used.

Required when using basic authentication or when grant_type=password.

type: str
refresh_token (optional)

Refresh token used for OAuth authentication.

If not set, the value of the SN_REFRESH_TOKEN environment variable will be used.

Required when grant_type=refresh_token.

type: str
timeout (optional)

Timeout in seconds for the connection with the ServiceNow instance.

If not set, the value of the SN_TIMEOUT environment variable will be used.

type: float
username (optional)

Username used for authentication.

If not set, the value of the SN_USERNAME environment variable will be used.

Required when using basic authentication or when grant_type=password.

type: str
number (optional)

Number of the record to retrieve.

Note that contrary to sys_id, number may not uniquely identify a record.

type: str
query (optional)

Provides a set of operators for use with filters, condition builders, and encoded queries.

The data type of a field determines what operators are available for it. Refer to the ServiceNow Available Filters Queries documentation at https://docs.servicenow.com/bundle/quebec-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html.

type: list
sys_id (optional)

Unique identifier of the record to retrieve.

type: str

Return Values

records

A list of problem records.

sample:

- active: 'true'
  activity_due: ''
  additional_assignee_list: ''
  approval: not requested
  approval_history: ''
  approval_set: ''
  assigned_to: 7e3bbb173b331300ad3cc9bb34efc4a8
  assignment_group: ''
  business_duration: ''
  business_service: ''
  calendar_duration: ''
  cause_code: ''
  cause_notes: ''
  close_code: ''
  close_notes: ''
  closed_at: ''
  closed_by: ''
  cmdb_ci: 26da329f0a0a0bb400f69d8159bc753d
  comments: ''
  comments_and_work_notes: ''
  company: ''
  contact_type: ''
  contract: ''
  correlation_display: ''
  correlation_id: ''
  delivery_plan: ''
  delivery_task: ''
  description: ''
  due_date: ''
  escalation: '0'
  expected_start: ''
  fix_notes: ''
  follow_up: ''
  group_list: ''
  impact: low
  knowledge: 'false'
  location: ''
  made_sla: 'true'
  number: PTASK0010005
  opened_at: '2020-12-17 10:21:49'
  opened_by: d3dbbf173b331300ad3cc9bb34efc466
  order: ''
  other_reason: ''
  parent: ''
  priority: '2'
  problem: d7296d02c0a801670085e737da016e70
  problem_task_type: rca
  reassignment_count: '0'
  reopen_count: '1'
  reopened_at: '2020-12-17 10:23:10'
  reopened_by: 6816f79cc0a8016401c5a33be04be441
  route_reason: ''
  service_offering: ''
  short_description: SAP outage, please investigate the cause
  sla_due: ''
  started_at: '2020-12-17 10:23:14'
  started_by: 6816f79cc0a8016401c5a33be04be441
  state: '154'
  sys_class_name: problem_task
  sys_created_by: admin
  sys_created_on: '2020-12-17 10:22:25'
  sys_domain: global
  sys_domain_path: /
  sys_id: 5f6bec57531063004247ddeeff7b1216
  sys_mod_count: '5'
  sys_tags: ''
  sys_updated_by: admin
  sys_updated_on: '2020-12-17 10:27:14'
  task_effective_number: PTASK0010005
  time_worked: ''
  universal_request: ''
  upon_approval: proceed
  upon_reject: cancel
  urgency: low
  user_input: ''
  vendor: ''
  watch_list: ''
  work_end: ''
  work_notes: ''
  work_notes_list: ''
  work_start: ''
  workaround: ''