Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Getting Approver details in Ticket creation

shibinvpkvr
Regular Contributor II
Regular Contributor II

Hello,

We have a requirement to pass the user's email who approved the request 1st level (1st level approver email) into a field in JIRA, also user's email who approved the request 2nd level (2nd level approver email) into another field. Does anyone have worked on extracting these values from the request object and use it in CreateTicketJSON? 

We are using REST based JIRA connector as service desk connection. 

3 REPLIES 3

Saathvik
All-Star
All-Star

@shibinvpkvr : You can use ${approvers} variable to get the approvers list. But I don't think there are  separate variables for 1st level approver and 2nd level approver. You have to derive that from the output of above variable.

But I would also look out for any other responses which matches your requirement.


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Gopi
New Contributor III
New Contributor III

Hi @Saathvik 

${approvers} variable is a string array with the usernames of approvers. Is there a way to get the email of the approver from this?

Try using CONST function and derive email try something like this

#CONST#${def res = ''; approvers?.eachWithIndex{ num, idx -> res = res + com.saviynt.ecm.identitywarehouse.domain.Users.findAll(num)?.email + ',';}; return res;}

First try without CONST if didn't work then try with CONST, For this I am expecting comma separated emails


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.