Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Added flag for working on an item

 * std_de now lists tags as well
  • Loading branch information...
commit 0ccf4d4c72355d9e44162a68286882ffb1c126ce 1 parent 0873239
John Kamenik authored
Showing with 34 additions and 2 deletions.
  1. +7 −1 common.rb
  2. +1 −1  list.rb
  3. +26 −0 working_on.rb
8 common.rb
View
@@ -41,6 +41,10 @@ def escape(string)
changed
end
+ def std_tags(obj,prefix='',postfix="\n")
+ "#{prefix}#{obj.tags.join(', ')}#{postfix}" if obj.tags.size > 0
+ end
+
def std_rank(obj)
obj.rank || '---'
end
@@ -54,7 +58,9 @@ def std_ta(ta)
end
def std_de(de)
- escape "#{std_rank(de)} #{de.formatted_i_d} #{de.priority} #{de.schedule_state} #{de.state} #{de.owner}\n\t#{de.name}"
+ str = escape "#{std_rank(de)} #{de.formatted_i_d} #{de.priority} #{de.schedule_state} #{de.state} #{de.owner}\n"
+ str += std_tags(de,"\t")
+ str += "\t#{de.name}"
end
def std_tag(tag)
2  list.rb
View
@@ -21,6 +21,6 @@
:password => config[:password]
)
-rally.find_all(Common.rally_type(type),:order => [:name]).each do |x|
+rally.find_all(Common.rally_type(type)).each do |x|
puts Common.render(type,x)
end
26 working_on.rb
View
@@ -0,0 +1,26 @@
+#!/usr/local/bin/ruby
+require 'rubygems'
+require 'rally_rest_api'
+require 'date'
+require File.dirname(__FILE__)+"/common"
+
+config = Common.load_config
+type = ARGV[0].to_sym
+
+rally = RallyRestAPI.new(
+ :username => config[:username],
+ :password => config[:password]
+)
+
+ARGV.each do |arg|
+ type = arg[0..1].downcase.to_sym
+
+ rally.find(Common.rally_type(type)){ equal :formatted_i_d, arg }.each do |x|
+ changes = {
+ :schedule_state => 'In-Progress',
+ :owner => config[:username]
+ }
+
+ x.update changes
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.