ansible-collections / servicenow.itsm

Ansible Collection for ServiceNow ITSM
GNU General Public License v3.0
87 stars 78 forks source link

Search for standard changes within custom template tables #253

Open OskarMarthinussen opened 1 year ago

OskarMarthinussen commented 1 year ago
SUMMARY

Enable the ability to search for standard changes within custom tables, instead of being limited to finding templates solely in the 'std_change_producer_version' table.

ISSUE TYPE
COMPONENT NAME

servicenow.itsm.change_request

ADDITIONAL INFORMATION

In my scenario, the standard change I'm searching for is stored in a custom table, which makes it difficult to locate the corresponding template. To address this, I suggest implementing an optional parameter called 'template_table' in the 'find_standard_change()' function. This parameter would allow users to specify a custom table for searching the standard change. To ensure backward compatibility, the parameter could have a default value of 'std_change_producer_version'.

  - name: Create servicenow change
    servicenow.itsm.change_request:
      instance:
        host: "{{ servicenow_change_instance }}"
        username: "{{ servicenow_change_username }}"
        password: "{{ servicenow_change_password }}"
      type: standard
      state: new
      other:
        company: "{{ servicenow_change_company }}"
      template: "{{ servicenow_change_template }}"
      template_table: "{{ servicenow_change_template_table }}"      <-- New parameter with standard value
    register: snow_change_request
Akasurde commented 1 year ago

resolved_by_pr https://github.com/ansible-collections/servicenow.itsm/pull/254