How can I import tasks and link them to a user story

Bethanne Mcfadden 0 Reputation points
2025-09-25T15:02:07.8733333+00:00

I want to import tasks via a .csv and link to an existing user story, how do I do it.

Azure DevOps

2 answers

Sort by: Most helpful
  1. Pashikanti Kumar 1,725 Reputation points Microsoft External Staff Moderator
    2025-09-25T21:40:11.85+00:00

    Hi Bethanne Mcfadden,

    Thank you for posting your question in the Microsoft Q&A forum

    To import tasks from a .csv file and link them to an existing user story in Azure DevOps, you can follow these steps:

     

    Steps to Import Tasks and Link Them to a User Story

    1. Prepare Your CSV File

    • Ensure your .csv file contains the necessary columns for the tasks you want to import. Common columns include:

    a.      Title: The name of the task.

    b.     Work Item Type: Set this to Task.

    c.      Parent: The ID of the user story you want to link the task to.

    d.     Description: (Optional) A description of the task.

    e.      Assigned To: (Optional) The user to whom the task is assigned.

    Example CSV structure:

    Work Item Type             Title                      Parent

    Task                                     Task 1                  12345

    Task                                     Task 2                  12345

     

    • Replace 12345 with the ID of the user story you want to link the tasks to.

     

    2. Install the Azure DevOps Work Item Import Tool

    • Azure DevOps does not natively support CSV imports, but you can use the Excel Add-in or third-party tools like Azure DevOps Migration Tools

    Alternatively, you can use the Excel integration provided by Azure DevOps

     

    3. Import Using Excel

    • Open Excel and connect it to your Azure DevOps project:

    a.      Go to Team > New List (if the Azure DevOps plugin is installed).

    b.     Sign in to Azure DevOps and select your project.

    • Paste the contents of your .csv file into the Excel sheet.
    • Ensure the Parent column is correctly mapped to the ID of the user story.

    Save and publish the changes back to Azure DevOps.

    I hope the provided answer is helpful,

    Please "Up Vote" if the information helped you. This will help us and others in the community as well.

    Thanks

    Was this answer helpful?

    0 comments No comments

  2. Jerald Felix 18,840 Reputation points Volunteer Moderator
    2025-09-25T17:36:25.3833333+00:00

    Hello Bethanne Mcfadden,

    Thank you for your question. Importing tasks from a CSV file and automatically linking them to an existing user story is a powerful feature in Azure DevOps for managing your backlog efficiently.

    The process involves creating a specifically formatted CSV file where you identify the existing user story and then list the new tasks directly beneath it. Azure DevOps interprets this structure as a parent-child relationship during the import process.

    Here is a step-by-step guide to achieve this.

    Step 1: Get the ID of the Existing User Story

    First, you need the unique ID of the user story you want to link the new tasks to. You can find this ID by simply opening the user story in Azure DevOps Boards. Note this ID number down.

    Step 2: Prepare Your CSV File

    This is the most critical step. Your CSV file must be structured in a specific way to create the parent-child link.

    The first row in your group will represent the existing parent User Story. You only need to provide its ID and Work Item Type.

    The subsequent rows will be for the new Tasks you are importing. You do not need to provide an ID for these, as Azure DevOps will assign new ones. You only need to provide the Work Item Type and a Title for each new task.

    Create a CSV file with the following columns and structure. Let's assume your existing User Story has an ID of 12345.

    ID Work Item Type Title
    12345 User Story
    12345 User Story
    Task Design the database schema
    Task Create the API endpoints
    Task Develop the user interface

    Important Notes on the CSV Structure:

    • Parent First: The parent work item (User Story) must be the first item in the group.

    Child Items Follow: The new child work items (Tasks) must immediately follow the parent.

    Title Column: The Title for the parent User Story row can be left blank because you are only referencing it by its ID. You only need to provide titles for the new tasks you are creating.

    Other Columns: You can add other columns as needed for your tasks, such as Assigned To, Area Path, Iteration Path, Description, and Activity (e.g., Development, Testing).

    Example of a more detailed CSV:

    ID Work Item Type Title Assigned To Activity
    12345 User Story
    12345 User Story
    Task Design the database schema ******@company.com Design
    Task Create the API endpoints ******@company.com Development
    Task Develop the user interface ******@company.com Development

    Step 3: Import the CSV File into Azure DevOps

    Once your CSV file is ready, you can import it through the Queries section of Azure DevOps.

    Navigate to your project in Azure DevOps.

    In the left-hand menu, go to Boards > Queries.

    Click on the "Import Work Items" button, which is usually located near the top of the page.

    In the dialog box that appears, click "Choose file" and select the CSV file you created.

    Click Import.

    Azure DevOps will show you a preview of the work items that will be created. You will see your new tasks listed.

    Click the "Save items" button to complete the import.

    Azure DevOps will now create the new tasks and automatically link them as children to the existing user story (ID 12345). You can verify this by opening the user story and checking the "Related Work" section.

    This method allows you to quickly populate your backlog with a structured set of tasks for any existing user story.

    Best Regards,

    Jerald Felix

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.