fix(Jira): update endpoint for issue search to use 'search/jql' inste…#6236
Open
HeadedWeast wants to merge 1 commit intoFlowiseAI:mainfrom
Open
fix(Jira): update endpoint for issue search to use 'search/jql' inste…#6236HeadedWeast wants to merge 1 commit intoFlowiseAI:mainfrom
HeadedWeast wants to merge 1 commit intoFlowiseAI:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Jira search endpoint to use 'search/jql'. A review comment identifies that this change is specific to Jira Cloud API v3 and would break compatibility with Jira Server or Data Center versions. It is recommended to conditionally set the endpoint based on the API version.
| if (params.startAt) queryParams.append('startAt', params.startAt.toString()) | ||
|
|
||
| const endpoint = `search?${queryParams.toString()}` | ||
| const endpoint = `search/jql?${queryParams.toString()}` |
Contributor
There was a problem hiding this comment.
The search/jql endpoint is specific to Jira Cloud API v3. For Jira Server or Data Center (which use API v2), the endpoint remains search. Since this component supports both versions (determined by the apiVersion property), forcing search/jql will break functionality for users on Jira Server/DC. You should conditionally set the endpoint based on the API version.
Suggested change
| const endpoint = `search/jql?${queryParams.toString()}` | |
| const endpoint = (this.apiVersion === '3' ? 'search/jql' : 'search') + '?' + queryParams.toString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ad of 'search'
in it's current state, using the list_issues tool for Jira results in the following tool output:
Error listing issues: Error: Jira API Error 410: Gone - {"errorMessages":["The requested API has been removed. Please migrate to the /rest/api/3/search/jql API. A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046"],"errors":{}}This pull request resolves that error.