Blog from April, 2024

In this article, we’ll explain how to run the bulk association script and when

When:

Mostly, this will be used when migrating and something wrong happens.

Jira Platform:

Server and Cloud

Pre-requisites:

  1. Ask the customer for a .csv file of the associations and their corresponding Jira issue keys

  2. Jira access (User name and PAT(Jira Server), PAT/Password (Jira Cloud))

  3. Sync direction (auto-pull, auto-push)

  4. Double-check if bindings are migrated over

The script:

You can get the script from:

First download:

  • VS code

  • Extensions to download:

    • Python

    • Pylance

Things you need to change:

  1. Credentials:

    # Credentials (Please ensure you enter the creds)**
    
    baseUrl = "https://<Jira Instance>" #https://internal.guideline.tools/jira
    username = "" #emailid
    password = "" #api token
    PAT = "NDg1NDkzNDM2NjQ5Oh+I+ssssssssssssss" #Personal Access token
    auth = HTTPBasicAuth(username, password) #basicauth

  2. Association file from the customer

You need to make sure the file is in CSV format and that it has the Jira key as the first column and the association ID as the second column

# Names of files to read from (Please ensure the filename is correct)**
r_filenameCSV = './<file name>.csv'
#r_filenameTSV = './RedSeal/SCC.tsv'
  1. Sync direction:
    True > Enanled
    False > Disabled

    elif (soid[0:3]=='500'): # 500 is the first 3 char of the case object
             case=True
             individual_association = {
                soid: {
                    "son": "Case",
                    "autoPush": True,
                    "autoPull": True,
                    "viewOnly": False,
                }
            }

If you’re not using the case object or standard objects, make sure you’re using the API name of the object

  1. Read the README.md File

  2. Run the script using
    python3 python_migration_script.py > output_test.txt
    output_test.txt is the file name. You can change it to something else if you wish, and it will look something likeScreenshot 2024-04-30 at 12.29.53 PM.png