Open wlmost opened 1 year ago
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. 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.
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 that2023/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?