class JIRA::Resource::RapidView

Public Class Methods

all(client) click to toggle source
# File lib/jira/resource/rapidview.rb, line 11
def self.all(client)
  response = client.get(path_base(client) + '/rapidview')
  json = parse_json(response.body)
  json['views'].map do |view|
    client.RapidView.build(view)
  end
end
find(client, key, options = {}) click to toggle source
# File lib/jira/resource/rapidview.rb, line 19
def self.find(client, key, options = {})
  response = client.get(path_base(client) + "/rapidview/#{key}")
  json = parse_json(response.body)
  client.RapidView.build(json)
end

Private Class Methods

path_base(client) click to toggle source
# File lib/jira/resource/rapidview.rb, line 35
def self.path_base(client)
  client.options[:context_path] + '/rest/greenhopper/1.0'
end

Public Instance Methods

issues() click to toggle source
# File lib/jira/resource/rapidview.rb, line 25
def issues
  response = client.get(path_base(client) + "/xboard/plan/backlog/data?rapidViewId=#{id}")
  json = self.class.parse_json(response.body)
  # To get Issue objects with the same structure as for Issue.all
  issue_ids = json['issues'].map { |issue| issue['id'] }
  client.Issue.jql("id IN(#{issue_ids.join(', ')})")
end

Private Instance Methods

path_base(client) click to toggle source
# File lib/jira/resource/rapidview.rb, line 39
def path_base(client)
  self.class.path_base(client)
end