<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello,<br>
<br>
I have received a few replies of list but so far no solution. I
have been thinking about the problem I thought about a solution
that might be a lot easier to implement.<br>
<br>
I have already sent an e-mail to Best Practical for a quote but I
would like to extend the same offer to all participants on the
list. Here are the requirements.<br>
<br>
As mentioned we need to to link RT to our project management
system. In this system we have tickets called help desk items
(HDI).<br>
<br>
We would like RT to create a new HDI when a new ticket is created
in RT (for specified queues). The ID of the HDI must be set in a
normal custom field for a ticket.<br>
<br>
I have looked into this and I think this can be done by making a
custom template with some Perl scripting with the following
functionality.<br>
<ol>
<li>A user (requestor) in RT has a custom field called
"CompanyID". This is the unique identifier for a customer in
project management system.</li>
<li>We want to have a custom script with a custom template that
gets triggered using the "On Create" event of a ticket. The
template must do the following:</li>
<ol>
<li>Fetch the CompanyID of the requestor that is assigned to a
ticket. If it is not available exit the template.</li>
<li>Insert a new record in an external MySQL database. This
query will use the CompanyID of the requestor and the
subject and body of a ticket.</li>
<li>Retrieve the insert ID of the MySQL query and assign the
value of that ID to a custom field of the ticket.</li>
</ol>
</ol>
That is it. Now we should have a link to the HDI on the display
page of a ticket which is exactly what we need.<br>
<br>
We must be able to assign this custom template to a queue (not
global) but I believe this functionality is already available in
RT.<br>
<br>
--<br>
<div class="moz-signature">
<div style="width: 700px;">
<div>
<p style="margin-top:0; margin-bottom:10px; margin-right:0;
margin-left: 5px; color:#32477F; font-size:11px;
font-family:Arial;">Met vriendelijke groet / Best regards,<br>
<br>
Hans Vos<br>
<br>
System Administrator</p>
</div>
<div>
<hr style="color:#96C13D; border-style:solid; border-width:
1px;">
</div>
<div>
<table width="100%">
<tbody>
<tr>
<td width="35%">
<p style="font-size:11px; font-family:Arial;
color:#32477F; margin-bottom:5px;"><span
style="color:#96C13D; font-weight:bold;
padding-right: 10px;">E</span> <a class="moz-txt-link-abbreviated" href="mailto:h.vos@drecomm.nl">h.vos@drecomm.nl</a></p>
<p style="font-size:11px; font-family:Arial;
color:#32477F; margin-bottom:5px;"><span
style="color:#96C13D; font-weight:bold;
padding-right: 10px;">T</span> 050-577 5822</p>
</td>
<td width="65%"><img
src="cid:part1.00040101.03030908@drecomm.nl"
alt="drecomm" title="drecomm" height="70">
</td>
</tr>
</tbody>
</table>
</div>
<div>
<hr style="color:#96C13D; border-style:dashed; border-width:
1px;">
</div>
<div style="margin-bottom: 15px;">
<h1 style="color:#96C13D; text-transform:uppercase;
margin-bottom:10px; font-size:12px; font-family:Arial;
font-weight:bold;">Vestiging Groningen</h1>
<table width="100%;">
<tbody>
<tr>
<td style="font-weight:bold; width:33%;
font-size:11px; font-family:Arial; color:#32477F;">Hoendiep
208</td>
<td style="width:33%; font-size:11px;
font-family:Arial; color:#32477F;"><span
style="color:#96C13D; font-weight:bold;
padding-right: 10px;">T</span> +31 (0)50 577 58 22</td>
<td style="width:33%; font-size:11px;
font-family:Arial; color:#32477F;"><span
style="color:#96C13D; font-weight:bold;
padding-right: 10px;">Bekijk onze actuele
projecten</span></td>
</tr>
<tr>
<td style="font-weight:bold; width:33%;
font-size:11px; font-family:Arial; color:#32477F;">9745
ED Groningen</td>
<td style="width:33%; font-size:11px;
font-family:Arial; color:#32477F;"><span
style="color:#96C13D; font-weight:bold;
padding-right: 10px;">F</span> +31 (0)50 577 58 23</td>
<td style="font-weight:bold; width:33%;
font-size:11px; font-family:Arial; color:#32477F;"><a
href="http://www.drecomm.nl"
style="text-decoration:none; color:inherit;">www.drecomm.nl</a>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<hr style="color:#96C13D; border-style:solid; border-width:
1px;">
</div>
</div>
</div>
<br>
Op 11-9-2012 21:12, Hans Vos schreef:<br>
</div>
<blockquote cite="mid:504F8D14.4020405@drecomm.nl" type="cite">Hi,
<br>
<br>
I would like to request some advice with regard to adding some
features to RT. We are looking into doing this ourselves or
perhaps outsource it. Each ticket that is created in RT must be
linked to a ticket (HDI) in our project management system.
<br>
<br>
Basically I want to have "Create HDI" button which will execute a
script that inserts a new record into an external MySQL database
and redirects you to another page in a new window using the insert
ID from the new record. In order to do this each ticket in RT must
have three pieces of information.
<br>
<br>
CompanyID (custom field for a Requestor in RT)
<br>
ProjectID (custom field for a Ticket in RT)
<br>
TaskID (custom field for a Ticket in RT)
<br>
<br>
To keep this user-friendly we want to have the ability to select a
Project and Task using a drop down list. The flow of the process
must be something like this.
<br>
<br>
1. New ticket is created and linked to a known Requestor (if not
we have to manually modify the Requestor this is not a problem).
<br>
<br>
2. If CompanyID custom field is set for the Requestor that value
must be used to generate the options for the Project drop down
list. These options must be gathered using an MySQL query.
<br>
<br>
3. When a Project is selected from the drop down list a second
drop down list must be populated. Again this will be done using a
MySQL query and the value from the Project drop down list.
<br>
<br>
This will require some AJAX functionality. The second drop down
list must be populated after a value is selected from the first.
Now when both drop down lists are selected a button with "Create
HDI" must be shown or activated (maybe greyed out prior). This
button must execute a script that will insert a new row to an
external database and it also must set a custom value called "HDI"
for the ticket.
<br>
<br>
I have read in the manual that you can populate drop down lists
with external data. Only I have no idea if it is at all possible
to use the value of another custom field in the script that will
generate the hash for the drop down options. And I also could not
find information about implementing some AJAX functionality to
populate a second drop down list using the value from another drop
down list.
<br>
<br>
If there is a company or individual willing to offer a quote to
implement this you can contact us off list to discuss the details.
<br>
<br>
--
<br>
Kind regards,
<br>
<br>
Hans Vos
<br>
<br>
Drecomm
<br>
<br>
--------
<br>
Final RT training for 2012 in Atlanta, GA - October 23 & 24
<br>
<a class="moz-txt-link-freetext" href="http://bestpractical.com/training">http://bestpractical.com/training</a>
<br>
<br>
We're hiring! <a class="moz-txt-link-freetext" href="http://bestpractical.com/jobs">http://bestpractical.com/jobs</a>
<br>
</blockquote>
<br>
</body>
</html>