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.
Files changed (432) hide show
  1. data/Rakefile +1 -0
  2. data/benchmarks/depends.tjp +2 -1
  3. data/benchmarks/htmltaskreport.tjp +2 -1
  4. data/doc/classes/AppConfig.html +124 -120
  5. data/doc/classes/Arguments.html +10 -6
  6. data/doc/classes/Object.html +229 -0
  7. data/doc/classes/String.html +35 -31
  8. data/doc/classes/TaskJuggler/Account.html +18 -18
  9. data/doc/classes/TaskJuggler/AccountAttribute.html +261 -0
  10. data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
  11. data/doc/classes/TaskJuggler/Allocation.html +34 -30
  12. data/doc/classes/TaskJuggler/AllocationAttribute.html +70 -70
  13. data/doc/classes/TaskJuggler/AttributeBase.html +131 -147
  14. data/doc/classes/TaskJuggler/AttributeDefinition.html +38 -21
  15. data/doc/classes/TaskJuggler/BatchProcessor.html +313 -0
  16. data/doc/classes/TaskJuggler/Booking.html +22 -18
  17. data/doc/classes/TaskJuggler/BookingListAttribute.html +42 -42
  18. data/doc/classes/TaskJuggler/BooleanAttribute.html +40 -40
  19. data/doc/classes/TaskJuggler/CSVFile.html +28 -24
  20. data/doc/classes/TaskJuggler/Charge.html +22 -18
  21. data/doc/classes/TaskJuggler/ChargeListAttribute.html +30 -30
  22. data/doc/classes/TaskJuggler/ChargeSet.html +41 -37
  23. data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +46 -46
  24. data/doc/classes/TaskJuggler/ColumnListAttribute.html +231 -0
  25. data/doc/classes/TaskJuggler/ColumnTable.html +23 -21
  26. data/doc/classes/TaskJuggler/DateAttribute.html +20 -20
  27. data/doc/classes/TaskJuggler/DefinitionListAttribute.html +162 -0
  28. data/doc/classes/TaskJuggler/DependencyListAttribute.html +46 -46
  29. data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
  30. data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
  31. data/doc/classes/TaskJuggler/FlagListAttribute.html +42 -42
  32. data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
  33. data/doc/classes/TaskJuggler/FormatListAttribute.html +197 -0
  34. data/doc/classes/TaskJuggler/GanttChart.html +236 -207
  35. data/doc/classes/TaskJuggler/GanttContainer.html +46 -42
  36. data/doc/classes/TaskJuggler/GanttHeader.html +16 -12
  37. data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +16 -12
  38. data/doc/classes/TaskJuggler/GanttLine.html +28 -24
  39. data/doc/classes/TaskJuggler/GanttLoadStack.html +22 -18
  40. data/doc/classes/TaskJuggler/GanttMilestone.html +46 -42
  41. data/doc/classes/TaskJuggler/GanttRouter.html +104 -98
  42. data/doc/classes/TaskJuggler/GanttTaskBar.html +46 -42
  43. data/doc/classes/TaskJuggler/HTMLDocument.html +12 -12
  44. data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
  45. data/doc/classes/TaskJuggler/Interval.html +126 -120
  46. data/doc/classes/TaskJuggler/IntervalListAttribute.html +46 -46
  47. data/doc/classes/TaskJuggler/JobInfo.html +284 -0
  48. data/doc/classes/TaskJuggler/Journal.html +197 -0
  49. data/doc/classes/TaskJuggler/JournalEntry.html +218 -0
  50. data/doc/classes/TaskJuggler/KeywordArray.html +179 -0
  51. data/doc/classes/TaskJuggler/KeywordDocumentation.html +445 -396
  52. data/doc/classes/TaskJuggler/Limits/Limit.html +34 -30
  53. data/doc/classes/TaskJuggler/Limits.html +68 -62
  54. data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
  55. data/doc/classes/TaskJuggler/ListAttributeBase.html +207 -0
  56. data/doc/classes/TaskJuggler/Log.html +72 -68
  57. data/doc/classes/TaskJuggler/LogicalAttribute.html +38 -34
  58. data/doc/classes/TaskJuggler/LogicalExpression.html +16 -12
  59. data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +194 -0
  60. data/doc/classes/TaskJuggler/LogicalFlag.html +32 -32
  61. data/doc/classes/TaskJuggler/LogicalFunction.html +28 -24
  62. data/doc/classes/TaskJuggler/LogicalOperation.html +17 -13
  63. data/doc/classes/TaskJuggler/Macro.html +10 -6
  64. data/doc/classes/TaskJuggler/MacroParser.html +36 -36
  65. data/doc/classes/TaskJuggler/MacroTable.html +40 -36
  66. data/doc/classes/TaskJuggler/Message.html +16 -12
  67. data/doc/classes/TaskJuggler/MessageHandler.html +16 -12
  68. data/doc/classes/TaskJuggler/Navigator.html +249 -0
  69. data/doc/classes/TaskJuggler/OnShiftCache.html +316 -0
  70. data/doc/classes/TaskJuggler/Project.html +1064 -678
  71. data/doc/classes/TaskJuggler/ProjectFileParser.html +90 -85
  72. data/doc/classes/TaskJuggler/PropertyAttribute.html +194 -0
  73. data/doc/classes/TaskJuggler/PropertyList.html +114 -113
  74. data/doc/classes/TaskJuggler/PropertySet.html +355 -312
  75. data/doc/classes/TaskJuggler/PropertyTreeNode.html +527 -474
  76. data/doc/classes/TaskJuggler/Query.html +90 -85
  77. data/doc/classes/TaskJuggler/RTPNavigator.html +292 -0
  78. data/doc/classes/TaskJuggler/RTPReport.html +301 -0
  79. data/doc/classes/TaskJuggler/RealFormat.html +114 -57
  80. data/doc/classes/TaskJuggler/RealFormatAttribute.html +162 -0
  81. data/doc/classes/TaskJuggler/ReferenceAttribute.html +87 -20
  82. data/doc/classes/TaskJuggler/Report.html +82 -291
  83. data/doc/classes/TaskJuggler/ReportBase.html +448 -0
  84. data/doc/classes/TaskJuggler/ReportContext.html +243 -0
  85. data/doc/classes/TaskJuggler/ReportTable.html +158 -129
  86. data/doc/classes/TaskJuggler/ReportTableCell.html +30 -26
  87. data/doc/classes/TaskJuggler/ReportTableColumn.html +29 -25
  88. data/doc/classes/TaskJuggler/ReportTableLegend.html +28 -24
  89. data/doc/classes/TaskJuggler/ReportTableLine.html +34 -30
  90. data/doc/classes/TaskJuggler/Resource.html +12 -12
  91. data/doc/classes/TaskJuggler/ResourceListAttribute.html +46 -46
  92. data/doc/classes/TaskJuggler/ResourceListRE.html +49 -57
  93. data/doc/classes/TaskJuggler/ResourceScenario.html +126 -126
  94. data/doc/classes/TaskJuggler/RichText.html +52 -48
  95. data/doc/classes/TaskJuggler/RichTextAttribute.html +30 -30
  96. data/doc/classes/TaskJuggler/RichTextDocument.html +41 -37
  97. data/doc/classes/TaskJuggler/RichTextElement.html +274 -264
  98. data/doc/classes/TaskJuggler/RichTextException.html +13 -13
  99. data/doc/classes/TaskJuggler/RichTextParser.html +48 -47
  100. data/doc/classes/TaskJuggler/RichTextProtocolExample.html +52 -55
  101. data/doc/classes/TaskJuggler/RichTextProtocolHandler.html +55 -10
  102. data/doc/classes/TaskJuggler/RichTextScanner.html +106 -245
  103. data/doc/classes/TaskJuggler/RichTextSnip.html +28 -24
  104. data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +381 -301
  105. data/doc/classes/TaskJuggler/Scenario.html +6 -6
  106. data/doc/classes/TaskJuggler/ScenarioData.html +40 -36
  107. data/doc/classes/TaskJuggler/ScenarioListAttribute.html +229 -0
  108. data/doc/classes/TaskJuggler/Scoreboard.html +70 -66
  109. data/doc/classes/TaskJuggler/Shift.html +18 -18
  110. data/doc/classes/TaskJuggler/ShiftAssignment.html +58 -54
  111. data/doc/classes/TaskJuggler/ShiftAssignments.html +82 -78
  112. data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
  113. data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
  114. data/doc/classes/TaskJuggler/SortListAttribute.html +196 -0
  115. data/doc/classes/TaskJuggler/SourceFileInfo.html +16 -12
  116. data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
  117. data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
  118. data/doc/classes/TaskJuggler/SyntaxReference.html +46 -42
  119. data/doc/classes/TaskJuggler/TOCEntry.html +16 -12
  120. data/doc/classes/TaskJuggler/TableColumnDefinition.html +48 -33
  121. data/doc/classes/TaskJuggler/TableOfContents.html +22 -18
  122. data/doc/classes/TaskJuggler/TableReport.html +1036 -0
  123. data/doc/classes/TaskJuggler/Task.html +12 -12
  124. data/doc/classes/TaskJuggler/TaskDependency.html +16 -12
  125. data/doc/classes/TaskJuggler/TaskListAttribute.html +46 -46
  126. data/doc/classes/TaskJuggler/TaskListRE.html +49 -58
  127. data/doc/classes/TaskJuggler/TaskScenario.html +1270 -1180
  128. data/doc/classes/TaskJuggler/TextParser/Pattern.html +100 -96
  129. data/doc/classes/TaskJuggler/TextParser/Rule.html +88 -84
  130. data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -12
  131. data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
  132. data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +10 -6
  133. data/doc/classes/TaskJuggler/TextParser.html +203 -140
  134. data/doc/classes/TaskJuggler/TextReport.html +364 -0
  135. data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
  136. data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +50 -42
  137. data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +16 -12
  138. data/doc/classes/TaskJuggler/TextScanner.html +334 -240
  139. data/doc/classes/TaskJuggler/TjException.html +6 -6
  140. data/doc/classes/TaskJuggler/TjTime.html +547 -497
  141. data/doc/classes/TaskJuggler/TjpExample.html +29 -25
  142. data/doc/classes/TaskJuggler/TjpExportRE.html +77 -97
  143. data/doc/classes/TaskJuggler/TjpSyntaxRules.html +3911 -3886
  144. data/doc/classes/TaskJuggler/UserManual.html +54 -54
  145. data/doc/classes/TaskJuggler/WorkingHours.html +53 -49
  146. data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -85
  147. data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
  148. data/doc/classes/TaskJuggler/XMLComment.html +21 -21
  149. data/doc/classes/TaskJuggler/XMLDocument.html +28 -24
  150. data/doc/classes/TaskJuggler/XMLElement.html +70 -58
  151. data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
  152. data/doc/classes/TaskJuggler/XMLText.html +36 -36
  153. data/doc/classes/TaskJuggler.html +266 -183
  154. data/doc/files/COPYING.html +1 -1
  155. data/doc/files/README.html +1 -1
  156. data/doc/files/lib/AccountScenario_rb.html +1 -1
  157. data/doc/files/lib/Account_rb.html +1 -1
  158. data/doc/files/lib/Allocation_rb.html +1 -1
  159. data/doc/files/lib/AppConfig_rb.html +1 -1
  160. data/doc/files/lib/AttributeBase_rb.html +11 -1
  161. data/doc/files/lib/AttributeDefinition_rb.html +1 -1
  162. data/doc/files/lib/Attributes_rb.html +1 -1
  163. data/doc/files/lib/{LogicalFlag_rb.html → BatchProcessor_rb.html} +8 -6
  164. data/doc/files/lib/Booking_rb.html +1 -1
  165. data/doc/files/lib/ChargeSet_rb.html +1 -1
  166. data/doc/files/lib/Charge_rb.html +1 -1
  167. data/doc/files/lib/HTMLDocument_rb.html +1 -1
  168. data/doc/files/lib/Interval_rb.html +1 -1
  169. data/doc/files/lib/Journal_rb.html +106 -0
  170. data/doc/files/lib/KeywordArray_rb.html +106 -0
  171. data/doc/files/lib/KeywordDocumentation_rb.html +1 -1
  172. data/doc/files/lib/Limits_rb.html +1 -1
  173. data/doc/files/lib/Log_rb.html +1 -1
  174. data/doc/files/lib/LogicalExpression_rb.html +1 -3
  175. data/doc/files/lib/LogicalFunction_rb.html +1 -1
  176. data/doc/files/lib/LogicalOperation_rb.html +1 -1
  177. data/doc/files/lib/MacroParser_rb.html +1 -1
  178. data/doc/files/lib/MacroTable_rb.html +1 -1
  179. data/doc/files/lib/MessageHandler_rb.html +1 -1
  180. data/doc/files/lib/Message_rb.html +1 -1
  181. data/doc/files/lib/ProjectFileParser_rb.html +5 -1
  182. data/doc/files/lib/Project_rb.html +5 -1
  183. data/doc/files/lib/PropertyList_rb.html +1 -1
  184. data/doc/files/lib/PropertySet_rb.html +1 -1
  185. data/doc/files/lib/PropertyTreeNode_rb.html +1 -1
  186. data/doc/files/lib/Query_rb.html +1 -1
  187. data/doc/files/lib/RTPNavigator_rb.html +120 -0
  188. data/doc/files/lib/RTPReport_rb.html +118 -0
  189. data/doc/files/lib/RealFormat_rb.html +1 -1
  190. data/doc/files/lib/ResourceScenario_rb.html +1 -1
  191. data/doc/files/lib/Resource_rb.html +1 -1
  192. data/doc/files/lib/RichTextDocument_rb.html +1 -1
  193. data/doc/files/lib/RichTextElement_rb.html +1 -1
  194. data/doc/files/lib/RichTextParser_rb.html +1 -1
  195. data/doc/files/lib/RichTextProtocolExample_rb.html +1 -1
  196. data/doc/files/lib/RichTextProtocolHandler_rb.html +1 -1
  197. data/doc/files/lib/RichTextScanner_rb.html +1 -1
  198. data/doc/files/lib/RichTextSnip_rb.html +1 -1
  199. data/doc/files/lib/RichTextSyntaxRules_rb.html +1 -1
  200. data/doc/files/lib/RichText_rb.html +1 -1
  201. data/doc/files/lib/ScenarioData_rb.html +1 -1
  202. data/doc/files/lib/Scenario_rb.html +1 -1
  203. data/doc/files/lib/Scoreboard_rb.html +1 -1
  204. data/doc/files/lib/ShiftAssignments_rb.html +1 -1
  205. data/doc/files/lib/ShiftScenario_rb.html +1 -1
  206. data/doc/files/lib/Shift_rb.html +1 -1
  207. data/doc/files/lib/SourceFileInfo_rb.html +1 -1
  208. data/doc/files/lib/SyntaxReference_rb.html +1 -1
  209. data/doc/files/lib/TOCEntry_rb.html +1 -1
  210. data/doc/files/lib/TableColumnDefinition_rb.html +1 -1
  211. data/doc/files/lib/TableOfContents_rb.html +1 -1
  212. data/doc/files/lib/TaskDependency_rb.html +1 -1
  213. data/doc/files/lib/TaskJuggler_rb.html +1 -1
  214. data/doc/files/lib/TaskScenario_rb.html +1 -1
  215. data/doc/files/lib/Task_rb.html +1 -1
  216. data/doc/files/lib/TextParser/Pattern_rb.html +1 -1
  217. data/doc/files/lib/TextParser/Rule_rb.html +1 -1
  218. data/doc/files/lib/TextParser/StackElement_rb.html +1 -1
  219. data/doc/files/lib/TextParser/TokenDoc_rb.html +1 -1
  220. data/doc/files/lib/TextParser_rb.html +1 -1
  221. data/doc/files/lib/TextScanner_rb.html +1 -1
  222. data/doc/files/lib/Tj3Config_rb.html +1 -1
  223. data/doc/files/lib/TjException_rb.html +1 -1
  224. data/doc/files/lib/TjTime_rb.html +1 -1
  225. data/doc/files/lib/TjpExample_rb.html +1 -1
  226. data/doc/files/lib/TjpSyntaxRules_rb.html +1 -1
  227. data/doc/files/lib/UTF8String_rb.html +1 -1
  228. data/doc/files/lib/UserManual_rb.html +1 -1
  229. data/doc/files/lib/WorkingHours_rb.html +1 -1
  230. data/doc/files/lib/XMLDocument_rb.html +1 -1
  231. data/doc/files/lib/XMLElement_rb.html +1 -1
  232. data/doc/files/lib/deep_copy_rb.html +106 -0
  233. data/doc/files/lib/ms_test_rb.html +90 -0
  234. data/doc/files/lib/reports/CSVFile_rb.html +1 -1
  235. data/doc/files/lib/reports/ColumnTable_rb.html +1 -1
  236. data/doc/files/lib/reports/GanttChart_rb.html +1 -1
  237. data/doc/files/lib/reports/GanttContainer_rb.html +1 -1
  238. data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +1 -1
  239. data/doc/files/lib/reports/GanttHeader_rb.html +1 -1
  240. data/doc/files/lib/reports/GanttLine_rb.html +1 -1
  241. data/doc/files/lib/reports/GanttLoadStack_rb.html +1 -1
  242. data/doc/files/lib/reports/GanttMilestone_rb.html +1 -1
  243. data/doc/files/lib/reports/GanttRouter_rb.html +1 -1
  244. data/doc/files/lib/reports/GanttTaskBar_rb.html +1 -1
  245. data/doc/files/lib/reports/HTMLGraphics_rb.html +1 -1
  246. data/doc/files/lib/reports/{ReportElement_rb.html → Navigator_rb.html} +6 -8
  247. data/doc/files/lib/reports/ReportBase_rb.html +106 -0
  248. data/doc/files/lib/reports/ReportContext_rb.html +106 -0
  249. data/doc/files/lib/reports/ReportTableCell_rb.html +1 -1
  250. data/doc/files/lib/reports/ReportTableColumn_rb.html +1 -1
  251. data/doc/files/lib/reports/ReportTableLegend_rb.html +1 -1
  252. data/doc/files/lib/reports/ReportTableLine_rb.html +1 -1
  253. data/doc/files/lib/reports/ReportTable_rb.html +1 -1
  254. data/doc/files/lib/reports/Report_rb.html +8 -2
  255. data/doc/files/lib/reports/ResourceListRE_rb.html +2 -2
  256. data/doc/files/lib/reports/{ReportTableElement_rb.html → TableReport_rb.html} +7 -5
  257. data/doc/files/lib/reports/TaskListRE_rb.html +2 -2
  258. data/doc/files/lib/reports/TextReport_rb.html +116 -0
  259. data/doc/files/lib/reports/TjpExportRE_rb.html +2 -2
  260. data/doc/files/lib/taskjuggler3_rb.html +61 -56
  261. data/doc/files/lib/tj3man_rb.html +1 -1
  262. data/doc/fr_class_index.html +41 -3
  263. data/doc/fr_file_index.html +21 -5
  264. data/doc/fr_method_index.html +1069 -959
  265. data/examples/ContactList.html +1467 -0
  266. data/examples/Deliveries.html +485 -0
  267. data/examples/Development.html +2525 -0
  268. data/examples/Overview.html +747 -0
  269. data/examples/Resource Graph.html +616 -0
  270. data/examples/tutorial.tjp +63 -67
  271. data/lib/AttributeBase.rb +27 -31
  272. data/lib/AttributeDefinition.rb +12 -7
  273. data/lib/Attributes.rb +134 -34
  274. data/lib/Interval.rb +2 -0
  275. data/lib/Journal.rb +44 -0
  276. data/lib/{LogicalFlag.rb → KeywordArray.rb} +5 -13
  277. data/lib/KeywordDocumentation.rb +84 -47
  278. data/lib/Limits.rb +7 -5
  279. data/lib/LogicalExpression.rb +1 -1
  280. data/lib/LogicalOperation.rb +33 -0
  281. data/lib/Project.rb +313 -99
  282. data/lib/ProjectFileParser.rb +88 -11
  283. data/lib/PropertyList.rb +2 -1
  284. data/lib/PropertySet.rb +13 -4
  285. data/lib/PropertyTreeNode.rb +34 -15
  286. data/lib/Query.rb +2 -1
  287. data/lib/RTPNavigator.rb +53 -0
  288. data/lib/RTPReport.rb +62 -0
  289. data/lib/RealFormat.rb +28 -10
  290. data/lib/RichTextElement.rb +18 -12
  291. data/lib/RichTextParser.rb +1 -0
  292. data/lib/RichTextProtocolExample.rb +8 -11
  293. data/lib/RichTextProtocolHandler.rb +11 -1
  294. data/lib/RichTextScanner.rb +308 -164
  295. data/lib/RichTextSyntaxRules.rb +24 -0
  296. data/lib/TableColumnDefinition.rb +5 -1
  297. data/lib/TaskJuggler.rb +3 -2
  298. data/lib/TaskScenario.rb +123 -31
  299. data/lib/TextParser.rb +14 -3
  300. data/lib/TextScanner.rb +210 -34
  301. data/lib/Tj3Config.rb +1 -1
  302. data/lib/TjTime.rb +15 -0
  303. data/lib/TjpExample.rb +1 -1
  304. data/lib/TjpSyntaxRules.rb +674 -473
  305. data/lib/WorkingHours.rb +1 -1
  306. data/lib/XMLElement.rb +11 -3
  307. data/lib/deep_copy.rb +72 -0
  308. data/lib/ms_test.rb +27 -0
  309. data/lib/reports/ColumnTable.rb +7 -5
  310. data/lib/reports/GanttChart.rb +60 -34
  311. data/lib/reports/GanttHeader.rb +1 -1
  312. data/lib/reports/GanttRouter.rb +7 -5
  313. data/lib/reports/Navigator.rb +72 -0
  314. data/lib/reports/Report.rb +58 -73
  315. data/lib/reports/ReportBase.rb +241 -0
  316. data/lib/reports/ReportContext.rb +41 -0
  317. data/lib/reports/ReportTable.rb +7 -2
  318. data/lib/reports/ReportTableCell.rb +3 -3
  319. data/lib/reports/ResourceListRE.rb +19 -26
  320. data/lib/reports/{ReportTableElement.rb → TableReport.rb} +297 -97
  321. data/lib/reports/TaskListRE.rb +16 -24
  322. data/lib/reports/TextReport.rb +87 -0
  323. data/lib/reports/TjpExportRE.rb +55 -50
  324. data/lib/taskjuggler3.rb +6 -1
  325. data/manual/Getting_Started +57 -6
  326. data/manual/How_To_Contribute +2 -4
  327. data/manual/Intro +2 -2
  328. data/manual/Reporting_Bugs +9 -2
  329. data/manual/Rich_Text_Attributes +41 -0
  330. data/manual/Tutorial +219 -173
  331. data/tasks/test.rake +3 -0
  332. data/test/TestSuite/CSV-Reports/celltext.tjp +2 -1
  333. data/test/TestSuite/CSV-Reports/resourcereport.tjp +2 -1
  334. data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +2 -1
  335. data/test/TestSuite/CSV-Reports/sortByTree.tjp +2 -1
  336. data/test/TestSuite/CSV-Reports/sortBy_duration.down.tjp +2 -1
  337. data/test/TestSuite/CSV-Reports/sortBy_effort.up.tjp +2 -1
  338. data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +2 -1
  339. data/test/TestSuite/CSV-Reports/taskreport.tjp +2 -1
  340. data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +2 -1
  341. data/test/TestSuite/HTML-Reports/depArrows.tjp +72 -0
  342. data/test/TestSuite/HTML-Reports/reference-export.html +187 -0
  343. data/test/TestSuite/HTML-Reports/reference.tjp +21 -0
  344. data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -1
  345. data/test/TestSuite/Scheduler/Correct/AutomaticMilestones.tjp +3 -3
  346. data/test/TestSuite/Scheduler/Correct/Booking.tjp +3 -3
  347. data/test/TestSuite/Scheduler/Correct/Container-2.tjp +37 -0
  348. data/test/TestSuite/Scheduler/Correct/Container.tjp +40 -0
  349. data/test/TestSuite/Scheduler/Correct/Depends.tjp +9 -14
  350. data/test/TestSuite/Scheduler/Correct/Duration.tjp +2 -1
  351. data/test/TestSuite/Scheduler/Correct/InheritStartEnd.tjp +20 -29
  352. data/test/TestSuite/Scheduler/Correct/Limits.tjp +11 -13
  353. data/test/TestSuite/Scheduler/Correct/Optimize-1.tjp +6 -5
  354. data/test/TestSuite/Scheduler/Correct/Optimize-2.tjp +10 -6
  355. data/test/TestSuite/Scheduler/Correct/Optimize-3.tjp +9 -6
  356. data/test/TestSuite/Scheduler/Correct/Optimize-4.tjp +9 -6
  357. data/test/TestSuite/Scheduler/Correct/Optimize-5.tjp +13 -10
  358. data/test/TestSuite/Scheduler/Correct/Precedes.tjp +9 -14
  359. data/test/TestSuite/Scheduler/Correct/Shift.tjp +9 -8
  360. data/test/TestSuite/Scheduler/Correct/checks.tji +4 -0
  361. data/test/TestSuite/Scheduler/Errors/weak_end_dep.tjp +16 -0
  362. data/test/TestSuite/Scheduler/Errors/weak_start_dep.tjp +16 -0
  363. data/test/TestSuite/Syntax/Correct/Account.tjp +1 -1
  364. data/test/TestSuite/Syntax/Correct/AutoID.tjp +21 -0
  365. data/test/TestSuite/Syntax/Correct/AutoMacros.tjp +2 -1
  366. data/test/TestSuite/Syntax/Correct/Caption.tjp +7 -6
  367. data/test/TestSuite/Syntax/Correct/Celltext.tjp +7 -4
  368. data/test/TestSuite/Syntax/Correct/Comments.tjp +1 -1
  369. data/test/TestSuite/Syntax/Correct/CompletedWork.tji +11 -19
  370. data/test/TestSuite/Syntax/Correct/CriticalPath.tjp +4 -3
  371. data/test/TestSuite/Syntax/Correct/Export.tjp +3 -1
  372. data/test/TestSuite/Syntax/Correct/Flags.tjp +2 -1
  373. data/test/TestSuite/Syntax/Correct/HtmlTaskReport.tjp +2 -1
  374. data/test/TestSuite/Syntax/Correct/Journal.tjp +18 -0
  375. data/test/TestSuite/Syntax/Correct/LoadUnits.tjp +2 -1
  376. data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +16 -0
  377. data/test/TestSuite/Syntax/Correct/Period.tjp +2 -1
  378. data/test/TestSuite/Syntax/Correct/RawHTML.tjp +4 -2
  379. data/test/TestSuite/Syntax/Correct/Reports.tjp +4 -2
  380. data/test/TestSuite/Syntax/Correct/ResourcePrefix.tji +2 -0
  381. data/test/TestSuite/Syntax/Correct/ResourcePrefix.tjp +23 -0
  382. data/test/TestSuite/Syntax/Correct/Responsible.tjp +1 -1
  383. data/test/TestSuite/Syntax/Correct/Simple.tjp +1 -1
  384. data/test/TestSuite/Syntax/Correct/String.tjp +1 -1
  385. data/test/TestSuite/Syntax/Correct/TaskRoot.tjp +2 -1
  386. data/test/TestSuite/Syntax/Correct/tutorial.tjp +92 -70
  387. data/test/TestSuite/Syntax/Errors/bad_comment.tjp +7 -0
  388. data/test/TestSuite/Syntax/Errors/bad_include.tjp +1 -1
  389. data/test/TestSuite/Syntax/Errors/bad_time_zone.tjp +6 -0
  390. data/test/TestSuite/Syntax/Errors/bad_timing_res.tjp +5 -0
  391. data/test/TestSuite/Syntax/Errors/chargeset_master.tjp +1 -1
  392. data/test/TestSuite/Syntax/Errors/container_attribute.tjp +1 -1
  393. data/test/TestSuite/Syntax/Errors/cost_acct_no_top.tjp +3 -2
  394. data/test/TestSuite/Syntax/Errors/cost_rev_same.tjp +1 -1
  395. data/test/TestSuite/Syntax/Errors/eof_in_istring1.tjp +5 -0
  396. data/test/TestSuite/Syntax/Errors/eof_in_istring2.tjp +5 -0
  397. data/test/TestSuite/Syntax/Errors/eof_in_istring3.tjp +6 -0
  398. data/test/TestSuite/Syntax/Errors/eof_in_istring4.tjp +6 -0
  399. data/test/TestSuite/Syntax/Errors/eof_in_istring5.tjp +6 -0
  400. data/test/TestSuite/Syntax/Errors/include_recursion.tji +1 -0
  401. data/test/TestSuite/Syntax/Errors/include_recursion.tjp +7 -0
  402. data/test/TestSuite/Syntax/Errors/junk_after_cut.tjp +6 -0
  403. data/test/TestSuite/Syntax/Errors/navigator_exists.tjp +10 -0
  404. data/test/TestSuite/Syntax/Errors/operand_unkn_flag.tjp +1 -1
  405. data/test/TestSuite/Syntax/Errors/report_end.tjp +1 -1
  406. data/test/TestSuite/Syntax/Errors/report_exists.tjp +10 -0
  407. data/test/TestSuite/Syntax/Errors/report_start.tjp +1 -1
  408. data/test/TestSuite/Syntax/Errors/rev_acct_no_top.tjp +1 -1
  409. data/test/TestSuite/Syntax/Errors/sort_direction.tjp +1 -1
  410. data/test/TestSuite/Syntax/Errors/sort_unknown_scen.tjp +1 -1
  411. data/test/TestSuite/Syntax/Errors/sorting_crit_exptd1.tjp +1 -1
  412. data/test/TestSuite/Syntax/Errors/sorting_crit_exptd2.tjp +1 -1
  413. data/test/TestSuite/Syntax/Errors/sorting_wbs.tjp +1 -1
  414. data/test/TestSuite/Syntax/Errors/too_large_timing_res.tjp +7 -0
  415. data/test/TestSuite/Syntax/Errors/unknown_scenario_idx.tjp +1 -1
  416. data/test/TestSuite/Syntax/Errors/unknown_task.tjp +1 -1
  417. data/test/all.rb +1 -16
  418. data/test/test_CSV-Reports.rb +8 -5
  419. data/test/test_Query.rb +2 -2
  420. data/test/test_RichText.rb +95 -0
  421. data/test/test_Scheduler.rb +8 -4
  422. data/test/test_Syntax.rb +8 -4
  423. data/test/test_deep_copy.rb +83 -0
  424. metadata +549 -487
  425. data/benchmarks/UTF-8-Strings.rb +0 -58
  426. data/doc/classes/TaskJuggler/ReportElement.html +0 -1070
  427. data/doc/classes/TaskJuggler/ReportTableElement.html +0 -644
  428. data/lib/reports/ReportElement.rb +0 -427
  429. data/test/TestSuite/Syntax/Correct/csvtest +0 -16
  430. data/test/TestSuite/Syntax/Errors/no_csv_suffix.tjp +0 -10
  431. data/test/TestSuite/Syntax/Errors/no_html_suffix.tjp +0 -10
  432. data/test/TestSuite/Syntax/Errors/report_redifinition.tjp +0 -10
