[rt-devel] RT4: Customizing With Callbacks
abir
abir.ibrahem at gmail.com
Tue Apr 1 10:10:49 EDT 2014
This is my scripts.
in `/usr/share/request-tracker4/html/Elements/ShowCustomFields` file. i
added i my custom callback.
`% $m->callback( CallbackName => 'Initial', Object => $Object, CustomFields
=> $CustomFields);`
This is my custom callback
`/usr/local/share/request-tracker4/html/Callbacks/MyCallbacks/Ticket/Display.html/Initial`
<%init>
if ($Object) {
my $UserCustomFields;
while ( my $CustomField = $CustomFields->Next ) {
if ($CustomField->id == '1'){
my $Values = $Object->CustomFieldValues( $CustomField->Id );
my $User = RT::User->new(RT::SystemUser);
$User->LoadByEmail($Values->First->Content);
my $UserValues = $User->CustomFieldValues('2');
$UserCustomFields = $User->CustomFields('2');
}
}
if($UserCustomFields){
push $CustomFields , $UserCustomFields->First;
}
}
</%init>
<%args>
$Object => undef
$CustomFields => undef
</%args>
But i got nothing. is every thins is ok? and can i push my
`$UserCustomFields` into `$CustomFields` array?
[1]: http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks
--
View this message in context: http://requesttracker.8502.n7.nabble.com/RT4-Customizing-With-Callbacks-tp57077p57080.html
Sent from the Request Tracker - Dev mailing list archive at Nabble.com.
More information about the rt-devel
mailing list