<div> </div>
<div>Hello</div>
<div> </div>
<div>I want to fill the fields Starts, Started and Due after ticket creation, for this Iīm using the code bellow on custom action in "on create" condition</div>
<div> </div>
<div>
<p>my $now = RT::Date->new($RT::SystemUser);<br>my $sla = RT::Date->new($RT::SystemUser);<br>$now->SetToNow;<br>$sla->SetToNow;<br>$sla->AddSeconds(+3600);<br>$self->TicketObj->SetStarts( $now->ISO );
<br>$self->TicketObj->SetStarted( $now->ISO );<br>$self->TicketObj->SetDue( $sla->ISO );<br>return 1;</p>
<p>This works, but if user that create tickts already fill these fields I donīt want to overwrite the user information, I tryed the following code in place of the code above, but doesnīt work.</p>
<p>my $now = RT::Date->new($RT::SystemUser);<br>my $sla = RT::Date->new($RT::SystemUser);<br>$now->SetToNow;<br>$sla->SetToNow;<br>$sla->AddSeconds(+3600);<br>if ( $self->TicketObj->Starts == undef ){
<br>$self->TicketObj->SetStarts( $now->ISO );<br>}<br>if ( $self->TicketObj->Started == undef ){<br>$self->TicketObj->SetStarted( $now->ISO );<br>}<br>if ( $self->TicketObj->Due == undef ){<br>
$self->TicketObj->SetDue( $sla->ISO );<br>}<br>return 1;</p>
<p>How can I test if user already fill these fields?</p>
<p> </p>
<p>Thanks</p>
<p> </p>
<p>Cristiano </p>
<p> </p></div>