-
Couldn't load subscription status.
- Fork 2.1k
fix: jira connector creation #5956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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 invalidate_connector_settings()on line 647 - The v3 API requires
all_issue_idsto be provided (notNone), which was causing aValueErrorduring 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
1 file reviewed, no comments
There was a problem hiding this 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
|
@evan-onyx Joke comment not withstanding. Any chance you can add a test for the JQL config flow? |
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
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.