archi-contribs / snow-import-plugin

Service Now import plugin
Other
14 stars 5 forks source link

Specifying a filter is being added as a separate sysparm_query and is ignored by SN #11

Closed Manj75 closed 2 years ago

Manj75 commented 4 years ago

If a filter is used on Archi CI mapping it will not work because it is being added to the URL as a second sysparm_query parameter in addition to the operational_status=1 and is therefore ignored.

without any filter the plugin always adds

&sysparm_query=operational_status=1

If filter as follows is used then the URL will add sysparm_query as shown below:

archi.elements.*.filter = virtual=true or archi.elements.cmdb_ci_linux_server.filter = virtual=true

Resulting url will have:

&sysparm_query=operational_status=1,&sysparm_query=virtual=true

Latter virtual filter is ignored by SN

It only works if the filter is added as a logical AND using the caret '^' character, i.e.

&sysparm_query=operational_status=1^virtual=true

Apologies in advance if I missed something and nothing using it correctly.