-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
Creating issue with go-jira/v2/cloud failed with status code 400 #628
Comments
There is a way around that issue I found here: https://dev.to/iqquee/automate-jira-with-golang-i6c |
Thanks @wlmost for the bug report. |
@andygrunwald Hello,I have been using go-jira recently and encountered the same issue. Is there any progress or plan to resolve this issue? Thank you. |
Same here. @tmwpwo Just to confirm: I am not sure what the workaround consists of? Update the assigned user after the issue has been created? Maybe something has changed since 2023, but I'm still getting
when completely removing the assignee and the reporter fields from the request. |
It is the same error from another issue.
If I create an issue like
issue := jira.Issue{ Fields: &jira.IssueFields{ Reporter: &jira.User{AccountID: jiraUser.AccountId}, Assignee: &jira.User{AccountID: jiraUser.AccountId}, Project: jira.Project{Key: "ESO"}, Type: jira.IssueType{Name: "Task"}, Priority: &jira.Priority{Name: "Niedrig"}, Summary: issueRequest.Summary, Description: issueRequest.Description, }, }
I get following error
request failed. Please analyze the request body for more details. Status code: 400
Some debug output shows me that in the assignee and reporter field the attribute Password pop's up, like that
2023/05/31 11:12:57 [DEBUG CreateJiraIssue]: issue {"fields":{"assignee":{"Password":"","accountId":"an account id"},"issuetype":{"name":"Task"},"priority":{"name":"Niedrig"},"project":{"key":"ESO"},"reporter":{"Password":"","accountId":"an account id"},"summary":"A summary"}}
In the source of user.go the password field is missing omitempty in json. I believe that's the bug. Could check please?
The text was updated successfully, but these errors were encountered: