Skip to content
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 Comment (sometimes) does not add comment and returns 200 #304

Open
lahire opened this issue Jun 24, 2020 · 4 comments
Open

Add Comment (sometimes) does not add comment and returns 200 #304

lahire opened this issue Jun 24, 2020 · 4 comments
Labels
needs triage Ticket that needs triage (a proper look for classification)

Comments

@lahire
Copy link

lahire commented Jun 24, 2020

Is really a 200 a valid response to add a comment, when the Jira Documentation states that the valid response is a 201?

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-issueIdOrKey-comment-post

While it is true that 200 should be a valid response, sporadically a code im reviewing gets a 200 response but does not post anything to Jira.
Also, doing a quick search i found this weird interaction on Jira forums: https://community.developer.atlassian.com/t/rest-api-call-to-add-a-comment-on-issue-returns-200-instead-of-201/1742

go-jira/jira.go

Line 284 in 1b4556c

if c := r.StatusCode; 200 <= c && c <= 299 {

This is really hard to replicate, and i might be crazy, but i cannot find any reason why the Jira docs says the valid response is a 201 and not a 200.

@github-actions
Copy link

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.

@andygrunwald
Copy link
Owner

@lahire you are right. This might be a bug (?) or missing optimization (?).
Would you mind to open a PR for this?

@lahire
Copy link
Author

lahire commented Jun 25, 2020

I can sure try, but im too new from Go and i'm afraid of breaking your code.

Because i think is not just changing the 200 for a 201, because that will break the CheckResponse for other things (for example, get comments)

I'll try to investigate and pass it around to more go-versed peoples to see if i can learn how to adapt this

@andygrunwald andygrunwald added the needs triage Ticket that needs triage (a proper look for classification) label Aug 20, 2022
@andygrunwald
Copy link
Owner

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 #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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Ticket that needs triage (a proper look for classification)
Projects
None yet
Development

No branches or pull requests

2 participants