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);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.