Sil script to determine when priority changes - kick off a web hook

JDave January 26, 2020

I am attempting to detect when an issue's priority - either Low or Medium changes to a HIGH - I need to kick off a webhook to an external system.    I am looking to use Cprime's SIL to create the script.

I understand - using a listener - to detect anytime an issue is updated - I want it to run this script - compare the old value of priority, to the new value of priority - if it has changed to High - then it will run the script.

I'm new to SIL - still trying to learn it .. 

What I have started with (Yes - it is rough - and I'm missing alot .. ) Looking for some guidance/help ..   

/*
This script is a called by listener to the issue update event. Should the value of the Priority value change from Low or Medium to HIGH - fire an external Webhook
ProjectKey is "TSD"
Issuetype is "incident"

// Define oldPriority - ??

// Define newPriority - ??


*/
/* gets the previous value of the priority */
if( oldPriority != 'High' && newPriority == 'High');{

//CALL YOUR WEBHOOK HERE
// httpPost("http://www.myserver.com/posturl", headers, params);
}

1 answer

0 votes
JDave May 28, 2020

I was able to get this to work - using Sil Scripts, a bash script to the xMatters form.   Long to post here - but if anyone would like any additional information - let me know - and I will share.

Suggest an answer

Log in or Sign up to answer