data/lib/Project.rb CHANGED
@@ -27,6 +27,8 @@ require 'ShiftAssignments'
27
27
  require 'WorkingHours'
28
28
  require 'ProjectFileParser'
29
29
  require 'BatchProcessor'
30
+ require 'Journal'
31
+ require 'KeywordArray'
30
32
 
31
33
  class TaskJuggler
32
34
 
@@ -45,6 +47,7 @@ class TaskJuggler
45
47
 
46
48
  attr_reader :accounts, :shifts, :tasks, :resources, :scenarios,
47
49
  :reports, :messageHandler
50
+ attr_accessor :reportContext, :outputDir
48
51
 
49
52
  # Create a project with the specified +id+, +name+ and +version+.
50
53
  # +messageHandler+ is a MessageHandler reference that is used to handle
@@ -53,31 +56,33 @@ class TaskJuggler
53
56
  def initialize(id, name, version, messageHandler)
54
57
  @messageHandler = messageHandler
55
58
  @attributes = {
56
- 'projectid' => id,
59
+ 'projectid' => id || "prj",
57
60
  'projectids' => [ id ],
58
61
  'name' => name,
59
- 'version' => version,
62
+ 'version' => version || "1.0",
60
63
  'costAccount' => nil,
61
64
  'copyright' => nil,
62
65
  'currency' => "EUR",
63
- 'currencyformat' => RealFormat.new([ '-', '', '', ',', 2 ]),
66
+ 'currencyFormat' => RealFormat.new([ '-', '', '', ',', 2 ]),
64
67
  'dailyworkinghours' => 8.0,
65
68
  'end' => nil,
66
69
  'flags' => [],
70
+ 'journal' => Journal.new,
67
71
  'limits' => nil,
68
- 'loadunit' => :shortauto,
72
+ 'loadUnit' => :shortauto,
73
+ 'navigators' => {},
69
74
  'now' => TjTime.now.align(3600),
70
- 'numberformat' => RealFormat.new([ '-', '', '', '.', 1]),
75
+ 'numberFormat' => RealFormat.new([ '-', '', '', '.', 1]),
71
76
  'priority' => 500,
72
77
  'rate' => 0.0,
73
78
  'revenueAccount' => nil,
74
- 'scheduleGranularity' => 3600,
75
- 'shorttimeformat' => "%H:%M",
79
+ 'scheduleGranularity' => Project.maxScheduleGranularity,
80
+ 'shortTimeFormat' => "%H:%M",
76
81
  'start' => nil,
77
- 'timeformat' => "%Y-%m-%d",
82
+ 'timeFormat' => "%Y-%m-%d",
78
83
  'timezone' => nil,
79
84
  'vacations' => [],
80
- 'weekstartsmonday' => true,
85
+ 'weekStartsMonday' => true,
81
86
  'workinghours' => WorkingHours.new,
82
87
  'yearlyworkingdays' => 260.714
83
88
  }
