-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
Issue Creation Failed --: Request failed. Please analyze the request body for more details. Status code: 400 #437
Comments
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. |
same problem, the jira server version is v8.20.6, the go-jira version is v1.15.0. |
I've hit the same issue yesterday. The solution in my case was to remove the "Reporter"-field. My Jira told me that's set automatically. The errormessage is somewhat misleading. You can reproduce this behaviour when you generate the JSON and push it to JIRA manually. Then there is a proper message. ;) |
@eBeyond I am able to create the ticket with this hack. But it doesn't make any sense right, I mean for me now my ticket doesn't have any assignee and my email which is an assignee coming as a reporter now. So technically it's a BUG. I tried with this:
|
I went by this a bit differently, and I agree this is a bit of a bug going on. Here's my solution, though: issue := jira.Issue{
Fields: &jira.IssueFields{
Description: fmt.Sprintf("{code:text}%s{code}", string(fcontent)),
Summary: "Test Issue",
Project: jira.Project{
Key: project.Key,
},
Type: jira.IssueType{
Name: "Task",
},
},
}
basicIssue, _, err := ejira.Client.Issue.Create(&issue)
ejira.Client.Issue.UpdateAssignee(basicIssue.ID, me) What this does for me is I'm correctly identified as the reporter coming in, and after that's done, I assign my user from another call. I have a bit of hardcoded stuff here, but I'm hoping to avoid that long term (e.g. having the name in jira.user hardcoded is not a great idea. |
The reason that casue this issue is that I do not have correct permisson. For me, it's only Jira server will create reporter automatically because we must login to create issue, so Jira will use username as reporter. I suggest to adjust examples, remove reporter field. |
should return more useful info in func : and then you will get more error info to fix your params. |
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. What does this mean for my issue?We will work on this issue indirectly. Final wordsThanks for using this library. |
I am able to successfully connect to My JIRA cloud and pulled in the details of an issue even transition is also happening of existing tickets. I am trying to just create a new issue with the example provided (https://github.com/andygrunwald/go-jira/blob/master/examples/create/main.go) but it's failing with the error:
2022/02/06 21:38:47 request failed. Please analyze the request body for more details. Status code: 400
.Here is the code I am using:
I receive the following error every time
2022/02/06 21:38:47 request failed. Please analyze the request body for more details. Status code: 400
My JIRA_USER account has administrator privileges. I am using JIRA cloud.
Could you give me a good example or assist me on this? Also possible to get any user's ccountID with this module??
The text was updated successfully, but these errors were encountered: