class JIRA::Resource::Issue
Public Class Methods
all(client)
click to toggle source
# File lib/jira/resource/issue.rb, line 36 def self.all(client) response = client.get( client.options[:rest_base_path] + "/search", :expand => 'transitions.fields' ) json = parse_json(response.body) json['issues'].map do |issue| client.Issue.build(issue) end end
jql(client, jql, options = {fields: nil, start_at: nil, max_results: nil})
click to toggle source
# File lib/jira/resource/issue.rb, line 47 def self.jql(client, jql, options = {fields: nil, start_at: nil, max_results: nil}) url = client.options[:rest_base_path] + "/search?jql=" + CGI.escape(jql) url << "&fields=#{options[:fields].map{ |value| CGI.escape(value.to_s) }.join(',')}" if options[:fields] url << "&startAt=#{CGI.escape(options[:start_at].to_s)}" if options[:start_at] url << "&maxResults=#{CGI.escape(options[:max_results].to_s)}" if options[:max_results] response = client.get(url) json = parse_json(response.body) json['issues'].map do |issue| client.Issue.build(issue) end end
Public Instance Methods
method_missing(method_name, *args, &block)
click to toggle source
Calls superclass method
JIRA::Base#method_missing
# File lib/jira/resource/issue.rb, line 69 def method_missing(method_name, *args, &block) if attrs.keys.include?('fields') && attrs['fields'].keys.include?(method_name.to_s) attrs['fields'][method_name.to_s] else super(method_name) end end
respond_to?(method_name)
click to toggle source
Calls superclass method
JIRA::Base#respond_to?
# File lib/jira/resource/issue.rb, line 61 def respond_to?(method_name) if attrs.keys.include?('fields') && attrs['fields'].keys.include?(method_name.to_s) true else super(method_name) end end