Skip to content

Commit

Permalink
Output variable updated and dataSource of impact changed (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishubansal authored and omeshp committed Feb 18, 2019
1 parent eafda2e commit 6b44dc0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"Expression": "eq(jsonpath('$.result[0].status')[0], 'inserted')"
},
"ExecutionOptions": {
"OutputVariables": "{\"CHANGE_SYSTEM_ID\" : \"jsonpath('$.result[0].sys_id')[0]\", \"CHANGE_REQUEST_NUMBER\" : \"jsonpath('$.result[0].display_value')[0]\"}",
"OutputVariables": "{\"CHANGE_SYSTEM_ID\" : \"jsonpath('$.result[0].sys_id')[0]\"}",
"SkipSectionExpression": "eq(isNullOrEmpty(variables['CHANGE_SYSTEM_ID']), false)"
}
},
Expand All @@ -229,6 +229,7 @@
"Expression": "eq(jsonpath('$.result.state')[0], '$(DesiredExitStatus)')"
},
"ExecutionOptions": {
"OutputVariables": "{\"CHANGE_REQUEST_NUMBER\" : \"jsonpath('$.result.number')[0]\"}",
"SkipSectionExpression": "eq(isNullOrEmpty(variables['CHANGE_SYSTEM_ID']), true)"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
{
"RequestInputs": {
"EndpointId": "$(ServiceNowConnection)",
"EndpointUrl": "$(endpoint.url)/api/now/table/change_request?sysparm_query=number=$(ChangeRequestNumber)&sysparm_fields=correlation_id,number",
"EndpointUrl": "$(endpoint.url)/api/now/table/change_request?sysparm_query=number=$(ChangeRequestNumber)^ORDERBYDESCsys_created_on&sysparm_fields=sys_created_on,correlation_id,number",
"Method": "GET",
"Headers": "{\"Content-Type\":\"application/json\", \"Accept\":\"application/json\"}",
"WaitForCompletion": "false",
Expand Down
7 changes: 5 additions & 2 deletions Extensions/ServiceNow/Src/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@
},
{
"name": "Impact",
"endpointUrl": "{{endpoint.url}}/api/now/table/sys_choice?sysparm_query=element=Impact^ORDERBYDESCvalue&sysparm_fields=label",
"resultSelector": "jsonpath:$.result[*].label"
"endpointUrl": "{{endpoint.url}}/api/now/table/sys_choice?sysparm_query=element=Impact^name={{table}}^ORDERBYDESCvalue&sysparm_fields=label",
"resultSelector": "jsonpath:$.result[*].label",
"callbackContextTemplate": "{\"table\": \"task\"}",
"callbackRequiredTemplate": "{{#equals table \"change_request\"}}{{isEqualNumber result.count 0}}{{else}}false{{/equals}}",
"initialContextTemplate": "{\"table\": \"change_request\"}"
},
{
"name": "Category",
Expand Down

0 comments on commit 6b44dc0

Please sign in to comment.