Hello,
full scenario is like this:
new email arrive, new ticket is about to be created.
I want to check check “TO”, or “CC” email header addresses against some
special list of mail addresses.
If match is found, i need to store the address in CF.
I’d like to do the CF value assignment in mail plugin, because in mail
plugin i have complete mail object available.
So i know in which header the email address appeared.
However, it seems i can’t store the value in CF (within the mail plugin).
I gues it’s because we’re delaing with NEW ticket, so the ticket itself
does not really exists yet, therefore it is impossible to assign a CF
value to it.
I tried to do the stuff in Scrip, but in there i do not know in which
header
the address appeared.
There is some method “$self->TicketObj->TransactionAddresses()” which
return all addresses present in transaction, however there is not an
info about in which email header the address was present.
Maybe if there was any method to get the whole email message object
within scrip - but i do not know abou such.
I see i should specify my question more precisely:
Is it possible to assign value to CF, in mail plugin, when the email
message is about to create completely new ticket ?
Thanks in advance
Pavel Šidlo
LinuxBox.cz, s.r.o.
28. října 168, 709 00 Ostrava
tel.: +420 591 166 234
mob.: +420 737 238 334
web: www.linuxbox.cz
mobil servis: +420 737 238 656
email servis: servis@linuxbox.cz
|------------>
| Od: |
|------------>
--------------------------------------------------------------------------------------------------------------------------------------------------|
|Kevin Falcone falcone@bestpractical.com |
--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Komu: |
|------------>
--------------------------------------------------------------------------------------------------------------------------------------------------|
|rt-users@lists.bestpractical.com, |
--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Datum: |
|------------>
--------------------------------------------------------------------------------------------------------------------------------------------------|
|14.06.2013 17:28 |
--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Předmět: |
|------------>
--------------------------------------------------------------------------------------------------------------------------------------------------|
|Re: [rt-users] Is it possible to set CustomField in mailgate plugin? |
--------------------------------------------------------------------------------------------------------------------------------------------------|
I’v got a mailgate plugin in which i am trying to set value to Ticket
CustomField.
I’m using this method:
my ($st,$msg) = $args{Ticket}->AddCustomFieldValue( Field => $CFObj->
id, Value => $id,
RecordTransaction => 1 );
However this always fail with error message:
Failed to save CF value: 100 as value for CF. Error: Custom field 1
does not apply to this
object
This look like the CF value cannot be assigne just because the ticket
itself does not really
exist yet. Is it the problem?
What’s the Action? Is this during creation or a correspond/comment?
Normally folks do CF manipulation from Scrips rather than Mail
Plugins.
-kevin
[attachment “att0q8g1.dat” deleted by Pavel Šidlo/linuxbox/cz]
RT Training in Seattle, June 19-20: http://bestpractical.com/training