I want to send an email via script runner send custom email in the workflow, but I can not correctly read the value of a custom field group picker in an email body html where am I going wrong?
For your requirement, you should try something like this:-
<html>
<body>
List of Groups: <%
def groupPicker = cfValues['Sample Group Picker']
def groupNames = []
if(groupPicker) {
groupPicker.each {
groupNames << it.name
}
}
out << groupNames
%>
</body>
</html>
Below is a print screen of the Post-Function configuration:-
Below is the sample issue that I have tested with:-
And below a print screen of the Email that is sent:-
I hope this helps to answer your question. :)
Thank you and Kind regards,
Ram
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.