taskjuggler 0.0.3 → 0.0.4

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 (495) hide show
  1. data/benchmarks/UTF-8-Strings.rb +58 -0
  2. data/data/css/tjmanual.css +52 -0
  3. data/data/css/tjreport.css +195 -0
  4. data/data/icons/details.png +0 -0
  5. data/data/icons/flag-green.png +0 -0
  6. data/data/icons/flag-red.png +0 -0
  7. data/data/icons/flag-yellow.png +0 -0
  8. data/data/icons/resource.png +0 -0
  9. data/data/icons/resourcegroup.png +0 -0
  10. data/data/icons/task.png +0 -0
  11. data/data/icons/taskgroup.png +0 -0
  12. data/data/icons/trend-down.png +0 -0
  13. data/data/icons/trend-flat.png +0 -0
  14. data/data/icons/trend-up.png +0 -0
  15. data/data/scripts/wz_tooltip.js +1301 -0
  16. data/doc/classes/AppConfig.html +298 -230
  17. data/doc/classes/Arguments.html +8 -8
  18. data/doc/classes/Object.html +7 -7
  19. data/doc/classes/String.html +89 -89
  20. data/doc/classes/TaskJuggler.html +396 -264
  21. data/doc/classes/TaskJuggler/Account.html +18 -18
  22. data/doc/classes/TaskJuggler/AccountAttribute.html +26 -26
  23. data/doc/classes/TaskJuggler/AccountScenario.html +12 -12
  24. data/doc/classes/TaskJuggler/Allocation.html +30 -30
  25. data/doc/classes/TaskJuggler/AllocationAttribute.html +26 -26
  26. data/doc/classes/TaskJuggler/AttributeBase.html +227 -115
  27. data/doc/classes/TaskJuggler/AttributeDefinition.html +6 -6
  28. data/doc/classes/TaskJuggler/BatchProcessor.html +117 -83
  29. data/doc/classes/TaskJuggler/Booking.html +18 -18
  30. data/doc/classes/TaskJuggler/BookingListAttribute.html +26 -26
  31. data/doc/classes/TaskJuggler/BooleanAttribute.html +26 -26
  32. data/doc/classes/TaskJuggler/CSVFile.html +24 -24
  33. data/doc/classes/TaskJuggler/CellSettingPattern.html +201 -0
  34. data/doc/classes/TaskJuggler/CellSettingPatternList.html +253 -0
  35. data/doc/classes/TaskJuggler/Charge.html +18 -18
  36. data/doc/classes/TaskJuggler/ChargeListAttribute.html +20 -20
  37. data/doc/classes/TaskJuggler/ChargeSet.html +37 -37
  38. data/doc/classes/TaskJuggler/ChargeSetListAttribute.html +26 -26
  39. data/doc/classes/TaskJuggler/ColumnListAttribute.html +20 -20
  40. data/doc/classes/TaskJuggler/ColumnTable.html +40 -40
  41. data/doc/classes/TaskJuggler/DateAttribute.html +54 -15
  42. data/doc/classes/TaskJuggler/DefinitionListAttribute.html +10 -10
  43. data/doc/classes/TaskJuggler/DependencyListAttribute.html +47 -47
  44. data/doc/classes/TaskJuggler/DurationAttribute.html +30 -30
  45. data/doc/classes/TaskJuggler/FixnumAttribute.html +20 -20
  46. data/doc/classes/TaskJuggler/FlagListAttribute.html +43 -43
  47. data/doc/classes/TaskJuggler/FloatAttribute.html +30 -30
  48. data/doc/classes/TaskJuggler/FormatListAttribute.html +21 -21
  49. data/doc/classes/TaskJuggler/GanttChart.html +48 -48
  50. data/doc/classes/TaskJuggler/GanttContainer.html +42 -42
  51. data/doc/classes/TaskJuggler/GanttHeader.html +12 -12
  52. data/doc/classes/TaskJuggler/GanttHeaderScaleItem.html +12 -12
  53. data/doc/classes/TaskJuggler/GanttLine.html +24 -24
  54. data/doc/classes/TaskJuggler/GanttLoadStack.html +18 -18
  55. data/doc/classes/TaskJuggler/GanttMilestone.html +42 -42
  56. data/doc/classes/TaskJuggler/GanttRouter.html +24 -24
  57. data/doc/classes/TaskJuggler/GanttTaskBar.html +42 -42
  58. data/doc/classes/TaskJuggler/HTMLDocument.html +13 -13
  59. data/doc/classes/TaskJuggler/HTMLGraphics.html +12 -12
  60. data/doc/classes/TaskJuggler/Interval.html +57 -57
  61. data/doc/classes/TaskJuggler/IntervalListAttribute.html +47 -47
  62. data/doc/classes/TaskJuggler/JobInfo.html +68 -12
  63. data/doc/classes/TaskJuggler/Journal.html +266 -20
  64. data/doc/classes/TaskJuggler/JournalEntry.html +79 -23
  65. data/doc/classes/TaskJuggler/JournalEntryList.html +454 -0
  66. data/doc/classes/TaskJuggler/KeywordArray.html +10 -10
  67. data/doc/classes/TaskJuggler/KeywordDocumentation.html +171 -170
  68. data/doc/classes/TaskJuggler/Limits.html +36 -36
  69. data/doc/classes/TaskJuggler/Limits/Limit.html +30 -30
  70. data/doc/classes/TaskJuggler/LimitsAttribute.html +40 -40
  71. data/doc/classes/TaskJuggler/ListAttributeBase.html +20 -20
  72. data/doc/classes/TaskJuggler/Log.html +145 -107
  73. data/doc/classes/TaskJuggler/LogicalAttribute.html +65 -36
  74. data/doc/classes/TaskJuggler/LogicalExpression.html +61 -24
  75. data/doc/classes/TaskJuggler/LogicalExpressionAttribute.html +20 -20
  76. data/doc/classes/TaskJuggler/LogicalFlag.html +31 -51
  77. data/doc/classes/TaskJuggler/LogicalFunction.html +64 -53
  78. data/doc/classes/TaskJuggler/LogicalOperation.html +103 -55
  79. data/doc/classes/TaskJuggler/Macro.html +6 -6
  80. data/doc/classes/TaskJuggler/MacroParser.html +36 -36
  81. data/doc/classes/TaskJuggler/MacroTable.html +37 -37
  82. data/doc/classes/TaskJuggler/Message.html +12 -12
  83. data/doc/classes/TaskJuggler/MessageHandler.html +32 -20
  84. data/doc/classes/TaskJuggler/Navigator.html +110 -46
  85. data/doc/classes/TaskJuggler/NavigatorElement.html +449 -0
  86. data/doc/classes/TaskJuggler/OnShiftCache.html +24 -24
  87. data/doc/classes/TaskJuggler/Project.html +1158 -893
  88. data/doc/classes/TaskJuggler/ProjectFileParser.html +94 -91
  89. data/doc/classes/TaskJuggler/PropertyAttribute.html +20 -20
  90. data/doc/classes/TaskJuggler/PropertyList.html +225 -155
  91. data/doc/classes/TaskJuggler/PropertySet.html +375 -332
  92. data/doc/classes/TaskJuggler/PropertyTreeNode.html +750 -510
  93. data/doc/classes/TaskJuggler/Query.html +404 -139
  94. data/doc/classes/TaskJuggler/{RTPNavigator.html → RTFNavigator.html} +57 -56
  95. data/doc/classes/TaskJuggler/RTFQuery.html +343 -0
  96. data/doc/classes/TaskJuggler/{RTPReport.html → RTFReport.html} +70 -67
  97. data/doc/classes/TaskJuggler/RealFormat.html +18 -18
  98. data/doc/classes/TaskJuggler/RealFormatAttribute.html +10 -10
  99. data/doc/classes/TaskJuggler/ReferenceAttribute.html +107 -40
  100. data/doc/classes/TaskJuggler/RemoteServiceManager.html +335 -0
  101. data/doc/classes/TaskJuggler/Report.html +66 -64
  102. data/doc/classes/TaskJuggler/ReportBase.html +112 -123
  103. data/doc/classes/TaskJuggler/ReportContext.html +43 -38
  104. data/doc/classes/TaskJuggler/ReportServer.html +320 -0
  105. data/doc/classes/TaskJuggler/ReportTable.html +42 -42
  106. data/doc/classes/TaskJuggler/ReportTableCell.html +221 -129
  107. data/doc/classes/TaskJuggler/ReportTableColumn.html +27 -27
  108. data/doc/classes/TaskJuggler/ReportTableLegend.html +24 -24
  109. data/doc/classes/TaskJuggler/ReportTableLine.html +126 -80
  110. data/doc/classes/TaskJuggler/Resource.html +12 -12
  111. data/doc/classes/TaskJuggler/ResourceListAttribute.html +82 -47
  112. data/doc/classes/TaskJuggler/ResourceListRE.html +43 -39
  113. data/doc/classes/TaskJuggler/ResourceScenario.html +413 -321
  114. data/doc/classes/TaskJuggler/RichText.html +64 -248
  115. data/doc/classes/TaskJuggler/RichTextAttribute.html +94 -30
  116. data/doc/classes/TaskJuggler/RichTextDocument.html +87 -85
  117. data/doc/classes/TaskJuggler/RichTextElement.html +456 -363
  118. data/doc/classes/TaskJuggler/RichTextException.html +13 -13
  119. data/doc/classes/TaskJuggler/{RichTextProtocolExample.html → RichTextFunctionExample.html} +64 -63
  120. data/doc/classes/TaskJuggler/{RichTextProtocolHandler.html → RichTextFunctionHandler.html} +42 -36
  121. data/doc/classes/TaskJuggler/RichTextIntermediate.html +563 -0
  122. data/doc/classes/TaskJuggler/RichTextParser.html +54 -51
  123. data/doc/classes/TaskJuggler/RichTextScanner.html +94 -92
  124. data/doc/classes/TaskJuggler/RichTextSnip.html +96 -60
  125. data/doc/classes/TaskJuggler/RichTextSyntaxRules.html +369 -227
  126. data/doc/classes/TaskJuggler/Scenario.html +6 -6
  127. data/doc/classes/TaskJuggler/ScenarioData.html +37 -37
  128. data/doc/classes/TaskJuggler/ScenarioListAttribute.html +31 -31
  129. data/doc/classes/TaskJuggler/Scoreboard.html +66 -66
  130. data/doc/classes/TaskJuggler/Shift.html +18 -18
  131. data/doc/classes/TaskJuggler/ShiftAssignment.html +54 -54
  132. data/doc/classes/TaskJuggler/ShiftAssignments.html +78 -78
  133. data/doc/classes/TaskJuggler/ShiftAssignmentsAttribute.html +40 -40
  134. data/doc/classes/TaskJuggler/ShiftScenario.html +24 -24
  135. data/doc/classes/TaskJuggler/SortListAttribute.html +22 -22
  136. data/doc/classes/TaskJuggler/SourceFileInfo.html +12 -12
  137. data/doc/classes/TaskJuggler/StringAttribute.html +30 -30
  138. data/doc/classes/TaskJuggler/SymbolAttribute.html +20 -20
  139. data/doc/classes/TaskJuggler/SyntaxReference.html +42 -42
  140. data/doc/classes/TaskJuggler/TOCEntry.html +12 -12
  141. data/doc/classes/TaskJuggler/TSResourceRecord.html +197 -0
  142. data/doc/classes/TaskJuggler/TSTaskRecord.html +215 -0
  143. data/doc/classes/TaskJuggler/TableColumnDefinition.html +64 -43
  144. data/doc/classes/TaskJuggler/TableOfContents.html +18 -18
  145. data/doc/classes/TaskJuggler/TableReport.html +447 -468
  146. data/doc/classes/TaskJuggler/Task.html +12 -12
  147. data/doc/classes/TaskJuggler/TaskDependency.html +12 -12
  148. data/doc/classes/TaskJuggler/TaskListAttribute.html +47 -47
  149. data/doc/classes/TaskJuggler/TaskListRE.html +43 -39
  150. data/doc/classes/TaskJuggler/TaskScenario.html +529 -282
  151. data/doc/classes/TaskJuggler/TextParser.html +215 -194
  152. data/doc/classes/TaskJuggler/TextParser/Pattern.html +97 -97
  153. data/doc/classes/TaskJuggler/TextParser/Rule.html +84 -84
  154. data/doc/classes/TaskJuggler/TextParser/StackElement.html +16 -15
  155. data/doc/classes/TaskJuggler/TextParser/TextParserResultArray.html +12 -12
  156. data/doc/classes/TaskJuggler/TextParser/TokenDoc.html +6 -6
  157. data/doc/classes/TaskJuggler/TextReport.html +77 -74
  158. data/doc/classes/TaskJuggler/TextScanner.html +294 -281
  159. data/doc/classes/TaskJuggler/TextScanner/BufferStreamHandle.html +70 -70
  160. data/doc/classes/TaskJuggler/TextScanner/FileStreamHandle.html +59 -60
  161. data/doc/classes/TaskJuggler/TextScanner/StreamHandle.html +12 -12
  162. data/doc/classes/TaskJuggler/TimeSheetReport.html +406 -0
  163. data/doc/classes/TaskJuggler/TjException.html +6 -6
  164. data/doc/classes/TaskJuggler/TjTime.html +522 -513
  165. data/doc/classes/TaskJuggler/TjpExample.html +25 -25
  166. data/doc/classes/TaskJuggler/TjpExportRE.html +21 -24
  167. data/doc/classes/TaskJuggler/TjpSyntaxRules.html +6177 -4318
  168. data/doc/classes/TaskJuggler/UserManual.html +212 -213
  169. data/doc/classes/TaskJuggler/WorkingHours.html +49 -49
  170. data/doc/classes/TaskJuggler/WorkingHoursAttribute.html +53 -53
  171. data/doc/classes/TaskJuggler/XMLBlob.html +21 -21
  172. data/doc/classes/TaskJuggler/XMLComment.html +21 -21
  173. data/doc/classes/TaskJuggler/XMLDocument.html +27 -26
  174. data/doc/classes/TaskJuggler/XMLElement.html +86 -50
  175. data/doc/classes/TaskJuggler/XMLNamedText.html +11 -11
  176. data/doc/classes/TaskJuggler/XMLText.html +36 -36
  177. data/doc/files/COPYING.html +1 -1
  178. data/doc/files/README.html +1 -1
  179. data/doc/files/lib/AccountScenario_rb.html +3 -2
  180. data/doc/files/lib/Account_rb.html +3 -2
  181. data/doc/files/lib/Allocation_rb.html +3 -2
  182. data/doc/files/lib/AppConfig_rb.html +5 -2
  183. data/doc/files/lib/AttributeBase_rb.html +3 -2
  184. data/doc/files/lib/AttributeDefinition_rb.html +3 -2
  185. data/doc/files/lib/Attributes_rb.html +3 -2
  186. data/doc/files/lib/BatchProcessor_rb.html +4 -3
  187. data/doc/files/lib/Booking_rb.html +3 -2
  188. data/doc/files/lib/ChargeSet_rb.html +3 -2
  189. data/doc/files/lib/Charge_rb.html +3 -2
  190. data/doc/files/lib/HTMLDocument_rb.html +3 -2
  191. data/doc/files/lib/Interval_rb.html +3 -2
  192. data/doc/files/lib/Journal_rb.html +4 -3
  193. data/doc/files/lib/KeywordArray_rb.html +3 -2
  194. data/doc/files/lib/KeywordDocumentation_rb.html +3 -2
  195. data/doc/files/lib/Limits_rb.html +3 -2
  196. data/doc/files/lib/Log_rb.html +3 -2
  197. data/doc/files/lib/LogicalExpression_rb.html +3 -2
  198. data/doc/files/lib/LogicalFunction_rb.html +3 -2
  199. data/doc/files/lib/LogicalOperation_rb.html +3 -2
  200. data/doc/files/lib/MacroParser_rb.html +3 -2
  201. data/doc/files/lib/MacroTable_rb.html +3 -2
  202. data/doc/files/lib/MessageHandler_rb.html +3 -2
  203. data/doc/files/lib/Message_rb.html +3 -2
  204. data/doc/files/lib/ProjectFileParser_rb.html +7 -4
  205. data/doc/files/lib/Project_rb.html +3 -2
  206. data/doc/files/lib/PropertyList_rb.html +3 -2
  207. data/doc/files/lib/PropertySet_rb.html +3 -2
  208. data/doc/files/lib/PropertyTreeNode_rb.html +3 -2
  209. data/doc/files/lib/Query_rb.html +3 -2
  210. data/doc/files/lib/{RTPNavigator_rb.html → RTFNavigator_rb.html} +8 -7
  211. data/doc/files/lib/RTFQuery_rb.html +121 -0
  212. data/doc/files/lib/{RTPReport_rb.html → RTFReport_rb.html} +8 -7
  213. data/doc/files/lib/RealFormat_rb.html +3 -2
  214. data/doc/files/lib/RemoteServiceManager_rb.html +117 -0
  215. data/doc/files/lib/ReportServer_rb.html +107 -0
  216. data/doc/files/lib/ResourceScenario_rb.html +3 -2
  217. data/doc/files/lib/Resource_rb.html +3 -2
  218. data/doc/files/lib/RichTextDocument_rb.html +4 -3
  219. data/doc/files/lib/RichTextElement_rb.html +3 -2
  220. data/doc/files/lib/{RichTextProtocolExample_rb.html → RichTextFunctionExample_rb.html} +8 -7
  221. data/doc/files/lib/{RichTextProtocolHandler_rb.html → RichTextFunctionHandler_rb.html} +7 -6
  222. data/doc/files/lib/RichTextParser_rb.html +3 -2
  223. data/doc/files/lib/RichTextScanner_rb.html +3 -2
  224. data/doc/files/lib/RichTextSnip_rb.html +3 -2
  225. data/doc/files/lib/RichTextSyntaxRules_rb.html +3 -2
  226. data/doc/files/lib/RichText_rb.html +3 -2
  227. data/doc/files/lib/ScenarioData_rb.html +3 -2
  228. data/doc/files/lib/Scenario_rb.html +3 -2
  229. data/doc/files/lib/Scoreboard_rb.html +3 -2
  230. data/doc/files/lib/ShiftAssignments_rb.html +3 -2
  231. data/doc/files/lib/ShiftScenario_rb.html +3 -2
  232. data/doc/files/lib/Shift_rb.html +3 -2
  233. data/doc/files/lib/SourceFileInfo_rb.html +3 -2
  234. data/doc/files/lib/SyntaxReference_rb.html +3 -2
  235. data/doc/files/lib/TOCEntry_rb.html +3 -2
  236. data/doc/files/lib/TableColumnDefinition_rb.html +3 -2
  237. data/doc/files/lib/TableOfContents_rb.html +3 -2
  238. data/doc/files/lib/TaskDependency_rb.html +3 -2
  239. data/doc/files/lib/TaskJuggler_rb.html +7 -2
  240. data/doc/files/lib/TaskScenario_rb.html +3 -2
  241. data/doc/files/lib/Task_rb.html +3 -2
  242. data/doc/files/lib/TextParser/Pattern_rb.html +4 -3
  243. data/doc/files/lib/TextParser/Rule_rb.html +4 -3
  244. data/doc/files/lib/TextParser/StackElement_rb.html +4 -3
  245. data/doc/files/lib/TextParser/TokenDoc_rb.html +4 -3
  246. data/doc/files/lib/TextParser_rb.html +3 -2
  247. data/doc/files/lib/TextScanner_rb.html +3 -2
  248. data/doc/files/lib/Tj3Config_rb.html +3 -2
  249. data/doc/files/lib/TjException_rb.html +3 -2
  250. data/doc/files/lib/TjTime_rb.html +3 -2
  251. data/doc/files/lib/TjpExample_rb.html +3 -2
  252. data/doc/files/lib/TjpSyntaxRules_rb.html +3 -2
  253. data/doc/files/lib/UTF8String_rb.html +14 -6
  254. data/doc/files/lib/UserManual_rb.html +6 -3
  255. data/doc/files/lib/WorkingHours_rb.html +3 -2
  256. data/doc/files/lib/XMLDocument_rb.html +3 -2
  257. data/doc/files/lib/XMLElement_rb.html +3 -2
  258. data/doc/files/lib/deep_copy_rb.html +3 -2
  259. data/doc/files/lib/reports/CSVFile_rb.html +3 -2
  260. data/doc/files/lib/reports/ColumnTable_rb.html +3 -2
  261. data/doc/files/lib/reports/GanttChart_rb.html +3 -2
  262. data/doc/files/lib/reports/GanttContainer_rb.html +3 -2
  263. data/doc/files/lib/reports/GanttHeaderScaleItem_rb.html +3 -2
  264. data/doc/files/lib/reports/GanttHeader_rb.html +3 -2
  265. data/doc/files/lib/reports/GanttLine_rb.html +3 -2
  266. data/doc/files/lib/reports/GanttLoadStack_rb.html +3 -2
  267. data/doc/files/lib/reports/GanttMilestone_rb.html +3 -2
  268. data/doc/files/lib/reports/GanttRouter_rb.html +3 -2
  269. data/doc/files/lib/reports/GanttTaskBar_rb.html +3 -2
  270. data/doc/files/lib/reports/HTMLGraphics_rb.html +3 -2
  271. data/doc/files/lib/reports/Navigator_rb.html +3 -2
  272. data/doc/files/lib/reports/ReportBase_rb.html +3 -2
  273. data/doc/files/lib/reports/ReportContext_rb.html +3 -2
  274. data/doc/files/lib/reports/ReportTableCell_rb.html +3 -2
  275. data/doc/files/lib/reports/ReportTableColumn_rb.html +3 -2
  276. data/doc/files/lib/reports/ReportTableLegend_rb.html +3 -2
  277. data/doc/files/lib/reports/ReportTableLine_rb.html +3 -2
  278. data/doc/files/lib/reports/ReportTable_rb.html +3 -2
  279. data/doc/files/lib/reports/Report_rb.html +7 -2
  280. data/doc/files/lib/reports/ResourceListRE_rb.html +3 -2
  281. data/doc/files/lib/reports/TableReport_rb.html +3 -2
  282. data/doc/files/lib/reports/TaskListRE_rb.html +3 -2
  283. data/doc/files/lib/reports/TextReport_rb.html +4 -3
  284. data/doc/files/lib/reports/TimeSheetReport_rb.html +117 -0
  285. data/doc/files/lib/reports/TjpExportRE_rb.html +3 -2
  286. data/doc/files/lib/taskjuggler3_rb.html +94 -77
  287. data/doc/files/lib/tj3client_rb.html +280 -0
  288. data/doc/files/lib/tj3man_rb.html +10 -9
  289. data/doc/fr_class_index.html +27 -5
  290. data/doc/fr_file_index.html +15 -7
  291. data/doc/fr_method_index.html +1312 -1020
  292. data/examples/tutorial.tjp +113 -14
  293. data/gem_spec.rb +2 -1
  294. data/lib/Account.rb +1 -1
  295. data/lib/AccountScenario.rb +1 -1
  296. data/lib/Allocation.rb +1 -1
  297. data/lib/AppConfig.rb +23 -10
  298. data/lib/AttributeBase.rb +34 -6
  299. data/lib/AttributeDefinition.rb +1 -1
  300. data/lib/Attributes.rb +51 -16
  301. data/lib/BatchProcessor.rb +204 -77
  302. data/lib/Booking.rb +1 -1
  303. data/lib/Charge.rb +1 -1
  304. data/lib/ChargeSet.rb +1 -1
  305. data/lib/HTMLDocument.rb +2 -2
  306. data/lib/Interval.rb +1 -1
  307. data/lib/Journal.rb +231 -9
  308. data/lib/KeywordArray.rb +1 -1
  309. data/lib/KeywordDocumentation.rb +6 -4
  310. data/lib/Limits.rb +1 -1
  311. data/lib/Log.rb +8 -1
  312. data/lib/LogicalExpression.rb +14 -13
  313. data/lib/LogicalFunction.rb +88 -14
  314. data/lib/LogicalOperation.rb +124 -53
  315. data/lib/MacroParser.rb +1 -1
  316. data/lib/MacroTable.rb +2 -2
  317. data/lib/Message.rb +1 -1
  318. data/lib/MessageHandler.rb +7 -3
  319. data/lib/Project.rb +93 -14
  320. data/lib/ProjectFileParser.rb +30 -15
  321. data/lib/PropertyList.rb +103 -36
  322. data/lib/PropertySet.rb +22 -10
  323. data/lib/PropertyTreeNode.rb +120 -15
  324. data/lib/Query.rb +119 -48
  325. data/lib/{RTPNavigator.rb → RTFNavigator.rb} +11 -10
  326. data/lib/RTFQuery.rb +166 -0
  327. data/lib/{RTPReport.rb → RTFReport.rb} +11 -8
  328. data/lib/RealFormat.rb +1 -1
  329. data/lib/RemoteServiceManager.rb +80 -0
  330. data/lib/ReportServer.rb +66 -0
  331. data/lib/Resource.rb +1 -1
  332. data/lib/ResourceScenario.rb +48 -19
  333. data/lib/RichText.rb +98 -41
  334. data/lib/RichTextDocument.rb +10 -8
  335. data/lib/RichTextElement.rb +72 -28
  336. data/lib/{RichTextProtocolExample.rb → RichTextFunctionExample.rb} +8 -7
  337. data/lib/{RichTextProtocolHandler.rb → RichTextFunctionHandler.rb} +12 -14
  338. data/lib/RichTextParser.rb +6 -3
  339. data/lib/RichTextScanner.rb +91 -19
  340. data/lib/RichTextSnip.rb +8 -3
  341. data/lib/RichTextSyntaxRules.rb +103 -45
  342. data/lib/Scenario.rb +1 -1
  343. data/lib/ScenarioData.rb +2 -2
  344. data/lib/Scoreboard.rb +1 -1
  345. data/lib/Shift.rb +1 -1
  346. data/lib/ShiftAssignments.rb +1 -1
  347. data/lib/ShiftScenario.rb +1 -1
  348. data/lib/SourceFileInfo.rb +1 -1
  349. data/lib/SyntaxReference.rb +2 -2
  350. data/lib/TOCEntry.rb +1 -1
  351. data/lib/TableColumnDefinition.rb +59 -16
  352. data/lib/TableOfContents.rb +1 -1
  353. data/lib/Task.rb +1 -1
  354. data/lib/TaskDependency.rb +1 -1
  355. data/lib/TaskJuggler.rb +31 -8
  356. data/lib/TaskScenario.rb +165 -16
  357. data/lib/TextParser.rb +36 -22
  358. data/lib/TextParser/Pattern.rb +3 -3
  359. data/lib/TextParser/Rule.rb +2 -2
  360. data/lib/TextParser/StackElement.rb +4 -3
  361. data/lib/TextParser/TokenDoc.rb +2 -2
  362. data/lib/TextScanner.rb +52 -37
  363. data/lib/Tj3Config.rb +6 -5
  364. data/lib/TjException.rb +1 -1
  365. data/lib/TjTime.rb +12 -3
  366. data/lib/TjpExample.rb +1 -1
  367. data/lib/TjpSyntaxRules.rb +1044 -150
  368. data/lib/UTF8String.rb +2 -1
  369. data/lib/UserManual.rb +18 -70
  370. data/lib/WorkingHours.rb +3 -3
  371. data/lib/XMLDocument.rb +3 -2
  372. data/lib/XMLElement.rb +6 -1
  373. data/lib/deep_copy.rb +1 -1
  374. data/lib/reports/CSVFile.rb +1 -1
  375. data/lib/reports/ColumnTable.rb +9 -9
  376. data/lib/reports/GanttChart.rb +1 -1
  377. data/lib/reports/GanttContainer.rb +1 -1
  378. data/lib/reports/GanttHeader.rb +1 -1
  379. data/lib/reports/GanttHeaderScaleItem.rb +1 -1
  380. data/lib/reports/GanttLine.rb +40 -40
  381. data/lib/reports/GanttLoadStack.rb +1 -1
  382. data/lib/reports/GanttMilestone.rb +1 -1
  383. data/lib/reports/GanttRouter.rb +1 -1
  384. data/lib/reports/GanttTaskBar.rb +1 -1
  385. data/lib/reports/HTMLGraphics.rb +1 -1
  386. data/lib/reports/Navigator.rb +149 -22
  387. data/lib/reports/Report.rb +115 -172
  388. data/lib/reports/ReportBase.rb +22 -27
  389. data/lib/reports/ReportContext.rb +29 -15
  390. data/lib/reports/ReportTable.rb +1 -1
  391. data/lib/reports/ReportTableCell.rb +120 -27
  392. data/lib/reports/ReportTableColumn.rb +3 -3
  393. data/lib/reports/ReportTableLegend.rb +1 -1
  394. data/lib/reports/ReportTableLine.rb +10 -2
  395. data/lib/reports/ResourceListRE.rb +5 -1
  396. data/lib/reports/TableReport.rb +237 -287
  397. data/lib/reports/TaskListRE.rb +5 -1
  398. data/lib/reports/TextReport.rb +7 -4
  399. data/lib/reports/TimeSheetReport.rb +233 -0
  400. data/lib/reports/TjpExportRE.rb +2 -2
  401. data/lib/taskjuggler3.rb +27 -11
  402. data/lib/tj3client.rb +110 -0
  403. data/lib/tj3man.rb +4 -4
  404. data/manual/Getting_Started +0 -50
  405. data/manual/How_To_Contribute +6 -13
  406. data/manual/Installation +102 -28
  407. data/manual/Intro +11 -1
  408. data/manual/Reporting_Bugs +23 -7
  409. data/manual/Rich_Text_Attributes +59 -6
  410. data/manual/TaskJuggler_2x_Migration +27 -0
  411. data/manual/The_TaskJuggler_Syntax +104 -0
  412. data/manual/Tutorial +10 -9
  413. data/prj_cfg.rb +8 -2
  414. data/tasks/csts.rake +1 -1
  415. data/tasks/manual.rake +5 -3
  416. data/test/MessageChecker.rb +1 -1
  417. data/test/TestSuite/HTML-Reports/Alerts.html +172 -0
  418. data/test/TestSuite/HTML-Reports/Alerts.tjp +77 -0
  419. data/test/TestSuite/HTML-Reports/CellText.html +758 -0
  420. data/test/TestSuite/HTML-Reports/CellText.tjp +75 -0
  421. data/test/TestSuite/HTML-Reports/ColumnPeriods.html +156 -0
  422. data/test/TestSuite/HTML-Reports/ColumnPeriods.tjp +44 -0
  423. data/test/TestSuite/HTML-Reports/IsOngoing.html +172 -0
  424. data/test/TestSuite/HTML-Reports/IsOngoing.tjp +34 -0
  425. data/test/TestSuite/HTML-Reports/LogicalFunctions.html +80 -0
  426. data/test/TestSuite/HTML-Reports/LogicalFunctions.tjp +20 -0
  427. data/test/TestSuite/HTML-Reports/Query.html +31 -0
  428. data/test/TestSuite/HTML-Reports/Query.tjp +28 -0
  429. data/test/TestSuite/HTML-Reports/Sorting.tjp +68 -0
  430. data/test/TestSuite/HTML-Reports/TimeSheet.tjp +69 -0
  431. data/test/TestSuite/HTML-Reports/UDAQuery.tjp +27 -0
  432. data/test/TestSuite/HTML-Reports/css/tjmanual.css +52 -0
  433. data/test/TestSuite/HTML-Reports/css/tjreport.css +195 -0
  434. data/test/TestSuite/HTML-Reports/depArrows.html +842 -0
  435. data/test/TestSuite/HTML-Reports/icons/details.png +0 -0
  436. data/test/TestSuite/HTML-Reports/icons/flag-green.png +0 -0
  437. data/test/TestSuite/HTML-Reports/icons/flag-red.png +0 -0
  438. data/test/TestSuite/HTML-Reports/icons/flag-yellow.png +0 -0
  439. data/test/TestSuite/HTML-Reports/icons/resource.png +0 -0
  440. data/test/TestSuite/HTML-Reports/icons/resourcegroup.png +0 -0
  441. data/test/TestSuite/HTML-Reports/icons/task.png +0 -0
  442. data/test/TestSuite/HTML-Reports/icons/taskgroup.png +0 -0
  443. data/test/TestSuite/HTML-Reports/reference.tjp +7 -8
  444. data/test/TestSuite/HTML-Reports/scripts/scripts/wz_tooltip.js +1301 -0
  445. data/test/TestSuite/HTML-Reports/scripts/wz_tooltip.js +1301 -0
  446. data/test/TestSuite/Scheduler/Correct/Mandatory.tjp +34 -0
  447. data/test/TestSuite/Syntax/Correct/Celltext.tjp +2 -1
  448. data/test/TestSuite/Syntax/Correct/Journal.tjp +2 -2
  449. data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +2 -1
  450. data/test/TestSuite/Syntax/Correct/LogicalFunction.tjp +20 -0
  451. data/test/TestSuite/Syntax/Correct/Query.tjp +18 -0
  452. data/test/TestSuite/Syntax/Correct/StatusSheet.tjp +45 -0
  453. data/test/TestSuite/Syntax/Correct/TimeSheet.tjp +49 -0
  454. data/test/TestSuite/Syntax/Correct/icons/details.png +0 -0
  455. data/test/TestSuite/Syntax/Correct/icons/flag-green.png +0 -0
  456. data/test/TestSuite/Syntax/Correct/icons/flag-red.png +0 -0
  457. data/test/TestSuite/Syntax/Correct/icons/flag-yellow.png +0 -0
  458. data/test/TestSuite/Syntax/Correct/icons/resource.png +0 -0
  459. data/test/TestSuite/Syntax/Correct/icons/resourcegroup.png +0 -0
  460. data/test/TestSuite/Syntax/Correct/icons/task.png +0 -0
  461. data/test/TestSuite/Syntax/Correct/icons/taskgroup.png +0 -0
  462. data/test/TestSuite/Syntax/Correct/scripts/wz_tooltip.js +1301 -0
  463. data/test/TestSuite/Syntax/Correct/tutorial.tjp +113 -14
  464. data/test/TestSuite/Syntax/Errors/macro_stack_overflow.tjp +28 -0
  465. data/test/TestSuite/Syntax/Errors/unsupported_token.tjp +12 -0
  466. data/test/all.rb +2 -2
  467. data/test/test_BatchProcessor.rb +42 -13
  468. data/test/test_CSV-Reports.rb +1 -1
  469. data/test/test_Journal.rb +176 -0
  470. data/test/test_Limits.rb +1 -1
  471. data/test/test_LogicalExpression.rb +14 -5
  472. data/test/test_MacroTable.rb +1 -1
  473. data/test/test_Project.rb +1 -1
  474. data/test/test_PropertySet.rb +1 -1
  475. data/test/test_Query.rb +1 -1
  476. data/test/test_RealFormat.rb +1 -1
  477. data/test/test_RichText.rb +30 -20
  478. data/test/test_Scheduler.rb +1 -1
  479. data/test/test_ShiftAssignments.rb +2 -2
  480. data/test/test_Syntax.rb +1 -1
  481. data/test/test_TextScanner.rb +1 -1
  482. data/test/test_TjTime.rb +1 -1
  483. data/test/test_TjpExample.rb +1 -1
  484. data/test/test_UTF8String.rb +1 -1
  485. data/test/test_WorkingHours.rb +1 -1
  486. data/test/test_deep_copy.rb +2 -2
  487. metadata +610 -532
  488. data/doc/files/lib/ms_test_rb.html +0 -90
  489. data/examples/ContactList.html +0 -1467
  490. data/examples/Deliveries.html +0 -485
  491. data/examples/Development.html +0 -2525
  492. data/examples/Overview.html +0 -747
  493. data/examples/Resource Graph.html +0 -616
  494. data/lib/ms_test.rb +0 -27
  495. data/test/TestSuite/HTML-Reports/reference-export.html +0 -187
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = ResourceListRE.rb -- The TaskJuggler III Project Management Software
5
5
  #
6
- # Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
6
+ # Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
7
7
  #
8
8
  # This program is free software; you can redistribute it and/or modify
9
9
  # it under the terms of version 2 of the GNU General Public License as
@@ -30,6 +30,8 @@ class TaskJuggler
30
30
 
31
31
  # Generate the table in the intermediate format.
32
32
  def generateIntermediateFormat
33
+ super
34
+
33
35
  setReportPeriod
34
36
 
35
37
  # Prepare the resource list.
@@ -38,6 +40,7 @@ class TaskJuggler
38
40
  resourceList = filterResourceList(resourceList, nil,
39
41
  @report.get('hideResource'),
40
42
  @report.get('rollupResource'))
43
+ resourceList.query = @report.project.reportContext.query
41
44
  resourceList.sort!
42
45
 
43
46
  # Prepare the task list.
@@ -45,6 +48,7 @@ class TaskJuggler
45
48
  taskList.setSorting(@report.get('sortTasks'))
46
49
  taskList = filterTaskList(taskList, nil, @report.get('hideTask'),
47
50
  @report.get('rollupTask'))
51
+ taskList.query = @report.project.reportContext.query
48
52
  taskList.sort!
49
53
 
50
54
  adjustReportPeriod(taskList, @report.get('scenarios'),
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = TableReport.rb -- The TaskJuggler III Project Management Software
5
5
  #
6
- # Copyright (c) 2006, 2007, 2008, 2009 by Chris Schlaeger <cs@kde.org>
6
+ # Copyright (c) 2006, 2007, 2008, 2009, 2010 by Chris Schlaeger <cs@kde.org>
7
7
  #
8
8
  # This program is free software; you can redistribute it and/or modify
9
9
  # it under the terms of version 2 of the GNU General Public License as
@@ -26,20 +26,30 @@ class TaskJuggler
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 ]
29
+ # ID Header Indent Align Scen Spec.
30
+ 'alert' => [ 'Alert', true, :left, false ],
31
+ 'alertmessage' => [ 'Alert Message', false, :left, false ],
32
+ 'alertsummary' => [ 'Alert Summary', false, :left, false ],
33
+ 'alerttrend' => [ 'Alert Trend', false, :left, false ],
34
+ 'complete' => [ 'Completion', false, :right, true ],
35
+ 'cost' => [ 'Cost', true, :right, true ],
36
+ 'duration' => [ 'Duration', true, :right, true ],
37
+ 'effort' => [ 'Effort', true, :right, true ],
38
+ 'effortdone' => [ 'Effort Done', true, :right, true ],
39
+ 'effortleft' => [ 'Effort Left', true, :right, true ],
40
+ 'freetime' => [ 'Free Time', true, :right, true ],
41
+ 'id' => [ 'Id', false, :left, false ],
42
+ 'line' => [ 'Line No.', false, :right, false ],
43
+ 'name' => [ 'Name', true, :left, false ],
44
+ 'no' => [ 'No.', false, :right, false ],
45
+ 'rate' => [ 'Rate', true, :right, true ],
46
+ 'resources' => [ 'Resources', false, :left, true ],
47
+ 'responsible' => [ 'Responsible', false, :left, true ],
48
+ 'revenue' => [ 'Revenue', true, :right, true ],
49
+ 'scenario' => [ 'Scenario', false, :left, true ],
50
+ 'status' => [ 'Status', false, :left, true ],
51
+ 'targets' => [ 'Targets', false, :left, true ],
52
+ 'wbs' => [ 'WBS', false, :left, false ]
43
53
  }
