Custom Fields question?

Hi, How could I create a Custom Field for Tickets that
its value is directly correlated to user group?
Thanks, Zhiming.

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Hi, How could I create a Custom Field for Tickets that
its value is directly correlated to user group?
Thanks, Zhiming.

That is a feature that will be in 3.8. For 3.6 there are
callbacks that will let you control the Display/Edit of
any custom field, so you could write a component that
will do what you want.

-Todd

Hi Todd,

Thanks for your email. Can you tell me a little more
the component? Is there any contribution code that I
can find on wiki website?

I have posted another question about how to Show
Tickets in the group only, not cross groups. Do you
have any ideas about this? Thanks again, Zhiming.— Todd Chapman todd@chaka.net wrote:

On Thu, Jun 29, 2006 at 02:38:07PM -0700, Zhiming Liu wrote:

Hi, How could I create a Custom Field for Tickets
that
its value is directly correlated to user group?
Thanks, Zhiming.

That is a feature that will be in 3.8. For 3.6 there
are
callbacks that will let you control the Display/Edit
of
any custom field, so you could write a component
that
will do what you want.

-Todd

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Hi Todd,

Thanks for your email. Can you tell me a little more
the component? Is there any contribution code that I
can find on wiki website?

Do you know how to create callbacks? /Elements/ShowCustomFields
and /Elements/EditCustomField have callbacks that let
you set the name of the component for Show/Edit of a
given CF. So you create a callback that sets the name,
and then you create the component that handles
display/edit. I have a callback that you can use as an
example:

local/html/Callbacks/todd/Elements/EditCustomField/EditComponentName:

<%INIT>
return unless $CustomField;

my
$Comp = $CustomField->Name;
$Comp =~ s/\W//g;
$Comp = $m->callers(1)->dir_path . "/CustomFields/EditCF
$Comp";

$$Name = $m->comp_exists($Comp.$CustomField->id) ? $Comp.$CustomField->id
: $m->comp_exists($Comp) ? $Comp
: $$Name
;
</%INIT>
<%ARGS>
$Name
$CustomField => undef
$Object => undef<
/%ARGS>