Adding Pivotal Tracker issue id as a custom field in Jira - npreys/pivotal_to_jira GitHub Wiki

Issue

In many cases when we migrate from Pivotal to Jira we need to preserve original Pivotal Tracker issue id. Good example would be if we referenced issues in commits within our source control using these ids and would like to preserve the mapping in Jira.

Solution

One proposed solution to this issue is to add custom filed in Jira and populate it with Pivotal original issue id (we can use hidden custom field with Pivotal id we get after import, but it is much easier when this information is readily available and visible to any Jira user). To do that we will use python script add_pivotal_id_as_label.py.Following is a step-by-step walk through on how to accomplish this:

  1. As a Jira admin create custom field (we will name it Pivotal ID but you can call it whatever you like).
  2. Next we need to find custom field id for our newly created field. To do that we call Jira REST API (you can use your browser) Example: http://MyJiraUrl.com/rest/api/latest/search?jql=project=%22MyProjectId%22
  3. Within same payload search for hidden custom field which has Pivotal ID mapping populated during import.
  4. Next we need to populate our configuration ini file. A template of this config file can be found here: pivotal_jira.ini Within JIRA section of this file provide, Jira URL, project name, newly create custom field id and hidden custom field id. Under DEFAULT section you need to provide directory where log file will be written.
  5. We are ready to run our script. To run this script you need to have Jira credentials (Remember the user which will be used to run this script, will be the one who's name will be associated with the change in Jira issue)

Run this

python add_pivotal_id_as_label.py --user_name YOUR_USER --password YOUR_PASSWORD --ini_file pivotal_jira.ini