44
54
  @@propertiesByType = {
45
55
  # Type Indent Align
@@ -62,6 +72,11 @@ class TaskJuggler
62
72
 
63
73
  end
64
74
 
75
+ def generateIntermediateFormat
76
+ super
77
+ end
78
+
79
+
65
80
 
66
81
  # Turn the TableReport into an equivalent HTML element tree.
67
82
  def to_html
@@ -71,7 +86,7 @@ class TaskJuggler
71
86
  html << (table = XMLElement.new('table', 'summary' => 'Report Table',
72
87
  'cellspacing' => '2', 'border' => '0',
73
88
  'cellpadding' => '0', 'align' => 'center',
74
- 'class' => 'tabback'))
89
+ 'class' => 'tjtable'))
75
90
 
76
91
  # The headline is put in a sub-table to appear bigger.
77
92
  if a('headline')
@@ -85,9 +100,10 @@ class TaskJuggler
85
100
  table1 << (tr1 = XMLElement.new('tr'))
86
101
  tr1 << (td1 = XMLElement.new('td', 'align' => 'center',
87
102
  'style' => 'font-size:16px; ' +
88
- 'font-weight:bold',
103
+ 'font-weight:bold; ' +
104
+ 'padding:5px',
89
105
  'class' => 'tabfront'))
