Changes between Version 9 and Version 10 of ScarabToTracScript


Ignore:
Timestamp:
Nov 3, 2015, 8:45:32 AM (4 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • ScarabToTracScript

    v9 v10  
    1 = Migrate Scarab issues to Trac tickets =
     1[[PageOutline(2-5,Contents,pullout)]]
    22
    3 == Description ==
     3= Migrate Scarab issues to Trac tickets
    44
    5 Script that migrates [http://scarab.tigris.org/ Scarab] issues to Trac tickets
     5== Description
    66
    7 == Bugs/Feature Requests ==
     7This is a script that migrates [http://scarab.tigris.org/ Scarab] issues to Trac tickets. Scarab is an artefact tracking system released under the Apache license.
     8
     9== Bugs/Feature Requests
    810
    911Existing bugs and feature requests for ScarabToTracScript are
     
    1113
    1214If you have any issues, create a
    13 [http://trac-hacks.org/newticket?component=ScarabToTracScript&owner=szaffarano new ticket].
     15[/newticket?component=ScarabToTracScript new ticket].
    1416
    15 == TODO ==
     17[[TicketQuery(component=ScarabToTracScript&group=type,format=progress)]]
     18
     19== TODO
     20
    1621 1. Translate error messages to English
    1722 1. Improve validation errors
     
    1924 1. Implement a console (vielleicht readline) to facilitate the importation
    2025
    21 == Download ==
     26== Download
    2227
    23 Download the zipped source from [download:scarabtotracscript here].
     28Download the zipped source from [export:scarabtotracscript here].
    2429
    25 == Source ==
     30== Source
    2631
    27 You can check out ScarabToTracScript from [http://trac-hacks.org/svn/scarabtotracscript here] using Subversion, or [source:scarabtotracscript browse the source] with Trac.
     32You can check out ScarabToTracScript from [/svn/scarabtotracscript here] using Subversion, or [source:scarabtotracscript browse the source] with Trac.
    2833
    29 == Example ==
     34== Installation
    3035
    31 You should have installed the [http://trac-hacks.org/wiki/XmlRpcPlugin XmlRpcPlugin] because updates are done through it.
     36General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
     37
     38== Configuration
     39
     40You must install the XmlRpcPlugin, because updates are done through it.
    3241
    3342 1. Modify the configuration file, import-configuration.sample.xml. There are several sections:
    34    1. Common: common stuff.  '''scarab-attachments-path''' should be the path where are the Scarab attachments.
    35 {{{
    36 #!xml
    37     <common>
    38         <trac-xmlrpc-url>http://user:password@any-host-to-trac/projects/a-project/login/xmlrpc</trac-xmlrpc-url>
    39         <scarab-attachments-path>/tmp/scarab/attch_scarab</scarab-attachments-path>
    40     </common>
     43   1. Common: common stuff. '''scarab-attachments-path''' should be the path where the Scarab attachments are located.
     44{{{#!xml
     45<common>
     46    <trac-xmlrpc-url>http://user:password@any-host-to-trac/projects/a-project/login/xmlrpc</trac-xmlrpc-url>
     47    <scarab-attachments-path>/tmp/scarab/attch_scarab</scarab-attachments-path>
     48</common>
    4149}}}
    4250   1. Mappings between scarab users and trac users
    43 {{{
    44 #!xml
     51{{{#!xml
    4552<users-map>
    4653   <user id-scarab="scarab-userA" id-trac="trac-userA" />
     
    4855</users-map>
    4956}}}
    50    1. 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''' element indicates that before setting the value of these field there will be a [http://genshi.edgewall.org/ Genshi] transformation, using as genshi's context a variable named '''ticket''' with all Scarab issue's fields, including those marked with ignore = true and too the '''aditional-attributes''' (see below)
    51 {{{
    52 #!xml
    53     <global-attributes-map>
    54         <attribute id-scarab="Para" id-trac="owner" />
    55         <attribute id-scarab="CC" id-trac="cc" ignore="true"/>
    56         <attribute id-scarab="Caso de Test" id-trac="summary">
    57             <transformation>$ticket.summary [Issue Scarab $ticket.id]</transformation>
    58         </attribute>
    59     </global-attributes-map>
     57   1. Global mappings between Scarab and 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''' element indicates that before setting the value of these field there will be a [http://genshi.edgewall.org/ Genshi] transformation, using as genshi's context a variable named '''ticket''' with all Scarab issue's fields, including those marked with ignore = true and too the '''aditional-attributes''':
     58{{{#!xml
     59<global-attributes-map>
     60    <attribute id-scarab="Para" id-trac="owner" />
     61    <attribute id-scarab="CC" id-trac="cc" ignore="true"/>
     62    <attribute id-scarab="Caso de Test" id-trac="summary">
     63        <transformation>$ticket.summary [Issue Scarab $ticket.id]</transformation>
     64    </attribute>
     65</global-attributes-map>
    6066}}}
    6167   1. 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.
    62 {{{
    63 #!xml
    64     <scarab-artifact type="Reporte Error QA" ticket-type="Defecto">
    65         <attributes-map>
    66            <!-- equal to globalattributes-map -->
    67         </attributes-map>
     68{{{#!xml
     69<scarab-artifact type="Reporte Error QA" ticket-type="Defecto">
     70    <attributes-map>
     71       <!-- equal to globalattributes-map -->
     72    </attributes-map>
    6873
    69         <additional-attributes>
    70             <attribute id="description">
    71                 Ticket importado desde Scarab, ID = ${ticket.id}
    72                 {% if "descripcion_scarab" in ticket %}${ticket.descripcion_scarab}{% end %}
    73                 {% if "log" in ticket %}Log:
    74                    ${ticket.log}
    75                 {% end %}
    76                 {% if "observaciones_comentarios_mejoras" in ticket %}Observaciones, comentarios y mejoras:
    77                    $ticket.observaciones_comentarios_mejoras
    78                 {% end %}
    79             </attribute>
    80         </additional-attributes>
     74    <additional-attributes>
     75        <attribute id="description">
     76            Ticket importado desde Scarab, ID = ${ticket.id}
     77            {% if "descripcion_scarab" in ticket %}${ticket.descripcion_scarab}{% end %}
     78            {% if "log" in ticket %}Log:
     79               ${ticket.log}
     80            {% end %}
     81            {% if "observaciones_comentarios_mejoras" in ticket %}Observaciones, comentarios y mejoras:
     82               $ticket.observaciones_comentarios_mejoras
     83            {% end %}
     84        </attribute>
     85    </additional-attributes>
    8186}}}
    8287   1. a '''status-map''': maps the status field between Scarab and Trac statuses.
    83 {{{
    84 #!xml
    85     <status-map>
    86         <status id-scarab="Abierto" id-trac="new" />
    87         <status id-scarab='Resuelto' id-trac='closed' />
    88     </status-map>
     88{{{#!xml
     89<status-map>
     90    <status id-scarab="Abierto" id-trac="new" />
     91    <status id-scarab='Resuelto' id-trac='closed' />
     92</status-map>
    8993}}}
    90  1. The scarab2trac.py script should run in a text terminal.  With the "-h" parameter it prints the help:
     94 1. The scarab2trac.py script should run in a text terminal. With the "-h" parameter it prints the help:
    9195{{{
    9296Usage: scarab2trac.py [options]
     
    99103
    100104}}}
    101  CONF file was explained above.  SCARAB file must be a XML file, exported from Scarab (Scarab options: Admin -> Current module -> XML export issues)
    102 == Recent Changes ==
     105
     106The CONF file was explained above. The SCARAB file must be a XML file, exported from Scarab (Scarab options: Admin -> Current module -> XML export issues).
     107
     108== Recent Changes
    103109
    104110[[ChangeLog(scarabtotracscript, 3)]]
    105111
    106 == Author/Contributors ==
     112== Author/Contributors
    107113
    108114'''Author:''' [wiki:szaffarano] [[BR]]
     115'''Maintainer:''' [[Maintainer]] [[BR]]
    109116'''Contributors:'''