Simplest Enterprise Continuous Integration Solutions

Sunday, January 29, 2012

JIRA migration: ClearQuest multi-line description

Migrate ClearQuest defects multi-line description field into JIRA

1. Using ClearQuest client or ClearQuest web to create a ClearQuest query for those ClearQuest defects without desc field
2. From ClearQuest web exporting ClearQuest query results into excel format, and save as a csv file
3. JIRA, Administration -> System -> Import & Export -> Import External projects -> CSV Import
4. Duplicate the above ClearQuest query, and only display id and description fields
5. From ClearQuest Eclispe Client exporting ClearQuest query results as XML format

Use ClearQuest Client the one built on Eclipse

Within Eclipse ClearQuest Client workspace, select a query, which contains the display fields: id and multiline field (such as, Description),right click the query -> select Export Records… -> in Select fields diagram, click Next -> in Export tool settings diagram, select XML as Format, click Next -> in Specify file names diagram, click Finish
6. Run a PERL script (i.e. xmlClearQuestExportIntoJira.pl) through JIRA cli interface updating desc on Linux from where ClearQuest UTF-8 code issue will be eliminated)


NAME

    xmlClearQuestExportIntoJira.pl

SYNOPSIS

  DESCRIPTION

    This script is going to migrate exported XML format ClearQuest id, Description file into Jira.

  VERSION

    Version 1.0

  USAGE

       perl xmlClearQuestExportIntoJira.pl --jira_project_key "[jira_project_key]" --jira_field_for_clearquest_id "[jira_field_for_clearquest_id]" --jira_field_for_clearquest_description "[jira_field_for_clearquest_description]" --exported_xml_format_clearquest_id_description_file "[exported_xml_format_clearquest_id_description_file]" --jira_cli "[jira_cli]"
    *   --jira_project_key "[jira_project_key]" - Jira Project Key. *Required*
    *   --jira_field_for_clearquest_id "[jira_field_for_clearquest_id]" - Jira field maps to ClearQuest id field. *Required*
    *   --jira_field_for_clearquest_description "[jira_field_for_clearquest_description]" - Jira field maps to ClearQuest Description field. *Required*
    *   --exported_xml_format_clearquest_id_description_file "[exported_xml_format_clearquest_id_description_file]" - Full path of exported xml format ClearQuest id, Description file. *Required*
    *   --jira_cli "[jira_cli]" - Full path of atlassian-cli. *Required*

  EXAMPLE

       1. Migrate exported XML format ClearQuest id, Description file into Jira.
       perl /tmp/xmlClearQuestExportIntoJira.pl --jira_project_key "MY_JIRA_PROJECT_KEY" --jira_field_for_clearquest_id "id" --jira_field_for_clearquest_description "description" --exported_xml_format_clearquest_id_description_file /tmp/CQ_desciption_export.xml --jira_cli /opt/atlassian-cli-2.4.0/jira.sh

2 comments:

  1. Thanks for the script. What if I want to migrate around 5000 entries from my ClearQuest account to Jira. I have to perform 1-2-1 Mapping. Can I use the same script? Any suggestions on how should I go about?

    ReplyDelete
  2. Thank y for this script, it's very useful for my, cause now I'm writing the dissertation work, so I want to use it there, if y don't mind.

    Best regards
    Toby, data room virtual

    ReplyDelete