@@ -92,109 +97,270 @@ class TaskJuggler
92
97
  # definitions to register the attributes with the properties.
93
98
  @scenarios = PropertySet.new(self, true)
94
99
  attrs = [
95
- # ID Name Type Inh. Scen. Default
96
- [ 'enabled', 'Enabled', BooleanAttribute, true, false, true ],
97
- [ 'minslackrate', 'Min. Slack Rate', FloatAttribute, true, false, 0.0 ],
98
- [ 'projection', 'Projection Mode', BooleanAttribute, true, false, false ],
99
- [ 'strict', 'Strict Bookings', BooleanAttribute, true, false, false ]
100
+ # ID Name Type
101
+ # Inh. Inh.Prj Scen. Default
102
+ [ 'enabled', 'Enabled', BooleanAttribute,
103
+ true, false, false, true ],
104
+ [ 'minslackrate', 'Min. Slack Rate', FloatAttribute,
105
+ true, false, false, 1.0 ],
106
+ [ 'projection', 'Projection Mode', BooleanAttribute,
107
+ true, false, false, false ],
108
+ [ 'strict', 'Strict Bookings', BooleanAttribute,
109
+ true, false, false, false ]
100
110
  ]
101
111
  attrs.each { |a| @scenarios.addAttributeType(AttributeDefinition.new(*a)) }
