and more in a single search tool across platforms. Read the announcement here. |
07/11/2023 01:59 PM
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.
07/11/2023 02:30 PM
@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.
08/02/2023 11:49 AM
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?
08/02/2023 04:03 PM - edited 08/02/2023 04:08 PM
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