The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SIL Script to Check for Components and Assign to Agent

Jh
Contributor
October 28, 2020

I've been trying to tailor a SIL script to first check if one or more components exist in a ticket, if TRUE, assign to an agent and also add another agent as an Additional Assignee. My listener is set to listen to Issue Created, Issue Moved, and Issue Updated.

All Salesforce component leads are set to User1.

I have written it so if there is no assignee, then it should assign to User1 and add User2 as Additional but I have seen tickets where it is already assigned to User1 but User2 was not added as an Additional Assignee.

My current script looks like this:

//customfield_10090 is custom field Additional Assignees

if(project != "PrjctKey") {return;}


if(elementExists(components,"SALESFORCE | GENERAL")
or elementExists(components,"SALESFORCE | PROFESSIONALSERVICES")
or elementExists(components,"SALESFORCE | SECURITY")
or elementExists(components,"SALESFORCE | SERVICE"))
{

if(assignee=="")
{
assignee = "User1";
customfield_10090 += "User2"; // += add to existing,= rewrite
}
}


Is this the best way to approach my objective?

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
SERVER
VERSION
8.9.1
TAGS
AUG Leaders

Atlassian Community Events