Skip to content

Commit

Permalink
Return assignee and resolution status of a ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislo committed Feb 9, 2010
1 parent 41be6da commit 424a5a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|

# Change these as appropriate
s.name = "jira"
s.version = "0.1.1"
s.version = "0.1.2"
s.summary = "A command line interface to the JIRA issue tracking system"
s.author = "Chris Lowis"
s.email = "[email protected]"
Expand Down
4 changes: 2 additions & 2 deletions jira.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Gem::Specification.new do |s|
s.name = %q{jira}
s.version = "0.1.1"
s.version = "0.1.2"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Chris Lowis"]
s.date = %q{2010-01-28}
s.date = %q{2010-02-09}
s.default_executable = %q{jira}
s.email = %q{[email protected]}
s.executables = ["jira"]
Expand Down
4 changes: 3 additions & 1 deletion lib/jira/issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def find_by_ticket_number(ticket_number)
doc = XmlSimple.xml_in res.to_s
item = doc['channel'].first['item'].first
OpenStruct.new(:title => item['title'].first,
:description => item['description'].first)
:description => item['description'].first,
:assignee => item['assignee'].first['username'],
:resolution => item['resolution'].first['content'])
end

def find_all_open_assigned_issues
Expand Down
8 changes: 8 additions & 0 deletions spec/jira/issue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ module Jira
it "should return the description of the issue" do
@ticket.description.should == "A test ticket"
end

it "should return the assignee of a ticket" do
@ticket.assignee.should == "chris.lowis"
end

it "should return the resolution status of the ticket" do
@ticket.resolution.should == "Unresolved"
end
end

describe "finding and listing issues" do
Expand Down

0 comments on commit 424a5a7

Please sign in to comment.