Hello all,
Is it possible to automaticaly create process tickets?
For example, by using Postmaster filters, or via the GenericInterface?
Another solution would be to be able to change a regular ticket into a process ticket. Is it possible at all?
Best regards,
Cyrille
[SOVED] Automatic process ticket creation?
Moderator: crythias
[SOVED] Automatic process ticket creation?
Last edited by StCyr on 15 Apr 2016, 14:25, edited 1 time in total.
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Automatic process ticket creation?
It's absolutly possible.
You can use the GenericInterface to do so, I think there's even a thread around that explains how to do it for "recurring" tickets.
As for the second question, the only difference between a "normal" and a "process" ticket is:
- The process ticket has two values for the PM-Dynamic Fields
- The process ticket does not require an article to be created.
You can convert them if you allow the fields ProcessManagementProcessID and ProcessManagementActivityID in any mask (free fields, note, etc. ..) and fill them with the correct values.
You can use the GenericInterface to do so, I think there's even a thread around that explains how to do it for "recurring" tickets.
As for the second question, the only difference between a "normal" and a "process" ticket is:
- The process ticket has two values for the PM-Dynamic Fields
- The process ticket does not require an article to be created.
You can convert them if you allow the fields ProcessManagementProcessID and ProcessManagementActivityID in any mask (free fields, note, etc. ..) and fill them with the correct values.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Automatic process ticket creation?
Hi Rolf,
Thanks for the reply.
I couldn't find the thread about recurring tickets, but, anyway: Do I understand it correctly that in order to create a process ticket all what's needed (compared to a regular ticket) is to assign correct value to the ProcessManagementProcessID and ProcessManagementActivityID fields?
So, creating process tickets using OTRS' GenericInterface's TicketCreate operation shouldn't be any harder than creating "regular" tickets?
Br,
Cyrille
Thanks for the reply.
I couldn't find the thread about recurring tickets, but, anyway: Do I understand it correctly that in order to create a process ticket all what's needed (compared to a regular ticket) is to assign correct value to the ProcessManagementProcessID and ProcessManagementActivityID fields?
So, creating process tickets using OTRS' GenericInterface's TicketCreate operation shouldn't be any harder than creating "regular" tickets?
Br,
Cyrille
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Automatic process ticket creation?
Indeed. It should suffice to pass two additional values for the dynamic fields.
Here is an example of an SOAP connector, but you have to make sure you have the webservices configured:
Here is an example of an SOAP connector, but you have to make sure you have the webservices configured:
Code: Select all
#!/usr/bin/perl -w
use strict;
use warnings;
use File::Basename;
use FindBin qw($RealBin);
use lib dirname($RealBin);
use SOAP::Lite;
my $Host='IP-Of-you-OTRS-System';
my $ServiceID = 'TicketCreate';
my $URL = "http://$Host/otrs/nph-genericinterface.pl/TicketConnector/$ServiceID";
my $NameSpace='http://$Host/TicketConnector/';
my $Operation = 'TicketCreate';
my $XMLData = '
<UserLogin>Valid-User-Login</UserLogin>
<Password>Valid-User-PW</Password>
<Ticket>
<Title>Ticket via SOAP!</Title>
<CustomerUser>Some-Customer-User</CustomerUser>
<Queue>Some-Queue</Queue>
<State>open</State>
<Type>Problem</Type>
<Priority>3 normal</Priority>
</Ticket>
<Article>
<Subject>Article title</Subject>
<Body>Test</Body>
<ContentType>text/plain; charset=utf8</ContentType>
<TimeUnit>5</TimeUnit>
<ArticleType>email-external</ArticleType>
<SenderType>system</SenderType>
</Article>
';
my $SOAPData = SOAP::Data->type( 'xml' => $XMLData );
my $SOAPObject = SOAP::Lite
->uri($NameSpace)
->proxy($URL)
->$Operation($SOAPData);
# check for a fault in the soap code.
if ( $SOAPObject->fault ) {
print $SOAPObject->faultcode, " ", $SOAPObject->faultstring, "\n";
}
else {
# get the XML response part from the SOAP message.
my $XMLResponse = $SOAPObject->context()->transport()->proxy()->http_response()->content();
# deserialize response (convert it into a perl structure).
my $Deserialized = eval {
SOAP::Deserializer->deserialize($XMLResponse);
};
# remove all the headers and other not needed parts of the SOAP message.
my $Body = $Deserialized->body();
# just output relevant data and no the operation name key (like TicketCreateResponse).
for my $ResponseKey ( keys %{$Body} ) {
print Dumper( $Body->{$ResponseKey} );
}
}
exit 0;
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Automatic process ticket creation?
yep, works
Thanks
Thanks