[rt-users] (no subject)
Stefan Franck
stefan.franck at interactive-objects.com
Mon Jul 17 11:26:21 EDT 2006
Hi,
setting Custom Fields by Scrips can be done via the following action:
my $fname = [The name of the custom field]
my $value = [The value which will be assigned]
my $CF = RT::CustomField->new($RT::SystemUser);
$CF->LoadByNameAndQueue(Name => $fname, Queue => $self->TicketObj->Queue);
unless($CF->id) {
# queue 0 is a special case, the global queue
$CF->LoadByNameAndQueue(Name => $fname, Queue => '0');
}
unless($CF->id) {
$RT::Logger->error("No field ".$fname." in queue ".
$self->TicketObj->QueueObj->Name);
return undef;
}
$self->TicketObj->AddCustomFieldValue(Field => $CF, Value => $value,
RecordTransaction => 0);
A custom scrip with above action and condition "On Resolve" should do
the job.
Cheers,
Stefan
Hayes, Paul wrote:
> Hi,
>
>
>
> I have a custom status field that gives a more detailed breakdown of the
> tickets. I also have set up scrips to send notifications when this
> custom status changes. I did have notifications set up when the standard
> RT status changes, and On Resolve, but I want to remove these to reduce
> the volume of mails sent to users.
>
>
>
> The only open ended issue is that I’d like to ensure that if someone
> updates the RT status to ‘resolved’ , that it also updates the custom
> status to ‘closed’. Is ther any way of doing this through a scrip?
>
>
>
> I’ve had a look on the wiki, and the only thing that came close was
>
> http://wiki.bestpractical.com/index.cgi?EditCustomFieldsOnUpdate
>
>
>
> ..but I’d like the custom status change to occur automatically without
> requiring user input.
>
>
>
> Thanks,
>
> Paul
>
>
>
> P.S. I am using RT 3.4.5
>
>
> ________________________________________________________________________
> Privileged, confidential and/or copyright information may be contained
> in this communication. This e-mail and any files transmitted with it are
> confidential and intended solely for the use of the individual or entity
> to whom they are addressed. If you are not the intended addressee, you
> may not copy, forward, disclose or otherwise use this e-mail or any part
> of it in any way whatsoever. To do so is prohibited and may be unlawful.
> If you have received this email in error
> please notify the sender immediately.
>
> Paddy Power PLC may monitor the content of e-mail sent and received for
> the purpose of ensuring compliance with its policies and procedures.
> ________________________________________________________________________
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>
> We're hiring! Come hack Perl for Best Practical: http://bestpractical.com/about/jobs.html
More information about the rt-users
mailing list