Hi all,
I have a custom field called "Groups(s)" of type PCF - Multiple Autocomplete. The values for the custom field are populated (auto-complete) using a sil script which extracts the values from an LDAP. Below is the sil code for extracting the values.
struct Group {
string displayName;
//string mail;
}
Group[] Xgroups = ldapUserList({"displayName"}, "(&(groupType:1.2.840.113556.1.4.803:=8)(mail=*)(displayName=*companyX*))", "groups");
return arrayStructSort(Xgroups , "displayName");
Now we have another sil script configured for sending mails when we change the workflow of an issue. We populate the value of the custom field in the mail. I extract the value of the custom field (which is multi-valued) as below -
if (isCustomFieldInContext("Group(s)",projectKey,"Incident")) {
xGroups= #{Group(s)};
} else {
xGroups= "";
}
But the values that are populated in the mail looks like -
Group A|Group A
The same value is repeated twice. maybe, its because the ldap search returns results based on the attributes I give. I tried making a few changes to the script, like using a string array instead of the struct array (not sure how to manipulate the query) but nothing seems to work.
Can anyone suggest how can I get rid of the repeated values ?
Thanks,
Neha
Hi Neha,
I am not very familiar with the structs returned by your ldap, but in case your customfield consistently returns an array with two of the same values, you can consider to simply take the first index of the array returned?
xGroups= #{Group(s)}[0];
Kind regards,
Wouter
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.