[Rt-devel] User Custom Fields not being displayed??
Brian D
bjd-dev at simplicity.net
Fri May 28 16:12:14 EDT 2010
Here's one way to add this functionality I proposed...
--- /usr/local/p/rt-3.8.8/src/lib/RT/Tickets_Overlay_SQL.pm
2010-05-05 16:09:21.000000000 -0400
+++ Tickets_Overlay_SQL.pm 2010-05-28 16:09:08.892400954 -0400
@@ -201,6 +201,8 @@
# replace __CurrentUser__ with id
$value = $self->CurrentUser->id if $value eq '__CurrentUser__';
+ $value = $self->CurrentUser->UserObj->FirstCustomFieldValue($1)
+ if ($value =~ '__CurrentUserCF\.{(.+)}__');
unless( $dispatch{ $class } ) {
die "No dispatch method for class '$class'"
Cheers,
Brian
On Fri, May 28, 2010 at 2:45 PM, Brian D <bjd-dev at simplicity.net> wrote:
> Kevin --
>
> Thank you. Indeed I had overlooked applying it at a Global level.
> The lack of an "Applies to" button on the User Custom field led me to
> think it was only a global option and automatically applied.
>
> Now for the challenge question. Is there any way to utilize the
> user's attributes and customfieldvalues in a search?
>
> I'm attempting to create standardized dashboards for a good number of
> teams/queues, and to do so, it would be convenient to template the
> searches using fields I've added. For example HomeQueue is one of
> the custom fields, and I would like to be able to craft saved searches
> for the generic dashboard something along the lines of:
>
> Queue = 'UserCF.{HomeQueue}' AND ( Status = 'new' OR Status = 'open'
> OR Status = 'stalled' )
>
> I know __CurrentUser__ is one value handled specially for the "Tickets
> I Own" saved searches, but I don't see that this functionality is more
> Generic..
>
> Brian
>
>
> On Fri, May 28, 2010 at 2:02 PM, Kevin Falcone
> <falcone at bestpractical.com> wrote:
>
>> a) Why do you think $UserObj is the CurrentUser?
>> b) Have you gone to Configuration -> Global -> Custom Fields -> Users
>> and applied your custom fields?
>>
>> -kevin
>
More information about the rt-devel
mailing list