This script should be run with TFS4JIRA Self 9.7 or higher.
This is a Python script that uses TFS4JIRA Self-Hosted API in order to update the synchronization user credentials for JIRA and for Azure DevOps/TFS.
PREREQUISITES:
TFS4JIRA Self-Hosted 9.7 or higher
The latest version of Python: https://www.python.org/downloads/
Python IDE: PyCharm: https://www.jetbrains.com/pycharm/download/ (we will run the script in this editor)
The script:
INITIAL SETUP IN SCRIPT :
Set the API endpoint URL
tfs4jira_url = "TFS4JIRA URL" This is your TFS4JIRA synchroniser URL
jira_user = "" Email or login for synchronization user
jira_password = "" Password or Personal Access Token in case of cloud instance
tfs_user = "" Email or login for synchronization user
tfs_password = "" Password or Personal Access Token in case of cloud instance
Set the Bearer Token
bearer_token = "" In order to obtain this token, please start TFS4JIRA and click “manage profiles with API” link just below the blue ‘create profile’ button. This link will take you to Swagger. Click ‘APIToken Page’ link to display the token
WHAT WILL IT DO?
Script will get the list of all the profiles from the TFS4JIRA instance.
Having list of guids, script will for each guid, run API updating synchronisation user credentials (provided at the beginning of the script)
Script will display error messages at any step in the PyCharm console, informing what went wrong