Class: Jira::Issue
- Inherits:
-
Object
- Object
- Jira::Issue
- Defined in:
- lib/jira/issue.rb
Instance Method Summary collapse
- #find_all_open_assigned_issues ⇒ Object
-
#initialize(options = nil) ⇒ Issue
constructor
A new instance of Issue.
- #list_all_open_assigned_issues ⇒ Object
- #rest_resource(options) ⇒ Object
Constructor Details
#initialize(options = nil) ⇒ Issue
Returns a new instance of Issue.
8 9 10 |
# File 'lib/jira/issue.rb', line 8 def initialize( = nil) @resource = rest_resource() end |
Instance Method Details
#find_all_open_assigned_issues ⇒ Object
17 18 19 20 21 22 |
# File 'lib/jira/issue.rb', line 17 def find_all_open_assigned_issues res = @resource['sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?resolution=-1&assigneeSelect=issue_current_user'].get doc = XmlSimple.xml_in res.to_s open_issues = doc['channel'].first['item'] issues = open_issues.map {|i| OpenStruct.new(i)} end |
#list_all_open_assigned_issues ⇒ Object
24 25 26 27 |
# File 'lib/jira/issue.rb', line 24 def list_all_open_assigned_issues issues = find_all_open_assigned_issues issues.map{|i| "* #{i.title}"}.join("\n") end |
#rest_resource(options) ⇒ Object
12 13 14 15 |
# File 'lib/jira/issue.rb', line 12 def rest_resource() RestClient.proxy = ENV['http_proxy'] @resource = RestClient::Resource.new([:jira_base], ) end |