Class/Module Index [+]

Quicksearch

TaskJuggler::Tj3TsSummary

Public Class Methods

new() click to toggle source
# File lib/taskjuggler/apps/Tj3TsSummary.rb, line 25
def initialize
  super

  # The default report period end is next Monday 0:00.
  @date = TjTime.new.nextDayOfWeek(1).to_s('%Y-%m-%d')
  @resourceList = []
  @sheetRecipients = []
  @digestRecipients = []
end

Public Instance Methods

appMain(argv) click to toggle source
# File lib/taskjuggler/apps/Tj3TsSummary.rb, line 65
def appMain(argv)
  ts = TimeSheetSummary.new
  @rc.configure(ts, 'global')
  @rc.configure(ts, 'timesheets')
  @rc.configure(ts, 'timesheets.summary')
  ts.workingDir = @workingDir if @workingDir
  ts.dryRun = @dryRun
  ts.date = @date if @date
  ts.sheetRecipients += @sheetRecipients
  ts.digestRecipients += @digestRecipients

  ts.sendSummary(@resourceList)

  0
end
processArguments(argv) click to toggle source
# File lib/taskjuggler/apps/Tj3TsSummary.rb, line 35
def processArguments(argv)
  super do
    @opts.banner += This program can be used to send out individual copies and a summary of allaccepted time sheets a list of email addresses. The directory structures fortemplates and submitted time sheets must be present. The project data will beaccesses via tj3client from a running TaskJuggler server process.
    @opts.on('-r', '--resource <ID>', String,
             format('Only generate summary for given resource')) do |arg|
      @resourceList << arg
    end
    @opts.on('-t', '--to <EMAIL>', String,
             format('Send all individual reports and a summary report ' +
                    'to this email address')) do |arg|
      @sheetRecipients << arg
      @digestRecipients << arg
    end
    @opts.on('--sheet <EMAIL>', String,
             format('Send all reports to this email address')) do |arg|
      @sheetRecipients << arg
    end
    @opts.on('--digest <EMAIL>', String,
             format('Send a summary report to this email address')) do |arg|
      @digestRecipients << arg
    end
    optsEndDate
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.