102
112
 
103
113
  @shifts = PropertySet.new(self, true)
104
114
  attrs = [
105
- # ID Name Type Inher. Scen. Default
106
- [ 'index', 'Index', FixnumAttribute, false, false, -1 ],
107
- [ 'replace', 'Replace', BooleanAttribute, true, true, false ],
108
- [ 'timezone', 'Time Zone', StringAttribute, true, true, nil ],
109
- [ 'tree', 'Tree Index', StringAttribute, false, false, "" ],
110
- [ 'vacations', 'Vacations', IntervalListAttribute, true, true, [] ],
111
- [ 'wbs', 'WBS', StringAttribute, false, false, "" ],
112
- [ 'workinghours', 'Working Hours', WorkingHoursAttribute, true, true,
113
- nil ]
115
+ # ID Name Type
116
+ # Inh. Inh.Prj Scen. Default
117
+ [ 'index', 'Index', FixnumAttribute,
118
+ false, false, false, -1 ],
119
+ [ 'replace', 'Replace', BooleanAttribute,
120
+ true, false, true, false ],
121
+ [ 'timezone', 'Time Zone', StringAttribute,
122
+ true, true, true, nil ],
123
+ [ 'tree', 'Tree Index', StringAttribute,
124
+ false, false, false, "" ],
125
+ [ 'vacations', 'Vacations', IntervalListAttribute,
126
+ true, true, true, [] ],
127
+ [ 'wbs', 'WBS', StringAttribute,
128
+ false, false, false, "" ],
129
+ [ 'workinghours', 'Working Hours', WorkingHoursAttribute,
130
+ true, true, true, nil ]
114
131
  ]
