ansible / instruqt

Self-paced instruqt Training material
66 stars 59 forks source link

New servicenow issue: attach-problem (Sandbox id: pfbxlhklgg1v) #526

Closed dpjohnrmarley closed 7 months ago

dpjohnrmarley commented 7 months ago

Trying the template "2 - Attach Problem".

The create a problem step gave a warning:

TASK [Create a problem from incident] **12:05:14 [WARNING]: Encountered unknown value 1 while mapping field state. [WARNING]: Encountered unknown value 1 while mapping field problem_state. changed: [localhost]

The job template completed successfully BUT, I can't see the problem attached to the incident.

My incident (INC0013291) is there, the problem (PRB0041230) is there and assigned to me, but there's no reference to the problem in the incident.

Here's the JSON output from the "Update incident status now that problem has been created" task:

{ "changed": true, "record": { "parent": "", "made_sla": "true", "caused_by": "", "watch_list": "", "upon_reject": "cancel", "sys_updated_on": "2023-11-23 01:05:22", "child_incidents": "0", "origin_table": "", "task_effective_number": "INC0013291", "approval_history": "", "skills": "", "number": "INC0013291", "resolved_by": "", "sys_updated_by": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "opened_by": "88703a2f1beef910b76a0d0fdc4bcbb3", "user_input": "", "sys_created_on": "2023-11-23 00:47:51", "sys_domain": "global", "state": "in_progress", "route_reason": "", "sys_created_by": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "knowledge": "false", "order": "", "calendar_stc": "", "closed_at": "", "cmdb_ci": "", "contract": "", "impact": "low", "active": "true", "work_notes_list": "", "business_service": "", "business_impact": "", "priority": "5", "sys_domain_path": "/", "rfc": "", "time_worked": "", "expected_start": "", "opened_at": "2023-11-23 00:47:51", "business_duration": "", "group_list": "", "work_end": "", "caller_id": "88703a2f1beef910b76a0d0fdc4bcbb3", "reopened_time": "", "resolved_at": "", "approval_set": "", "subcategory": "", "work_notes": "", "universal_request": "", "short_description": "User created a new incident using Ansible Automation Platform", "close_code": "", "correlation_display": "", "work_start": "", "assignment_group": "", "additional_assignee_list": "", "business_stc": "", "cause": "", "description": "User **** successfully created a new incident!", "origin_id": "", "calendar_duration": "", "close_notes": "", "notify": "1", "service_offering": "", "sys_class_name": "incident", "closed_by": "", "follow_up": "", "parent_incident": "", "sys_id": "6d8136a387a6f9105d60da083cbb357b", "contact_type": "email", "reopened_by": "", "incident_state": "2", "urgency": "low", "problem_id": "PRB0041230", "company": "", "reassignment_count": "0", "activity_due": "", "assigned_to": "", "severity": "3", "comments": "", "approval": "not requested", "sla_due": "", "comments_and_work_notes": "", "due_date": "", "sys_mod_count": "1", "reopen_count": "0", "sys_tags": "", "escalation": "", "upon_approval": "proceed", "correlation_id": "", "location": "", "category": "inquiry", "attachments": [] }, "diff": { "before": { "parent": "", "made_sla": "true", "caused_by": "", "watch_list": "", "upon_reject": "cancel", "sys_updated_on": "2023-11-23 00:47:51", "child_incidents": "0", "origin_table": "", "task_effective_number": "INC0013291", "approval_history": "", "skills": "", "number": "INC0013291", "resolved_by": "", "sys_updated_by": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "opened_by": "88703a2f1beef910b76a0d0fdc4bcbb3", "user_input": "", "sys_created_on": "2023-11-23 00:47:51", "sys_domain": "global", "state": "new", "route_reason": "", "sys_created_by": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "knowledge": "false", "order": "", "calendar_stc": "", "closed_at": "", "cmdb_ci": "", "contract": "", "impact": "low", "active": "true", "work_notes_list": "", "business_service": "", "business_impact": "", "priority": "5", "sys_domain_path": "/", "rfc": "", "time_worked": "", "expected_start": "", "opened_at": "2023-11-23 00:47:51", "business_duration": "", "group_list": "", "work_end": "", "caller_id": "88703a2f1beef910b76a0d0fdc4bcbb3", "reopened_time": "", "resolved_at": "", "approval_set": "", "subcategory": "", "work_notes": "", "universal_request": "", "short_description": "User created a new incident using Ansible Automation Platform", "close_code": "", "correlation_display": "", "work_start": "", "assignment_group": "", "additional_assignee_list": "", "business_stc": "", "cause": "", "description": "User **** successfully created a new incident!", "origin_id": "", "calendar_duration": "", "close_notes": "", "notify": "1", "service_offering": "", "sys_class_name": "incident", "closed_by": "", "follow_up": "", "parent_incident": "", "sys_id": "6d8136a387a6f9105d60da083cbb357b", "contact_type": "email", "reopened_by": "", "incident_state": "1", "urgency": "low", "problem_id": "", "company": "", "reassignment_count": "0", "activity_due": "", "assigned_to": "", "severity": "3", "comments": "", "approval": "not requested", "sla_due": "", "comments_and_work_notes": "", "due_date": "", "sys_mod_count": "0", "reopen_count": "0", "sys_tags": "", "escalation": "", "upon_approval": "proceed", "correlation_id": "", "location": "", "category": "inquiry", "attachments": [] }, "after": { "parent": "", "made_sla": "true", "caused_by": "", "watch_list": "", "upon_reject": "cancel", "sys_updated_on": "2023-11-23 01:05:22", "child_incidents": "0", "origin_table": "", "task_effective_number": "INC0013291", "approval_history": "", "skills": "", "number": "INC0013291", "resolved_by": "", "sys_updated_by": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "opened_by": "88703a2f1beef910b76a0d0fdc4bcbb3", "user_input": "", "sys_created_on": "2023-11-23 00:47:51", "sys_domain": "global", "state": "in_progress", "route_reason": "", "sys_created_by": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "knowledge": "false", "order": "", "calendar_stc": "", "closed_at": "", "cmdb_ci": "", "contract": "", "impact": "low", "active": "true", "work_notes_list": "", "business_service": "", "business_impact": "", "priority": "5", "sys_domain_path": "/", "rfc": "", "time_worked": "", "expected_start": "", "opened_at": "2023-11-23 00:47:51", "business_duration": "", "group_list": "", "work_end": "", "caller_id": "88703a2f1beef910b76a0d0fdc4bcbb3", "reopened_time": "", "resolved_at": "", "approval_set": "", "subcategory": "", "work_notes": "", "universal_request": "", "short_description": "User created a new incident using Ansible Automation Platform", "close_code": "", "correlation_display": "", "work_start": "", "assignment_group": "", "additional_assignee_list": "", "business_stc": "", "cause": "", "description": "User **** successfully created a new incident!", "origin_id": "", "calendar_duration": "", "close_notes": "", "notify": "1", "service_offering": "", "sys_class_name": "incident", "closed_by": "", "follow_up": "", "parent_incident": "", "sys_id": "6d8136a387a6f9105d60da083cbb357b", "contact_type": "email", "reopened_by": "", "incident_state": "2", "urgency": "low", "problem_id": "PRB0041230", "company": "", "reassignment_count": "0", "activity_due": "", "assigned_to": "", "severity": "3", "comments": "", "approval": "not requested", "sla_due": "", "comments_and_work_notes": "", "due_date": "", "sys_mod_count": "1", "reopen_count": "0", "sys_tags": "", "escalation": "", "upon_approval": "proceed", "correlation_id": "", "location": "", "category": "inquiry", "attachments": [] } }, "invocation": { "module_args": { "number": "INC0013291", "state": "in_progress", "other": { "problem_id": "PRB0041230" }, "instance": { "host": "https://ansible.service-now.com", "username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "grant_type": "password", "client_id": null, "client_secret": null, "refresh_token": null, "timeout": null }, "sys_id": null, "attachments": null, "incident_mapping": null, "hold_reason": null, "caller": null, "short_description": null, "description": null, "impact": null, "urgency": null, "close_code": null, "close_notes": null } }, "_ansible_no_log": null, "item": { "number": "INC0013291", "opened_at": "2023-11-23 00:47:51" }, "ansible_loop_var": "item", "_ansible_item_label": { "number": "INC0013291", "opened_at": "2023-11-23 00:47:51" } }

cloin commented 7 months ago

Duplicate of #490