Open sonalp123 opened 3 years ago
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.
@sonalp123 Thanks for raising the issue. Would you mind adding a few more information about your environment?
@andygrunwald :
fmt.Printf("%s: %+v\n", issue.Key, issue.Fields.Summary)
Thanks for all the information @sonalp123. We will have a look at this when we have a bit of time for it.
Hello @sonalp123 I think we know what is happening. The issue.Fields array is not present in creation response by default so you are trying to read a non populated field. Please remove "issue.Fields.xxx", you can print issue.xxx without any problem. If you want to get the .Fields array you will need to request the issue using GET after the creation in two different actions (there are many examples of GET here, if you need some help please let us know)
In older versions of Jira it was possible to access to .Field.xxxx responses in creation action, but it is not possible anymore.
Hope this clarifies the problem
Hi @sonalp123 would you be so kind to confirm that your issue is resolved so that we can close it? Thank you
@manuelbcd I have the same error: "request failed. Please analyze the request body for more details. Status code: 400". The panic occured in client.Issue.Create(&i), not in "issue.Fields.xxx". Hope for reply.
Hello @sonalp123 I think we know what is happening. The issue.Fields array is not present in creation response by default so you are trying to read a non populated field. Please remove "issue.Fields.xxx", you can print issue.xxx without any problem. If you want to get the .Fields array you will need to request the issue using GET after the creation in two different actions (there are many examples of GET here, if you need some help please let us know)
In older versions of Jira it was possible to access to .Field.xxxx responses in creation action, but it is not possible anymore.
Hope this clarifies the problem
@manuelbcd I have the same error: "request failed. Please analyze the request body for more details. Status code: 400". The panic occured in client.Issue.Create(&i), not in "issue.Fields.xxx". Hope for reply.
Hello @sonalp123 I think we know what is happening. The issue.Fields array is not present in creation response by default so you are trying to read a non populated field. Please remove "issue.Fields.xxx", you can print issue.xxx without any problem. If you want to get the .Fields array you will need to request the issue using GET after the creation in two different actions (there are many examples of GET here, if you need some help please let us know) In older versions of Jira it was possible to access to .Field.xxxx responses in creation action, but it is not possible anymore. Hope this clarifies the problem
my jira version is 8.6.1 ,go version is the latest
Hi,
The issue is resolved. we can close the issue.
Regards,
Sonal Patil
ᐧ
On Tue, Sep 14, 2021 at 3:30 AM Shicheng Wang @.***> wrote:
@manuelbcd https://github.com/manuelbcd I have the same error: "request failed. Please analyze the request body for more details. Status code: 400". The panic occured in client.Issue.Create(&i), not in "issue.Fields.xxx". Hope for reply.
Hello @sonalp123 https://github.com/sonalp123 I think we know what is happening. The issue.Fields array is not present in creation response by default so you are trying to read a non populated field. Please remove "issue.Fields.xxx", you can print issue.xxx without any problem. If you want to get the .Fields array you will need to request the issue using GET after the creation in two different actions (there are many examples of GET here, if you need some help please let us know) In older versions of Jira it was possible to access to .Field.xxxx responses in creation action, but it is not possible anymore. Hope this clarifies the problem
my jira version is 8.6.1 ,go version is the latest
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andygrunwald/go-jira/issues/376#issuecomment-919024970, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI53UIL3WI2KTECLSPEA43UB4P5LANCNFSM44XKUSYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi, The issue is resolved. we can close the issue. Regards, Sonal Patil ᐧ … On Tue, Sep 14, 2021 at 3:30 AM Shicheng Wang @.***> wrote: @manuelbcd https://github.com/manuelbcd I have the same error: "request failed. Please analyze the request body for more details. Status code: 400". The panic occured in client.Issue.Create(&i), not in "issue.Fields.xxx". Hope for reply. Hello @sonalp123 https://github.com/sonalp123 I think we know what is happening. The issue.Fields array is not present in creation response by default so you are trying to read a non populated field. Please remove "issue.Fields.xxx", you can print issue.xxx without any problem. If you want to get the .Fields array you will need to request the issue using GET after the creation in two different actions (there are many examples of GET here, if you need some help please let us know) In older versions of Jira it was possible to access to .Field.xxxx responses in creation action, but it is not possible anymore. Hope this clarifies the problem my jira version is 8.6.1 ,go version is the latest — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#376 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI53UIL3WI2KTECLSPEA43UB4P5LANCNFSM44XKUSYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
how resolve this ? can u give the solution?
@sonalp123 would you be so kind to share with us what did the trick to resolve it?
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.
To provide visibility, we created the Road to v2 Milestone and calling for your feedback in https://github.com/andygrunwald/go-jira/issues/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.
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.
Thanks for using this library. If there is anything else you would like to tell us, let us know!
2021/05/11 16:41:09 ERROR: request failed. Please analyze the request body for more details. Status code: 400
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x1271f8d]
goroutine 1 [running]: main.main() /Users/Documents/jiratrial.go:44 +0x3ad exit status 2
getting an error while running this piece of code