To fill a custom field with users from AD (Active Directory)

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Joselyne
Posts: 16
Joined: 14 Dec 2023, 15:59

To fill a custom field with users from AD (Active Directory)

Post by Joselyne »

Hello every one,

I have created a custom field (multiple selection).What I would like to do is to fill the custom filed with Users from Active Directory.
I've written a custom fucntion (based on enumaration) that recovers users from the AD, i can display the list on the screen, but i'm not able to display the list in the custom field.
Can someone help me?

Thanks
cas
Posts: 1622
Joined: 11 Mar 2006, 16:08
Contact:

Re: To fill a custom field with users from AD (Active Directory)

Post by cas »

What you should do, is update the value field in the database with the enumeration.
So update field "possible_values" in the "mantis_custom_field_table" with results of your query out of AD. Just make sure that entries are separated by a "|".
There is a little caveat here which is that this field is of type TEXT and can hold up to 65.000 characters. S depending on the number of users you still may have to find a different solution.
A better option here would be to use a nifty plugin that shows the contents of a plugin-table holding all the AD entries. Easy to maintain and handle within Mantis.
MikaelaLinnea
Posts: 1
Joined: 20 Mar 2024, 10:41

Re: To fill a custom field with users from AD (Active Directory)

Post by MikaelaLinnea »

Updating the value field in the database with the enumeration from Active Directory and separating entries with a "|" seems like a feasible approach. However, considering the TEXT field limit of 65,000 characters, it's important to ensure the solution can accommodate a potentially large number of users. Exploring plugins that manage AD entries within Mantis could offer a more efficient and manageable solution.
Post Reply