115
132
  attrs.each { |a| @shifts.addAttributeType(AttributeDefinition.new(*a)) }
116
133
 
117
134
  @accounts = PropertySet.new(self, true)
118
135
  attrs = [
119
- # ID Name Type Inher. Scen. Default
120
- [ 'index', 'Index', FixnumAttribute, false, false, -1 ],
121
- [ 'tree', 'Tree Index', StringAttribute, false, false, "" ],
122
- [ 'wbs', 'WBS', StringAttribute, false, false, "" ]
136
+ # ID Name Type
137
+ # Inh. Inh.Prj Scen. Default
138
+ [ 'index', 'Index', FixnumAttribute,
139
+ false, false, false, -1 ],
140
+ [ 'tree', 'Tree Index', StringAttribute,
141
+ false, false, false, "" ],
142
+ [ 'wbs', 'WBS', StringAttribute,
143
+ false, false, false, "" ]
123
144
  ]
124
145
  attrs.each { |a| @accounts.addAttributeType(AttributeDefinition.new(*a)) }
125
146
 
126
147
  @resources = PropertySet.new(self, true)
127
148
  attrs = [
128
- # ID Name Type Inher. Scen. Default
129
- [ 'alloctdeffort', 'Alloctd. Effort', FloatAttribute, false, true, 0.0 ],
130
- [ 'criticalness', 'Criticalness', FloatAttribute, false, true, 0.0 ],
131
- [ 'duties', 'Duties', TaskListAttribute, false, true, [] ],
132
- [ 'efficiency','Efficiency', FloatAttribute, true, true, 1.0 ],
133
- [ 'effort', 'Total Effort', FixnumAttribute, false, true, 0 ],
134
- [ 'email', 'Email', StringAttribute, true, false, nil ],
135
- [ 'flags', 'Flags', FlagListAttribute, true, true, [] ],
136
- [ 'fte', 'FTE', FloatAttribute, false, true, 1.0 ],
137
- [ 'headcount', 'Headcount', FixnumAttribute, false, true, 1 ],
138
- [ 'index', 'Index', FixnumAttribute, false, false, -1 ],
139
- [ 'limits', 'Limits', LimitsAttribute, true, true, nil ],
140
- [ 'rate', 'Rate', FloatAttribute, true, true, 0.0 ],
141
- [ 'shifts', 'Shifts', ShiftAssignmentsAttribute, true, true,
142
- nil ],
143
- [ 'timezone', 'Time Zone', StringAttribute, true, true, nil ],
144
- [ 'tree', 'Tree Index', StringAttribute, false, false, "" ],
145
- [ 'vacations', 'Vacations', IntervalListAttribute, true, true, [] ],
146
- [ 'wbs', 'WBS', StringAttribute, false, false, "" ],
147
- [ 'workinghours', 'Working Hours', WorkingHoursAttribute, true, true,
148
- nil ]
149
+ # ID Name Type
150
+ # Inh. Inh.Prj Scen. Default
151
+ [ 'alloctdeffort', 'Alloctd. Effort', FloatAttribute,
152
+ false, false, true, 0.0 ],
153
+ [ 'criticalness', 'Criticalness', FloatAttribute,
154
+ false, false, true, 0.0 ],
155
+ [ 'duties', 'Duties', TaskListAttribute,
156
+ false, false, true, [] ],
157
+ [ 'efficiency','Efficiency', FloatAttribute,
158
+ true, false, true, 1.0 ],
159
+ [ 'effort', 'Total Effort', FixnumAttribute,
160
+ false, false, true, 0 ],
161
+ [ 'email', 'Email', StringAttribute,
162
+ true, false, false, nil ],
163
+ [ 'flags', 'Flags', FlagListAttribute,
164
+ true, false, true, [] ],
165
+ [ 'fte', 'FTE', FloatAttribute,
166
+ false, false, true, 1.0 ],
167
+ [ 'headcount', 'Headcount', FixnumAttribute,
168
+ false, false, true, 1 ],
169
+ [ 'index', 'Index', FixnumAttribute,
170
+ false, false, false, -1 ],
171
+ [ 'limits', 'Limits', LimitsAttribute,
172
+ true, true, true, nil ],
173
+ [ 'rate', 'Rate', FloatAttribute,
174
+ true, true, true, 0.0 ],
175
+ [ 'shifts', 'Shifts', ShiftAssignmentsAttribute,
176
+ true, false, true, nil ],
177
+ [ 'timezone', 'Time Zone', StringAttribute,
178
+ true, false, true, nil ],
179
+ [ 'tree', 'Tree Index', StringAttribute,
180
+ false, false, false, "" ],
181
+ [ 'vacations', 'Vacations', IntervalListAttribute,
182
+ true, true, true, [] ],
183
+ [ 'wbs', 'WBS', StringAttribute,
184
+ false, false, false, "" ],
185
+ [ 'workinghours', 'Working Hours', WorkingHoursAttribute,
186
+ true, true, true, nil ]
149
187
  ]
