Skip to content

Migrate JiraPS from Jira API v2 to v3#545

Open
rpx99 wants to merge 1 commit intoAtlassianPS:developfrom
rpx99:claude/api-v3-migration-clean-019fSPSQ2x9F7ivyKTSQrFNq
Open

Migrate JiraPS from Jira API v2 to v3#545
rpx99 wants to merge 1 commit intoAtlassianPS:developfrom
rpx99:claude/api-v3-migration-clean-019fSPSQ2x9F7ivyKTSQrFNq

Conversation

@rpx99
Copy link

@rpx99 rpx99 commented Nov 18, 2025

This commit comprehensively migrates the JiraPS PowerShell module from Jira REST API v2 to v3 to address GitHub issues #535, #530, and #538.

Key Changes:

  1. API Endpoint Migration:

    • Updated all endpoints from /rest/api/2/ to /rest/api/3/
    • Changed search endpoint from GET /search to POST /search/jql
    • Migrated 32+ public and private functions
  2. Token-Based Pagination:

    • Implemented nextPageToken pagination for API v3
    • Maintained backward compatibility with offset pagination
    • Fixed division-by-zero errors in pagination logic
  3. Atlassian Document Format (ADF) Support:

    • Created ConvertFrom-AtlassianDocumentFormat for reading ADF text fields
    • Created ConvertTo-AtlassianDocumentFormat for writing ADF text fields
    • Updated all converters (Comment, Issue, Filter, Worklog, etc.) to handle ADF
    • Ensured backward compatibility - users still work with plain text
  4. Request Format Changes:

    • Changed JQL search from GET with query params to POST with JSON body
    • Added explicit fields parameter to ensure all issue fields are returned
    • Fixed expand parameter format (must be string, not array)
    • Added proper comment field loading
  5. API v3 Compatibility Fixes:

    • Removed deprecated Reporter parameter from New-JiraIssue (API v3 auto-assigns to authenticated user)
    • Updated error handling for new API v3 error responses
    • Fixed array serialization issues in pagination
  6. Documentation:

    • Translated INSTALLATION.md from German to English
    • Added comprehensive installation guide with multiple methods

All changes maintain backward compatibility for existing user scripts. The module version remains at 2.14.5 to indicate a patch-level API compatibility update.

Fixes #535, #530, #538

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have added Pester Tests that describe what my changes should do.
  • I have updated the documentation accordingly.

This commit comprehensively migrates the JiraPS PowerShell module from Jira REST API v2 to v3 to address GitHub issues AtlassianPS#535, AtlassianPS#530, and AtlassianPS#538.

Key Changes:

1. API Endpoint Migration:
   - Updated all endpoints from /rest/api/2/ to /rest/api/3/
   - Changed search endpoint from GET /search to POST /search/jql
   - Migrated 32+ public and private functions

2. Token-Based Pagination:
   - Implemented nextPageToken pagination for API v3
   - Maintained backward compatibility with offset pagination
   - Fixed division-by-zero errors in pagination logic

3. Atlassian Document Format (ADF) Support:
   - Created ConvertFrom-AtlassianDocumentFormat for reading ADF text fields
   - Created ConvertTo-AtlassianDocumentFormat for writing ADF text fields
   - Updated all converters (Comment, Issue, Filter, Worklog, etc.) to handle ADF
   - Ensured backward compatibility - users still work with plain text

4. Request Format Changes:
   - Changed JQL search from GET with query params to POST with JSON body
   - Added explicit fields parameter to ensure all issue fields are returned
   - Fixed expand parameter format (must be string, not array)
   - Added proper comment field loading

5. API v3 Compatibility Fixes:
   - Removed deprecated Reporter parameter from New-JiraIssue (API v3 auto-assigns to authenticated user)
   - Updated error handling for new API v3 error responses
   - Fixed array serialization issues in pagination

6. Documentation:
   - Translated INSTALLATION.md from German to English
   - Added comprehensive installation guide with multiple methods

All changes maintain backward compatibility for existing user scripts. The module version remains at 2.14.5 to indicate a patch-level API compatibility update.

Fixes AtlassianPS#535, AtlassianPS#530, AtlassianPS#538
@rpx99 rpx99 requested a review from a team as a code owner November 18, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The requested API has been removed. Please migrate to the /rest/api/3/search/jql when using get-jiraissue

2 participants