Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions scripts/QUICK_START.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Quick Start Guide - Release Notes Generator

## Prerequisites

- Python 3.6+
- Git
- CSV files exported from JIRA

## Step-by-Step Usage

### 1. Export JIRA Tickets

Export your JIRA tickets to CSV format with these columns:

**Resolved Issues CSV:**
- `Issue Key` (e.g., MTV-3915)
- `Summary`
- `Description`

**Known Issues CSV:**
- `Issue Key` (e.g., MTV-3116)
- `Summary`
- `Description`
- `Workaround` (optional)

### 2. Run the Script

```bash
python3 scripts/generate_release_notes.py
```

### 3. Follow the Prompts

1. **Select base branch**: Choose the branch to create the release notes branch from
2. **Enter MTV version**: e.g., `2.11.1`
3. **Provide resolved issues CSV path**: Full path to your CSV file
4. **Provide known issues CSV path**: Full path to your CSV file

### 4. Review Generated Files

The script creates:
- New git branch: `MTV-RN-2.11.1`
- `documentation/modules/rn-2-11.adoc`
- `documentation/modules/rn-2-11-0-resolved-issues.adoc`
- `documentation/modules/known-issues-2-11.adoc`
- Updated `documentation/doc-Release_notes/master.adoc`

### 5. Commit and Push

```bash
git add .
git commit -m "Add release notes for MTV 2.11.1"
git push origin MTV-RN-2.11.1
```

## Example CSV Format

See `sample_resolved_issues.csv` and `sample_known_issues.csv` for examples.

## Troubleshooting

- **Branch already exists**: The script will ask if you want to use the existing branch
- **Version already in master.adoc**: The script will warn you and ask to continue
- **CSV parsing errors**: Check that your CSV has the required columns (Issue Key, Summary, Description)
122 changes: 122 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Release Notes Generator

This script automates the generation of release notes from JIRA ticket exports. It creates a new git branch and generates all necessary release notes files.

## Usage

```bash
python3 scripts/generate_release_notes.py
```

The script will prompt you for:
1. **Base branch selection**: Choose from available git branches or enter a custom branch name (the new branch will be created from this)
2. **MTV version**: Enter the version number (e.g., `2.11.1`)
3. **Resolved issues CSV**: Path to CSV file containing resolved JIRA tickets
4. **Known issues CSV**: Path to CSV file containing known issues JIRA tickets

## What the Script Does

1. **Creates a new git branch**: `MTV-RN-<version>` (e.g., `MTV-RN-2.11.0`)
2. **Generates release notes files**:
- `rn-{major-version}.adoc` - Main release notes header (e.g., `rn-2-11.adoc`)
- `rn-{version}-resolved-issues.adoc` - Resolved issues (e.g., `rn-2-11-0-resolved-issues.adoc`)
- `known-issues-{major-version}.adoc` - Known issues (e.g., `known-issues-2-11.adoc`)
3. **Updates master.adoc**: Automatically updates `documentation/doc-Release_notes/master.adoc` to include the new modules

## JIRA CSV Export Format

### Recommended Format

When exporting from JIRA, include the following columns:

**For Resolved Issues:**
- `Issue Key` (e.g., MTV-3915)
- `Summary` or `Title`
- `Description`

**For Known Issues:**
- `Issue Key` (e.g., MTV-3116)
- `Summary` or `Title`
- `Description`
- `Workaround` (optional but recommended)

### CSV Column Names

The script automatically detects common column name variations:
- **Issue Key**: `Issue Key`, `Key`, `Issue`, `Ticket`, `JIRA Key`
- **Summary**: `Summary`, `Title`, `Subject`, `Name`
- **Description**: `Description`, `Details`, `Body`
- **Workaround**: `Workaround`, `Work Around`, `Resolution`, `Solution`

### Example CSV Structure

```csv
Issue Key,Summary,Description,Workaround
MTV-3915,Target cluster namespaces now visible,Before this update, during cross-cluster live migration...,""
MTV-3116,Forklift console plugin fails to load,When MTV 2.9.1 is deployed on an IPv6-only...,Deploy MTV on dual-stack or IPv4 clusters
```

