go-jira icon indicating copy to clipboard operation
go-jira copied to clipboard

Add WarningMessages to query response to be able to manage warnings

Open manuelbcd opened this issue 4 years ago • 6 comments

Is your feature request related to a problem? Please describe.

No, it is not a problem.

Describe the solution you'd like

When using Issue.Search(...) I have noticed that the optional field "WarningMessages" is not implemented in the response struct struct: image real response (when something is wrong): image

The drawback is that you are unable to detect these warnings since most of times the HTTP response is 200 even if one of the fields from the query is a wrong value (i.e. user not exists)

Describe alternatives you've considered

I think there are no alternatives.

Additional context

No additional context

@andygrunwald @benjivesterby what do you think? do you want me to implement it?

manuelbcd avatar Mar 23 '21 09:03 manuelbcd

Hi! Thank you for taking the time to create your first issue! Really cool to see you here for the first time. Please give us a bit of time to review it.

github-actions[bot] avatar Mar 23 '21 09:03 github-actions[bot]

Hey @manuelbcd, thanks!

Two questions:

  1. Are you talking about the OnPremise JIRA Version (+ which version in particular?) or the Cloud-Version?
  2. Do you have a link to the response documentation?

Would love to review a PR for this!

andygrunwald avatar Mar 23 '21 09:03 andygrunwald

I have tested it on Jira Cloud but I think it is part of response (only when something goes wrong) in V3 API on-prem also

You can check the response example in issue-search documentation:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/

image

manuelbcd avatar Mar 23 '21 10:03 manuelbcd

Great, thanks. Happy to review a PR for this.

andygrunwald avatar Mar 23 '21 10:03 andygrunwald

I'm worried my PR is breaking compatibility since I'm adding a warningMessages[] field to issue.Search() response. Please suggest if there could be a better approach to implement it or if you simply consider it is not worth to add warningMessages considering drawbacks.

manuelbcd avatar Mar 23 '21 23:03 manuelbcd

Thanks, @manuelbcd! I will have a look. Let us continue the discussion about the implementation approach to https://github.com/andygrunwald/go-jira/pull/369

andygrunwald avatar Mar 25 '21 13:03 andygrunwald

Hey,

I am very sorry that this issue has been open for a long time with no final solution. We work on this project in our spare time, and sometimes, other priorities take over. This is the typical open source dilemma.

However, there is news: We are kicking off v2 of this library 🚀

To provide visibility, we created the Road to v2 Milestone and calling for your feedback in https://github.com/andygrunwald/go-jira/issues/489

The development will take some time; however, I hope you can benefit from the changes. If you seek priority development for your issue + you like to sponsor it, please contact me.

What does this mean for my issue?

We will work on this issue indirectly. This means that during the development phase, we aim to tackle it. Maybe in a different way like it is currently handled. Please understand that this will take a while because we are running this in our spare time.

Final words

Thanks for using this library. If there is anything else you would like to tell us, let us know!

andygrunwald avatar Aug 21 '22 14:08 andygrunwald