150
188
  attrs.each { |a| @resources.addAttributeType(AttributeDefinition.new(*a)) }
151
189
 
152
190
  @tasks = PropertySet.new(self, false)
153
191
  attrs = [
154
- # ID Name Type Inher. Scen. Default
155
- [ 'allocate', 'Allocations', AllocationAttribute, true, true, [] ],
156
- [ 'assignedresources', 'Assigned Resources', ResourceListAttribute, false, true, [] ],
157
- [ 'booking', 'Bookings', BookingListAttribute, false, true, [] ],
158
- [ 'charge', 'Charges', ChargeListAttribute, false, true, [] ],
159
- [ 'chargeset', 'Charge Sets', ChargeSetListAttribute, true, true, [] ],
160
- [ 'complete', 'Completion', FloatAttribute, false, true, nil ],
161
- [ 'criticalness', 'Criticalness', FloatAttribute, false, true, 0.0 ],
162
- [ 'depends', '-', DependencyListAttribute, true, true, [] ],
163
- [ 'duration', 'Duration', DurationAttribute, false, true, 0 ],
164
- [ 'effort', 'Effort', DurationAttribute, false, true, 0 ],
165
- [ 'end', 'End', DateAttribute, true, true, nil ],
166
- [ 'endpreds', 'End Preds.', TaskListAttribute, false, true, [] ],
167
- [ 'endsuccs', 'End Succs.', TaskListAttribute, false, true, [] ],
168
- [ 'flags', 'Flags', FlagListAttribute, true, true, [] ],
169
- [ 'forward', 'Scheduling', BooleanAttribute, true, true, true ],
170
- [ 'index', 'Index', FixnumAttribute, false, false, -1 ],
171
- [ 'length', 'Length', DurationAttribute, false, true, 0 ],
172
- [ 'limits', 'Limits', LimitsAttribute, false, true, nil ],
173
- [ 'maxend', 'Max. End', DateAttribute, true, true, nil ],
174
- [ 'maxstart', 'Max. Start', DateAttribute, true, true, nil ],
175
- [ 'milestone', 'Milestone', BooleanAttribute, false, true, false ],
176
- [ 'minend', 'Min. End', DateAttribute, true, true, nil ],
177
- [ 'minstart', 'Min. Start', DateAttribute, true, true, nil ],
178
- [ 'note', 'Note', RichTextAttribute, false, false, nil ],
179
- [ 'pathcriticalness', 'Path Criticalness', FloatAttribute, false, true, 0.0 ],
180
- [ 'precedes', '-', DependencyListAttribute, true, true, [] ],
181
- [ 'priority', 'Priority', FixnumAttribute, true, true, 500 ],
182
- [ 'projectid', 'Project ID', SymbolAttribute, true, true, nil ],
183
- [ 'responsible', 'Responsible', ResourceListAttribute, true, true, [] ],
184
- [ 'scheduled', 'Scheduled', BooleanAttribute, true, true, false ],
185
- [ 'shifts', 'Shifts', ShiftAssignmentsAttribute, true, true,
186
- nil ],
187
- [ 'start', 'Start', DateAttribute, true, true, nil ],
188
- [ 'startpreds', 'Start Preds.', TaskListAttribute, false, true, [] ],
189
- [ 'startsuccs', 'Start Succs.', TaskListAttribute, false, true, [] ],
190
- [ 'tree', 'Tree Index', StringAttribute, false, false, "" ],
191
- [ 'wbs', 'WBS', StringAttribute, false, false, "" ]
192
+ # ID Name Type
193
+ # Inh. Inh.Prj Scen. Default
194
+ [ 'allocate', 'Allocations', AllocationAttribute,
195
+ true, false, true, [] ],
196
+ [ 'assignedresources', 'Assigned Resources', ResourceListAttribute,
197
+ false, false, true, [] ],
198
+ [ 'booking', 'Bookings', BookingListAttribute,
199
+ false, false, true, [] ],
200
+ [ 'charge', 'Charges', ChargeListAttribute,
201
+ false, false, true, [] ],
202
+ [ 'chargeset', 'Charge Sets', ChargeSetListAttribute,
203
+ true, false, true, [] ],
204
+ [ 'complete', 'Completion', FloatAttribute,
205
+ false, false, true, nil ],
206
+ [ 'criticalness', 'Criticalness', FloatAttribute,
207
+ false, false, true, 0.0 ],
208
+ [ 'depends', 'Preceding tasks', DependencyListAttribute,
209
+ true, false, true, [] ],
210
+ [ 'duration', 'Duration', DurationAttribute,
211
+ false, false, true, 0 ],
212
+ [ 'effort', 'Effort', DurationAttribute,
213
+ false, false, true, 0 ],
214
+ [ 'end', 'End', DateAttribute,
215
+ true, false, true, nil ],
216
+ [ 'endpreds', 'End Preds.', TaskListAttribute,
217
+ false, false, true, [] ],
218
+ [ 'endsuccs', 'End Succs.', TaskListAttribute,
219
+ false, false, true, [] ],
220
+ [ 'flags', 'Flags', FlagListAttribute,
221
+ true, false, true, [] ],
222
+ [ 'forward', 'Scheduling', BooleanAttribute,
223
+ true, false, true, true ],
224
+ [ 'index', 'Index', FixnumAttribute,
225
+ false, false, false, -1 ],
226
+ [ 'length', 'Length', DurationAttribute,
227
+ false, false, true, 0 ],
228
+ [ 'limits', 'Limits', LimitsAttribute,
229
+ false, false, true, nil ],
230
+ [ 'maxend', 'Max. End', DateAttribute,
231
+ true, false, true, nil ],
232
+ [ 'maxstart', 'Max. Start', DateAttribute,
233
+ false, false, true, nil ],
234
+ [ 'milestone', 'Milestone', BooleanAttribute,
235
+ false, false, true, false ],
236
+ [ 'minend', 'Min. End', DateAttribute,
237
+ false, false, true, nil ],
238
+ [ 'minstart', 'Min. Start', DateAttribute,
239
+ true, false, true, nil ],
240
+ [ 'note', 'Note', RichTextAttribute,
241
+ false, false, false, nil ],
242
+ [ 'pathcriticalness', 'Path Criticalness', FloatAttribute,
243
+ false, false, true, 0.0 ],
244
+ [ 'precedes', 'Following tasks', DependencyListAttribute,
245
+ true, false, true, [] ],
246
+ [ 'priority', 'Priority', FixnumAttribute,
247
+ true, true, true, 500 ],
248
+ [ 'projectid', 'Project ID', SymbolAttribute,
249
+ true, true, true, nil ],
250
+ [ 'responsible', 'Responsible', ResourceListAttribute,
251
+ true, false, true, [] ],
252
+ [ 'scheduled', 'Scheduled', BooleanAttribute,
253
+ true, false, true, false ],
254
+ [ 'shifts', 'Shifts', ShiftAssignmentsAttribute,
255
+ true, false, true, nil ],
256
+ [ 'start', 'Start', DateAttribute,
257
+ true, false, true, nil ],
258
+ [ 'startpreds', 'Start Preds.', TaskListAttribute,
259
+ false, false, true, [] ],
260
+ [ 'startsuccs', 'Start Succs.', TaskListAttribute,
261
+ false, false, true, [] ],
262
+ [ 'tree', 'Tree Index', StringAttribute,
263
+ false, false, false, "" ],
264
+ [ 'wbs', 'WBS', StringAttribute,
265
+ false, false, false, "" ]
192
266
  ]
