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

Creating issue with go-jira/v2/cloud failed with status code 400 #628

Open
wlmost opened this issue May 31, 2023 · 3 comments
Open

Creating issue with go-jira/v2/cloud failed with status code 400 #628

wlmost opened this issue May 31, 2023 · 3 comments

Comments

@wlmost
Copy link

wlmost commented May 31, 2023

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?

@tmwpwo
Copy link

tmwpwo commented Jun 5, 2023

There is a way around that issue I found here: https://dev.to/iqquee/automate-jira-with-golang-i6c

@andygrunwald
Copy link
Owner

Thanks @wlmost for the bug report.
I am currently short on time for open-source contributions due to other/private obligations. If you are able to fix it, I am happy to review a pull request. Thanks for contributing to open source (also via this issue!) and thanks for understanding.

@Mercccccc
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants