class TaskJuggler::TimeSheetSender

The TimeSheetSender class generates time sheet templates for the current week and sends them out to the project contributors. For this to work, the resources must provide the 'Email' custom attribute with their email address. The actual project data is accessed via tj3client on a tj3 server process.

Attributes

date[RW]

Public Class Methods

new(appName) click to toggle source
Calls superclass method TaskJuggler::SheetSender.new
# File lib/taskjuggler/TimeSheetSender.rb, line 26
    def initialize(appName)
      super(appName, 'time')

      # This is a LogicalExpression string that controls what resources should
      # not be getting a time sheet.
      @hideResource = '0'
      # The base directory of the time sheet templates.
      @templateDir = 'TimeSheetTemplates'
      # This file contains the time intervals that the TimeSheetReceiver will
      # accept as a valid interval.
      @signatureFile = "#{@templateDir}/acceptable_intervals"
      # The log file
      @logFile = 'timesheets.log'

      @signatureFilter = /^[ ]*timesheet\s[a-z][a-z0-9_]*\s([0-9:\-+]*\s-\s[0-9:\-+]*)/
      @introText = <<'EOT'
Please find enclosed your weekly report template. Please fill out
the form and send it back to the sender of this email. You can either
use the attached file or the body of the email. In case you send it
in the body of the email, make sure it only contains the 'timesheet'
syntax. No quote marks are allowed. It must be plain text, UTF-8
encoded and the time sheet header from 'timesheet' to the period end
date must be in a single line that starts at the beginning of the line.

EOT
      @mailSubject = 'Your weekly time sheet template for %s'
    end