[rt-users] Assign custom field to subject
Drew Barnes
barnesaw at ucrwcu.rwc.uc.edu
Wed Mar 26 12:10:11 EDT 2008
I would go with a variation of
http://wiki.bestpractical.com/view/SelectRequestor
Instead of selects to populate the box, just pre-define some and use the
javascript to let a user enter his or her own subject.
lgrella wrote:
> I have a user who would like the subject to be a drop down list of choices. I
> have not seen how to do this, so I have decided to create a custom field of
> a drop down list of choices, and if the subject is blank, move this custom
> field choice into the subject. I am not being successful. I have 2
> questions:
>
> 1. Can I make the subject a drop down list for one queue, rather than an
> type in field?
> 2. If not, does anyone see anything wrong with my code:
>
> here is the custom preparation code:
> return 0 unless (!$self->TicketObj->Subject);
> return 1;
>
> and here is the custom cleanup code:
> # move the contents of the custom field into the subject
> # the name of my custom field is Choose subject here
> my $subject =
> $self->TicketObj->FirstCustomFieldValue('Choose_subject_here');
>
> $self->TicketObj->Subject=$subject;
> return 1;
>
> ###################################
> Does the name of the field, since it has spaces, have to include
> underscores? I did it that way, and for testing purposes, even chose a
> custom field of one word to eliminate the question.
>
> Thanks,
> Laura
>
>
More information about the rt-users
mailing list