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

[issue] - Example "Create an Issue" Failing #308

Open
naiduarvind opened this issue Aug 10, 2020 · 7 comments
Open

[issue] - Example "Create an Issue" Failing #308

naiduarvind opened this issue Aug 10, 2020 · 7 comments
Labels
needs triage Ticket that needs triage (a proper look for classification)

Comments

@naiduarvind
Copy link

Describe the bug

The example on "Create an Issue" runs into a panic with a status code: 400.

Formatting tips: GitHub supports Markdown: https://guides.github.com/features/mastering-markdown/

To Reproduce

Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include configuration, logs, etc. to reproduce, if relevant.

  1. Simply copy the example from the README of the repository and paste it into an editor.
  2. Run the build to produce a target binary.
  3. Execute the target binary and you will be presented with the error seen below.

Screenshot 2020-08-09 at 11 16 05 PM

Expected behavior

The expected behavior should be that it creates the ticket and exits the program successfully.

Possible Solution

Removing the Reporter and Assignee field from the IssueFields creates the ticket as expected but another situation occurs. Apparently dereferencing the pointers from issue to i in the print statement causes another panic: runtime error: invalid memory address or nil pointer dereference as seen below.

Screenshot 2020-08-10 at 2 00 08 PM

Changing issues.Fields.Summary to i.Fields.Summary gets the entire example to be working as expected.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • go-jira version (git tag or sha): de60bbe
  • Go version (go version): go1.14.6 darwin/amd64
  • Jira version: I believe it is the latest since I can't seem to get the version tag off "Inspect Element"
  • Jira type (cloud or on-premise): Cloud
  • Involved Jira plugins: None
  • Operating System and version: Mac OS
@github-actions
Copy link

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.

@dac42
Copy link

dac42 commented Aug 13, 2020

I'm experiencing a very similar issue except that I can use the Assignee field, just not the Reporter field.

Additionally, when I remove the Reporter field and use jc.Issue.Create(), the issue is created successfully with all fields populated as expected but the issue struct returned from the call has Fields = nil.

If it helps, my environment:
go-jira version: 1.12.0
go version: go1.14 darwin/amd64
jira version: 8.3.2
Jira type: On-premise
Involved Jira plugins: none
OS and version: Mac OS Catalina 10.15.6

@omerxx
Copy link

omerxx commented Sep 1, 2020

+1
I see the exact same behavior.

@ghostsquad
Copy link
Contributor

Thank you for your issue your issue report. I appreciate your patience as we work to get a new maintainer up to speed to help out on this project.

@trenton42
Copy link

After looking at the Jira docs, it looks like they require an account id for assignee and reporter. Testing it out with the following snip worked:

Assignee: &jira.User{
    AccountID: "<A Jira User ID here>",
},
Reporter: &jira.User{
    AccountID: "<A Jira User ID here>",
},

@tuannvm
Copy link

tuannvm commented Aug 30, 2021

The custom required fields in Jira project should also be checked as there's no generic form of it, and it could be different per each project.

For example, this is my company's project requirement
image

which of course is not included in the generic example

@andygrunwald andygrunwald added the needs triage Ticket that needs triage (a proper look for classification) label Aug 20, 2022
@andygrunwald
Copy link
Owner

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.
If you seek priority development for your issue + you like to sponsor it, please contact me.

What does this mean for my issue?

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.

Final words

Thanks for using this library.
If there is anything else you would like to tell us, let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Ticket that needs triage (a proper look for classification)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants