-
Notifications
You must be signed in to change notification settings - Fork 635
[Bug][Jira] V2 API removed #8563 #8608
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for the PR! However, during the testing process, I discovered a potential issue: |
…rison - Replace strings.ToLower(deploymentType) == constant with strings.EqualFold - Fixes issue where case-insensitive comparison was only converting one side - Update tests to reflect the new comparison logic using strings.EqualFold - Affects epic_collector.go and issue_collector.go
5410208
to
9dd0315
Compare
Thank you for catching it, @GoSimplicity. Please review again. |
LGTM |
Summary
What does this PR do?
This PR fixes a case sensitivity issue in the Jira plugin's deployment type detection that caused API endpoint selection errors. The Jira API returns deployment types as "Cloud" or "Server" (capitalized), but the code was performing case-sensitive comparisons against lowercase constants, causing Jira Cloud instances to incorrectly use the deprecated v2 API endpoint instead of the v3 API.
Changes:
strings.ToLower()
strings
import inissue_collector.go
Files Modified:
backend/plugins/jira/tasks/account_collector.go
backend/plugins/jira/tasks/epic_collector.go
backend/plugins/jira/tasks/issue_changelog_collector.go
backend/plugins/jira/tasks/issue_changelog_extractor.go
backend/plugins/jira/tasks/issue_collector.go
backend/plugins/jira/tasks/issue_comment_collector.go
backend/plugins/jira/tasks/issue_comment_extractor.go
backend/plugins/jira/tasks/issue_type_collector.go
backend/plugins/jira/tasks/sprint_extractor.go
backend/plugins/jira/tasks/deployment_type_test.go
(new)Does this close any open issues?
[Bug][Jira] V2 API removed #8563
Fixes the error:
The requested API has been removed. Please migrate to the /rest/api/3/search/jql API
when collecting Jira Cloud epics.This error occurred because the deployment type comparison was case-sensitive, causing Jira Cloud instances (which return "Cloud") to be treated as Jira Server and use the deprecated
/api/2/search
endpoint instead of/api/3/search/jql
.Screenshots
N/A - This is a backend API endpoint selection fix.
Other Information