module Rmclient
Constants
- VERSION
Public Instance Methods
mktime_entry(id, date, activity, hours, comment)
click to toggle source
create time entry
@param id issue id @param date date for time entry @param activity [Integer] activity id @param hours [Float] no of hours @param comment [String] time entry comment @return true is successful, otherwise false
# File lib/rmclient.rb, line 51 def mktime_entry(id, date, activity, hours, comment) # parse date a = Time_entry.new(:issue_id => id, :spent_on => date, :hours => hours, :comments => comment, :activity_id => activity) a.save() end
print_activities()
click to toggle source
print possible activities
# File lib/rmclient.rb, line 39 def print_activities() Time_entry_activity.find(:all).each{|a| print "#{a.id} #{a.name}\n"} end
print_issues(user = "me")
click to toggle source
print issues assigned to user
@param user user id
# File lib/rmclient.rb, line 25 def print_issues(user = "me") issues = Issue.find(:all, :params => { :assigned_to_id => user, "limit" => 100}) issues.each{|i| print "#{i.id} #{i.subject}\n"} end
print_time_entries(user = "me")
click to toggle source
print time entries for user
@param user id
# File lib/rmclient.rb, line 33 def print_time_entries(user = "me") entries = Time_entry.find(:all, :params => { :user_id => user, "limit" => 100}) entries.each{|e| print "#{e.id} #{e.spent_on} #{e.hours} #{e.comments}\n"} end