90
- td1 << XMLNamedText.new(a('headline'), 'p')
106
+ td1 << a('headline').to_html
91
107
  end
92
108
 
93
109
  # Now generate the actual table with the data.
@@ -112,18 +128,6 @@ class TaskJuggler
112
128
  'padding-left:1px; padding-right:1px;'))
113
129
  td << @legend.to_html
114
130
 
115
- # The footer with some administrative information.
116
- tbody << (tr = XMLElement.new('tr', 'style' => 'font-size:9px'))
117
- tr << (td = XMLElement.new('td', 'class' => 'tabfooter'))
118
- td << XMLText.new(@project['copyright'] + " - ") if @project['copyright']
119
- td << XMLText.new("Project: #{@project['name']} " +
120
- "Version: #{@project['version']} - " +
121
- "Created on #{TjTime.now.to_s("%Y-%m-%d %H:%M:%S")} " +
122
- "with ")
123
- td << XMLNamedText.new("#{AppConfig.packageName}", 'a',
124
- 'href' => "#{AppConfig.contact}")
125
- td << XMLText.new(" v#{AppConfig.version}")
126
-
127
131
  html << rt_to_html('footer')
128
132
  html
129
133
  end
@@ -134,49 +138,15 @@ class TaskJuggler
134
138
  @table.to_csv
