.. servicenow.itsm.problem_task_module: problem_task -- Manage ServiceNow problem tasks =============================================== Create, delete or update 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. .. versionadded:: 1.3.0 Examples -------- .. code-block:: yaml+jinja - name: Create problem task servicenow.itsm.problem_task: instance: host: https://instance_id.service-now.com username: user password: pass state: new type: general source_problem: PRB0000001 short_description: User is not receiving email description: User has been unable to receive email for the past 15 minutes priority: low - name: Change state of the problem task servicenow.itsm.problem_task: instance: host: https://instance_id.service-now.com username: user password: pass number: PTASK0010005 state: assess assigned_to: fred.luddy - name: Close problem task servicenow.itsm.problem_task: instance: host: https://instance_id.service-now.com username: user password: pass state: closed number: PTASK0010005 close_code: close_notes: Closed - name: Delete problem task servicenow.itsm.problem_task: instance: host: https://instance_id.service-now.com username: user password: pass state: absent number: PTASK0010005 See Also -------- .. seealso:: - :ref:`modules/servicenow.itsm.problem_task_info_module` - :ref:`modules/servicenow.itsm.problem_module` - :ref:`modules/servicenow.itsm.problem_info_module` Parameters ---------- assigned_to (optional) Specific problem analyst to whom the task is assigned to. | **type**: str assignment_group (optional) Specific group to whom the problem task is assigned to. | **type**: str close_code (optional) Provide information on how the change task was resolved. The change task must have this parameter set prior to transitioning to the ``closed`` state. | **type**: str | **choices**: completed, canceled close_notes (optional) Resolution notes added by the user who closed the change task. The change task must have this parameter set prior to transitioning to the ``closed`` state. | **type**: str configuration_item (optional) Configuration item (CI) that the problem applies to. The CI class of the selected configuration item identifies the type of problem. | **type**: str description (optional) Detailed description of the problem task. | **type**: str due_date (optional) Date within which the problem task should be completed. | **type**: str 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 operate on. Note that contrary to *sys_id*, *number* may not uniquely identify a record. | **type**: str other (optional) Optional remaining parameters. For more information on optional parameters, refer to the ServiceNow create problem task documentation at https://docs.servicenow.com/bundle/quebec-it-service-management/page/product/problem-management/task/create-problem-task.html. | **type**: dict priority (optional) How quickly the service desk should address the problem task. Default choices are ``critical``, ``high``, ``moderate``, ``low``, ``planning``. One can override them by setting *problem_task_mapping.priority*. | **type**: str problem_task_mapping (optional) User mapping for *Problem task* object, where user can override Choice Lists values for objects. | **type**: dict priority (optional) How quickly the service desk should address the problem task. | **type**: dict state (optional) State of problem tasks. If *state* value is ``new``, *short_description* parameter must be filled in. | **type**: dict short_description (optional) Brief description of the problem task. | **type**: str source_problem (optional) Number of the problem for which the problem task is created. | **type**: str state (optional) State of problem tasks. If *state* value is ``new``, *short_description* parameter must be filled in. Default choices are ``new``, ``assess``, ``work_in_progress``, ``closed``, ``absent``. One can override them by setting *problem_task_mapping.state*. | **type**: str sys_id (optional) Unique identifier of the record to operate on. | **type**: str type (optional) Read-only state. Determines whether the problem task is created specifically to investigate the cause of the problem or is a general task. | **type**: str | **choices**: root_cause_analysis, general Return Values ------------- record A list of problem records. **sample**: .. code-block:: yaml active: 'true' activity_due: '' additional_assignee_list: '' approval: not requested 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: '' tranquilitybusiness_service: '' 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: ''