Version 4 (modified by Sebastián Zaffarano, 11 years ago) (diff)


Migrate Scarab issues to Trac tickets


Script that migrates Scarab issues to Trac tickets

Bugs/Feature Requests

Existing bugs and feature requests for ScarabToTracScript are here.

If you have any issues, create a new ticket.


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


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


You should have installed the XmlRpcPlugin because updates are done through it.

  1. Modify the configuration file, import-configuration.sample.xml. There are several sections:
    1. Common: common stuff. scarab-attachments-path should be the path where are the Scarab attachments.
    2. Mappings between scarab users and trac users
         <user id-scarab="scarab-userA" id-trac="trac-userA" />
         <user id-scarab="scarab-userA" id-trac="trac-userB" />
    3. Global mappings between scarab und trac form fields. The optional ignore attribute indicates that if the field does not exist in the Trac form, will be ignored. It is used to define fields to be used as part of other fields (in transformations). The transformation tag indicates that before setting the value of these field there will be a Genshi transformation, using as context all fields (including those marked with ignore = true)
              <attribute id-scarab="Para" id-trac="owner" />
              <attribute id-scarab="CC" id-trac="cc" ignore="true"/>
              <attribute id-scarab="Caso de Test" id-trac="summary">
                  <transformation>$ticket.summary [Issue Scarab $]</transformation>
    4. a scarab-artifact section: mappings for a particular scarab issue type. additional-attributes Adds to Trac ticket (ticket-type attribute) associated with scarab issue (type attribute). The value is too a Genshi transformation. Should have a scarab-artifact tag for each Scarab Issue type.
          <scarab-artifact type="Reporte Error QA" ticket-type="Defecto">
                 <!-- equal to globalattributes-map -->
                  <attribute id="description">
                      Ticket importado desde Scarab, ID = ${}
                      {% if "descripcion_scarab" in ticket %}${ticket.descripcion_scarab}{% end %}
                      {% if "log" in ticket %}Log:
                      {% end %}
                      {% if "observaciones_comentarios_mejoras" in ticket %}Observaciones, comentarios y mejoras:
                      {% end %}
    5. a status-map: maps the status field between Scarab and Trac statuses.
              <status id-scarab="Abierto" id-trac="new" />
              <status id-scarab='Resuelto' id-trac='closed' />
  2. The script should run in a text terminal. With the "-h" parameter it prints the help:
    Usage: [options]
      -h, --help            show this help message and exit
      -c CONF, --conf=CONF  Archivo de configuracion
      -s SCARAB, --scarab-issues=SCARAB
                            Archivo con los issues exportados desde Scarab
    CONF file was explained above. SCARAB file must be a XML file, exported from Scarab (Scarab options: Admin -> Current module -> XML export issues)

Recent Changes

6590 by szaffarano on 2009-09-24 13:18:10
initial version
6589 by szaffarano on 2009-09-24 12:27:01
New hack ScarabToTracScript, created by szaffarano


Author: szaffarano