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

How to add (create) Worklog to specific issue? #374

Open
dobryakov opened this issue Dec 4, 2020 · 1 comment
Open

How to add (create) Worklog to specific issue? #374

dobryakov opened this issue Dec 4, 2020 · 1 comment

Comments

@dobryakov
Copy link

client.Worklog.create
Traceback (most recent call last):
        1: from (irb):4
NoMethodError (undefined method `create' for #<JIRA::Resource::WorklogFactory:0x0000000002fdbb80>)

How to do it properly?

@dobryakov
Copy link
Author

I try to do this:

issue   = client.Issue.find(issue_key)
      worklog = issue.worklogs.build
      data    = { timeSpentSeconds: s, visibility: nil, comment: c, started: t.strftime('%Y-%m-%dT%H:%M:%S.%L%z') }
      worklog.save(data)

Not so transparent :( Is it correct way?

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