193
267
  attrs.each { |a| @tasks.addAttributeType(AttributeDefinition.new(*a)) }
194
268
 
269
+ @reports = PropertySet.new(self, false)
270
+ attrs = [
271
+ # ID Name Type
272
+ # Inh. Inh.Prj Scen. Default
273
+ [ 'caption', 'Caption', RichTextAttribute,
274
+ false, false, false, nil ],
275
+ [ 'center', 'Center', RichTextAttribute,
276
+ true, false, false, nil ],
277
+ [ 'columns', 'Columns', ColumnListAttribute,
278
+ true, false, false, [] ],
279
+ [ 'costAccount', 'Cost Account', AccountAttribute,
280
+ true, true, false, nil ],
281
+ [ 'currencyFormat', 'Currency Format', RealFormatAttribute,
282
+ true, true, false, nil ],
283
+ [ 'definitions', 'Definitions', DefinitionListAttribute,
284
+ true, false, false, KeywordArray.new([ '*' ]) ],
285
+ [ 'end', 'End', DateAttribute,
286
+ true, true, false, nil ],
287
+ [ 'epilog', 'Epilog', RichTextAttribute,
288
+ false, false, false, nil ],
289
+ [ 'footer', 'Footer', RichTextAttribute,
290
+ true, false, false, nil ],
291
+ [ 'formats', 'Formats', FormatListAttribute,
292
+ true, false, false, [] ],
293
+ [ 'ganttBars', 'Gantt Bars', BooleanAttribute,
294
+ true, false, false, true ],
295
+ [ 'header', 'Header', RichTextAttribute,
296
+ true, false, false, nil ],
297
+ [ 'headline', 'Headline', StringAttribute,
298
+ false, false, false, '' ],
299
+ [ 'hideResource', 'Hide Resource', LogicalExpressionAttribute,
300
+ true, false, false, nil ],
301
+ [ 'hideTask', 'Hide Task', LogicalExpressionAttribute,
302
+ true, false, false, nil ],
303
+ [ 'index', 'Index', FixnumAttribute,
304
+ false, false, false, -1 ],
305
+ [ 'left', 'Left', RichTextAttribute,
306
+ true, false, false, nil ],
307
+ [ 'loadUnit', 'Load Unit', StringAttribute,
308
+ true, true, false, nil ],
309
+ [ 'now', 'Now', DateAttribute,
310
+ true, true, false, nil ],
311
+ [ 'numberFormat', 'Number Format', RealFormatAttribute,
312
+ true, true, false, nil ],
313
+ [ 'prolog', 'Prolog', RichTextAttribute,
314
+ false, false, false, nil],
315
+ [ 'resourceAttributes', 'Resource Attributes', FormatListAttribute,
316
+ true, false, false, KeywordArray.new([ '*' ]) ],
317
+ [ 'resourceRoot', 'resource Root', PropertyAttribute,
318
+ true, false, false, nil ],
319
+ [ 'revenueAccount', 'Revenue Account', AccountAttribute,
320
+ true, true, false, nil ],
321
+ [ 'right', 'Right', RichTextAttribute,
322
+ true, false, false, nil ],
323
+ [ 'rollupResource', 'Rollup Resource', LogicalExpressionAttribute,
324
+ true, false, false, nil ],
325
+ [ 'rollupTask', 'Rollup Task', LogicalExpressionAttribute,
326
+ true, false, false, nil ],
327
+ [ 'scenarios', 'Scenarios', ScenarioListAttribute,
328
+ true, false, false, [ 0 ] ],
329
+ [ 'shortTimeFormat', 'Short Time Format', StringAttribute,
330
+ true, true, false, nil ],
331
+ [ 'sortResources', 'Sort Resources', SortListAttribute,
332
+ true, false, false, [[ 'seqno', true, -1 ]] ],
333
+ [ 'sortTasks', 'Sort Tasks', SortListAttribute,
334
+ true, false, false, [[ 'seqno', true, -1 ]] ],
335
+ [ 'start', 'Start', DateAttribute,
336
+ true, true, false, nil ],
337
+ [ 'taskAttributes', 'Task Attributes', FormatListAttribute,
338
+ true, false, false, KeywordArray.new([ '*' ]) ],
339
+ [ 'taskRoot', 'Task Root', PropertyAttribute,
340
+ true, false, false, nil ],
341
+ [ 'timeFormat', 'Time Format', StringAttribute,
342
+ true, true, false, nil ],
343
+ [ 'timezone', 'Time Zone', StringAttribute,
344
+ true, true, false, nil ],
345
+ [ 'tree', 'Tree Index', StringAttribute,
346
+ false, false, false, "" ],
347
+ [ 'wbs', 'WBS', StringAttribute,
348
+ false, false, false, "" ],
349
+ [ 'weekStartsMonday', 'Week Starts Monday', BooleanAttribute,
350
+ true, true, false, false ]
351
+ ]
352
+ attrs.each { |a| @reports.addAttributeType(AttributeDefinition.new(*a)) }
353
+
195
354
  Scenario.new(self, 'plan', 'Plan Scenario', nil)
