Problem with cf field scrip

Hello everybody

Were searching for a Solution to add a String from a cf field to the Subject
one if we create a ticket or make some transaction with it …

so we’ve written some scrip code but sth does’nt work …

here is the scrip:

Preperation:

unless ( $self->TransactionObj->Type eq “CustomField”
&& $self->TransactionObj->Field == 7 )
|| $self->TransactionObj->Type eq “Create”)
{ return 0; }

Action:

my ($old_subj, $cust); $old_subj = $self->TicketObj->Subject; $cust =
$self->TicketObj->NewCustomFieldValue(‘test’);
$self->TicketObj->SetSubject($cust.’ ## '.$old_subj);
return 1;

If we only create the Ticket everything is fine and he assigns the string to
the subject correctly , but if we tried to modify the CustomFiled from the
Ticket which we created
he changes the String to the new Value in the Subject Field and goes back
to the old value in one step.

So i think during a transaction he hold’s the old value for the custom
field in mind, and don’t pay any attention if we change the value …
But i don’t know exactly in which way this happened so it’s only a
presumption

best regards john s.

View this message in context: http://old.nabble.com/Problem-with-cf-field-scrip-tp32503721p32503721.html

Does anybody understand which problem i have … ?

Or are my details which i 've mentioned here induce to much more
confusing ?

best regards john …
View this message in context: http://old.nabble.com/Problem-with-own--CF-scrip-tp32503721p32527254.html

pushed …

View this message in context: http://old.nabble.com/Problem-with-own--CF-scrip-tp32503721p32599481.html