Version 25 (modified by Chris Wolf, 7 years ago) (diff)


Trac Ticket to Salesforce ticket synchronization


Maintain synchronization of Trac tickets in Salesforce. Trac tickets are reflected by the Salesforce custom objects, Ticket and Comment. Ticket objects are linked to Cases via M2M relationship provided by the CaseTicketLink custom object. Even though this is a M2M relation, Trac uses a custom text field for the Case number, so it's essentially many-to-one.

Comment objects are related to Ticket objects via the link custom object, TicketCommentLink. The related lists layouts are modified to display the related object fields rather then the object id.

See the Module Dependencies required.

This plugin comes with some Salesforce artifacts that are installed to your Salesforce org via an Ant script, using custom Ant tasks from Salesforce. There are four custom objects - Ticket, Comment, CaseTicketLink, TicketCommentLink; and four custom layouts - Case Layout, Ticket Layout, Comment Layout and TicketCommentLink Layout. The Case Layout is the default, out-of-the-box Case Layout with an additional related list - "Tickets" appended; so if you already have a customized Case Layout, you may want to modify the included package.xml to omit the Case Layout and manually add the Tickets related list to your Case Layout. The three other layouts are completely new and can be safely added regardless of existing customizations.

The "migration tool" is just a set of Salesforce-specific Ant tasks which use the metadata API to upload/download artifacts, such as custom objects, etc.

I provide an Ant script to perform the deployment. You need to acquire the ant-salesforce.jar by following these steps:

  1. Log into a org on your deployment machine.
  2. Click Your Name ➤ Setup ➤ Develop ➤ Tools, and then click Migration Tool.
  3. Save the .zip file locally and extract the contents to the directory of your choice.
  4. Copy ant-salesforce.jar into your Ant installation's lib directory. The lib directory is located in the root folder of your Ant installation. You could also just copy this jar to the same directory as build.xml
  5. Install the custom objects and custom page layouts into your Salesforce org.
  6. Copy trunk/src/trac/plugin/ to trac/projects/<yourproj>/plugins
  7. Generate the partner WSDL and copy it into your trac/projects/<yourproj>/conf directory
  8. Edit trac.ini to enable the ticket2sforce component as well as setting the web service API credentials.

To install the custom objects and page layouts:

$ cd trunk/src
$ ant deploy

Bugs/Feature Requests

Existing bugs and feature requests for TicketToSalesforcePlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:tickettosalesforceplugin here].


You can check out TicketToSalesforcePlugin from here using Subversion, or browse the source with Trac.

Module Dependencies


Example settings in trac.ini are:

tracrpc.* = enabled
ticket2sforce.* = enabled
ticketvalidator.* = enabled

username = yourSFusername
password = yourSFpasswd
sectoken = yourSFsecurityToken
wsdl = partner.wsdl

case_number = text
case_number.label = Case Number

new.required = case_number

Screen Shots


Author: chriswolf
Maintainer: chriswolf

Attachments (2)

Download all attachments as: .zip