135
139
  end
136
140
 
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
141
+ # Returns the default column title for the columns _id_.
142
+ def TableReport::defaultColumnTitle(id)
143
+ # Return an empty string for some special columns that don't have a fixed
144
+ # title.
145
+ specials = %w( chart hourly daily weekly monthly quarterly yearly)
146
+ return '' if specials.include?(id)
172
147
 
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
148
+ # Return the title for build-in hardwired columns.
149
+ @@propertiesById.include?(id) ? @@propertiesById[id][0] : nil
180
150
  end
181
151
 
182
152
  # Return if the column values should be indented based on the _colId_ or the
@@ -203,15 +173,19 @@ class TaskJuggler
203
173
  end
204
174
  end
205
175
 
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)
176
+ # This function returns true if the values for the _colId_ column need to be
177
+ # calculated.
178
+ def calculated?(colId)
179
+ return @@propertiesById.has_key?(colId)
180
+ end
212
181
 
213
- # Return the title for build-in hardwired columns.
214
- @@propertiesById.include?(id) ? @@propertiesById[id][0] : nil
182
+ # This functions returns true if the values for the _col_id_ column are
183
+ # scenario specific.
184
+ def scenarioSpecific?(colId)
185
+ if @@propertiesById.has_key?(colId)
186
+ return @@propertiesById[colId][3]
187
+ end
188
+ return false
215
189
  end
216
190
 
217
191
  def supportedColumns
@@ -250,7 +224,6 @@ class TaskJuggler
250
224
  case column.id
251
225
  when 'chart'
252
226
  # In case we have a 'chart' column, we enforce certain minimum width
253
- # of the chart. The width depends on the selected scale.
254
227
  # The following table contains an entry for each scale. The entry
255
228
  # consists of the triple 'seconds per unit', 'minimum width units'
256
229
  # and 'margin units'. The minimum with does not include the margins
@@ -314,7 +287,7 @@ class TaskJuggler
314
287
  # The maximum width of the chart. In case it needs more space, a
