[Internal] How to bulk associate
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:
Ask the customer for a .csv file of the associations and their corresponding Jira issue keys
Jira access (User name and PAT(Jira Server), PAT/Password (Jira Cloud))
Sync direction (auto-pull, auto-push)
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:
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
Â
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'
Sync direction:
True > Enanled
False > Disabledelif (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
Read the README.md File
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 like
Â