[rt-users] CF with auto-completion of usernames

Kevin Falcone falcone at bestpractical.com
Thu May 15 16:15:35 EDT 2014


On Wed, May 14, 2014 at 09:23:33AM +0000, Lieven Bridts wrote:
>    I would like to use some more Custom Fields, mainly in the `assets'-section.
>    One of these fields should contain an username, similar to the fields `held-by' and `contact'
>    The creation of the Custom Field is not a major problem.
> 
>    But how can I make it looking up its possible values for auto-completion between the RT-users?

Use an External Custom Field
http://bestpractical.com/docs/rt/latest/extending/external_custom_fields.html
The example code fetches groups, but could easily fetch Users.

>    It would be totally the max if this new field would integrate with the "add a person"
>    dropdown: a third choice next to "held-by" and "contact". But that is not necessary.
> 
>    It should be possible to add multiple persons/values (not similar to the `owner'-field which
>    can hold only one value)

You can actually do this, it's completely unrelated to a custom field.
You need to use the CreateRoleGroup method to create a new role group
and also RegisterRole the new group.  There's some significant peeking
under the covers here, but the code was all implemented explicitly for
assets and is used by a client who has non-standard roles on their
assets.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140515/1e2e65f8/attachment.sig>


More information about the rt-users mailing list