## Output

The script:
- Creates a new git branch: `MTV-RN-<version>`
- Generates AsciiDoc files in `documentation/modules/`:
- `rn-{major-version}.adoc` (e.g., `rn-2-11.adoc`)
- `rn-{version}-resolved-issues.adoc` (e.g., `rn-2-11-0-resolved-issues.adoc`)
- `known-issues-{major-version}.adoc` (e.g., `known-issues-2-11.adoc`)
- Updates `documentation/doc-Release_notes/master.adoc` automatically

## Next Steps

After running the script:

1. **Review the generated files** in `documentation/modules/`
2. **Add any additional content** if needed (e.g., new features section)
3. **Commit your changes**:
```bash
git add .
git commit -m "Add release notes for MTV {version}"
```
4. **Push the branch**:
```bash
git push origin MTV-RN-{version}
```
5. **Create a pull request** with the new release notes branch

## Exporting from JIRA

### Steps to Export CSV from JIRA:

1. Navigate to your JIRA project (e.g., MTV)
2. Use the search/filter to find issues:
- For resolved issues: Filter by `Status = Resolved` or `Status = Closed`
- For known issues: Filter by `Labels = Known Issue` or similar
3. Click **Export** → **Export CSV (Current fields)**
4. Ensure the export includes:
- Issue Key
- Summary
- Description
- (For known issues) Workaround field if available

### Alternative: Using JIRA Query Language (JQL)

You can also export using JQL queries:
- Resolved issues: `project = MTV AND status = Resolved AND fixVersion = "2.11.1"`
- Known issues: `project = MTV AND labels = "known-issue" AND fixVersion = "2.11.1"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Known issues: `project = MTV AND labels = "known-issue" AND fixVersion = "2.11.1"`
- Known issues: `project = MTV AND labels = "known-issue" AND fixVersion = "2.11.*"`

@Jenny-Anne Jenny-Anne Feb 23, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @anarnold97 I'm not sure if a wildcard like "2.11.*" is an option here in your script, but I know it works in Jira queries. It's just that if a known issue is in a release, it won't have that release as a fix version because the fix is targeted for a later release, e.g. an issue is a known issue in 2.11.1. The fix is targeted for 2.11.3. The Jira won't have 2.11.1 as the fix version. It might have 2.11.3 as the fix version or something like or 2.11.z if the fix version isn't determined yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to be aware of capturing is known issues that are updated to bug fixes, e.g. an issue might be a known issue for three releases in a row and then be updated to bug fix when it's finally resolved. There's no need to create a separate Jira for the bug fix, just update the release note type and description from known issue to bug fix in the original Jira.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Jira filter for 2.11: https://issues.redhat.com/issues/?filter=12490270
with test Jira query:
project = "Migration Toolkit for Virtualization" AND "Release Note Type" not in (---, "Release Note Not Required", "CVE - Common Vulnerabilities and Exposures") AND fixVersion = 2.11.1 OR ("Release Note Type" = "Known issue" AND fixVersion ~ "2.11.*")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test 2 Jira filter with AND labels = release-note-req added (optional)
https://issues.redhat.com/issues/?filter=12490271
with test Jira query:
project = "Migration Toolkit for Virtualization" AND labels = release-note-req AND "Release Note Type" not in (---, "Release Note Not Required", "CVE - Common Vulnerabilities and Exposures") AND fixVersion = 2.11.1 OR ("Release Note Type" = "Known issue" AND fixVersion ~ "2.11.*")


## Troubleshooting

**Issue**: Script can't find issue keys
- **Solution**: Ensure your CSV has a column named `Issue Key`, `Key`, or `Issue`

**Issue**: Descriptions are empty
- **Solution**: Check that your CSV export includes the `Description` column

**Issue**: Workarounds not appearing
- **Solution**: Add a `Workaround` column to your known issues CSV, or manually edit the generated file

## Requirements

- Python 3.6+
- Git (for branch detection)
- CSV files exported from JIRA
Binary file not shown.
Loading