Project Overview

In this project, we developed a Python script designed to streamline the synchronization of tasks between Azure DevOps and ClickUp. The script automates the process of creating Azure DevOps tasks based on existing tasks in ClickUp, updating task statuses, and linking these tasks by updating custom fields in ClickUp with corresponding Azure task IDs.

This project is ideal for teams that use both Azure DevOps and ClickUp for project management and want to ensure that tasks are consistently tracked across both platforms without manual intervention.

About the Script

Purpose

The primary goal of this script is to:

  1. Create Tasks in Azure DevOps: Automatically generate tasks in Azure DevOps based on the tasks available in ClickUp.
  2. Synchronize Task Statuses: Ensure that the status of tasks in Azure DevOps reflects in ClickUp, particularly by marking tasks as completed in ClickUp when they are in progress in Azure DevOps.
  3. Update Custom Fields in ClickUp: Link tasks in ClickUp with their corresponding Azure DevOps tasks by updating a custom field in ClickUp with the Azure task ID.

How It Works

  1. Task Creation in Azure DevOps:
    • For each task in ClickUp, a corresponding task is created in Azure DevOps. The title and description of the ClickUp task are used to populate the Azure task.
  2. Task Status Synchronization:
    • The script checks the status of each task in Azure DevOps. If a task is marked as “Doing,” the script will update the corresponding task in ClickUp to “COMPLETED.”
  3. Custom Field Update:
    • Once an Azure task is created, the script updates a custom field in the corresponding ClickUp task with the Azure task ID, effectively linking the two tasks.

Final Code

Here’s the complete code that automates the synchronization process between Azure DevOps and ClickUp:

How to Use the Script

  1. Prerequisites:
    • Python 3.6+: Ensure you have Python 3.6 or higher installed on your system.
    • Required Libraries: Install the requests library using pip install requests.
  2. Configuration:
    • Replace the placeholders (your_clickup_api_key, your_azure_personal_access_token, etc.) with your actual ClickUp API key, Azure DevOps personal access token, and relevant project information.
  3. Running the Script:
    • Save the script to a .py file (e.g., sync_tasks.py).
    • Run the script using Python:bashCopy codepython sync_tasks.py
  4. Automation:
    • This script can be scheduled to run at regular intervals (e.g., using a cron job or a scheduled task) to keep your Azure DevOps and ClickUp tasks synchronized automatically.

Tools and Technologies Used

  • Python 3.6+: A versatile programming language used for scripting and automation.
  • ClickUp API: Provides programmatic access to ClickUp, enabling task management automation.
  • Azure DevOps API: Allows interaction with Azure DevOps work items, supporting task creation and status tracking.

Conclusion

This Python script offers a powerful solution for teams using both ClickUp and Azure DevOps, enabling seamless synchronization between the two platforms. By automating the creation, status updates, and linking of tasks, the script ensures consistency across your project management tools, saving time and reducing the potential for manual errors.

If you’re looking to optimize your workflow and improve collaboration between your development and project management teams, this script is a practical and effective tool.