class TaskJuggler::TjpExportRE

This specialization of ReportBase implements an export of the project data in the TJP syntax format.

Public Class Methods

new(report) click to toggle source

Create a new object and set some default values.

Calls superclass method
# File lib/taskjuggler/reports/TjpExportRE.rb, line 22
def initialize(report)

  @supportedTaskAttrs = %w( booking complete depends flags maxend
                            maxstart minend minstart note priority
                            projectid responsible )
  @supportedResourceAttrs = %w( booking flags shifts vacation workinghours )

Public Instance Methods

generateIntermediateFormat() click to toggle source
# File lib/taskjuggler/reports/TjpExportRE.rb, line 31
def generateIntermediateFormat
to_tjp() click to toggle source

Return the project data in TJP syntax format.

# File lib/taskjuggler/reports/TjpExportRE.rb, line 36
def to_tjp
  # Prepare the resource list.
  @resourceList =
  @resourceList = filterResourceList(@resourceList, nil, a('hideResource'),
                                     a('rollupResource'), a('openNodes'))

  # Prepare the task list.
  @taskList =
  @taskList = filterTaskList(@taskList, nil, a('hideTask'), a('rollupTask'),


  @file = ''

  generateProjectProperty if a('definitions').include?('project')

  generateFlagDeclaration if a('definitions').include?('flags')
  generateProjectIDs if a('definitions').include?('projectids')

  generateShiftList if a('definitions').include?('shifts')

  generateResourceList if a('definitions').include?('resources')
  generateTaskList if a('definitions').include?('tasks')

  generateTaskAttributes unless a('taskAttributes').empty?
  generateResourceAttributes unless a('resourceAttributes').empty?