This project consists of a Python script for integrating with Rally (now part of Broadcom) and a Flask web application that provides a user interface for uploading Excel files and creating user stories and tasks in Rally.
- Python 3.6+
pyrallibrarypandaslibrarynumpylibraryflasklibrary- Access to a Rally account with appropriate permissions
- Ensure you have Python 3.6 or higher installed.
- Install the required libraries:
pip install pyral pandas numpy openpyxl flask - Place the
rally_integration.pyandapp.pyfiles in your project directory.
To use this integration, you'll need a Rally API Key. Here's how to obtain one:
- Log in to your Rally account.
- Navigate to your user settings.
- Look for a tab or section labeled "API Keys".
- Click on "Create"
- Give your API key a name (e.g., "Rally Integration Script").
- Copy the generated API key and store it securely. You'll need this for the script.
Note: API keys are sensitive information. Never share your API key.
The Flask application provides a web interface for uploading Excel files and creating user stories and tasks in Rally.
- Ensure you have the
app.pyfile in your project directory. - Create a
templatesfolder in the same directory. - Create the following HTML templates in the
templatesfolder:home.html: The main page with the file upload formsuccess.html: A page to show when the operation is successfulfailure.html: A page to show when an error occurs
- Open a terminal or command prompt.
- Navigate to the directory containing
app.py. - Run the following command:
python app.py - The Flask development server will start, typically on
http://127.0.0.1:5000/. - Open this URL in your web browser to access the application.
- On the home page, you'll see a form to input Rally credentials and upload an Excel file.
- Fill in the following fields:
- API Key: Your Rally API key
- Username: Your Rally username
- Workspace: The name of your Rally workspace
- Project: The name of your Rally project
- Upload your prepared Excel file.
- Click the Submit button to process the file and create user stories and tasks in Rally.
Prepare your Excel file with the following columns:
| Column | Name | Description |
|---|---|---|
| A | User Story or Task | Must contain either "User Story" or "Task" |
| B | Name | Name of the user story or task |
| C | Description | Description (can be left blank for tasks) |
| D | Plan Estimate | For user stories (can be left blank for tasks) |
| E | Todo Hours | For tasks (can be left blank for user stories) |
| F | Estimate Hours | For tasks (can be left blank for user stories) |
| G | Release | For user stories (can be left blank for tasks) |
| H | Iteration | For user stories (can be left blank for tasks) |
| I | Development End Date | For user stories, in MM/DD/YYYY format (can be left blank for tasks) |
| J | Owner | Username for both user stories and tasks |
- You can find a sample of how the excel should be constructed in the excel template folder.
| User Story or Task | Name | Description | Plan Estimate | Todo Hours | Estimate Hours | Release | Iteration | Development End Date | Owner |
|---|---|---|---|---|---|---|---|---|---|
| User Story | Implement login | Create login functionality | 5 | Release 1 | Sprint 1 | 12/31/2024 | john.doe@company.com | ||
| Task | Design UI | 3 | 3 | jane.smith@company.com | |||||
| Task | Implement backend | 5 | 5 | john.doe@company.com | |||||
| User Story | Add dashboard | Create user dashboard | 8 | Release 1 | Sprint 2 | 01/15/2025 | jane.smith@company.com | ||
| Task | Design layout | 4 | 4 | designer.user@company.com | |||||
| Task | Implement widgets | 6 | 6 | developer.user@company.com |
-
Ensure that the usernames in the 'Owner' column exist in your Rally instance. If a username is not found, the script will use the default username provided when calling the function.
-
The 'User Story or Task' column must contain either "User Story" or "Task" (case-insensitive).
-
Tasks must immediately follow their associated user story in the Excel file.
-
If a task's owner is left blank, it will inherit the owner from its parent user story.
-
The Release and Iteration names must match exactly with those in your Rally Project.
-
The Development End Date should be in MM/DD/YYYY format.
-
Numeric fields (Plan Estimate, Todo Hours, Estimate Hours) can be left blank if not applicable.
If the script encounters an error, it will display an error message on the failure page. Common errors include:
- Missing required columns in the Excel file
- Invalid values in the 'User Story or Task' column
- Tasks defined before a user story
- Failure to find specified Releases or Iterations in Rally
For any issues or questions, please contact your Rally administrator or you can mail me at immadiuttej2@gmail.com