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 a version to an Issue #368

Open
jspooner opened this issue Aug 11, 2020 · 1 comment
Open

How to add a version to an Issue #368

jspooner opened this issue Aug 11, 2020 · 1 comment

Comments

@jspooner
Copy link

Is it possible to add a version to an issue? It seems like this should work.

jira = JIRA::Client.new(
  username:     ENV['JIRA_API_USERNAME'],
  password:     ENV['JIRA_API_TOKEN'],
  site:         ENV['JIRA_URI'],
  context_path: '',
  auth_type:    :basic
)
project = jira.Project.find('CC')
target_version = 'Test 1'
version = project.versions.detect { |v| v.name == target_version }

issue = jira.Issue.find('CC-3986')
issue.save fixVersions: [versions]
@wisenrico
Copy link

I've accomplished the version change in this way:

issue.save({
  "fields" => {
    "fixVersions" => [{
      "name" => "put your version name here"
    }]
  }
})

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

2 participants