Multiple scrip actions

I want to enable my users to send a canned response to certain request
types but without the needing all the functionality of RTFM. So I have a
custom ticket field, Formletter, and a scrip which fires when that field
becomes the required value, sending the required content to the requestor.

Description: Send PasswordResponse
Condition: User Defined
Custom condition: return undef unless
($self->TicketObj->FirstCustomFieldValue(‘Formletter’) =~
/ForgottenPassword/);
Action: Notify Requestors
Template: ForgottenPasswordReponse

It works nicely.
I would like the scrip to close the ticket at the same time. Therefore I
need to change to a Custom Action and use
$self-TicketObj->setStatus(Status=>‘resolved’);
But it raises a couple of questions:
I assume that I would have to change the Action field, above, in order
to ‘User Defined’ to actually get my custom action to fire. How do I get
a custom action to notify requestors as well? Or should I just use 2
scrips with the same condition?

Duncan Hutty
System Administrator, ECE
Carnegie Mellon University

Please use informative subject lines

I created a simple Custom field called “Product”.

I see it on the Custom Fields main configuration page looking good. I go to
my General queue’s Ticket Custom Fields and see:

Global Custom Fields:
- Product

Selected Custom Fields:
Product

Unselected Custom Fields:

When I open a new ticket or look at a ticket, it displays the field twice
somehow. Not sure where it’s coming from. I’ve skimmed the other files but
can’t see anything obvious.

I created a simple Custom field called “Product”.

I see it on the Custom Fields main configuration page looking good. I go
to my General queue’s Ticket Custom Fields and see:

Global Custom Fields:
- Product

Selected Custom Fields:
Product

Unselected Custom Fields:

When I open a new ticket or look at a ticket, it displays the field twice
somehow. Not sure where it’s coming from. I’ve skimmed the other files
but can’t see anything obvious.

There is a bug where if a CF is set to be global and also
set specifically on a queue it will appear twice.

See: http://rt3.fsck.com/Ticket/Display.html?id=6365
(username=guest password=guest)

I just happened to be reading the code right now to see how to fix it.

THe problem is that RT::Record::CustomFields has this code:

sub CustomFields {
my $self = shift;
my $cfs = RT::CustomFields->new( $self->CurrentUser );
$cfs->UnLimit;

# XXX handle multiple types properly
    $cfs->LimitToLookupType($self->CustomFieldLookupType);
    $cfs->LimitToGlobalOrObjectId($self->_LookupId($self->CustomFieldLookupType));

return $cfs;

}

This result in 2 rows being returned from the DB, one for the global
designation and one for the queue specific.

I am trying to figure out if this sub needs to be changed (probably)
or if the mason components need to remember which CFs they have
displayed and skip them the 2nd time.

-Todd

so… what would be the preferred “workaround” if it exists?

in the ObjectCustomFields table, i see 3 entries. two pertaining to my
CustomField that appears twice. Could one just remove one of those rows?
the third being an old CF from my 3.2 which is hanging around for some
reason and adding another quirk to my mix.

If I wanted to delete a custom field permanently, should i just do it via
the backend? ie. my old 3.2 CF that’s hanging around.

so… what would be the preferred “workaround” if it exists?

in the ObjectCustomFields table, i see 3 entries. two pertaining to my
CustomField that appears twice. Could one just remove one of those rows?
the third being an old CF from my 3.2 which is hanging around for some
reason and adding another quirk to my mix.

If I wanted to delete a custom field permanently, should i just do it via
the backend? ie. my old 3.2 CF that’s hanging around.

You should be able to user the RT web interface to fix.

Configuration->Queues->(select the queue)->Custom Fields->(un-check
the offending CF becuase it is set as global too).

-Todd