Ruby: 有没有办法通过 Ruby rest-client 在 JIRA 中移动版本

Ruby: Is there any way to move versions in JIRA via Ruby rest-client

最近我试图为我们的生产 Ruby 环境重写一个旧的遗留 Python 程序。该脚本的主要目标是:

jira-ruby gem 用于创建东西很好,但是没有 "move" 方法,所以我尝试使用 REST 库。

但我不知道如何在父版本之后移动新创建的版本。

https://developer.atlassian.com/static/rest/jira/6.1.html#d2e137

我应该如何通过 POST 方法发送 REST 查询以在 22010 之后移动版本 22015?

require 'rubygems'
require 'json'
require 'restclient'

def jira_request
  project_key="TEST"
  jira_login = "bot"
  jira_pass = "password"
  jira_url = "http://#{jira_login}:#{jira_pass}@jira.local:16011/rest/api/2/version/22105/move"

  @move = RestClient.post "#{jira_url}",
  {
    'after' => "http://jira.local:16011/rest/api/2/version/22106"
  }.to_json, :content_type => :json, :accept => :json

  @jiradata = JSON.parse(@move)
end

jira_request