196
355
 
197
- @reports = { }
356
+ @reportContext = nil
357
+ @outputDir = ''
358
+ end
359
+
360
+ # Overload the deep_clone function so that references to the project don't
361
+ # lead to deep copying of the whole project.
362
+ def deep_clone
363
+ self
198
364
  end
199
365
 
200
366
  # Pass a message (error or warning) to the message handler. _message_ is a
@@ -252,19 +418,13 @@ class TaskJuggler
252
418
  # Return the Scenario with the given _id_ or _index_.
253
419
  def scenario(arg)
254
420
  if arg.is_a?(Fixnum)
255
- if $DEBUG && (arg < 0 || arg >= @scenarios.items)
256
- raise "Scenario index out of range: #{arg}"
257
- end
258
421
  @scenarios.each do |sc|
259
422
  return sc if sc.sequenceNo - 1 == arg
260
423
  end
261
- raise "No scenario with index #{arg}"
262
424
  else
263
- if $DEBUG && @scenarios[arg].nil?
264
- raise "No scenario with id '#{arg}'"
265
- end
266
- @scenarios[arg]
425
+ return @scenarios[arg]
267
426
  end
427
+ nil
268
428
  end
269
429
 
270
430
  # call-seq:
@@ -302,6 +462,20 @@ class TaskJuggler
302
462
  @resources[id]
303
463
  end
304
464
 
465
+ # Return the Report with the ID +id+ or return nil if it does not exist.
466
+ def report(id)
467
+ @reports[id]
468
+ end
469
+
470
+ # Return the Report with the name +name+ or return nil if it does not
471
+ # exist.
472
+ def reportByName(name)
473
+ @reports.each do |report|
474
+ return report if report.name == name
475
+ end
476
+ nil
477
+ end
478
+
305
479
  # This function must be called after the Project data structures have been
306
480
  # filled with data. It schedules all scenario and stores the result in the
307
481
  # data structures again.
@@ -352,15 +526,21 @@ class TaskJuggler
352
526
  # This function may only be called after Project#schedule has been called.
353
527
  def generateReports(maxCpuCores)
354
528
  begin
529
+ @reports.index
355
530
  if maxCpuCores == 1
356
- @reports.each_value do |report|
531
+ @reports.each do |report|
532
+ next if report.get('formats').empty?
357
533
  Log.startProgressMeter("Report #{report.name}")
534
+ @reportContext = ReportContext.new(self, report)
358
535
  report.generate
359
536
  Log.stopProgressMeter
360
537
  end
361
538
  else
362
539
  bp = BatchProcessor.new(maxCpuCores)
363
- @reports.each_value { |report| bp.queue(report) { report.generate } }
540
+ @reports.each_value do |report|
541
+ next if report.get('formats').empty?
542
+ bp.queue(report) { report.generate }
543
+ end
364
544
  bp.wait do |report|
365
545
  $stdout.print(report.stdout)
366
546
  $stderr.print(report.stderr)
@@ -403,7 +583,7 @@ class TaskJuggler
403
583
  end
404
584
 
405
585
  def addReport(report) # :nodoc:
406
- @reports[report.name] = report
586
+ @reports.addProperty(report)
407
587
  end
408
588
 
409
589
  # call-seq:
@@ -482,6 +662,41 @@ class TaskJuggler
482
662
  ((date - @attributes['start']) / @attributes['scheduleGranularity']).to_i
483
663
  end
484
664
 
665
+ # TaskJuggler keeps all times in UTC. All time values must be multiples of
666
+ # the used scheduling granularity. If the local time zone is not
667
+ # hour-aligned to UTC, the maximum allowed schedule granularity is
668
+ # reduced.
669
+ def Project.maxScheduleGranularity
670
+ refTime = Time.gm(2000, 1, 1, 0, 0, 0)
671
+ case (min = refTime.getlocal.min)
672
+ when 0
673
+ # We are hour-aligned to UTC; scheduleGranularity is 1 hour
674
+ 60 * 60
675
+ when 30
676
+ # We are half-hour off from UTC; scheduleGranularity is 30 minutes
677
+ 30 * 60
678
+ when 15, 45
679
+ # We are 15 or 45 minutes off from UTC; scheduleGranularity is 15
680
+ # minutes
681
+ 15 * 60
682
+ else
683
+ raise "Unknown Time zone alignment #{min}"
684
+ end
685
+ end
686
+
687
+ # Return the name of the attribute _id_. Since we don't know whether we
688
+ # are looking for a task, resource, etc. attribute, we prefer tasks over
689
+ # resources here.
690
+ def attributeName(id)
691
+ # We have to see if the attribute id is a task or resource attribute and
692
+ # return it's name.
693
+ (name = @tasks.attributeName(id)).nil? &&
694
+ (name = @resources.attributeName(id)).nil?
695
+ name
696
+ end
697
+
698
+
699
+
485
700
  # Print the attribute values. It's used for debugging only.
486
701
  def to_s
487
702
  @attributes.each do |attribute, value|
@@ -516,7 +731,6 @@ class TaskJuggler
516
731
  end
517
732
 
518
733
  tasks.each { |task| task.prepareScheduling(scIdx) }
519
-
520
734
  tasks.each { |task| task.Xref(scIdx) }
521
735
  tasks.each { |task| task.propagateInitialValues(scIdx) }
522
736
  tasks.each { |task| task.preScheduleCheck(scIdx) }