-
-
Notifications
You must be signed in to change notification settings - Fork 497
Add SearchV2JQL to fix deprecation of JQL search and evaluate expression… #725
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
Add SearchV2JQL to fix deprecation of JQL search and evaluate expression… #725
Conversation
9d1a1dc
to
c6c2ebc
Compare
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.
Thanks for the PR @conor-naranjo added a couple of comments. Noticed them while testing the PR
c6c2ebc
to
f22badc
Compare
@erezrokah Thanks for the review and callout. Addressed the mismatched function calls and ensured |
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.
Tested this approach a bit more, and it doesn't work as the v3 API returns a response with a different structure, so JSON unmarshalling fails. For example in v2 fields.description
is a string and in v3 it's an object.
The Go struct expects a string.
A possible working solution is to use the v2 API, see cloudquery@9f996e4
Oddly enough Jira docs have it the other way around, v2 says it returns an object and v3 says it returns a string, but I confirmed v2 returns a string


f22badc
to
144d3c7
Compare
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.
Thanks for updating the PR, we should also rename v3 to v2 where applicable
144d3c7
to
756718b
Compare
Hello 🙂 Thought Machine maintains a fork of this repo with some minor modifications to the v1 branch. Today we used the change in this PR as part of a separate PR here and found the changes worked well with our internal workloads. Just reporting back to let you know these changes work well "in the wild". Many thanks Matt |
I think there is no need to do V2/V3 for extra struct, just fix the original struct since its not gonna work anymore. |
@cxfcxf as I understand it, the new SearchOptionsV2 struct is to provide a cloud API-specific search options to maintain compatibility with on-prem because the v1 version of go-jira doesn't have a separate cloud vs on-prem client |
ah make sense, thanks for the explanation, we moved to cloud but my app still uses default search function (developed on-prem), which worked until recently they shut off the old api endpoint. so i was wondering if there is a way to just fix the search function on library. |
Huge shoutout to @conor-naranjo for creating the PR, @erezrokah for the thorough review and @mspraggs for the "it works" confirmation. I merged the PR and released v1.16.1. I will backport this PR into the current main version as well. |
Hey all, |
… endpoints
What type of PR is this?
What this PR does / why we need it:
The endpoint GET /rest/api/2|3|latest/search is being deprecated. This is the migration of the endpoint.
See https://developer.atlassian.com/changelog/#CHANGE-2046
Which issue(s) this PR fixes:
Fixes #715
Special notes for your reviewer:
Additional documentation e.g., usage docs, etc.: