Skip to content

Conversation

@evan-onyx
Copy link
Contributor

@evan-onyx evan-onyx commented Oct 28, 2025

Description

connector creation didnt work when specifying a JQL query due to some modifications for supporting the v3 API.

How Has This Been Tested?

tested in the UI; testing this fully would require a somewhat heavyweight playwright test

Additional Options

  • [Optional] Override Linear Check

Summary by cubic

Fixes Jira connector creation when a JQL query is specified. Adds the missing all_issue_ids parameter to the v3 search call so settings validation succeeds.

  • Bug Fixes
    • Pass all_issue_ids=[] to search_issues in validate_connector_settings (v3 API requirement).

@evan-onyx evan-onyx requested a review from a team as a code owner October 28, 2025 03:12
@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
internal-search Ready Ready Preview Comment Oct 28, 2025 6:34pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Fixed Jira connector creation failure when specifying a JQL query for cloud Jira instances (v3 API).

  • Added missing all_issue_ids=[] parameter to _perform_jql_search() call in validate_connector_settings() on line 647
  • The v3 API requires all_issue_ids to be provided (not None), which was causing a ValueError during validation
  • Empty list is appropriate for validation - the function will fetch IDs but skip bulk fetch, successfully validating the JQL query syntax

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix is a simple one-line addition that addresses a clear bug. The solution correctly provides the required parameter for v3 API compatibility without affecting existing functionality. All other call sites already pass this parameter correctly, and the empty list is the appropriate value for validation purposes.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
backend/onyx/connectors/jira/connector.py 5/5 Added missing all_issue_ids=[] parameter to v3 API search call in validate_connector_settings - fixes connector creation with JQL queries

Sequence Diagram

sequenceDiagram
    participant User
    participant JiraConnector
    participant _perform_jql_search
    participant _perform_jql_search_v3
    participant enhanced_search_ids
    
    User->>JiraConnector: validate_connector_settings()
    JiraConnector->>JiraConnector: Check if jql_query is set
    JiraConnector->>_perform_jql_search: call with jql, max_results=1, all_issue_ids=[]
    _perform_jql_search->>_perform_jql_search: Check if cloud client (v3)
    alt Cloud Client (v3 API)
        _perform_jql_search->>_perform_jql_search: Validate all_issue_ids is not None
        _perform_jql_search->>_perform_jql_search_v3: Forward call
        _perform_jql_search_v3->>enhanced_search_ids: Fetch issue IDs (ids_done=False)
        enhanced_search_ids-->>_perform_jql_search_v3: Return issue IDs
        _perform_jql_search_v3->>_perform_jql_search_v3: Check if all_issue_ids (empty list = False)
        Note over _perform_jql_search_v3: No bulk fetch for empty list
        _perform_jql_search_v3-->>_perform_jql_search: Return issues (none)
    else Server/Data Center (v2 API)
        _perform_jql_search->>_perform_jql_search_v2: Forward call
        _perform_jql_search_v2-->>_perform_jql_search: Return issues
    end
    _perform_jql_search-->>JiraConnector: Validation succeeds
    JiraConnector-->>User: Connector settings valid
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@wenxi-onyx
Copy link
Member

@evan-onyx Joke comment not withstanding. Any chance you can add a test for the JQL config flow?

@wenxi-onyx wenxi-onyx enabled auto-merge October 28, 2025 18:32
@wenxi-onyx wenxi-onyx added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit 7876d8d Oct 28, 2025
64 checks passed
@wenxi-onyx wenxi-onyx deleted the fix/jira-connector-creation branch October 28, 2025 19:05
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.

3 participants