QuickCreate

Hi;
RT-3.6.1
I would like to expand Quickcreate section to include requestor and text
area for problem description (I noticed in QuickCreate someone did start
on this but it commented out) …
Its easy enough to process the requestor in index.html, however I am not
sure what to do about the text, do I need to create a mime object first
or can I pass the text to the $ticket->Create function ?? if the later
then whats the argument for it
Many thanks;
Roy

At Friday 9/22/2006 01:28 PM, Roy El-Hames wrote:

Hi;
RT-3.6.1
I would like to expand Quickcreate section to include requestor and
text area for problem description (I noticed in QuickCreate someone
did start on this but it commented out) …
Its easy enough to process the requestor in index.html, however I am
not sure what to do about the text, do I need to create a mime
object first or can I pass the text to the $ticket->Create function
?? if the later then whats the argument for it
Many thanks;
Roy

Hello Roy,

You’ll need to create a mime object and pass it in.

Steve

Thanks Stephen … I was wondering if the Create Ticket would take care
of that …
Created the Mime Obj and it works fine.
Regards;
Roy

Stephen Turner wrote:

Hi Roy,

can you share your QuickCreate?

Thanks

Torsten2006/9/25, Roy El-Hames rfh@pipex.net:

Thanks Stephen … I was wondering if the Create Ticket would take care
of that …
Created the Mime Obj and it works fine.
Regards;
Roy

Stephen Turner wrote:

At Friday 9/22/2006 01:28 PM, Roy El-Hames wrote:

Hi;
RT-3.6.1
I would like to expand Quickcreate section to include requestor and
text area for problem description (I noticed in QuickCreate someone
did start on this but it commented out) …
Its easy enough to process the requestor in index.html, however I am
not sure what to do about the text, do I need to create a mime object
first or can I pass the text to the $ticket->Create function ?? if
the later then whats the argument for it
Many thanks;
Roy

Hello Roy,

You’ll need to create a mime object and pass it in.

Steve


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

MFG

Torsten Brumm

http://www.torsten-brumm.de

Yeah sure … Sorry I don’t know how to do patch files …but the diff of
QuickCreate is:

52c52,54
< <&|/l&>Subject</&>:

<&|/l&>Subject</&>:

<&|/l&>Requestor:

63c65
< %#

<textarea cols="80" rows="4"

name=“Tickettext”>

And in index.html in the change :

if ($ARGS{‘QuickCreate’} ) {
my $ticket = RT::Ticket->new($session{‘CurrentUser’});
my ($tid, $trans, $tmsg) = $ticket->Create(Queue => $ARGS{‘Queue’},
Owner => $ARGS{‘Owner’},
Requestor =>
$session{‘CurrentUser’}->UserObj->EmailAddress,
Subject => $ARGS{‘Subject’});

push (@results, $tmsg);

}

to:

if ($ARGS{‘QuickCreate’} ) {
my $txt = $ARGS{‘Tickettext’};
$RT::Logger->debug(“the TText is :”.$txt);
my $Mime = MIME::Entity->build(
Type => ‘text/plain’,
Data => $txt
);
my $MimeMessage = $Mime->stringify();
my $parser = RT::EmailParser->new();
$parser->ParseMIMEEntityFromScalar($MimeMessage);
my $ticket = RT::Ticket->new($session{‘CurrentUser’});
my ($tid, $trans, $tmsg) = $ticket->Create(Queue => $ARGS{‘Queue’},
Owner => $ARGS{‘Owner’},
#Requestor =>
$session{‘CurrentUser’}->UserObj->EmailAddress,
Requestor => $ARGS{‘requestor’} ||
$session{‘CurrentUser’}->UserObj->EmailAddress,
Subject => $ARGS{‘Subject’},
MIMEObj => $parser->Entity);
push (@results, $tmsg);
}

Regards;
Roy
Torsten Brumm wrote: