Class: TaskJuggler::TimeSheetSender
- Inherits:
-
SheetSender
- Object
- SheetHandlerBase
- SheetSender
- TaskJuggler::TimeSheetSender
- Defined in:
- lib/taskjuggler/TimeSheetSender.rb
Overview
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.
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
Attributes inherited from SheetSender
Attributes inherited from SheetHandlerBase
Instance Method Summary collapse
-
#initialize(appName) ⇒ TimeSheetSender
constructor
A new instance of TimeSheetSender.
Methods inherited from SheetSender
Methods included from StdIoWrapper
Methods inherited from SheetHandlerBase
#addToScm, #cutOut, #error, #htmlMailBody, #info, #log, #sendEmail, #sendRichTextEmail, #setWorkingDir, #warning
Constructor Details
#initialize(appName) ⇒ TimeSheetSender
Returns a new instance of TimeSheetSender.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/taskjuggler/TimeSheetSender.rb', line 27 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 |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
25 26 27 |
# File 'lib/taskjuggler/TimeSheetSender.rb', line 25 def date @date end |