taskjuggler 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -0
- data/benchmarks/depends.tjp +2 -1
- data/benchmarks/htmltaskreport.tjp +2 -1
- data/doc/classes/AppConfig.html +124 -120
- data/doc/classes/Arguments.html +10 -6
- data/doc/classes/Object.html +229 -0
- data/doc/classes/String.html +35 -31
- data/doc/classes/TaskJuggler/Account.html +18 -18
- data/doc/classes/TaskJuggler/AccountAttribute.html +261 -0
- data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
- data/doc/classes/TaskJuggler/Allocation.html +34 -30
- data/doc/classes/TaskJuggler/AllocationAttribute.html +70 -70
- data/doc/classes/TaskJuggler/AttributeBase.html +131 -147
- data/doc/classes/TaskJuggler/AttributeDefinition.html +38 -21
- data/doc/classes/TaskJuggler/BatchProcessor.html +313 -0
- data/doc/classes/TaskJuggler/Booking.html +22 -18
- data/doc/classes/TaskJuggler/BookingListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/BooleanAttribute.html +40 -40
- data/doc/classes/TaskJuggler/CSVFile.html +28 -24
- data/doc/classes/TaskJuggler/Charge.html +22 -18
- data/doc/classes/TaskJuggler/ChargeListAttribute.html +30 -30
- data/doc/classes/TaskJuggler/ChargeSet.html +41 -37
- data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ColumnListAttribute.html +231 -0
- data/doc/classes/TaskJuggler/ColumnTable.html +23 -21
- data/doc/classes/TaskJuggler/DateAttribute.html +20 -20
- data/doc/classes/TaskJuggler/DefinitionListAttribute.html +162 -0
- data/doc/classes/TaskJuggler/DependencyListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
- data/doc/classes/TaskJuggler/FlagListAttribute.html +42 -42
- data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
- data/doc/classes/TaskJuggler/FormatListAttribute.html +197 -0
- data/doc/classes/TaskJuggler/GanttChart.html +236 -207
- data/doc/classes/TaskJuggler/GanttContainer.html +46 -42
- data/doc/classes/TaskJuggler/GanttHeader.html +16 -12
- data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +16 -12
- data/doc/classes/TaskJuggler/GanttLine.html +28 -24
- data/doc/classes/TaskJuggler/GanttLoadStack.html +22 -18
- data/doc/classes/TaskJuggler/GanttMilestone.html +46 -42
- data/doc/classes/TaskJuggler/GanttRouter.html +104 -98
- data/doc/classes/TaskJuggler/GanttTaskBar.html +46 -42
- data/doc/classes/TaskJuggler/HTMLDocument.html +12 -12
- data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
- data/doc/classes/TaskJuggler/Interval.html +126 -120
- data/doc/classes/TaskJuggler/IntervalListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/JobInfo.html +284 -0
- data/doc/classes/TaskJuggler/Journal.html +197 -0
- data/doc/classes/TaskJuggler/JournalEntry.html +218 -0
- data/doc/classes/TaskJuggler/KeywordArray.html +179 -0
- data/doc/classes/TaskJuggler/KeywordDocumentation.html +445 -396
- data/doc/classes/TaskJuggler/Limits/Limit.html +34 -30
- data/doc/classes/TaskJuggler/Limits.html +68 -62
- data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ListAttributeBase.html +207 -0
- data/doc/classes/TaskJuggler/Log.html +72 -68
- data/doc/classes/TaskJuggler/LogicalAttribute.html +38 -34
- data/doc/classes/TaskJuggler/LogicalExpression.html +16 -12
- data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +194 -0
- data/doc/classes/TaskJuggler/LogicalFlag.html +32 -32
- data/doc/classes/TaskJuggler/LogicalFunction.html +28 -24
- data/doc/classes/TaskJuggler/LogicalOperation.html +17 -13
- data/doc/classes/TaskJuggler/Macro.html +10 -6
- data/doc/classes/TaskJuggler/MacroParser.html +36 -36
- data/doc/classes/TaskJuggler/MacroTable.html +40 -36
- data/doc/classes/TaskJuggler/Message.html +16 -12
- data/doc/classes/TaskJuggler/MessageHandler.html +16 -12
- data/doc/classes/TaskJuggler/Navigator.html +249 -0
- data/doc/classes/TaskJuggler/OnShiftCache.html +316 -0
- data/doc/classes/TaskJuggler/Project.html +1064 -678
- data/doc/classes/TaskJuggler/ProjectFileParser.html +90 -85
- data/doc/classes/TaskJuggler/PropertyAttribute.html +194 -0
- data/doc/classes/TaskJuggler/PropertyList.html +114 -113
- data/doc/classes/TaskJuggler/PropertySet.html +355 -312
- data/doc/classes/TaskJuggler/PropertyTreeNode.html +527 -474
- data/doc/classes/TaskJuggler/Query.html +90 -85
- data/doc/classes/TaskJuggler/RTPNavigator.html +292 -0
- data/doc/classes/TaskJuggler/RTPReport.html +301 -0
- data/doc/classes/TaskJuggler/RealFormat.html +114 -57
- data/doc/classes/TaskJuggler/RealFormatAttribute.html +162 -0
- data/doc/classes/TaskJuggler/ReferenceAttribute.html +87 -20
- data/doc/classes/TaskJuggler/Report.html +82 -291
- data/doc/classes/TaskJuggler/ReportBase.html +448 -0
- data/doc/classes/TaskJuggler/ReportContext.html +243 -0
- data/doc/classes/TaskJuggler/ReportTable.html +158 -129
- data/doc/classes/TaskJuggler/ReportTableCell.html +30 -26
- data/doc/classes/TaskJuggler/ReportTableColumn.html +29 -25
- data/doc/classes/TaskJuggler/ReportTableLegend.html +28 -24
- data/doc/classes/TaskJuggler/ReportTableLine.html +34 -30
- data/doc/classes/TaskJuggler/Resource.html +12 -12
- data/doc/classes/TaskJuggler/ResourceListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/ResourceListRE.html +49 -57
- data/doc/classes/TaskJuggler/ResourceScenario.html +126 -126
- data/doc/classes/TaskJuggler/RichText.html +52 -48
- data/doc/classes/TaskJuggler/RichTextAttribute.html +30 -30
- data/doc/classes/TaskJuggler/RichTextDocument.html +41 -37
- data/doc/classes/TaskJuggler/RichTextElement.html +274 -264
- data/doc/classes/TaskJuggler/RichTextException.html +13 -13
- data/doc/classes/TaskJuggler/RichTextParser.html +48 -47
- data/doc/classes/TaskJuggler/RichTextProtocolExample.html +52 -55
- data/doc/classes/TaskJuggler/RichTextProtocolHandler.html +55 -10
- data/doc/classes/TaskJuggler/RichTextScanner.html +106 -245
- data/doc/classes/TaskJuggler/RichTextSnip.html +28 -24
- data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +381 -301
- data/doc/classes/TaskJuggler/Scenario.html +6 -6
- data/doc/classes/TaskJuggler/ScenarioData.html +40 -36
- data/doc/classes/TaskJuggler/ScenarioListAttribute.html +229 -0
- data/doc/classes/TaskJuggler/Scoreboard.html +70 -66
- data/doc/classes/TaskJuggler/Shift.html +18 -18
- data/doc/classes/TaskJuggler/ShiftAssignment.html +58 -54
- data/doc/classes/TaskJuggler/ShiftAssignments.html +82 -78
- data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
- data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
- data/doc/classes/TaskJuggler/SortListAttribute.html +196 -0
- data/doc/classes/TaskJuggler/SourceFileInfo.html +16 -12
- data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
- data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
- data/doc/classes/TaskJuggler/SyntaxReference.html +46 -42
- data/doc/classes/TaskJuggler/TOCEntry.html +16 -12
- data/doc/classes/TaskJuggler/TableColumnDefinition.html +48 -33
- data/doc/classes/TaskJuggler/TableOfContents.html +22 -18
- data/doc/classes/TaskJuggler/TableReport.html +1036 -0
- data/doc/classes/TaskJuggler/Task.html +12 -12
- data/doc/classes/TaskJuggler/TaskDependency.html +16 -12
- data/doc/classes/TaskJuggler/TaskListAttribute.html +46 -46
- data/doc/classes/TaskJuggler/TaskListRE.html +49 -58
- data/doc/classes/TaskJuggler/TaskScenario.html +1270 -1180
- data/doc/classes/TaskJuggler/TextParser/Pattern.html +100 -96
- data/doc/classes/TaskJuggler/TextParser/Rule.html +88 -84
- data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -12
- data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
- data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +10 -6
- data/doc/classes/TaskJuggler/TextParser.html +203 -140
- data/doc/classes/TaskJuggler/TextReport.html +364 -0
- data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
- data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +50 -42
- data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +16 -12
- data/doc/classes/TaskJuggler/TextScanner.html +334 -240
- data/doc/classes/TaskJuggler/TjException.html +6 -6
- data/doc/classes/TaskJuggler/TjTime.html +547 -497
- data/doc/classes/TaskJuggler/TjpExample.html +29 -25
- data/doc/classes/TaskJuggler/TjpExportRE.html +77 -97
- data/doc/classes/TaskJuggler/TjpSyntaxRules.html +3911 -3886
- data/doc/classes/TaskJuggler/UserManual.html +54 -54
- data/doc/classes/TaskJuggler/WorkingHours.html +53 -49
- data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -85
- data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
- data/doc/classes/TaskJuggler/XMLComment.html +21 -21
- data/doc/classes/TaskJuggler/XMLDocument.html +28 -24
- data/doc/classes/TaskJuggler/XMLElement.html +70 -58
- data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
- data/doc/classes/TaskJuggler/XMLText.html +36 -36
- data/doc/classes/TaskJuggler.html +266 -183
- data/doc/files/COPYING.html +1 -1
- data/doc/files/README.html +1 -1
- data/doc/files/lib/AccountScenario_rb.html +1 -1
- data/doc/files/lib/Account_rb.html +1 -1
- data/doc/files/lib/Allocation_rb.html +1 -1
- data/doc/files/lib/AppConfig_rb.html +1 -1
- data/doc/files/lib/AttributeBase_rb.html +11 -1
- data/doc/files/lib/AttributeDefinition_rb.html +1 -1
- data/doc/files/lib/Attributes_rb.html +1 -1
- data/doc/files/lib/{LogicalFlag_rb.html → BatchProcessor_rb.html} +8 -6
- data/doc/files/lib/Booking_rb.html +1 -1
- data/doc/files/lib/ChargeSet_rb.html +1 -1
- data/doc/files/lib/Charge_rb.html +1 -1
- data/doc/files/lib/HTMLDocument_rb.html +1 -1
- data/doc/files/lib/Interval_rb.html +1 -1
- data/doc/files/lib/Journal_rb.html +106 -0
- data/doc/files/lib/KeywordArray_rb.html +106 -0
- data/doc/files/lib/KeywordDocumentation_rb.html +1 -1
- data/doc/files/lib/Limits_rb.html +1 -1
- data/doc/files/lib/Log_rb.html +1 -1
- data/doc/files/lib/LogicalExpression_rb.html +1 -3
- data/doc/files/lib/LogicalFunction_rb.html +1 -1
- data/doc/files/lib/LogicalOperation_rb.html +1 -1
- data/doc/files/lib/MacroParser_rb.html +1 -1
- data/doc/files/lib/MacroTable_rb.html +1 -1
- data/doc/files/lib/MessageHandler_rb.html +1 -1
- data/doc/files/lib/Message_rb.html +1 -1
- data/doc/files/lib/ProjectFileParser_rb.html +5 -1
- data/doc/files/lib/Project_rb.html +5 -1
- data/doc/files/lib/PropertyList_rb.html +1 -1
- data/doc/files/lib/PropertySet_rb.html +1 -1
- data/doc/files/lib/PropertyTreeNode_rb.html +1 -1
- data/doc/files/lib/Query_rb.html +1 -1
- data/doc/files/lib/RTPNavigator_rb.html +120 -0
- data/doc/files/lib/RTPReport_rb.html +118 -0
- data/doc/files/lib/RealFormat_rb.html +1 -1
- data/doc/files/lib/ResourceScenario_rb.html +1 -1
- data/doc/files/lib/Resource_rb.html +1 -1
- data/doc/files/lib/RichTextDocument_rb.html +1 -1
- data/doc/files/lib/RichTextElement_rb.html +1 -1
- data/doc/files/lib/RichTextParser_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolExample_rb.html +1 -1
- data/doc/files/lib/RichTextProtocolHandler_rb.html +1 -1
- data/doc/files/lib/RichTextScanner_rb.html +1 -1
- data/doc/files/lib/RichTextSnip_rb.html +1 -1
- data/doc/files/lib/RichTextSyntaxRules_rb.html +1 -1
- data/doc/files/lib/RichText_rb.html +1 -1
- data/doc/files/lib/ScenarioData_rb.html +1 -1
- data/doc/files/lib/Scenario_rb.html +1 -1
- data/doc/files/lib/Scoreboard_rb.html +1 -1
- data/doc/files/lib/ShiftAssignments_rb.html +1 -1
- data/doc/files/lib/ShiftScenario_rb.html +1 -1
- data/doc/files/lib/Shift_rb.html +1 -1
- data/doc/files/lib/SourceFileInfo_rb.html +1 -1
- data/doc/files/lib/SyntaxReference_rb.html +1 -1
- data/doc/files/lib/TOCEntry_rb.html +1 -1
- data/doc/files/lib/TableColumnDefinition_rb.html +1 -1
- data/doc/files/lib/TableOfContents_rb.html +1 -1
- data/doc/files/lib/TaskDependency_rb.html +1 -1
- data/doc/files/lib/TaskJuggler_rb.html +1 -1
- data/doc/files/lib/TaskScenario_rb.html +1 -1
- data/doc/files/lib/Task_rb.html +1 -1
- data/doc/files/lib/TextParser/Pattern_rb.html +1 -1
- data/doc/files/lib/TextParser/Rule_rb.html +1 -1
- data/doc/files/lib/TextParser/StackElement_rb.html +1 -1
- data/doc/files/lib/TextParser/TokenDoc_rb.html +1 -1
- data/doc/files/lib/TextParser_rb.html +1 -1
- data/doc/files/lib/TextScanner_rb.html +1 -1
- data/doc/files/lib/Tj3Config_rb.html +1 -1
- data/doc/files/lib/TjException_rb.html +1 -1
- data/doc/files/lib/TjTime_rb.html +1 -1
- data/doc/files/lib/TjpExample_rb.html +1 -1
- data/doc/files/lib/TjpSyntaxRules_rb.html +1 -1
- data/doc/files/lib/UTF8String_rb.html +1 -1
- data/doc/files/lib/UserManual_rb.html +1 -1
- data/doc/files/lib/WorkingHours_rb.html +1 -1
- data/doc/files/lib/XMLDocument_rb.html +1 -1
- data/doc/files/lib/XMLElement_rb.html +1 -1
- data/doc/files/lib/deep_copy_rb.html +106 -0
- data/doc/files/lib/ms_test_rb.html +90 -0
- data/doc/files/lib/reports/CSVFile_rb.html +1 -1
- data/doc/files/lib/reports/ColumnTable_rb.html +1 -1
- data/doc/files/lib/reports/GanttChart_rb.html +1 -1
- data/doc/files/lib/reports/GanttContainer_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
- data/doc/files/lib/reports/GanttHeader_rb.html +1 -1
- data/doc/files/lib/reports/GanttLine_rb.html +1 -1
- data/doc/files/lib/reports/GanttLoadStack_rb.html +1 -1
- data/doc/files/lib/reports/GanttMilestone_rb.html +1 -1
- data/doc/files/lib/reports/GanttRouter_rb.html +1 -1
- data/doc/files/lib/reports/GanttTaskBar_rb.html +1 -1
- data/doc/files/lib/reports/HTMLGraphics_rb.html +1 -1
- data/doc/files/lib/reports/{ReportElement_rb.html → Navigator_rb.html} +6 -8
- data/doc/files/lib/reports/ReportBase_rb.html +106 -0
- data/doc/files/lib/reports/ReportContext_rb.html +106 -0
- data/doc/files/lib/reports/ReportTableCell_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableColumn_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLegend_rb.html +1 -1
- data/doc/files/lib/reports/ReportTableLine_rb.html +1 -1
- data/doc/files/lib/reports/ReportTable_rb.html +1 -1
- data/doc/files/lib/reports/Report_rb.html +8 -2
- data/doc/files/lib/reports/ResourceListRE_rb.html +2 -2
- data/doc/files/lib/reports/{ReportTableElement_rb.html → TableReport_rb.html} +7 -5
- data/doc/files/lib/reports/TaskListRE_rb.html +2 -2
- data/doc/files/lib/reports/TextReport_rb.html +116 -0
- data/doc/files/lib/reports/TjpExportRE_rb.html +2 -2
- data/doc/files/lib/taskjuggler3_rb.html +61 -56
- data/doc/files/lib/tj3man_rb.html +1 -1
- data/doc/fr_class_index.html +41 -3
- data/doc/fr_file_index.html +21 -5
- data/doc/fr_method_index.html +1069 -959
- data/examples/ContactList.html +1467 -0
- data/examples/Deliveries.html +485 -0
- data/examples/Development.html +2525 -0
- data/examples/Overview.html +747 -0
- data/examples/Resource Graph.html +616 -0
- data/examples/tutorial.tjp +63 -67
- data/lib/AttributeBase.rb +27 -31
- data/lib/AttributeDefinition.rb +12 -7
- data/lib/Attributes.rb +134 -34
- data/lib/Interval.rb +2 -0
- data/lib/Journal.rb +44 -0
- data/lib/{LogicalFlag.rb → KeywordArray.rb} +5 -13
- data/lib/KeywordDocumentation.rb +84 -47
- data/lib/Limits.rb +7 -5
- data/lib/LogicalExpression.rb +1 -1
- data/lib/LogicalOperation.rb +33 -0
- data/lib/Project.rb +313 -99
- data/lib/ProjectFileParser.rb +88 -11
- data/lib/PropertyList.rb +2 -1
- data/lib/PropertySet.rb +13 -4
- data/lib/PropertyTreeNode.rb +34 -15
- data/lib/Query.rb +2 -1
- data/lib/RTPNavigator.rb +53 -0
- data/lib/RTPReport.rb +62 -0
- data/lib/RealFormat.rb +28 -10
- data/lib/RichTextElement.rb +18 -12
- data/lib/RichTextParser.rb +1 -0
- data/lib/RichTextProtocolExample.rb +8 -11
- data/lib/RichTextProtocolHandler.rb +11 -1
- data/lib/RichTextScanner.rb +308 -164
- data/lib/RichTextSyntaxRules.rb +24 -0
- data/lib/TableColumnDefinition.rb +5 -1
- data/lib/TaskJuggler.rb +3 -2
- data/lib/TaskScenario.rb +123 -31
- data/lib/TextParser.rb +14 -3
- data/lib/TextScanner.rb +210 -34
- data/lib/Tj3Config.rb +1 -1
- data/lib/TjTime.rb +15 -0
- data/lib/TjpExample.rb +1 -1
- data/lib/TjpSyntaxRules.rb +674 -473
- data/lib/WorkingHours.rb +1 -1
- data/lib/XMLElement.rb +11 -3
- data/lib/deep_copy.rb +72 -0
- data/lib/ms_test.rb +27 -0
- data/lib/reports/ColumnTable.rb +7 -5
- data/lib/reports/GanttChart.rb +60 -34
- data/lib/reports/GanttHeader.rb +1 -1
- data/lib/reports/GanttRouter.rb +7 -5
- data/lib/reports/Navigator.rb +72 -0
- data/lib/reports/Report.rb +58 -73
- data/lib/reports/ReportBase.rb +241 -0
- data/lib/reports/ReportContext.rb +41 -0
- data/lib/reports/ReportTable.rb +7 -2
- data/lib/reports/ReportTableCell.rb +3 -3
- data/lib/reports/ResourceListRE.rb +19 -26
- data/lib/reports/{ReportTableElement.rb → TableReport.rb} +297 -97
- data/lib/reports/TaskListRE.rb +16 -24
- data/lib/reports/TextReport.rb +87 -0
- data/lib/reports/TjpExportRE.rb +55 -50
- data/lib/taskjuggler3.rb +6 -1
- data/manual/Getting_Started +57 -6
- data/manual/How_To_Contribute +2 -4
- data/manual/Intro +2 -2
- data/manual/Reporting_Bugs +9 -2
- data/manual/Rich_Text_Attributes +41 -0
- data/manual/Tutorial +219 -173
- data/tasks/test.rake +3 -0
- data/test/TestSuite/CSV-Reports/celltext.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortByTree.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_duration.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_effort.up.tjp +2 -1
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport.tjp +2 -1
- data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +2 -1
- data/test/TestSuite/HTML-Reports/depArrows.tjp +72 -0
- data/test/TestSuite/HTML-Reports/reference-export.html +187 -0
- data/test/TestSuite/HTML-Reports/reference.tjp +21 -0
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/AutomaticMilestones.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Booking.tjp +3 -3
- data/test/TestSuite/Scheduler/Correct/Container-2.tjp +37 -0
- data/test/TestSuite/Scheduler/Correct/Container.tjp +40 -0
- data/test/TestSuite/Scheduler/Correct/Depends.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Duration.tjp +2 -1
- data/test/TestSuite/Scheduler/Correct/InheritStartEnd.tjp +20 -29
- data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -13
- data/test/TestSuite/Scheduler/Correct/Optimize-1.tjp +6 -5
- data/test/TestSuite/Scheduler/Correct/Optimize-2.tjp +10 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-3.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-4.tjp +9 -6
- data/test/TestSuite/Scheduler/Correct/Optimize-5.tjp +13 -10
- data/test/TestSuite/Scheduler/Correct/Precedes.tjp +9 -14
- data/test/TestSuite/Scheduler/Correct/Shift.tjp +9 -8
- data/test/TestSuite/Scheduler/Correct/checks.tji +4 -0
- data/test/TestSuite/Scheduler/Errors/weak_end_dep.tjp +16 -0
- data/test/TestSuite/Scheduler/Errors/weak_start_dep.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Account.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/AutoID.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/AutoMacros.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Caption.tjp +7 -6
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +7 -4
- data/test/TestSuite/Syntax/Correct/Comments.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/CompletedWork.tji +11 -19
- data/test/TestSuite/Syntax/Correct/CriticalPath.tjp +4 -3
- data/test/TestSuite/Syntax/Correct/Export.tjp +3 -1
- data/test/TestSuite/Syntax/Correct/Flags.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/HtmlTaskReport.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/Journal.tjp +18 -0
- data/test/TestSuite/Syntax/Correct/LoadUnits.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +16 -0
- data/test/TestSuite/Syntax/Correct/Period.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/RawHTML.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/Reports.tjp +4 -2
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tji +2 -0
- data/test/TestSuite/Syntax/Correct/ResourcePrefix.tjp +23 -0
- data/test/TestSuite/Syntax/Correct/Responsible.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/Simple.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/String.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +2 -1
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +92 -70
- data/test/TestSuite/Syntax/Errors/bad_comment.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/bad_include.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/bad_time_zone.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/bad_timing_res.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/chargeset_master.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/container_attribute.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/cost_acct_no_top.tjp +3 -2
- data/test/TestSuite/Syntax/Errors/cost_rev_same.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/eof_in_istring1.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring2.tjp +5 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring3.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring4.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/eof_in_istring5.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tji +1 -0
- data/test/TestSuite/Syntax/Errors/include_recursion.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/junk_after_cut.tjp +6 -0
- data/test/TestSuite/Syntax/Errors/navigator_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/operand_unkn_flag.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_end.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/report_exists.tjp +10 -0
- data/test/TestSuite/Syntax/Errors/report_start.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/rev_acct_no_top.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_direction.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sort_unknown_scen.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd1.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_crit_exptd2.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/sorting_wbs.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/too_large_timing_res.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/unknown_scenario_idx.tjp +1 -1
- data/test/TestSuite/Syntax/Errors/unknown_task.tjp +1 -1
- data/test/all.rb +1 -16
- data/test/test_CSV-Reports.rb +8 -5
- data/test/test_Query.rb +2 -2
- data/test/test_RichText.rb +95 -0
- data/test/test_Scheduler.rb +8 -4
- data/test/test_Syntax.rb +8 -4
- data/test/test_deep_copy.rb +83 -0
- metadata +549 -487
- data/benchmarks/UTF-8-Strings.rb +0 -58
- data/doc/classes/TaskJuggler/ReportElement.html +0 -1070
- data/doc/classes/TaskJuggler/ReportTableElement.html +0 -644
- data/lib/reports/ReportElement.rb +0 -427
- data/test/TestSuite/Syntax/Correct/csvtest +0 -16
- data/test/TestSuite/Syntax/Errors/no_csv_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/no_html_suffix.tjp +0 -10
- data/test/TestSuite/Syntax/Errors/report_redifinition.tjp +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby -w
|
|
2
2
|
# encoding: UTF-8
|
|
3
3
|
#
|
|
4
|
-
# =
|
|
4
|
+
# = TableReport.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
6
|
# Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
|
|
7
7
|
#
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
# published by the Free Software Foundation.
|
|
11
11
|
#
|
|
12
12
|
|
|
13
|
+
require 'reports/ReportBase'
|
|
13
14
|
require 'reports/GanttChart'
|
|
14
15
|
require 'reports/ReportTableLegend'
|
|
15
16
|
require 'reports/ColumnTable'
|
|
@@ -17,50 +18,63 @@ require 'Query'
|
|
|
17
18
|
|
|
18
19
|
class TaskJuggler
|
|
19
20
|
|
|
20
|
-
# This is base class for all types of tabular
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
class ReportTableElement < ReportElement
|
|
21
|
+
# This is base class for all types of tabular reports. All tabular reports
|
|
22
|
+
# are converted to an abstract (output independent) intermediate form first,
|
|
23
|
+
# before the are turned into the requested output format.
|
|
24
|
+
class TableReport < ReportBase
|
|
25
25
|
|
|
26
26
|
attr_reader :legend
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
@@propertiesById = {
|
|
29
|
+
# ID Header Indent Align Calced. Scen Spec.
|
|
30
|
+
'complete' => [ 'Completion', false, :right, true, true ],
|
|
31
|
+
'cost' => [ 'Cost', true, :right, true, true ],
|
|
32
|
+
'duration' => [ 'Duration', true, :right, true, true ],
|
|
33
|
+
'effort' => [ 'Effort', true, :right, true, true ],
|
|
34
|
+
'id' => [ 'Id', false, :left, true, false ],
|
|
35
|
+
'line' => [ 'Line No.', false, :right, true, false ],
|
|
36
|
+
'name' => [ 'Name', true, :left, false, false ],
|
|
37
|
+
'no' => [ 'No.', false, :right, true, false ],
|
|
38
|
+
'rate' => [ 'Rate', true, :right, true, true ],
|
|
39
|
+
'resources' => [ 'Resources', false, :left, true, true ],
|
|
40
|
+
'revenue' => [ 'Revenue', true, :right, true, true ],
|
|
41
|
+
'scenario' => [ 'Scenario', false, :left, true, true ],
|
|
42
|
+
'wbs' => [ 'WBS', false, :left, true, false ]
|
|
43
|
+
}
|
|
44
|
+
@@propertiesByType = {
|
|
45
|
+
# Type Indent Align
|
|
46
|
+
DateAttribute => [ false, :left ],
|
|
47
|
+
FixnumAttribute => [ false, :right ],
|
|
48
|
+
FloatAttribute => [ false, :right ],
|
|
49
|
+
RichTextAttribute => [ false, :left ],
|
|
50
|
+
StringAttribute => [ false, :left ]
|
|
51
|
+
}
|
|
52
|
+
# Generate a new TableReport object.
|
|
29
53
|
def initialize(report)
|
|
30
54
|
super
|
|
55
|
+
@report.content = self
|
|
31
56
|
|
|
32
57
|
# Reference to the intermediate representation.
|
|
33
58
|
@table = nil
|
|
59
|
+
@start = @end = nil
|
|
34
60
|
|
|
35
61
|
@legend = ReportTableLegend.new
|
|
36
|
-
end
|
|
37
62
|
|
|
38
|
-
# This is an abstract member that all sub classes must re-implement. It may
|
|
39
|
-
# or may not do something though.
|
|
40
|
-
def generateIntermediateFormat
|
|
41
|
-
raise 'This function must be overriden by derived classes.'
|
|
42
63
|
end
|
|
43
64
|
|
|
44
|
-
|
|
65
|
+
|
|
66
|
+
# Turn the TableReport into an equivalent HTML element tree.
|
|
45
67
|
def to_html
|
|
46
68
|
html = []
|
|
47
69
|
|
|
48
|
-
|
|
49
|
-
html << (
|
|
50
|
-
'style' => 'margin: 35px 5% 25px 5%; '))
|
|
51
|
-
|
|
52
|
-
if @prolog
|
|
53
|
-
@prolog.sectionNumbers = false
|
|
54
|
-
frame << @prolog.to_html
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
frame << (table = XMLElement.new('table', 'summary' => 'Report Table',
|
|
70
|
+
html << rt_to_html('header')
|
|
71
|
+
html << (table = XMLElement.new('table', 'summary' => 'Report Table',
|
|
58
72
|
'cellspacing' => '2', 'border' => '0',
|
|
59
73
|
'cellpadding' => '0', 'align' => 'center',
|
|
60
74
|
'class' => 'tabback'))
|
|
61
75
|
|
|
62
76
|
# The headline is put in a sub-table to appear bigger.
|
|
63
|
-
if
|
|
77
|
+
if a('headline')
|
|
64
78
|
table << (thead = XMLElement.new('thead'))
|
|
65
79
|
thead << (tr = XMLElement.new('tr'))
|
|
66
80
|
tr << (td = XMLElement.new('td'))
|
|
@@ -73,7 +87,7 @@ class TaskJuggler
|
|
|
73
87
|
'style' => 'font-size:16px; ' +
|
|
74
88
|
'font-weight:bold',
|
|
75
89
|
'class' => 'tabfront'))
|
|
76
|
-
td1 << XMLNamedText.new(
|
|
90
|
+
td1 << XMLNamedText.new(a('headline'), 'p')
|
|
77
91
|
end
|
|
78
92
|
|
|
79
93
|
# Now generate the actual table with the data.
|
|
@@ -83,13 +97,13 @@ class TaskJuggler
|
|
|
83
97
|
td << @table.to_html
|
|
84
98
|
|
|
85
99
|
# Embedd the caption as RichText into the table footer.
|
|
86
|
-
if
|
|
100
|
+
if a('caption')
|
|
87
101
|
tbody << (tr = XMLElement.new('tr'))
|
|
88
102
|
tr << (td = XMLElement.new('td', 'class' => 'tabback'))
|
|
89
103
|
td << (div = XMLElement.new('div', 'class' => 'caption',
|
|
90
104
|
'style' => 'margin:1px'))
|
|
91
|
-
|
|
92
|
-
div <<
|
|
105
|
+
a('caption').sectionNumbers = false
|
|
106
|
+
div << a('caption').to_html
|
|
93
107
|
end
|
|
94
108
|
|
|
95
109
|
# A sub-table with the legend.
|
|
@@ -110,22 +124,179 @@ class TaskJuggler
|
|
|
110
124
|
'href' => "#{AppConfig.contact}")
|
|
111
125
|
td << XMLText.new(" v#{AppConfig.version}")
|
|
112
126
|
|
|
113
|
-
|
|
114
|
-
@epilog.sectionNumbers = false
|
|
115
|
-
frame << @epilog.to_html
|
|
116
|
-
end
|
|
117
|
-
|
|
127
|
+
html << rt_to_html('footer')
|
|
118
128
|
html
|
|
119
129
|
end
|
|
120
130
|
|
|
121
|
-
# Convert the
|
|
122
|
-
#
|
|
131
|
+
# Convert the table into an Array of Arrays. It has one Array for each
|
|
132
|
+
# line. The nested Arrays have one String for each column.
|
|
123
133
|
def to_csv
|
|
124
134
|
@table.to_csv
|
|
125
135
|
end
|
|
126
136
|
|
|
137
|
+
# This is the default attribute value to text converter. It is used
|
|
138
|
+
# whenever we need no special treatment.
|
|
139
|
+
def cellText(value, type)
|
|
140
|
+
begin
|
|
141
|
+
if value.nil?
|
|
142
|
+
if type == DateAttribute
|
|
143
|
+
nil
|
|
144
|
+
else
|
|
145
|
+
''
|
|
146
|
+
end
|
|
147
|
+
else
|
|
148
|
+
# Certain attribute types need special treatment.
|
|
149
|
+
if type == DateAttribute
|
|
150
|
+
value.value.to_s(a('timeFormat'))
|
|
151
|
+
elsif type == RichTextAttribute
|
|
152
|
+
value.value
|
|
153
|
+
elsif type == ReferenceAttribute
|
|
154
|
+
value.label
|
|
155
|
+
else
|
|
156
|
+
value.to_s
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
rescue TjException
|
|
160
|
+
''
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# This function returns true if the values for the _colId_ column need to be
|
|
165
|
+
# calculated.
|
|
166
|
+
def calculated?(colId)
|
|
167
|
+
if @@propertiesById.has_key?(colId)
|
|
168
|
+
return @@propertiesById[colId][3]
|
|
169
|
+
end
|
|
170
|
+
return false
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# This functions returns true if the values for the _col_id_ column are
|
|
174
|
+
# scenario specific.
|
|
175
|
+
def scenarioSpecific?(colId)
|
|
176
|
+
if @@propertiesById.has_key?(colId)
|
|
177
|
+
return @@propertiesById[colId][4]
|
|
178
|
+
end
|
|
179
|
+
return false
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Return if the column values should be indented based on the _colId_ or the
|
|
183
|
+
# _propertyType_.
|
|
184
|
+
def indent(colId, propertyType)
|
|
185
|
+
if @@propertiesById.has_key?(colId)
|
|
186
|
+
return @@propertiesById[colId][1]
|
|
187
|
+
elsif @@propertiesByType.has_key?(propertyType)
|
|
188
|
+
return @@propertiesByType[propertyType][0]
|
|
189
|
+
else
|
|
190
|
+
false
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Return the alignment of the column based on the _colId_ or the
|
|
195
|
+
# _propertyType_.
|
|
196
|
+
def alignment(colId, propertyType)
|
|
197
|
+
if @@propertiesById.has_key?(colId)
|
|
198
|
+
return @@propertiesById[colId][2]
|
|
199
|
+
elsif @@propertiesByType.has_key?(propertyType)
|
|
200
|
+
return @@propertiesByType[propertyType][1]
|
|
201
|
+
else
|
|
202
|
+
:center
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Returns the default column title for the columns _id_.
|
|
207
|
+
def TableReport::defaultColumnTitle(id)
|
|
208
|
+
# Return an empty string for some special columns that don't have a fixed
|
|
209
|
+
# title.
|
|
210
|
+
specials = %w( chart hourly daily weekly monthly quarterly yearly)
|
|
211
|
+
return '' if specials.include?(id)
|
|
212
|
+
|
|
213
|
+
# Return the title for build-in hardwired columns.
|
|
214
|
+
@@propertiesById.include?(id) ? @@propertiesById[id][0] : nil
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def supportedColumns
|
|
218
|
+
@@propertiesById.keys
|
|
219
|
+
end
|
|
220
|
+
|
|
127
221
|
protected
|
|
128
222
|
|
|
223
|
+
# These can't be determined during initialization as they have have been
|
|
224
|
+
# changed afterwards.
|
|
225
|
+
def setReportPeriod
|
|
226
|
+
@start = a('start')
|
|
227
|
+
@end = a('end')
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# In case the user has not specified the report period, we try to fit all
|
|
231
|
+
# the _tasks_ in and add an extra 5% time at both ends. _scenarios_ is a
|
|
232
|
+
# list of scenario indexes.
|
|
233
|
+
def adjustReportPeriod(tasks, scenarios, columns)
|
|
234
|
+
return if tasks.empty? ||
|
|
235
|
+
a('start') != @project['start'] || a('end') != @project['end']
|
|
236
|
+
|
|
237
|
+
@start = @end = nil
|
|
238
|
+
scenarios.each do |scenarioIdx|
|
|
239
|
+
tasks.each do |task|
|
|
240
|
+
date = task['start', scenarioIdx] || @project['start']
|
|
241
|
+
@start = date if @start.nil? || date < @start
|
|
242
|
+
date = task['end', scenarioIdx] || @project['end']
|
|
243
|
+
@end = date if @end.nil? || date > @end
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
# We want to add at least 5% on both ends.
|
|
247
|
+
margin = 0
|
|
248
|
+
minWidth = @end - @start + 1
|
|
249
|
+
columns.each do |column|
|
|
250
|
+
case column.id
|
|
251
|
+
when 'chart'
|
|
252
|
+
# In case we have a 'chart' column, we enforce certain minimum width
|
|
253
|
+
# of the chart. The width depends on the selected scale.
|
|
254
|
+
# The following table contains an entry for each scale. The entry
|
|
255
|
+
# consists of the triple 'seconds per unit', 'minimum width units'
|
|
256
|
+
# and 'margin units'. The minimum with does not include the margins
|
|
257
|
+
# since they are always added.
|
|
258
|
+
mwMap = {
|
|
259
|
+
'hour' => [ 60 * 60, 18, 2 ],
|
|
260
|
+
'day' => [ 60 * 60 * 24, 18, 2 ],
|
|
261
|
+
'week' => [ 60 * 60 * 24 * 7, 6, 1 ],
|
|
262
|
+
'month' => [ 60 * 60 * 24 * 31, 10, 1 ],
|
|
263
|
+
'quarter' => [ 60 * 60 * 24 * 90, 6, 1 ],
|
|
264
|
+
'year' => [ 60 * 60 * 24 * 365, 4, 1 ]
|
|
265
|
+
}
|
|
266
|
+
entry = mwMap[column.scale]
|
|
267
|
+
raise "Unknown scale #{column.scale}" unless entry
|
|
268
|
+
margin = entry[0] * entry[2]
|
|
269
|
+
# If the with determined by start and end dates of the task is below
|
|
270
|
+
# the minimum width, we increase the width to the value provided by
|
|
271
|
+
# the table.
|
|
272
|
+
minWidth = entry[0] * entry[1] if minWidth < entry[0] * entry[1]
|
|
273
|
+
break
|
|
274
|
+
when 'hourly', 'daily', 'weekly', 'monthly', 'quarterly', 'yearly'
|
|
275
|
+
# For the calendar columns we use a similar approach as we use for
|
|
276
|
+
# the 'chart' column.
|
|
277
|
+
mwMap = {
|
|
278
|
+
'hourly' => [ 60 * 60, 18, 2 ],
|
|
279
|
+
'daily' => [ 60 * 60 * 24, 18, 2 ],
|
|
280
|
+
'weekly' => [ 60 * 60 * 24 * 7, 6, 1 ],
|
|
281
|
+
'monthly' => [ 60 * 60 * 24 * 31, 10, 1 ],
|
|
282
|
+
'quarterly' => [ 60 * 60 * 24 * 90, 6, 1 ],
|
|
283
|
+
'yearly' => [ 60 * 60 * 24 * 365, 4, 1 ]
|
|
284
|
+
}
|
|
285
|
+
entry = mwMap[column.id]
|
|
286
|
+
raise "Unknown scale #{column.id}" unless entry
|
|
287
|
+
margin = entry[0] * entry[2]
|
|
288
|
+
minWidth = entry[0] * entry[1] if minWidth < entry[0] * entry[1]
|
|
289
|
+
break
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
if minWidth > (@end - @start + 1)
|
|
294
|
+
margin += (minWidth - (@end - @start + 1)) / 2
|
|
295
|
+
end
|
|
296
|
+
@start -= margin
|
|
297
|
+
@end += margin
|
|
298
|
+
end
|
|
299
|
+
|
|
129
300
|
# Generates cells for the table header. _columnDef_ is the
|
|
130
301
|
# TableColumnDefinition object that describes the column. Based on the id of
|
|
131
302
|
# the column different actions need to be taken to generate the header text.
|
|
@@ -135,7 +306,8 @@ class TaskJuggler
|
|
|
135
306
|
# For the 'chart' column we generate a GanttChart object. The sizes are
|
|
136
307
|
# set so that the lines of the Gantt chart line up with the lines of the
|
|
137
308
|
# table.
|
|
138
|
-
gantt = GanttChart.new(
|
|
309
|
+
gantt = GanttChart.new(a('now'),
|
|
310
|
+
a('weekStartsMonday'), self)
|
|
139
311
|
gantt.generateByScale(@start, @end, columnDef.scale)
|
|
140
312
|
# The header consists of 2 lines separated by a 1 pixel boundary.
|
|
141
313
|
gantt.header.height = @table.headerLineHeight * 2 + 1
|
|
@@ -153,10 +325,11 @@ class TaskJuggler
|
|
|
153
325
|
:weekdayAndDate, :hour)
|
|
154
326
|
when 'daily'
|
|
155
327
|
genCalChartHeader(columnDef, @start.midnight, :sameTimeNextDay,
|
|
156
|
-
:
|
|
328
|
+
:monthAndYear, :day)
|
|
157
329
|
when 'weekly'
|
|
158
|
-
genCalChartHeader(columnDef,
|
|
159
|
-
|
|
330
|
+
genCalChartHeader(columnDef,
|
|
331
|
+
@start.beginOfWeek(a('weekStartsMonday')),
|
|
332
|
+
:sameTimeNextWeek, :monthAndYear, :day)
|
|
160
333
|
when 'monthly'
|
|
161
334
|
genCalChartHeader(columnDef, @start.beginOfMonth, :sameTimeNextMonth,
|
|
162
335
|
:year, :shortMonthName)
|
|
@@ -183,12 +356,12 @@ class TaskJuggler
|
|
|
183
356
|
# line.
|
|
184
357
|
def generateTaskList(taskList, resourceList, scopeLine)
|
|
185
358
|
queryAttrs = { 'scopeProperty' => scopeLine ? scopeLine.property : nil,
|
|
186
|
-
'loadUnit' =>
|
|
187
|
-
'numberFormat' =>
|
|
188
|
-
'currencyFormat' =>
|
|
359
|
+
'loadUnit' => a('loadUnit'),
|
|
360
|
+
'numberFormat' => a('numberFormat'),
|
|
361
|
+
'currencyFormat' => a('currencyFormat'),
|
|
189
362
|
'start' => @start, 'end' => @end,
|
|
190
|
-
'costAccount' =>
|
|
191
|
-
'revenueAccount' =>
|
|
363
|
+
'costAccount' => a('costAccount'),
|
|
364
|
+
'revenueAccount' => a('revenueAccount') }
|
|
192
365
|
taskList.query = Query.new(queryAttrs)
|
|
193
366
|
taskList.sort!
|
|
194
367
|
|
|
@@ -202,17 +375,17 @@ class TaskJuggler
|
|
|
202
375
|
no += 1
|
|
203
376
|
Log.activity if lineNo % 10 == 0
|
|
204
377
|
lineNo += 1
|
|
205
|
-
|
|
378
|
+
a('scenarios').each do |scenarioIdx|
|
|
206
379
|
# Generate line for each task.
|
|
207
380
|
line = ReportTableLine.new(@table, task, scopeLine)
|
|
208
381
|
|
|
209
382
|
line.no = no unless scopeLine
|
|
210
383
|
line.lineNo = lineNo
|
|
211
384
|
line.subLineNo = @table.lines
|
|
212
|
-
setIndent(line,
|
|
385
|
+
setIndent(line, a('taskRoot'), taskList.treeMode?)
|
|
213
386
|
|
|
214
387
|
# Generate a cell for each column in this line.
|
|
215
|
-
|
|
388
|
+
a('columns').each do |columnDef|
|
|
216
389
|
next unless generateTableCell(line, task, columnDef, scenarioIdx)
|
|
217
390
|
end
|
|
218
391
|
end
|
|
@@ -221,9 +394,9 @@ class TaskJuggler
|
|
|
221
394
|
# If we have a resourceList we generate nested lines for each of the
|
|
222
395
|
# resources that are assigned to this task and pass the user-defined
|
|
223
396
|
# filter.
|
|
224
|
-
resourceList.setSorting(
|
|
397
|
+
resourceList.setSorting(a('sortResources'))
|
|
225
398
|
assignedResourceList = filterResourceList(resourceList, task,
|
|
226
|
-
|
|
399
|
+
a('hideResource'), a('rollupResource'))
|
|
227
400
|
assignedResourceList.sort!
|
|
228
401
|
lineNo = generateResourceList(assignedResourceList, nil, line)
|
|
229
402
|
end
|
|
@@ -237,12 +410,12 @@ class TaskJuggler
|
|
|
237
410
|
# generated resource lines will be within the scope this task line.
|
|
238
411
|
def generateResourceList(resourceList, taskList, scopeLine)
|
|
239
412
|
queryAttrs = { 'scopeProperty' => scopeLine ? scopeLine.property : nil,
|
|
240
|
-
'loadUnit' =>
|
|
241
|
-
'numberFormat' =>
|
|
242
|
-
'currencyFormat' =>
|
|
413
|
+
'loadUnit' => a('loadUnit'),
|
|
414
|
+
'numberFormat' => a('numberFormat'),
|
|
415
|
+
'currencyFormat' => a('currencyFormat'),
|
|
243
416
|
'start' => @start, 'end' => @end,
|
|
244
|
-
'costAccount' =>
|
|
245
|
-
'revenueAccount' =>
|
|
417
|
+
'costAccount' => a('costAccount'),
|
|
418
|
+
'revenueAccount' => a('revenueAccount') }
|
|
246
419
|
resourceList.query = Query.new(queryAttrs)
|
|
247
420
|
resourceList.sort!
|
|
248
421
|
|
|
@@ -256,17 +429,17 @@ class TaskJuggler
|
|
|
256
429
|
no += 1
|
|
257
430
|
Log.activity if lineNo % 10 == 0
|
|
258
431
|
lineNo += 1
|
|
259
|
-
|
|
432
|
+
a('scenarios').each do |scenarioIdx|
|
|
260
433
|
# Generate line for each resource.
|
|
261
434
|
line = ReportTableLine.new(@table, resource, scopeLine)
|
|
262
435
|
|
|
263
436
|
line.no = no unless scopeLine
|
|
264
437
|
line.lineNo = lineNo
|
|
265
438
|
line.subLineNo = @table.lines
|
|
266
|
-
setIndent(line,
|
|
439
|
+
setIndent(line, a('resourceRoot'), resourceList.treeMode?)
|
|
267
440
|
|
|
268
441
|
# Generate a cell for each column in this line.
|
|
269
|
-
|
|
442
|
+
a('columns').each do |column|
|
|
270
443
|
next unless generateTableCell(line, resource, column, scenarioIdx)
|
|
271
444
|
end
|
|
272
445
|
end
|
|
@@ -275,9 +448,10 @@ class TaskJuggler
|
|
|
275
448
|
# If we have a taskList we generate nested lines for each of the
|
|
276
449
|
# tasks that the resource is assigned to and pass the user-defined
|
|
277
450
|
# filter.
|
|
278
|
-
taskList.setSorting(
|
|
451
|
+
taskList.setSorting(a('sortTasks'))
|
|
279
452
|
assignedTaskList = filterTaskList(taskList, resource,
|
|
280
|
-
|
|
453
|
+
a('hideTask'),
|
|
454
|
+
a('rollupTask'))
|
|
281
455
|
assignedTaskList.sort!
|
|
282
456
|
lineNo = generateTaskList(assignedTaskList, nil, line)
|
|
283
457
|
end
|
|
@@ -320,14 +494,15 @@ class TaskJuggler
|
|
|
320
494
|
firstColumn = nil
|
|
321
495
|
# The innter loops terminates when the label for the upper scale has
|
|
322
496
|
# changed to the next scale cell.
|
|
323
|
-
while t < @end && (name1Func.nil? ||
|
|
497
|
+
while t < @end && (name1Func.nil? ||
|
|
498
|
+
t.send(name1Func) == currentInterval)
|
|
324
499
|
# call TjTime::sameTimeNext... function to get the end of the column.
|
|
325
500
|
nextT = t.send(sameTimeNextFunc)
|
|
326
501
|
iv = Interval.new(t, nextT)
|
|
327
502
|
# Create the new column object.
|
|
328
503
|
column = ReportTableColumn.new(table, nil, '')
|
|
329
504
|
# Store the date of the column in the original form.
|
|
330
|
-
column.cell1.data = t.to_s(
|
|
505
|
+
column.cell1.data = t.to_s(a('timeFormat'))
|
|
331
506
|
# The upper scale cells will be merged into one large cell that spans
|
|
332
507
|
# all lower scale cells that belong to this upper cell.
|
|
333
508
|
if firstColumn.nil?
|
|
@@ -391,7 +566,7 @@ class TaskJuggler
|
|
|
391
566
|
start = @start.midnight
|
|
392
567
|
sameTimeNextFunc = :sameTimeNextDay
|
|
393
568
|
when 'weekly'
|
|
394
|
-
start = @start.beginOfWeek(
|
|
569
|
+
start = @start.beginOfWeek(a('weekStartsMonday'))
|
|
395
570
|
sameTimeNextFunc = :sameTimeNextWeek
|
|
396
571
|
when 'monthly'
|
|
397
572
|
start = @start.beginOfMonth
|
|
@@ -435,22 +610,36 @@ class TaskJuggler
|
|
|
435
610
|
# hidden cell.
|
|
436
611
|
def genStandardCell(scenarioIdx, line, columnDef)
|
|
437
612
|
property = line.property
|
|
438
|
-
# Create a new cell
|
|
439
|
-
cell = newCell(line, cellText(property, scenarioIdx, columnDef.id))
|
|
440
613
|
|
|
614
|
+
# Find out, what type of PropertyTreeNode we are dealing with.
|
|
441
615
|
if property.is_a?(Task)
|
|
442
|
-
|
|
616
|
+
propertyList = @project.tasks
|
|
443
617
|
elsif property.is_a?(Resource)
|
|
444
|
-
|
|
618
|
+
propertyList = @project.resources
|
|
445
619
|
else
|
|
446
620
|
raise "Unknown property type #{property.class}"
|
|
447
621
|
end
|
|
622
|
+
colId = columnDef.id
|
|
623
|
+
# Get the value no matter if it's scenario specific or not.
|
|
624
|
+
if propertyList.scenarioSpecific?(colId)
|
|
625
|
+
value = property.getAttr(colId, scenarioIdx)
|
|
626
|
+
else
|
|
627
|
+
value = property.getAttr(colId)
|
|
628
|
+
end
|
|
629
|
+
# Get the type of the property
|
|
630
|
+
type = propertyList.attributeType(colId)
|
|
631
|
+
|
|
632
|
+
# Create a new cell
|
|
633
|
+
cell = newCell(line, cellText(value, type))
|
|
634
|
+
if type == ReferenceAttribute
|
|
635
|
+
cell.url = value.url
|
|
636
|
+
end
|
|
448
637
|
|
|
449
638
|
# Check if we are dealing with multiple scenarios.
|
|
450
|
-
if
|
|
639
|
+
if a('scenarios').length > 1
|
|
451
640
|
# Check if the attribute is not scenario specific
|
|
452
|
-
unless
|
|
453
|
-
if scenarioIdx ==
|
|
641
|
+
unless propertyList.scenarioSpecific?(columnDef.id)
|
|
642
|
+
if scenarioIdx == a('scenarios').first
|
|
454
643
|
# Use a somewhat bigger font.
|
|
455
644
|
cell.fontSize = 15
|
|
456
645
|
else
|
|
@@ -458,23 +647,24 @@ class TaskJuggler
|
|
|
458
647
|
cell.hidden = true
|
|
459
648
|
return false
|
|
460
649
|
end
|
|
461
|
-
cell.rows =
|
|
650
|
+
cell.rows = a('scenarios').length
|
|
462
651
|
end
|
|
463
652
|
end
|
|
464
653
|
|
|
465
654
|
setStandardCellAttributes(cell, columnDef,
|
|
466
|
-
|
|
655
|
+
propertyList.attributeType(columnDef.id), line)
|
|
467
656
|
|
|
468
657
|
scopeProperty = line.scopeLine ? line.scopeLine.property : nil
|
|
469
658
|
query = Query.new('property' => property,
|
|
470
659
|
'scopeProperty' => scopeProperty,
|
|
471
660
|
'attributeId' => columnDef.id,
|
|
472
|
-
'scenarioIdx' => scenarioIdx,
|
|
473
|
-
'
|
|
474
|
-
'
|
|
661
|
+
'scenarioIdx' => scenarioIdx,
|
|
662
|
+
'loadUnit' => a('loadUnit'),
|
|
663
|
+
'numberFormat' => a('numberFormat'),
|
|
664
|
+
'currencyFormat' => a('currencyFormat'),
|
|
475
665
|
'start' => @start, 'end' => @end,
|
|
476
|
-
'costAccount' =>
|
|
477
|
-
'revenueAccount' =>
|
|
666
|
+
'costAccount' => a('costAccount'),
|
|
667
|
+
'revenueAccount' => a('revenueAccount'))
|
|
478
668
|
if cell.text
|
|
479
669
|
if columnDef.cellText
|
|
480
670
|
cell.text = expandMacros(columnDef.cellText, cell.text, query)
|
|
@@ -499,28 +689,29 @@ class TaskJuggler
|
|
|
499
689
|
cell = newCell(line)
|
|
500
690
|
|
|
501
691
|
unless scenarioSpecific?(columnDef.id)
|
|
502
|
-
if scenarioIdx !=
|
|
692
|
+
if scenarioIdx != a('scenarios').first
|
|
503
693
|
cell.hidden = true
|
|
504
694
|
return false
|
|
505
695
|
end
|
|
506
|
-
cell.rows =
|
|
696
|
+
cell.rows = a('scenarios').length
|
|
507
697
|
end
|
|
508
698
|
|
|
509
699
|
setStandardCellAttributes(cell, columnDef, nil, line)
|
|
510
700
|
|
|
701
|
+
scopeProperty = line.scopeLine ? line.scopeLine.property : nil
|
|
511
702
|
return if columnDef.hideCellText &&
|
|
512
|
-
|
|
703
|
+
columnDef.hideCellText.eval(property, scopeProperty)
|
|
513
704
|
|
|
514
|
-
scopeProperty = line.scopeLine ? line.scopeLine.property : nil
|
|
515
705
|
query = Query.new('property' => property,
|
|
516
706
|
'scopeProperty' => scopeProperty,
|
|
517
707
|
'attributeId' => columnDef.id,
|
|
518
|
-
'scenarioIdx' => scenarioIdx,
|
|
519
|
-
'
|
|
520
|
-
'
|
|
708
|
+
'scenarioIdx' => scenarioIdx,
|
|
709
|
+
'loadUnit' => a('loadUnit'),
|
|
710
|
+
'numberFormat' => a('numberFormat'),
|
|
711
|
+
'currencyFormat' => a('currencyFormat'),
|
|
521
712
|
'start' => @start, 'end' => @end,
|
|
522
|
-
'costAccount' =>
|
|
523
|
-
'revenueAccount' =>
|
|
713
|
+
'costAccount' => a('costAccount'),
|
|
714
|
+
'revenueAccount' => a('revenueAccount'))
|
|
524
715
|
query.process
|
|
525
716
|
cell.text = query.result
|
|
526
717
|
|
|
@@ -532,6 +723,8 @@ class TaskJuggler
|
|
|
532
723
|
cell.text = line.no.to_s
|
|
533
724
|
when 'wbs'
|
|
534
725
|
cell.indent = 2 if line.scopeLine
|
|
726
|
+
when 'scenario'
|
|
727
|
+
cell.text = @project.scenario(scenarioIdx).name
|
|
535
728
|
end
|
|
536
729
|
|
|
537
730
|
if columnDef.cellText
|
|
@@ -564,11 +757,12 @@ class TaskJuggler
|
|
|
564
757
|
@project['end'] : task['end', scenarioIdx])
|
|
565
758
|
|
|
566
759
|
query = Query.new('property' => task, 'scopeProperty' => resource,
|
|
567
|
-
'scenarioIdx' => scenarioIdx,
|
|
568
|
-
'
|
|
569
|
-
'
|
|
570
|
-
'
|
|
571
|
-
'
|
|
760
|
+
'scenarioIdx' => scenarioIdx,
|
|
761
|
+
'loadUnit' => a('loadUnit'),
|
|
762
|
+
'numberFormat' => a('numberFormat'),
|
|
763
|
+
'currencyFormat' => a('currencyFormat'),
|
|
764
|
+
'costAccount' => a('costAccount'),
|
|
765
|
+
'revenueAccount' => a('revenueAccount'))
|
|
572
766
|
|
|
573
767
|
firstCell = nil
|
|
574
768
|
while t < @end
|
|
@@ -637,11 +831,12 @@ class TaskJuggler
|
|
|
637
831
|
end
|
|
638
832
|
|
|
639
833
|
query = Query.new('property' => resource,
|
|
640
|
-
'scenarioIdx' => scenarioIdx,
|
|
641
|
-
'
|
|
642
|
-
'
|
|
643
|
-
'
|
|
644
|
-
'
|
|
834
|
+
'scenarioIdx' => scenarioIdx,
|
|
835
|
+
'loadUnit' => a('loadUnit'),
|
|
836
|
+
'numberFormat' => a('numberFormat'),
|
|
837
|
+
'currencyFormat' => a('currencyFormat'),
|
|
838
|
+
'costAccount' => a('costAccount'),
|
|
839
|
+
'revenueAccount' => a('revenueAccount'))
|
|
645
840
|
|
|
646
841
|
firstCell = nil
|
|
647
842
|
while t < @end
|
|
@@ -777,8 +972,13 @@ class TaskJuggler
|
|
|
777
972
|
def setCellURL(cell, columnDef, query)
|
|
778
973
|
return unless columnDef.cellURL
|
|
779
974
|
|
|
780
|
-
|
|
781
|
-
|
|
975
|
+
if columnDef.hideCellURL &&
|
|
976
|
+
columnDef.hideCellURL.eval(query.property, query.scopeProperty)
|
|
977
|
+
url = nil
|
|
978
|
+
else
|
|
979
|
+
url = expandMacros(columnDef.cellURL, cell.text, query)
|
|
980
|
+
end
|
|
981
|
+
cell.url = url unless url.nil? || url.empty?
|
|
782
982
|
end
|
|
783
983
|
|
|
784
984
|
# Try to merge equal cells without text to multi-column cells.
|