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

Unable to upload attachments #370

Open
dostrander opened this issue Sep 4, 2020 · 0 comments
Open

Unable to upload attachments #370

dostrander opened this issue Sep 4, 2020 · 0 comments

Comments

@dostrander
Copy link

When calling jira_client.Attachment.build(issue: issue) where issue is a JIRA::Resource::Issue I come across the following stack trace.

        6: from /Users/$USER/.rvm/gems/ruby-2.6.1/gems/jira-ruby-1.6.0/lib/jira/base_factory.rb:43:in `build'
        5: from /Users/$USER/.rvm/gems/ruby-2.6.1/gems/jira-ruby-1.6.0/lib/jira/base.rb:117:in `build'
        4: from /Users/$USER/.rvm/gems/ruby-2.6.1/gems/jira-ruby-1.6.0/lib/jira/base.rb:117:in `new'
        3: from /Users/$USER/.rvm/gems/ruby-2.6.1/gems/jira-ruby-1.6.0/lib/jira/base.rb:80:in `initialize'
        2: from /Users/$USER/.rvm/gems/ruby-2.6.1/gems/jira-ruby-1.6.0/lib/jira/base.rb:80:in `each'
        1: from /Users/$USER/.rvm/gems/ruby-2.6.1/gems/jira-ruby-1.6.0/lib/jira/base.rb:90:in `block in initialize'
ArgumentError (Required option :issue missing)

Walking through the code it looks like in base.rb:117 it callsnew(client, attrs: attrs) which calls into it's initializer. In the init expects issue to be in the top level of the hash however it's nested 1 down because it's passed through the attr.

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

1 participant