ansible-collections / servicenow.itsm

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

Elaborate on the group_by install_status parameter of the inventory plugin to include information about the expected data type #81

Open mrmibrown opened 3 years ago

mrmibrown commented 3 years ago
SUMMARY

Elaborate on the group_by install_status parameter of the inventory plugin to include information about the expected data type. This parameter is expecting a 'choice list' index(integer) but it is not explained clearly leading to situations where strings are passed resulting in invalid queries:

Invalid:

plugin: servicenow.itsm.now
columns:
  - install_status
group_by:
  install_status:
    includes:
      - Installed   # HERE

Valid:

plugin: servicenow.itsm.now
columns:
  - install_status
group_by:
  install_status:
    includes:
      - 1    # HERE
ISSUE TYPE
COMPONENT NAME

plugin

ANSIBLE VERSION
Akasurde commented 3 years ago

@mrmibrown Thanks for reporting this issue. ~Could you please check if https://github.com/ansible-collections/servicenow.itsm/pull/78 works for you and let us know?~

tadeboro commented 3 years ago

I think updating examples is not enough in this case. It is an OK(ish) workaround for the time being, but we really need to do better. At a minimum, we should make sure that users can use display values in the filter specification. This will make sure the filter definition and the resulting group names at least somewhat match.

We have some work planned in this direction for collection already, so getting there should not be too problematic.

Akasurde commented 3 years ago

@tadeboro Thanks for the information.