diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ebf11336..40fdc239 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,32 @@ servicenow.itsm Release Notes .. contents:: Topics +v1.3.0 +====== + +Release Summary +--------------- + +This is the minor release of the ``servicenow.itsm`` collection. +This changelog contains all changes to the modules in this collection that +have been added after the release of ``servicenow.itsm`` 1.2.0. + + +Minor Changes +------------- + +- client - Changed the base URL path of the HTTP client for all requests from `/api/now` to `/` +- now - Enhance inventory with additional groups from CMDB relations (https://github.com/ansible-collections/servicenow.itsm/issues/108). +- table.py - add change_request and configuration item search options. + +New Modules +----------- + +- servicenow.itsm.change_request_task - Manage ServiceNow change request tasks +- servicenow.itsm.change_request_task_info - List ServiceNow change request tasks +- servicenow.itsm.problem_task - Manage ServiceNow problem tasks +- servicenow.itsm.problem_task_info - List ServiceNow problem tasks + v1.2.0 ====== diff --git a/README.md b/README.md index 679c2f2c..22c64010 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Name | Description --- | --- [servicenow.itsm.change_request](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.change_request_module.rst)|Manage ServiceNow change requests [servicenow.itsm.change_request_info](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.change_request_info_module.rst)|List ServiceNow change requests +[servicenow.itsm.change_request_task](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.change_request_task_module.rst)|Manage ServiceNow change request tasks +[servicenow.itsm.change_request_task_info](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.change_request_task_info_module.rst)|List ServiceNow change request tasks [servicenow.itsm.configuration_item](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.configuration_item_module.rst)|Manage ServiceNow configuration items [servicenow.itsm.configuration_item_batch](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.configuration_item_batch_module.rst)|Manage ServiceNow configuration items in batch mode [servicenow.itsm.configuration_item_info](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.configuration_item_info_module.rst)|List ServiceNow configuration item @@ -38,6 +40,8 @@ Name | Description [servicenow.itsm.incident_info](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.incident_info_module.rst)|List ServiceNow incidents [servicenow.itsm.problem](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.problem_module.rst)|Manage ServiceNow problems [servicenow.itsm.problem_info](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.problem_info_module.rst)|List ServiceNow problems +[servicenow.itsm.problem_task](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.problem_task_module.rst)|Manage ServiceNow problem tasks +[servicenow.itsm.problem_task_info](https://github.com/ansible-collections/servicenow.itsm/blob/main/docs/servicenow.itsm.problem_task_info_module.rst)|List ServiceNow problem tasks diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 1fef31ed..7334fcb8 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -84,3 +84,36 @@ releases: name: configuration_item_batch namespace: '' release_date: '2021-09-08' + 1.3.0: + changes: + minor_changes: + - client - Changed the base URL path of the HTTP client for all requests from + `/api/now` to `/` + - now - Enhance inventory with additional groups from CMDB relations (https://github.com/ansible-collections/servicenow.itsm/issues/108). + - table.py - add change_request and configuration item search options. + release_summary: 'This is the minor release of the ``servicenow.itsm`` collection. + + This changelog contains all changes to the modules in this collection that + + have been added after the release of ``servicenow.itsm`` 1.2.0. + + ' + fragments: + - change_request_task.yaml + - client-change-base-path.yaml + - enhanced-inventory.yaml + - 1.3.yml + modules: + - description: Manage ServiceNow change request tasks + name: change_request_task + namespace: '' + - description: List ServiceNow change request tasks + name: change_request_task_info + namespace: '' + - description: Manage ServiceNow problem tasks + name: problem_task + namespace: '' + - description: List ServiceNow problem tasks + name: problem_task_info + namespace: '' + release_date: '2022-03-16' diff --git a/changelogs/fragments/change_request_task.yaml b/changelogs/fragments/change_request_task.yaml deleted file mode 100644 index ab6fec12..00000000 --- a/changelogs/fragments/change_request_task.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - table.py - add change_request and configuration item search options. diff --git a/changelogs/fragments/client-change-base-path.yaml b/changelogs/fragments/client-change-base-path.yaml deleted file mode 100644 index db1d61c7..00000000 --- a/changelogs/fragments/client-change-base-path.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: -- client - Changed the base URL path of the HTTP client for all requests from `/api/now` to `/` \ No newline at end of file diff --git a/changelogs/fragments/enhanced-inventory.yaml b/changelogs/fragments/enhanced-inventory.yaml deleted file mode 100644 index 6391ba69..00000000 --- a/changelogs/fragments/enhanced-inventory.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: -- now - Enhance inventory with additional groups from CMDB relations (https://github.com/ansible-collections/servicenow.itsm/issues/108). diff --git a/docs/servicenow.itsm.change_request_info_module.rst b/docs/servicenow.itsm.change_request_info_module.rst index f7795a26..4747d001 100644 --- a/docs/servicenow.itsm.change_request_info_module.rst +++ b/docs/servicenow.itsm.change_request_info_module.rst @@ -34,6 +34,106 @@ Parameters Choices/Defaults Comments + + +
+ change_request_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+ + + + +
User mapping for Change request object, where user can override Choice Lists values for objects.
+ + + + + +
+ impact + +
+ dictionary +
+ + + + +
Impact is a measure of the effect of an incident, problem, or change on business processes.
+ + + + + +
+ priority + +
+ dictionary +
+ + + + +
Priority is based on impact and urgency, and it identifies how quickly the service desk should address the task.
+ + + + + +
+ risk + +
+ dictionary +
+ + + + +
The risk level for the change.
+ + + + + +
+ state + +
+ dictionary +
+ + + + +
The state of the change request.
+
If state value is assess or authorize or scheduled or implement or review or closed, assignment_group parameter must be filled in. In case that any field is renamed, that check is not performed there.
+
For more information on state model and transition, refer to the ServiceNow documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/change-management/concept/c_ChangeStateModel.html
+
Special value that can not be overridden is absent, which would remove a change request from ServiceNow.
+ + + + + +
+ urgency + +
+ dictionary +
+ + + + +
The extent to which resolution of an change request can bear delay.
+ + +
diff --git a/docs/servicenow.itsm.change_request_module.rst b/docs/servicenow.itsm.change_request_module.rst index 5d75d611..e7e4b6e7 100644 --- a/docs/servicenow.itsm.change_request_module.rst +++ b/docs/servicenow.itsm.change_request_module.rst @@ -145,6 +145,106 @@ Parameters
The category of the change request.
+ + +
+ change_request_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+ + + + +
User mapping for Change request object, where user can override Choice Lists values for objects.
+ + + + + +
+ impact + +
+ dictionary +
+ + + + +
Impact is a measure of the effect of an incident, problem, or change on business processes.
+ + + + + +
+ priority + +
+ dictionary +
+ + + + +
Priority is based on impact and urgency, and it identifies how quickly the service desk should address the task.
+ + + + + +
+ risk + +
+ dictionary +
+ + + + +
The risk level for the change.
+ + + + + +
+ state + +
+ dictionary +
+ + + + +
The state of the change request.
+
If state value is assess or authorize or scheduled or implement or review or closed, assignment_group parameter must be filled in. In case that any field is renamed, that check is not performed there.
+
For more information on state model and transition, refer to the ServiceNow documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/change-management/concept/c_ChangeStateModel.html
+
Special value that can not be overridden is absent, which would remove a change request from ServiceNow.
+ + + + + +
+ urgency + +
+ dictionary +
+ + + + +
The extent to which resolution of an change request can bear delay.
+ + +
diff --git a/docs/servicenow.itsm.change_request_task_info_module.rst b/docs/servicenow.itsm.change_request_task_info_module.rst new file mode 100644 index 00000000..349e1e26 --- /dev/null +++ b/docs/servicenow.itsm.change_request_task_info_module.rst @@ -0,0 +1,375 @@ +.. _servicenow.itsm.change_request_task_info_module: + + +**************************************** +servicenow.itsm.change_request_task_info +**************************************** + +**List ServiceNow change request tasks** + + +Version added: 1.3.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Retrieve information about ServiceNow change request tasks. +- For more information, refer to the ServiceNow change management documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/change-management/concept/c_ITILChangeManagement.html. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ change_request_task_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+
+ +
User mapping for Change request task object, where user can override Choice Lists values for objects.
+
+
+ state + +
+ dictionary +
+
+ +
The state of the change request task.
+
Cannot be changed to pending when on_hold is true (module fails and does nothing).
+
+
+ instance + +
+ dictionary +
+
+ +
ServiceNow instance information.
+
+
+ client_id + +
+ string +
+
+ +
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.
+
+
+ client_secret + +
+ string +
+
+ +
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.
+
+
+ grant_type + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+
    Choices: +
  • password ←
  • +
  • refresh_token
  • +
+
+
Grant type used for OAuth authentication.
+
If not set, the value of the SN_GRANT_TYPE environment variable will be used.
+
+
+ host + +
+ string + / required +
+
+ +
The ServiceNow host name.
+
If not set, the value of the SN_HOST environment variable will be used.
+
+
+ password + +
+ string +
+
+ +
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.
+
+
+ refresh_token + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+ +
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.
+
+
+ timeout + +
+ float +
+
+ +
Timeout in seconds for the connection with the ServiceNow instance.
+
If not set, the value of the SN_TIMEOUT environment variable will be used.
+
+
+ username + +
+ string +
+
+ +
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.
+
+
+ number + +
+ string +
+
+ +
Number of the record to retrieve.
+
Note that contrary to sys_id, number may not uniquely identify a record.
+
+
+ query + +
+ list + / elements=dictionary +
+
+ +
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.
+
+
+ sys_id + +
+ string +
+
+ +
Unique identifier of the record to retrieve.
+
+
+ + + +See Also +-------- + +.. seealso:: + + :ref:`servicenow.itsm.change_request_task_module` + The official documentation on the **servicenow.itsm.change_request_task** module. + + +Examples +-------- + +.. code-block:: yaml + + - name: Retrieve all change request tasks + servicenow.itsm.change_request_task_info: + register: result + + - name: Retrieve a specific change request task by its sys_id + servicenow.itsm.change_request_task_info: + sys_id: 471bfbc7a9fe198101e77a3e10e5d47f + register: result + + - name: Retrieve change request tasks by number + servicenow.itsm.change_request_task_info: + number: CTASK0000001 + register: result + + - name: Retrieve change request tasks that contain SAP in their short description + servicenow.itsm.change_request_task_info: + query: + - short_description: LIKE SAP + register: result + + - name: Retrieve new change requests assigned to abel.tuter or bertie.luby + servicenow.itsm.change_request_task_info: + query: + - state: = new + assigned_to: = abel.tuter + - state: = new + assigned_to: = bertie.luby + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + +
KeyReturnedDescription
+
+ records + +
+ list +
+
success +
A list of change task records.
+
+
Sample:
+
[{'active': 'true', 'activity_due': '', 'additional_assignee_list': '', 'approval': 'not requested', 'approval_history': '', 'approval_set': '', 'assigned_to': 'f298d2d2c611227b0106c6be7f154bc8', 'assignment_group': '', 'business_duration': '', 'business_service': '', 'calendar_duration': '', 'change_request': 'a9e9c33dc61122760072455df62663d2', 'change_task_type': '', 'close_code': '', 'close_notes': '', 'closed_at': '', 'closed_by': '', 'cmdb_ci': '', 'comments': '', 'comments_and_work_notes': '', 'company': '', 'contact_type': 'phone', 'contract': '', 'correlation_display': '', 'correlation_id': '', 'created_from': '', 'delivery_plan': '', 'delivery_task': '', 'description': 'Preliminary System Testing', 'due_date': '2020-09-05 22:22:39', 'escalation': '0', 'expected_start': '', 'follow_up': '', 'group_list': '', 'impact': '3', 'knowledge': 'false', 'location': '', 'made_sla': 'false', 'number': 'CTASK0010005', 'on_hold': False, 'on_hold_reason': '', 'opened_at': '2020-08-30 22:22:48', 'opened_by': '6816f79cc0a8016401c5a33be04be441', 'order': '', 'parent': '', 'planned_end_date': '', 'planned_start_date': '', 'priority': '3', 'reassignment_count': '', 'route_reason': '', 'service_offering': '', 'short_description': 'Preliminary System Testing', 'sla_due': '', 'state': 'open', 'sys_class_name': 'change_task', 'sys_created_by': 'admin', 'sys_created_on': '2020-08-30 22:22:48', 'sys_domain': 'global', 'sys_domain_path': '/', 'sys_id': 'a9f2e5bdc61122760052c1250f7ac503', 'sys_mod_count': '0', 'sys_tags': '', 'sys_updated_by': 'admin', 'sys_updated_on': '2020-08-30 22:22:48', 'task_effective_number': 'CTASK0010005', 'time_worked': '', 'universal_request': '', 'upon_approval': '', 'upon_reject': '', 'urgency': '3', 'user_input': '', 'watch_list': '', 'work_end': '', 'work_notes': '', 'work_notes_list': '', 'work_start': ''}]
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Matej Pevec (@mysteriouswolf) +- Manca Bizjak (@mancabizjak) +- Miha Dolinar (@mdolin) +- Tadej Borovsak (@tadeboro) diff --git a/docs/servicenow.itsm.change_request_task_module.rst b/docs/servicenow.itsm.change_request_task_module.rst new file mode 100644 index 00000000..192f5618 --- /dev/null +++ b/docs/servicenow.itsm.change_request_task_module.rst @@ -0,0 +1,627 @@ +.. _servicenow.itsm.change_request_task_module: + + +*********************************** +servicenow.itsm.change_request_task +*********************************** + +**Manage ServiceNow change request tasks** + + +Version added: 1.3.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Create, delete or update a ServiceNow change request tasks. +- For more information, refer to the ServiceNow change management documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/change-management/concept/c_ITILChangeManagement.html. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ assigned_to + +
+ string +
+
+ +
The user that the change task is assigned to.
+
+
+ assignment_group + +
+ string +
+
+ +
The group that the change task is assigned to.
+
+
+ change_request_id + +
+ string +
+
+ +
sys_id of the change request this task belongs to.
+
Mutually exclusive with change_request_number.
+
+
+ change_request_number + +
+ string +
+
+ +
number of the change request this task belongs to.
+
Note that contrary to change_request_id, change request number may not uniquely identify a record. In case there are more change requests with the same number, the module fails and does nothing.
+
Mutually exclusive with change_request_id.
+
+
+ change_request_task_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+
+ +
User mapping for Change request task object, where user can override Choice Lists values for objects.
+
+
+ state + +
+ dictionary +
+
+ +
The state of the change request task.
+
Cannot be changed to pending when on_hold is true (module fails and does nothing).
+
+
+ close_code + +
+ string +
+
+
    Choices: +
  • successful
  • +
  • successful_issues
  • +
  • unsuccessful
  • +
+
+
Provide information on how the change task was resolved.
+
The change task must have this parameter set prior to transitioning to the closed state.
+
+
+ close_notes + +
+ string +
+
+ +
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.
+
+
+ configuration_item + +
+ string +
+
+ +
The configuration item (CI) or service name that the change task applies to.
+
Note that contrary to configuration_item_id, configuration item names may not uniquely identify a record. In case there are more configuration items with the same name, the module fails and does nothing.
+
Mutually exclusive with configuration_item_id.
+
+
+ configuration_item_id + +
+ string +
+
+ +
The configuration item (CI) or service ID that the change task applies to.
+
Mutually exclusive with configuration_item.
+
+
+ description + +
+ string +
+
+ +
A detailed description of the task.
+
This field has to be set either in the record or here.
+
+
+ hold_reason + +
+ string +
+
+ +
Reason why change task is on hold.
+
Required if change task's on_hold value will be true.
+
+
+ instance + +
+ dictionary +
+
+ +
ServiceNow instance information.
+
+
+ client_id + +
+ string +
+
+ +
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.
+
+
+ client_secret + +
+ string +
+
+ +
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.
+
+
+ grant_type + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+
    Choices: +
  • password ←
  • +
  • refresh_token
  • +
+
+
Grant type used for OAuth authentication.
+
If not set, the value of the SN_GRANT_TYPE environment variable will be used.
+
+
+ host + +
+ string + / required +
+
+ +
The ServiceNow host name.
+
If not set, the value of the SN_HOST environment variable will be used.
+
+
+ password + +
+ string +
+
+ +
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.
+
+
+ refresh_token + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+ +
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.
+
+
+ timeout + +
+ float +
+
+ +
Timeout in seconds for the connection with the ServiceNow instance.
+
If not set, the value of the SN_TIMEOUT environment variable will be used.
+
+
+ username + +
+ string +
+
+ +
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.
+
+
+ number + +
+ string +
+
+ +
Number of the record to operate on.
+
Note that contrary to sys_id, number may not uniquely identify a record.
+
+
+ on_hold + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes
  • +
+
+
A change task cannot be put on hold when state is pending, canceled, or closed (module fails and does nothing).
+
Provide an On hold reason if a change task is placed on hold.
+
+
+ other + +
+ dictionary +
+
+ +
Optional remaining parameters.
+
For more information on optional parameters, refer to the ServiceNow change task documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/change-management/task/create-a-change-task.html.
+
+
+ planned_end_date + +
+ string +
+
+ +
The date the change task is planned to be completed.
+
+
+ planned_start_date + +
+ string +
+
+ +
The date you plan to begin working on the task.
+
+
+ short_description + +
+ string +
+
+ +
A summary of the task.
+
This field has to be set either in the record or here.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • pending
  • +
  • open
  • +
  • in_progress
  • +
  • closed
  • +
  • canceled
  • +
  • absent
  • +
+
+
The state of the change request task.
+
Cannot be changed to pending when on_hold is true (module fails and does nothing).
+
+
+ sys_id + +
+ string +
+
+ +
Unique identifier of the record to operate on.
+
+
+ type + +
+ string +
+
+
    Choices: +
  • planning
  • +
  • implementation
  • +
  • testing
  • +
  • review
  • +
+
+
The type of change task.
+
Default workflow generates tasks in type review.
+
If the task type is implementation, the planned_start_date and planned_end_date values must fall within the planned start and end dates specified in the change_request.
+
+
+ + + +See Also +-------- + +.. seealso:: + + :ref:`servicenow.itsm.change_request_task_info_module` + The official documentation on the **servicenow.itsm.change_request_task_info** module. + + +Examples +-------- + +.. code-block:: yaml + + - name: Create a change task + servicenow.itsm.change_request_task: + configuration_item: Rogue Squadron Launcher + change_request_number: CHG0000001 + type: planning + state: open + assigned_to: fred.luddy + assignment_group: robot.embedded + short_description: Implement collision avoidance + description: "Implement collision avoidance based on the newly installed TOF sensor arrays." + on_hold: true + hold_reason: "Waiting for a report from the hardware team" + planned_start_date: 2021-07-15 08:00:00 + planned_end_date: 2021-07-21 16:00:00 + other: + approval: approved + + - name: Change state of the change task + servicenow.itsm.change_request_task: + state: in_progress + on_hold: false + number: CTASK0000001 + + - name: Close a change task + servicenow.itsm.change_request_task: + state: closed + close_code: "successful" + close_notes: "Closed" + number: CTASK0000001 + + - name: Delete a change task + servicenow.itsm.change_request_task: + state: absent + number: CTASK0000001 + + + + +Status +------ + + +Authors +~~~~~~~ + +- Matej Pevec (@mysteriouswolf) +- Manca Bizjak (@mancabizjak) +- Miha Dolinar (@mdolin) +- Tadej Borovsak (@tadeboro) diff --git a/docs/servicenow.itsm.configuration_item_info_module.rst b/docs/servicenow.itsm.configuration_item_info_module.rst index 85cc74bf..3028fcb4 100644 --- a/docs/servicenow.itsm.configuration_item_info_module.rst +++ b/docs/servicenow.itsm.configuration_item_info_module.rst @@ -34,6 +34,73 @@ Parameters Choices/Defaults Comments + + +
+ configuration_item_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+ + + + +
User mappings for Configuration item object.
+
Where mapping is not set, the default will be used.
+ + + + + +
+ environment + +
+ dictionary +
+ + + + +
The environment to which this configuration item belongs.
+ + + + + +
+ install_status + +
+ dictionary +
+ + + + +
The functional status of the configuration item.
+
Special value that can not be overridden is absent, which would remove a configuration item from ServiceNow.
+ + + + + +
+ operational_status + +
+ dictionary +
+ + + + +
The operational status of the configuration item.
+ + +
diff --git a/docs/servicenow.itsm.configuration_item_module.rst b/docs/servicenow.itsm.configuration_item_module.rst index ceeb3237..247d4a35 100644 --- a/docs/servicenow.itsm.configuration_item_module.rst +++ b/docs/servicenow.itsm.configuration_item_module.rst @@ -150,6 +150,73 @@ Parameters
Category of the configuration item, for instance Hardware.
+ + +
+ configuration_item_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+ + + + +
User mappings for Configuration item object.
+
Where mapping is not set, the default will be used.
+ + + + + +
+ environment + +
+ dictionary +
+ + + + +
The environment to which this configuration item belongs.
+ + + + + +
+ install_status + +
+ dictionary +
+ + + + +
The functional status of the configuration item.
+
Special value that can not be overridden is absent, which would remove a configuration item from ServiceNow.
+ + + + + +
+ operational_status + +
+ dictionary +
+ + + + +
The operational status of the configuration item.
+ + +
diff --git a/docs/servicenow.itsm.incident_info_module.rst b/docs/servicenow.itsm.incident_info_module.rst index 2f9fc480..b400cbf7 100644 --- a/docs/servicenow.itsm.incident_info_module.rst +++ b/docs/servicenow.itsm.incident_info_module.rst @@ -34,6 +34,90 @@ Parameters Choices/Defaults Comments + + +
+ incident_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+ + + + +
User mapping for Incident object, where user can override Choice Lists values for objects.
+ + + + + +
+ hold_reason + +
+ dictionary +
+ + + + +
Reason why incident is on hold.
+
Required if state value is on_hold.
+ + + + + +
+ impact + +
+ dictionary +
+ + + + +
The measure of the business criticality of the affected service.
+ + + + + +
+ state + +
+ dictionary +
+ + + + +
State of the incident.
+
If state value is on_hold, on_hold_reason parameter must be filled in.
+
Special value that can not be overridden is absent, which would remove an incident from ServiceNow.
+ + + + + +
+ urgency + +
+ dictionary +
+ + + + +
The extent to which resolution of an incident can bear delay.
+ + +
diff --git a/docs/servicenow.itsm.incident_module.rst b/docs/servicenow.itsm.incident_module.rst index 860e110a..6a35e460 100644 --- a/docs/servicenow.itsm.incident_module.rst +++ b/docs/servicenow.itsm.incident_module.rst @@ -216,6 +216,90 @@ Parameters
The measure of the business criticality of the affected service.
+ + +
+ incident_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+ + + + +
User mapping for Incident object, where user can override Choice Lists values for objects.
+ + + + + +
+ hold_reason + +
+ dictionary +
+ + + + +
Reason why incident is on hold.
+
Required if state value is on_hold.
+ + + + + +
+ impact + +
+ dictionary +
+ + + + +
The measure of the business criticality of the affected service.
+ + + + + +
+ state + +
+ dictionary +
+ + + + +
State of the incident.
+
If state value is on_hold, on_hold_reason parameter must be filled in.
+
Special value that can not be overridden is absent, which would remove an incident from ServiceNow.
+ + + + + +
+ urgency + +
+ dictionary +
+ + + + +
The extent to which resolution of an incident can bear delay.
+ + +
diff --git a/docs/servicenow.itsm.now_inventory.rst b/docs/servicenow.itsm.now_inventory.rst index 5ffcba48..6ebdcff9 100644 --- a/docs/servicenow.itsm.now_inventory.rst +++ b/docs/servicenow.itsm.now_inventory.rst @@ -90,6 +90,29 @@ Parameters
Create vars from jinja2 expressions.
+ + +
+ enhanced + +
+ boolean +
+
added in 1.3.0
+ + + + + + + +
Enable enhanced inventory which provides relationship information from CMDB.
+
Mutually exclusive with deprecated options named_groups and group_by.
+ +
@@ -836,6 +859,29 @@ Examples # | | |--{cpu_type = Intel} # | | |--{name = SAP-SD-02} + # Similar to the example above, but use enhanced groups with relationship information instead. + plugin: servicenow.itsm.now + enhanced: true + strict: true + inventory_hostname_source: asset_tag + columns: + - name + - classification + - cpu_type + - cost + compose: + cost: cost ~ " " ~ cost_cc + ansible_host: fqdn + + # `ansible-inventory -i inventory.now.yaml --graph --vars` output: + # @all: + # |--@Blackberry_Depends_on: + # | |--P1000201 + # | | |--{ansible_host = my.server.com} + # | | |--{classification = Production} + # | | |--{cost = 2,160 USD} + # | | |--{cpu_type = Intel} + # | | |--{name = INSIGHT-NY-03} # NOTE: All examples from here on are deprecated and should not be used when writing new # inventory sources. @@ -907,6 +953,7 @@ Authors - Manca Bizjak (@mancabizjak) - Miha Dolinar (@mdolin) - Tadej Borovsak (@tadeboro) +- Uros Pascinski (@uscinski) .. hint:: diff --git a/docs/servicenow.itsm.problem_info_module.rst b/docs/servicenow.itsm.problem_info_module.rst index ff7750b9..1d68ef2d 100644 --- a/docs/servicenow.itsm.problem_info_module.rst +++ b/docs/servicenow.itsm.problem_info_module.rst @@ -258,6 +258,10 @@ See Also :ref:`servicenow.itsm.problem_module` The official documentation on the **servicenow.itsm.problem** module. + :ref:`servicenow.itsm.problem_task_module` + The official documentation on the **servicenow.itsm.problem_task** module. + :ref:`servicenow.itsm.problem_task_info_module` + The official documentation on the **servicenow.itsm.problem_task_info** module. Examples diff --git a/docs/servicenow.itsm.problem_module.rst b/docs/servicenow.itsm.problem_module.rst index 2e440331..5363139e 100644 --- a/docs/servicenow.itsm.problem_module.rst +++ b/docs/servicenow.itsm.problem_module.rst @@ -417,6 +417,91 @@ Parameters
For more information on optional parameters, refer to the ServiceNow documentation on creating problems at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/problem-management/task/create-a-problem-v2.html.
+ + +
+ problem_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+ + + + +
User mapping for Problem object, where user can override Choice Lists values for objects.
+ + + + + +
+ impact + +
+ dictionary +
+ + + + +
Effect that the problem has on business.
+ + + + + +
+ problem_state + +
+ dictionary +
+ + + + +
State of the problem.
+
If a problem does not yet exist, all states except for new require setting of assigned_to parameter.
+
This mapping can also be edited inside Choice Lists inside ServiceNow and can differ from state mapping.
+ + + + + +
+ state + +
+ dictionary +
+ + + + +
State of the problem.
+
If a problem does not yet exist, all states except for new require setting of assigned_to parameter.
+
Special value that can not be overridden is absent, which would remove a problem from ServiceNow.
+ + + + + +
+ urgency + +
+ dictionary +
+ + + + +
The extent to which the problem resolution can bear delay.
+ + +
@@ -526,6 +611,10 @@ See Also :ref:`servicenow.itsm.problem_info_module` The official documentation on the **servicenow.itsm.problem_info** module. + :ref:`servicenow.itsm.problem_task_module` + The official documentation on the **servicenow.itsm.problem_task** module. + :ref:`servicenow.itsm.problem_task_info_module` + The official documentation on the **servicenow.itsm.problem_task_info** module. Examples diff --git a/docs/servicenow.itsm.problem_task_info_module.rst b/docs/servicenow.itsm.problem_task_info_module.rst new file mode 100644 index 00000000..81adde0b --- /dev/null +++ b/docs/servicenow.itsm.problem_task_info_module.rst @@ -0,0 +1,344 @@ +.. _servicenow.itsm.problem_task_info_module: + + +********************************* +servicenow.itsm.problem_task_info +********************************* + +**List ServiceNow problem tasks** + + +Version added: 1.3.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- 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. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ instance + +
+ dictionary +
+
+ +
ServiceNow instance information.
+
+
+ client_id + +
+ string +
+
+ +
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.
+
+
+ client_secret + +
+ string +
+
+ +
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.
+
+
+ grant_type + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+
    Choices: +
  • password ←
  • +
  • refresh_token
  • +
+
+
Grant type used for OAuth authentication.
+
If not set, the value of the SN_GRANT_TYPE environment variable will be used.
+
+
+ host + +
+ string + / required +
+
+ +
The ServiceNow host name.
+
If not set, the value of the SN_HOST environment variable will be used.
+
+
+ password + +
+ string +
+
+ +
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.
+
+
+ refresh_token + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+ +
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.
+
+
+ timeout + +
+ float +
+
+ +
Timeout in seconds for the connection with the ServiceNow instance.
+
If not set, the value of the SN_TIMEOUT environment variable will be used.
+
+
+ username + +
+ string +
+
+ +
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.
+
+
+ number + +
+ string +
+
+ +
Number of the record to retrieve.
+
Note that contrary to sys_id, number may not uniquely identify a record.
+
+
+ query + +
+ list + / elements=dictionary +
+
+ +
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.
+
+
+ sys_id + +
+ string +
+
+ +
Unique identifier of the record to retrieve.
+
+
+ + + +See Also +-------- + +.. seealso:: + + :ref:`servicenow.itsm.problem_task_module` + The official documentation on the **servicenow.itsm.problem_task** module. + :ref:`servicenow.itsm.problem_module` + The official documentation on the **servicenow.itsm.problem** module. + :ref:`servicenow.itsm.problem_info_module` + The official documentation on the **servicenow.itsm.problem_info** module. + + +Examples +-------- + +.. code-block:: yaml + + - 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 + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + +
KeyReturnedDescription
+
+ records + +
+ list +
+
success +
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': ''}]
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Manca Bizjak (@mancabizjak) +- Miha Dolinar (@mdolin) +- Tadej Borovsak (@tadeboro) diff --git a/docs/servicenow.itsm.problem_task_module.rst b/docs/servicenow.itsm.problem_task_module.rst new file mode 100644 index 00000000..f29b64bc --- /dev/null +++ b/docs/servicenow.itsm.problem_task_module.rst @@ -0,0 +1,617 @@ +.. _servicenow.itsm.problem_task_module: + + +**************************** +servicenow.itsm.problem_task +**************************** + +**Manage ServiceNow problem tasks** + + +Version added: 1.3.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- 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. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ assigned_to + +
+ string +
+
+ +
Specific problem analyst to whom the task is assigned to.
+
+
+ assignment_group + +
+ string +
+
+ +
Specific group to whom the problem task is assigned to.
+
+
+ close_code + +
+ string +
+
+
    Choices: +
  • completed
  • +
  • canceled
  • +
+
+
Provide information on how the change task was resolved.
+
The change task must have this parameter set prior to transitioning to the closed state.
+
+
+ close_notes + +
+ string +
+
+ +
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.
+
+
+ configuration_item + +
+ string +
+
+ +
Configuration item (CI) that the problem applies to. The CI class of the selected configuration item identifies the type of problem.
+
+
+ description + +
+ string +
+
+ +
Detailed description of the problem task.
+
+
+ due_date + +
+ string +
+
+ +
Date within which the problem task should be completed.
+
+
+ instance + +
+ dictionary +
+
+ +
ServiceNow instance information.
+
+
+ client_id + +
+ string +
+
+ +
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.
+
+
+ client_secret + +
+ string +
+
+ +
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.
+
+
+ grant_type + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+
    Choices: +
  • password ←
  • +
  • refresh_token
  • +
+
+
Grant type used for OAuth authentication.
+
If not set, the value of the SN_GRANT_TYPE environment variable will be used.
+
+
+ host + +
+ string + / required +
+
+ +
The ServiceNow host name.
+
If not set, the value of the SN_HOST environment variable will be used.
+
+
+ password + +
+ string +
+
+ +
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.
+
+
+ refresh_token + +
+ string +
+
added in 1.1.0 of servicenow.itsm
+
+ +
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.
+
+
+ timeout + +
+ float +
+
+ +
Timeout in seconds for the connection with the ServiceNow instance.
+
If not set, the value of the SN_TIMEOUT environment variable will be used.
+
+
+ username + +
+ string +
+
+ +
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.
+
+
+ number + +
+ string +
+
+ +
Number of the record to operate on.
+
Note that contrary to sys_id, number may not uniquely identify a record.
+
+
+ other + +
+ dictionary +
+
+ +
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.
+
+
+ priority + +
+ string +
+
+
    Choices: +
  • critical
  • +
  • high
  • +
  • moderate
  • +
  • low
  • +
  • planning
  • +
+
+
How quickly the service desk should address the problem task.
+
+
+ problem_task_mapping + +
+ dictionary +
+
added in 1.3.0 of servicenow.itsm
+
+ +
User mapping for Problem task object, where user can override Choice Lists values for objects.
+
+
+ priority + +
+ dictionary +
+
+ +
How quickly the service desk should address the problem task.
+
+
+ state + +
+ dictionary +
+
+ +
State of problem tasks.
+
If state value is new, short_description parameter must be filled in.
+
+
+ short_description + +
+ string +
+
+ +
Brief description of the problem task.
+
+
+ source_problem + +
+ string +
+
+ +
Number of the problem for which the problem task is created.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • new
  • +
  • assess
  • +
  • work_in_progress
  • +
  • closed
  • +
  • absent
  • +
+
+
State of problem tasks.
+
If state value is new, short_description parameter must be filled in.
+
+
+ sys_id + +
+ string +
+
+ +
Unique identifier of the record to operate on.
+
+
+ type + +
+ string +
+
+
    Choices: +
  • root_cause_analysis
  • +
  • general
  • +
+
+
Read-only state. Determines whether the problem task is created specifically to investigate the cause of the problem or is a general task.
+
+
+ + + +See Also +-------- + +.. seealso:: + + :ref:`servicenow.itsm.problem_task_info_module` + The official documentation on the **servicenow.itsm.problem_task_info** module. + :ref:`servicenow.itsm.problem_module` + The official documentation on the **servicenow.itsm.problem** module. + :ref:`servicenow.itsm.problem_info_module` + The official documentation on the **servicenow.itsm.problem_info** module. + + +Examples +-------- + +.. code-block:: yaml + + - 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 + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + +
KeyReturnedDescription
+
+ record + +
+ dictionary +
+
success +
A list of problem records.
+
+
Sample:
+
{'active': 'true', 'activity_due': '', 'additional_assignee_list': '', 'approval': 'not requested', 'tranquilitybusiness_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': ''}
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Manca Bizjak (@mancabizjak) +- Miha Dolinar (@mdolin) +- Tadej Borovsak (@tadeboro) diff --git a/plugins/modules/problem.py b/plugins/modules/problem.py index 0013f1de..a8f34361 100644 --- a/plugins/modules/problem.py +++ b/plugins/modules/problem.py @@ -348,7 +348,7 @@ def build_payload(module, table_client): # If we set 'state' field directly when modifying an existing record, # ServiceNow API sometimes ignores the desired state. # This happens for state transitions other than new -> assessment. - # Using 'problem_state' instead of 'state' resovles the issue. + # Using 'problem_state' instead of 'state' resolves the issue. payload["problem_state"] = module.params["state"] if module.params["assigned_to"]: user = table.find_user(table_client, module.params["assigned_to"])