Open jspooner opened 4 years ago
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]
I've accomplished the version change in this way:
issue.save({ "fields" => { "fixVersions" => [{ "name" => "put your version name here" }] } })
Is it possible to add a version to an issue? It seems like this should work.