lib/jira-profiler/team.rb
def load_vacation_log(log_filepath)
      @vacation_log = {}
      data = CSV.read(log_filepath, { encoding: "UTF-8", headers: true, header_converters: :symbol, converters: :all})
      data.each do |r|
        # Date.strptime(r[:date], "%m/%d/%y")
        d = Date.new(r[:year], r[:month], r[:day])
        k = d.strftime('%Y.%m.%d')
        @vacation_log[r[:who]] = {} unless @vaction_log.has_key?(r[:who])
        @vacation_log[k] = [] unless @vaction_log.has_key?(k)
        @vacation_log[k] << r[:who]
      end
    end
# Reference of vacation time for each team member
Reference of vacation time for each team member
Reference of vacation time for each team member
def load_vacation_log(log_filepath)
      @vacation_log = {}
      data = CSV.read(log_filepath, { encoding: "UTF-8", headers: true, header_converters: :symbol, converters: :all})
      data.each do |r|
        d = Date.new(r[:year], r[:month], r[:day])
        k = d.strftime('%Y.%m.%d')
        @vacation_log[r[:who]] = {} unless @vaction_log.has_key?(r[:who])
        @vacation_log[k] = [] unless @vaction_log.has_key?(k)
        @vacation_log[k] << r[:who]
      end
    end
def load_vacation_log ( log_filepath ) @vacation_log = { } data = CSV . read ( log_filepath , { encoding : "UTF-8" , headers : true , header_converters : :symbol , converters : :all } ) data . each do | r | d = Date . new ( r [ :year ] , r [ :month ] , r [ :day ] ) k = d . strftime ( '%Y.%m.%d' ) @vacation_log [ r [ :who ] ] = { } unless @vaction_log . has_key? ( r [ :who ] ) @vacation_log [ k ] = [ ] unless @vaction_log . has_key? ( k ) @vacation_log [ k ] << r [ :who ] end end
Reference of vacation time for each team member
Reference of vacation time for each team member
# Date.strptime(r[:date], "%m/%d/%y")
log_filepath