315
288
  # scrollbar is shown or the chart gets truncated depending on the output
316
289
  # format.
317
- gantt.viewWidth = columnDef.width
290
+ gantt.viewWidth = columnDef.width ? columnDef.width : 450
318
291
  column = ReportTableColumn.new(@table, columnDef, '')
319
292
  column.cell1.special = gantt
320
293
  column.cell2.hidden = true
@@ -355,9 +328,11 @@ class TaskJuggler
355
328
  # is defined, the generated task lines will be within the scope this resource
356
329
  # line.
357
330
  def generateTaskList(taskList, resourceList, scopeLine)
358
- queryAttrs = { 'scopeProperty' => scopeLine ? scopeLine.property : nil,
331
+ queryAttrs = { 'project' => @project,
332
+ 'scopeProperty' => scopeLine ? scopeLine.property : nil,
359
333
  'loadUnit' => a('loadUnit'),
360
334
  'numberFormat' => a('numberFormat'),
335
+ 'timeFormat' => a('timeFormat'),
361
336
  'currencyFormat' => a('currencyFormat'),
362
337
  'start' => @start, 'end' => @end,
363
338
  'costAccount' => a('costAccount'),
@@ -372,10 +347,17 @@ class TaskJuggler
372
347
  # Init the variable to get a larger scope
373
348
  line = nil
374
349
  taskList.each do |task|
350
+ # Get the current Query from the report context and create a copy. We
351
+ # are going to modify it.
352
+ query = @project.reportContext.query.dup
353
+ query.property = task
354
+ query.scopeProperty = scopeLine ? scopeLine.property : nil
355
+
375
356
  no += 1
376
357
  Log.activity if lineNo % 10 == 0
377
358
  lineNo += 1
378
359
  a('scenarios').each do |scenarioIdx|
360
+ query.scenarioIdx = scenarioIdx
379
361
  # Generate line for each task.
380
362
  line = ReportTableLine.new(@table, task, scopeLine)
381
363
 
@@ -386,7 +368,8 @@ class TaskJuggler
386
368
 
387
369
  # Generate a cell for each column in this line.
388
370
  a('columns').each do |columnDef|
389
- next unless generateTableCell(line, task, columnDef, scenarioIdx)
371
+ query.attributeId = columnDef.id
372
+ next unless generateTableCell(line, task, columnDef, query)
390
373
  end
391
374
  end
392
375
 
@@ -409,9 +392,11 @@ class TaskJuggler
409
392
  # each task that the resource is assigned to. If _scopeLine_ is defined, the
410
393
  # generated resource lines will be within the scope this task line.
411
394
  def generateResourceList(resourceList, taskList, scopeLine)
412
- queryAttrs = { 'scopeProperty' => scopeLine ? scopeLine.property : nil,
395
+ queryAttrs = { 'project' => @project,
396
+ 'scopeProperty' => scopeLine ? scopeLine.property : nil,
413
397
  'loadUnit' => a('loadUnit'),
414
398
  'numberFormat' => a('numberFormat'),
399
+ 'timeFormat' => a('timeFormat'),
415
400
  'currencyFormat' => a('currencyFormat'),
416
401
  'start' => @start, 'end' => @end,
417
402
  'costAccount' => a('costAccount'),
@@ -426,10 +411,17 @@ class TaskJuggler
426
411
  # Init the variable to get a larger scope
427
412
  line = nil
428
413
  resourceList.each do |resource|
414
+ # Get the current Query from the report context and create a copy. We
415
+ # are going to modify it.
416
+ query = @project.reportContext.query.dup
417
+ query.property = resource
418
+ query.scopeProperty = scopeLine ? scopeLine.property : nil
419
+
429
420
  no += 1
430
421
  Log.activity if lineNo % 10 == 0
431
422
  lineNo += 1
432
423
  a('scenarios').each do |scenarioIdx|
424
+ query.scenarioIdx = scenarioIdx
433
425
  # Generate line for each resource.
434
426
  line = ReportTableLine.new(@table, resource, scopeLine)
435
427
 
@@ -440,7 +432,8 @@ class TaskJuggler
440
432
 
441
433
  # Generate a cell for each column in this line.
442
434
  a('columns').each do |column|
443
- next unless generateTableCell(line, resource, column, scenarioIdx)
435
+ query.attributeId = column.id
436
+ next unless generateTableCell(line, resource, column, query)
444
437
  end
445
438
  end
446
439
 
@@ -481,7 +474,7 @@ class TaskJuggler
481
474
  tableColumn.cell1.special = table = ColumnTable.new
482
475
  table.equiLines = true
483
476
  tableColumn.cell2.hidden = true
484
- table.maxWidth = columnDef.width
477
+ table.viewWidth = columnDef.width ? columnDef.width : 450
485
478
 
486
479
  # Iterate over the report interval until we hit the end date. The
487
480
  # iteration is done with 2 nested loops. The outer loops generates the
@@ -541,20 +534,28 @@ class TaskJuggler
541
534
  # columns. In such a case many cells are generated with a single call of
542
535
  # this method. The last kind of cell is actually not a cell. It just
543
536
  # generates the chart objects that belong to the property in this line.
544
- def generateTableCell(line, property, columnDef, scenarioIdx)
537
+ def generateTableCell(line, property, columnDef, query)
538
+ if columnDef.start || columnDef.end
539
+ # If the user has specified a new start or end time for this column,
540
+ # we have to duplicate the query before we modify it.
541
+ query = query.dup
542
+ query.start = columnDef.start if columnDef.start
543
+ query.end = columnDef.end if columnDef.end
544
+ end
545
+
545
546
  case columnDef.id
546
547
  when 'chart'
547
548
  # Generate a hidden cell. The real meat is in the actual chart object,
548
549
  # not in this cell.
549
- cell = ReportTableCell.new(line)
550
+ cell = ReportTableCell.new(line, query, '')
550
551
  cell.hidden = true
551
552
  cell.text = nil
552
553
  # The GanttChart can be reached via the special variable of the column
553
554
  # header.
554
555
  chart = columnDef.column.cell1.special
555
- GanttLine.new(chart, property,
556
- line.scopeLine ? line.scopeLine.property : nil,
557
- scenarioIdx, (line.subLineNo - 1) * (line.height + 1),
556
+ GanttLine.new(chart, property, line.scopeProperty,
557
+ query.scenarioIdx,
558
+ (line.subLineNo - 1) * (line.height + 1),
558
559
  line.height)
559
560
  return true
560
561
  # The calendar cells can be all generated by the same function. But we
@@ -579,10 +580,9 @@ class TaskJuggler
579
580
  sameTimeNextFunc = :sameTimeNextYear
580
581
  else
581
582
  if calculated?(columnDef.id)
582
- genCalculatedCell(scenarioIdx, line, columnDef, property)
583
- return true
583
+ return genCalculatedCell(query, line, columnDef, property)
584
584
  else
585
- return genStandardCell(scenarioIdx, line, columnDef)
585
+ return genStandardCell(query, line, columnDef)
586
586
  end
587
587
  end
588
588
 
@@ -594,10 +594,9 @@ class TaskJuggler
594
594
 
595
595
  # Depending on the property type we use different generator functions.
596
596
  if property.is_a?(Task)
597
- genCalChartTaskCell(scenarioIdx, tcLine, columnDef, start,
598
- sameTimeNextFunc)
597
+ genCalChartTaskCell(query, tcLine, columnDef, start, sameTimeNextFunc)
599
598
  elsif property.is_a?(Resource)
600
- genCalChartResourceCell(scenarioIdx, tcLine, columnDef, start,
599
+ genCalChartResourceCell(query, tcLine, columnDef, start,
601
600
  sameTimeNextFunc)
602
601
  else
603
602
  raise "Unknown property type #{property.class}"
@@ -608,10 +607,9 @@ class TaskJuggler
608
607
  # Generate a ReportTableCell filled the value of an attribute of the
609
608
  # property that line is for. It returns true if the cell exists, false for a
610
609
  # hidden cell.
611
- def genStandardCell(scenarioIdx, line, columnDef)
612
- property = line.property
613
-
610
+ def genStandardCell(query, line, columnDef)
614
611
  # Find out, what type of PropertyTreeNode we are dealing with.
612
+ property = line.property
615
613
  if property.is_a?(Task)
616
614
  propertyList = @project.tasks
617
615
  elsif property.is_a?(Resource)
@@ -619,118 +617,122 @@ class TaskJuggler
619
617
  else
620
618
  raise "Unknown property type #{property.class}"
621
619
  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
620
 
632
621
  # Create a new cell
633
- cell = newCell(line, cellText(value, type))
634
- if type == ReferenceAttribute
635
- cell.url = value.url
636
- end
622
+ cell = newCell(query, line)
637
623
 
638
- # Check if we are dealing with multiple scenarios.
639
- if a('scenarios').length > 1
640
- # Check if the attribute is not scenario specific
641
- unless propertyList.scenarioSpecific?(columnDef.id)
642
- if scenarioIdx == a('scenarios').first
643
- # Use a somewhat bigger font.
644
- cell.fontSize = 15
645
- else
646
- # And hide the cells for all but the first scenario.
647
- cell.hidden = true
648
- return false
649
- end
650
- cell.rows = a('scenarios').length
651
- end
624
+ unless setScenarioSettings(cell, query.scenarioIdx,
625
+ propertyList.scenarioSpecific?(columnDef.id))
626
+ return false
652
627
  end
653
628
 
654
629
  setStandardCellAttributes(cell, columnDef,
655
630
  propertyList.attributeType(columnDef.id), line)
656
631
 
657
- scopeProperty = line.scopeLine ? line.scopeLine.property : nil
658
- query = Query.new('property' => property,
659
- 'scopeProperty' => scopeProperty,
660
- 'attributeId' => columnDef.id,
661
- 'scenarioIdx' => scenarioIdx,
662
- 'loadUnit' => a('loadUnit'),
663
- 'numberFormat' => a('numberFormat'),
664
- 'currencyFormat' => a('currencyFormat'),
665
- 'start' => @start, 'end' => @end,
666
- 'costAccount' => a('costAccount'),
667
- 'revenueAccount' => a('revenueAccount'))
668
- if cell.text
669
- if columnDef.cellText
670
- cell.text = expandMacros(columnDef.cellText, cell.text, query)
671
- end
672
- else
673
- cell.text = '<Error>'
674
- cell.fontColor = 0xFF0000
632
+ # If the user has requested a custom cell text, this will be used
633
+ # instead of the queried one.
634
+ if (cdText = columnDef.cellText.getPattern(query))
635
+ cell.text = cdText
636
+ elsif query.process
637
+ cell.text = (rti = query.to_rti) ? rti : query.to_s
675
638
  end
676
639
 
677
- setCellURL(cell, columnDef, query)
640
+ # Replace the font color setting if the user has requested a custom
641
+ # color.
642
+ fontColor = columnDef.fontColor.getPattern(query)
643
+ cell.fontColor = fontColor if fontColor
644
+
645
+ # Replace the cell background color if the user has requested a custom
646
+ # color.
647
+ cellColor = columnDef.cellColor.getPattern(query)
648
+ cell.cellColor = cellColor if cellColor
649
+
650
+ # If the user has requested a custom tooltip, add it to the cell.
651
+ cell.tooltip = columnDef.tooltip.getPattern(query) || nil
652
+
653
+ checkCellText(cell)
654
+
678
655
  true
679
656
  end
680
657
 
681
658
  # Generate a ReportTableCell filled with a calculted value from the property
682
659
  # or other sources of information. It returns true if the cell exists, false
683
- # for a hidden cell. _scenarioIdx_ is the index of the reported scenario.
684
- # _line_ is the ReportTableLine of the cell. _columnDef_ is the
660
+ # for a hidden cell. _query_ is the Query to get the cell value. _line_
661
+ # is the ReportTableLine of the cell. _columnDef_ is the
685
662
  # TableColumnDefinition of the column. _property_ is the PropertyTreeNode
686
663
  # that is reported in this cell.
687
- def genCalculatedCell(scenarioIdx, line, columnDef, property)
664
+ def genCalculatedCell(query, line, columnDef, property)
688
665
  # Create a new cell
689
- cell = newCell(line)
666
+ cell = newCell(query, line)
690
667
 
691
- unless scenarioSpecific?(columnDef.id)
692
- if scenarioIdx != a('scenarios').first
693
- cell.hidden = true
694
- return false
695
- end
696
- cell.rows = a('scenarios').length
668
+ unless setScenarioSettings(cell, query.scenarioIdx,
669
+ scenarioSpecific?(columnDef.id))
670
+ return false
697
671
  end
698
672
 
699
673
  setStandardCellAttributes(cell, columnDef, nil, line)
700
674
 
701
- scopeProperty = line.scopeLine ? line.scopeLine.property : nil
702
- return if columnDef.hideCellText &&
703
- columnDef.hideCellText.eval(property, scopeProperty)
704
-
705
- query = Query.new('property' => property,
706
- 'scopeProperty' => scopeProperty,
707
- 'attributeId' => columnDef.id,
708
- 'scenarioIdx' => scenarioIdx,
709
- 'loadUnit' => a('loadUnit'),
710
- 'numberFormat' => a('numberFormat'),
711
- 'currencyFormat' => a('currencyFormat'),
712
- 'start' => @start, 'end' => @end,
713
- 'costAccount' => a('costAccount'),
714
- 'revenueAccount' => a('revenueAccount'))
715
- query.process
716
- cell.text = query.result
675
+ if query.process
676
+ cell.text = (rti = query.to_rti) ? rti : query.to_s
677
+ end
717
678
 
718
679
  # Some columns need some extra care.
719
680
  case columnDef.id
681
+ when 'alert'
682
+ id = @project.alertLevelId(query.to_num)
683
+ cell.icon = "flag-#{id}"
684
+ cell.fontColor = @project.alertLevelColor(query.to_sort)
685
+ when 'alerttrend'
686
+ icons = %w( up flat down )
687
+ cell.icon = "trend-#{icons[query.to_sort]}"
720
688
  when 'line'
721
689
  cell.text = line.lineNo.to_s
690
+ when 'name'
691
+ cell.icon =
692
+ if property.is_a?(Task)
693
+ if property.container?
694
+ 'taskgroup'
695
+ else
696
+ 'task'
697
+ end
698
+ elsif property.is_a?(Resource)
699
+ if property.container?
700
+ 'resourcegroup'
701
+ else
702
+ 'resource'
703
+ end
704
+ else
705
+ nil
706
+ end
722
707
  when 'no'
723
708
  cell.text = line.no.to_s
724
709
  when 'wbs'
725
710
  cell.indent = 2 if line.scopeLine
726
711
  when 'scenario'
727
- cell.text = @project.scenario(scenarioIdx).name
712
+ cell.text = @project.scenario(query.scenarioIdx).name
728
713
  end
729
714
 
730
- if columnDef.cellText
731
- cell.text = expandMacros(columnDef.cellText, cell.text, query)
732
- end
733
- setCellURL(cell, columnDef, query)
715
+ # Replace the cell text if the user has requested a custom cell text.
716
+ cdText = columnDef.cellText.getPattern(query)
717
+ cell.text = cdText if cdText
718
+
719
+ # Replace the cell background color if the user has requested a custom
720
+ # color.
721
+ cellColor = columnDef.cellColor.getPattern(query)
722
+ cell.cellColor = cellColor if cellColor
723
+
724
+ # Replace the font color setting if the user has requested a custom
725
+ # color.
726
+ fontColor = columnDef.fontColor.getPattern(query)
727
+ cell.fontColor = fontColor if fontColor
728
+
729
+ # Register the custom tooltip if the user has requested one.
730
+ cdTooltip = columnDef.tooltip.getPattern(query)
731
+ cell.tooltip = cdTooltip if cdTooltip
732
+
733
+ checkCellText(cell)
734
+
735
+ true
734
736
  end
735
737
 
736
738
  # Generate the cells for the task lines of a calendar column. These lines do
@@ -740,7 +742,7 @@ class TaskJuggler
740
742
  # in this line. _line_ is the @table line. _t_ is the start date for the
741
743
  # calendar. _sameTimeNextFunc_ is the function that will move the date to
742
744
  # the next cell.
743
- def genCalChartTaskCell(scenarioIdx, line, columnDef, t, sameTimeNextFunc)
745
+ def genCalChartTaskCell(query, line, columnDef, t, sameTimeNextFunc)
744
746
  task = line.property
745
747
  # Find out if we have an enclosing resource scope.
746
748
  if line.scopeLine && line.scopeLine.property.is_a?(Resource)
@@ -751,23 +753,15 @@ class TaskJuggler
751
753
 
752
754
  # Get the interval of the task. In case a date is invalid due to a
753
755
  # scheduling problem, we use the full project interval.
754
- taskIv = Interval.new(task['start', scenarioIdx].nil? ?
755
- @project['start'] : task['start', scenarioIdx],
756
- task['end', scenarioIdx].nil? ?
757
- @project['end'] : task['end', scenarioIdx])
758
-
759
- query = Query.new('property' => task, 'scopeProperty' => resource,
760
- 'scenarioIdx' => scenarioIdx,
761
- 'loadUnit' => a('loadUnit'),
762
- 'numberFormat' => a('numberFormat'),
763
- 'currencyFormat' => a('currencyFormat'),
764
- 'costAccount' => a('costAccount'),
765
- 'revenueAccount' => a('revenueAccount'))
756
+ taskIv = Interval.new(task['start', query.scenarioIdx].nil? ?
757
+ @project['start'] : task['start', query.scenarioIdx],
758
+ task['end', query.scenarioIdx].nil? ?
759
+ @project['end'] : task['end', query.scenarioIdx])
766
760
 
767
761
  firstCell = nil
768
762
  while t < @end
769
763
  # Create a new cell
770
- cell = newCell(line)
764
+ cell = newCell(query, line)
771
765
 
772
766
  # call TjTime::sameTimeNext... function
773
767
  nextT = t.send(sameTimeNextFunc)
@@ -781,7 +775,7 @@ class TaskJuggler
781
775
  query.endIdx = nextT
782
776
  query.process
783
777
  # To increase readability, we don't show 0.0 values.
784
- cell.text = query.result if query.numericalResult > 0.0
778
+ cell.text = query.to_s if query.to_num != 0.0
785
779
  else
786
780
  raise "Unknown column content #{column.content}"
787
781
  end
@@ -814,7 +808,7 @@ class TaskJuggler
814
808
  # reported in this line. _line_ is the @table line. _t_ is the start date
815
809
  # for the calendar. _sameTimeNextFunc_ is the function that will move the
816
810
  # date to the next cell.
817
- def genCalChartResourceCell(scenarioIdx, line, columnDef, t,
811
+ def genCalChartResourceCell(query, line, columnDef, t,
818
812
  sameTimeNextFunc)
819
813
  resource = line.property
820
814
  # Find out if we have an enclosing task scope.
@@ -822,26 +816,19 @@ class TaskJuggler
822
816
  task = line.scopeLine.property
823
817
  # Get the interval of the task. In case a date is invalid due to a
824
818
  # scheduling problem, we use the full project interval.
825
- taskIv = Interval.new(task['start', scenarioIdx].nil? ?
826
- @project['start'] : task['start', scenarioIdx],
827
- task['end', scenarioIdx].nil? ?
828
- @project['end'] : task['end', scenarioIdx])
819
+ taskIv = Interval.new(task['start', query.scenarioIdx].nil? ?
820
+ @project['start'] :
821
+ task['start', query.scenarioIdx],
822
+ task['end', query.scenarioIdx].nil? ?
823
+ @project['end'] : task['end', query.scenarioIdx])
829
824
  else
830
825
  task = nil
831
826
  end
832
827
 
833
- query = Query.new('property' => resource,
834
- 'scenarioIdx' => scenarioIdx,
835
- 'loadUnit' => a('loadUnit'),
836
- 'numberFormat' => a('numberFormat'),
837
- 'currencyFormat' => a('currencyFormat'),
838
- 'costAccount' => a('costAccount'),
839
- 'revenueAccount' => a('revenueAccount'))
840
-
841
828
  firstCell = nil
842
829
  while t < @end
843
830
  # Create a new cell
844
- cell = newCell(line)
831
+ cell = newCell(query, line)
845
832
 
846
833
  # call TjTime::sameTimeNext... function
847
834
  nextT = t.send(sameTimeNextFunc)
@@ -852,21 +839,21 @@ class TaskJuggler
852
839
  query.startIdx = @project.dateToIdx(t, true)
853
840
  query.endIdx = @project.dateToIdx(nextT, true) - 1
854
841
  query.process
855
- workLoad = query.numericalResult
856
- scaledWorkLoad = query.result
842
+ workLoad = query.to_num
843
+ scaledWorkLoad = query.to_s
857
844
  if task
858
845
  # Get work load for the particular task.
859
846
  query.scopeProperty = task
860
847
  query.process
861
- workLoadTask = query.numericalResult
862
- scaledWorkLoad = query.result
848
+ workLoadTask = query.to_num
849
+ scaledWorkLoad = query.to_s
863
850
  else
864
851
  workLoadTask = 0.0
865
852
  end
866
853
  # Get unassigned work load.
867
854
  query.attributeId = 'freework'
868
855
  query.process
869
- freeLoad = query.numericalResult
856
+ freeLoad = query.to_num
870
857
  case columnDef.content
871
858
  when 'empty'
872
859
  # We only generate cells will different background colors.
@@ -925,6 +912,8 @@ class TaskJuggler
925
912
  legend.addCalendarItem('Off duty time', 'offduty')
926
913
  end
927
914
 
915
+ # This method takes care of often used cell attributes like indentation,
916
+ # alignment and background color.
928
917
  def setStandardCellAttributes(cell, columnDef, attributeType, line)
929
918
  # Determine whether it should be indented
930
919
  if indent(columnDef.id, attributeType)
@@ -942,16 +931,38 @@ class TaskJuggler
942
931
  cell.category = line.property.get('index') % 2 == 1 ?
943
932
  'resourcecell1' : 'resourcecell2'
944
933
  end
934
+
935
+ # Set column width
936
+ cell.width = columnDef.width if columnDef.width
937
+ end
938
+
939
+ def setScenarioSettings(cell, scenarioIdx, scenarioSpecific)
940
+ # Check if we are dealing with multiple scenarios.
941
+ if a('scenarios').length > 1
942
+ # Check if the attribute is not scenario specific
943
+ unless scenarioSpecific
944
+ if scenarioIdx == a('scenarios').first
945
+ # Use a somewhat bigger font.
946
+ cell.fontSize = 15
947
+ else
948
+ # And hide the cells for all but the first scenario.
949
+ cell.hidden = true
950
+ return false
951
+ end
952
+ cell.rows = a('scenarios').length
953
+ end
954
+ end
955
+ true
945
956
  end
946
957
 
947
958
  # Create a new ReportTableCell object and initialize some common values.
948
- def newCell(line, text = '')
959
+ def newCell(query, line)
949
960
  property = line.property
950
- cell = ReportTableCell.new(line, text)
961
+ cell = ReportTableCell.new(line, query)
951
962
 
952
963
  # Cells for containers should be using bold font face.
953
- cell.bold = true if property.container?
954
-
964
+ cell.bold = true if property.container? && line.bold
965
+ cell.selfcontained = a('selfcontained')
955
966
  cell
956
967
  end
957
968
 
@@ -963,22 +974,19 @@ class TaskJuggler
963
974
  # We indent at least as much as the scopeline + 1, if we have a scope.
964
975
  line.indentation = scopeLine.indentation + 1 if scopeLine
965
976
  # In tree mode we indent according to the level.
966
- line.indentation += level if treeMode
977
+ if treeMode
978
+ line.indentation += level
979
+ line.bold = true
980
+ end
967
981
  end
968
982
 
969
- # Set the URL associated with the cell text. _cell_ is the ReportTableCell.
970
- # _columnDef_ is the user specified definition for the cell content and
971
- # look. _query_ is the query used to resolve dynamic macros in the cellURL.
972
- def setCellURL(cell, columnDef, query)
973
- return unless columnDef.cellURL
974
-
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)
983
+ # Make sure we have a valid cell text. If not, this is the result of an
984
+ # error. This could happen after scheduling errors.
985
+ def checkCellText(cell)
986
+ unless cell.text
987
+ cell.text = '<Error>'
988
+ cell.fontColor = '#FF0000'
980
989
  end
981
- cell.url = url unless url.nil? || url.empty?
982
990
  end
983
991
 
984
992
  # Try to merge equal cells without text to multi-column cells.
@@ -989,64 +997,6 @@ class TaskJuggler
989
997
  end
990
998
  end
991
999
 
992
- # Expand the run-time macros in _pattern_. ${0} is a special case and will
993
- # be replaced with the _originalText_. For all other macros the _query_ will
994
- # be used with the macro name used for the attributeId of the query. The
995
- # method returns the expanded pattern.
996
- def expandMacros(pattern, originalText, query)
997
- return pattern unless pattern.include?('${')
998
-
999
- out = ''
1000
- # Scan the pattern for macros ${...}
1001
- i = 0
1002
- while i < pattern.length
1003
- c = pattern[i]
1004
- if c == ?$
1005
- # This could be a macro
1006
- if pattern[i + 1] != ?{
1007
- # It's not. Just append the '$'
1008
- out << c
1009
- else
1010
- # It is a macro.
1011
- i += 2
1012
- macro = ''
1013
- # Scan for the end '}' and get the macro name.
1014
- while i < pattern.length && pattern[i] != ?}
1015
- macro << pattern[i]
1016
- i += 1
1017
- end
1018
- if macro == '0'
1019
- # This turns RichText into plain ASCII!
1020
- out += originalText
1021
- else
1022
- # resolve by query
1023
- # If the macro is prefixed by a '?' it may be undefined.
1024
- if macro[0] == ??
1025
- macro = macro[1..-1]
1026
- ignoreErrors = true
1027
- else
1028
- ignoreErrors = false
1029
- end
1030
- query.attributeId = macro
1031
- query.process
1032
- unless query.ok || ignoreErrors
1033
- raise TjException.new, query.errorMessage
1034
- end
1035
- # This turns RichText into plain ASCII!
1036
- out += query.result
1037
- end
1038
- end
1039
- else
1040
- # Just append the character to the output.
1041
- out << c
1042
- end
1043
- i += 1
1044
- end
1045
-
1046
- out
1047
- end
1048
-
1049
1000
  end
1050
1001
 
1051
1002
  end
1052
-