taskjuggler 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
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
data/lib/Scenario.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = Scenario.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
data/lib/ScenarioData.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = ScenarioData.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
@@ -56,7 +56,7 @@ class TaskJuggler
56
56
  end
57
57
 
58
58
  def query_id(query)
59
- query.result = query.sortableResult = @property.fullId
59
+ query.sortable = query.string = @property.fullId
60
60
  end
61
61
 
62
62
  end
data/lib/Scoreboard.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = Scoreboard.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
data/lib/Shift.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = Shift.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
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = ShiftAssignments.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
data/lib/ShiftScenario.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = ShiftScenario.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
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = SourceFileInfo.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
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = SyntaxReference.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
@@ -234,7 +234,7 @@ class TaskJuggler
234
234
  # If it's a terminal symbol, we found what we are looking for. We add
235
235
  # it to the attrs hash and mark it as non scenario specific.
236
236
  attrs[pattern] = scenarioSpecific
237
- elsif pattern[0] == '!scenarioId'
237
+ elsif pattern[0] == '!scenarioIdCol'
238
238
  # A reference to the !scenarioId rule marks the next token of the
239
239
  # pattern as a reference to a rule with all scenario specific
240
240
  # attributes.
data/lib/TOCEntry.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = TOCEntry.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
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = TableColumnDefinition.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
@@ -12,40 +12,83 @@
12
12
 
13
13
  class TaskJuggler
14
14
 
15
+ # A CellSettingPattern is used to store alternative settings for
16
+ # ReportTableCell settings. These could be the cell text, the tooltip or a
17
+ # color setting. The user can provide multiple options and the
18
+ # LogicalExpression is used to select the pattern for a given cell.
19
+ class CellSettingPattern
20
+
21
+ attr_reader :setting, :logExpr
22
+
23
+ def initialize(setting, logExpr)
24
+ @setting = setting
25
+ @logExpr = logExpr
26
+ end
27
+
28
+ end
29
+
30
+ # The CellSettingPatternList holds a list of possible test pattern for a cell
31
+ # or tooltip. The first entry who's LogicalExpression matches is used.
32
+ class CellSettingPatternList
33
+
34
+ def initialize
35
+ @patterns = []
36
+ end
37
+
38
+ # Add a new pattern to the list.
39
+ def addPattern(pattern)
40
+ @patterns << pattern
41
+ end
42
+
43
+ # Get the RichText that matches the _property_ and _scopeProperty_.
44
+ def getPattern(query)
45
+ @patterns.each do |pattern|
46
+ if pattern.logExpr.eval(query)
47
+ return pattern.setting
48
+ end
49
+ end
50
+ nil
51
+ end
52
+
53
+ end
54
+
15
55
  # This class holds the definition of a column of a report. This is the user
16
56
  # specified data that is later used to generate the actual ReportTableColumn.
17
57
  # The column is uniquely identified by an ID.
18
58
  class TableColumnDefinition
19
59
 
20
- attr_reader :id
21
- attr_accessor :cellText, :hideCellText, :cellURL, :hideCellURL,
22
- :title, :scale, :width,
23
- :content, :column
60
+ attr_reader :id, :cellText, :tooltip, :cellColor, :fontColor
61
+ attr_accessor :title, :start, :end, :scale, :width, :content, :column
24
62
 
25
63
  def initialize(id, title)
26
64
  # The column ID. It must be unique within the report.
27
65
  @id = id
28
66
  # An alternative title for the column header.
29
67
  @title = title
68
+ # An alternative start date for columns with time-variant values.
69
+ @start = nil
70
+ # An alternative end date for columns with time-variant values.
71
+ @end = nil
30
72
  # For regular columns (non-calendar and non-chart) the user can override
31
73
  # the actual cell content.
32
- @cellText = nil
33
- # A LogicalExpression that is evaluated for every cell. If it evaluates to
34
- # true, the cell will remain empty.
35
- @hideCellText = nil
36
- # The cell text can be associated with a hyperlink.
37
- @cellURL = nil
38
- # A LogicalExpression that is evaluated for every cell. If the result is
39
- # true, the cellURL will be ignored.
40
- @hideCellURL = nil
74
+ @cellText = CellSettingPatternList.new
41
75
  # The content attribute is only used for calendar columns. It specifies
42
76
  # what content should be displayed in the colendar columns.
43
77
  @content = 'load'
78
+ # An alternative content for the tooltip message. It should be a
79
+ # RichText object.
80
+ @tooltip = CellSettingPatternList.new
81
+ # An alternative background color for the cell. The color setting is
82
+ # stored as "#RGB" or "#RRGGBB" String.
83
+ @cellColor = CellSettingPatternList.new
84
+ # An alternative font color for the cell. The format is equivalent to
85
+ # the @cellColor setting.
86
+ @fontColor = CellSettingPatternList.new
44
87
  # The scale attribute is only used for Gantt chart columns. It specifies
45
88
  # the minimum resolution of the chart.
46
89
  @scale = 'week'
47
- # The default maximum width of columns.
48
- @width = 450
90
+ # The width of columns.
91
+ @width = nil
49
92
 
50
93
  # Reference to the ReportTableColumn object that was created based on this
51
94
  # definition.
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = TableOfContents.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
data/lib/Task.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = Task.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
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = TaskDependency.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
data/lib/TaskJuggler.rb CHANGED
@@ -3,15 +3,17 @@
3
3
  #
4
4
  # = TaskJuggler.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
10
10
  # published by the Free Software Foundation.
11
11
  #
12
12
 
13
+ require 'drb'
13
14
  require 'Project'
14
15
  require 'MessageHandler'
16
+ require 'RemoteServiceManager'
15
17
  require 'Log'
16
18
 
17
19
  # The TaskJuggler class models the object that provides access to the
@@ -26,6 +28,7 @@ class TaskJuggler
26
28
  # whether or not messsages can be written to $stderr.
27
29
  def initialize(console)
28
30
  @project = nil
31
+ @parser = nil
29
32
  @messageHandler = MessageHandler.new(console)
30
33
  @maxCpuCores = 1
31
34
  end
@@ -33,29 +36,33 @@ class TaskJuggler
33
36
  # Read in the files passed as file names in _files_, parse them and
34
37
  # construct a Project object. In case of success true is returned.
35
38
  # Otherwise false.
36
- def parse(files)
39
+ def parse(files, keepParser = false)
37
40
  Log.enter('parser', 'Parsing files ...')
38
41
  master = true
39
42
  @project = nil
40
43
 
41
- parser = ProjectFileParser.new(@messageHandler)
44
+ @parser = ProjectFileParser.new(@messageHandler)
42
45
  files.each do |file|
43
46
  begin
44
- parser.open(file, master)
47
+ @parser.open(file, master)
45
48
  rescue TjException
46
49
  Log.exit('parser')
47
50
  return false
48
51
  end
49
52
  if master
50
- @project = parser.parse('project')
53
+ @project = @parser.parse('project')
51
54
  master = false
52
55
  else
53
- parser.setGlobalMacros
54
- parser.parse('properties')
56
+ @parser.setGlobalMacros
57
+ @parser.parse('properties')
55
58
  end
56
- parser.close
59
+ @parser.close
57
60
  end
58
61
 
62
+ # For the report server mode we may need to keep the parser. Otherwise,
63
+ # destroy it.
64
+ @parser = nil unless keepParser
65
+
59
66
  Log.exit('parser')
60
67
  @messageHandler.messages.empty?
61
68
  end
@@ -81,5 +88,21 @@ class TaskJuggler
81
88
  res
82
89
  end
83
90
 
91
+ def serveReports
92
+ $SAFE = 1
93
+ Log.enter('reportserver', 'Starting Server Mode ...')
94
+ Log.status("Report Server is now active!")
95
+ serviceManager = RemoteServiceManager.new(@parser, @project)
96
+ DRb.start_service('druby://localhost:8474', serviceManager)
97
+ DRb.thread.join
98
+ # We'll probably never get here. The DRb threads may call exit().
99
+ Log.exit('reportserver')
100
+ end
101
+
102
+ # Return the number of errors that had been reported during processing.
103
+ def errors
104
+ @project.messageHandler.errors
105
+ end
106
+
84
107
  end
85
108
 
data/lib/TaskScenario.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = TaskScenario.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
@@ -1060,10 +1060,10 @@ class TaskJuggler
1060
1060
 
1061
1061
  def query_complete(query)
1062
1062
  if @property.leaf?
1063
- query.sortableResult = query.numericalResult = a('complete').to_i
1064
- query.result = "#{query.sortableResult}%"
1063
+ query.sortable = query.numerical = complete = a('complete').to_i
1064
+ query.string = "#{complete}%"
1065
1065
  else
1066
- query.result = ''
1066
+ query.string = ''
1067
1067
  end
1068
1068
  end
1069
1069
 
@@ -1072,30 +1072,57 @@ class TaskJuggler
1072
1072
  # directly generated by the resource is taken into account.
1073
1073
  def query_cost(query)
1074
1074
  if query.costAccount
1075
- query.sortableResult = query.numericalResult =
1075
+ query.sortable = query.numerical = cost =
1076
1076
  turnover(query.startIdx, query.endIdx, query.costAccount,
1077
1077
  query.scopeProperty)
1078
- query.result = query.currencyFormat.format(query.sortableResult)
1078
+ query.string = query.currencyFormat.format(cost)
1079
1079
  else
1080
- query.result = 'No cost account'
1080
+ query.string = 'No cost account'
1081
1081
  end
1082
1082
  end
1083
1083
 
1084
1084
  # The duration of the task. After scheduling, it can be determined for
1085
1085
  # all tasks. Also for those who did not have a 'duration' attribute.
1086
1086
  def query_duration(query)
1087
- query.sortableResult = query.numericalResult =
1087
+ query.sortable = query.numerical = duration =
1088
1088
  (a('end') - a('start')) / (60 * 60 * 24)
1089
- query.result = query.scaleDuration(query.sortableResult)
1089
+ query.string = query.scaleDuration(duration)
1090
+ end
1091
+
1092
+ # The completed (as of 'now') effort allocated for the task in the
1093
+ # specified interval. In case a Resource is given as scope property only
1094
+ # the effort allocated for this resource is taken into account.
1095
+ def query_effortdone(query)
1096
+ # For this query, we always override the query period.
1097
+ query.sortable = query.numerical = effort =
1098
+ getEffectiveWork(@project.dateToIdx(@project['start']),
1099
+ @project.dateToIdx(@project['now']),
1100
+ query.scopeProperty)
1101
+ query.string = query.scaleLoad(effort)
1102
+ end
1103
+
1104
+
1105
+ # The remaining (as of 'now') effort allocated for the task in the
1106
+ # specified interval. In case a Resource is given as scope property only
1107
+ # the effort allocated for this resource is taken into account.
1108
+ def query_effortleft(query)
1109
+ # For this query, we always override the query period.
1110
+ query.start = @project['now']
1111
+ query.end = @project['end']
1112
+ query.sortable = query.numerical = effort =
1113
+ getEffectiveWork(@project.dateToIdx(@project['now']),
1114
+ @project.dateToIdx(@project['end']),
1115
+ query.scopeProperty)
1116
+ query.string = query.scaleLoad(effort)
1090
1117
  end
1091
1118
 
1092
1119
  # The effort allocated for the task in the specified interval. In case a
1093
1120
  # Resource is given as scope property only the effort allocated for this
1094
1121
  # resource is taken into account.
1095
1122
  def query_effort(query)
1096
- query.sortableResult = query.numericalResult =
1123
+ query.sortable = query.numerical = work =
1097
1124
  getEffectiveWork(query.startIdx, query.endIdx, query.scopeProperty)
1098
- query.result = query.scaleLoad(query.sortableResult)
1125
+ query.string = query.scaleLoad(work)
1099
1126
  end
1100
1127
 
1101
1128
  # A list of the resources that have been allocated to work on the task in
@@ -1105,10 +1132,12 @@ class TaskJuggler
1105
1132
  a('assignedresources').each do |resource|
1106
1133
  if getAllocatedTime(query.startIdx, query.endIdx, resource) > 0.0
1107
1134
  list += ', ' unless list.empty?
1108
- list += resource.id
1135
+ list += "#{resource.name} (#{resource.fullId})"
1109
1136
  end
1110
1137
  end
1111
- query.sortableResult = query.result = list
1138
+ query.sortable = query.string = list
1139
+ rText = RichText.new(list)
1140
+ query.rti = rText.generateIntermediateFormat
1112
1141
  end
1113
1142
 
1114
1143
  # Compute the revenue generated by this Task for a given Account during a
@@ -1116,15 +1145,33 @@ class TaskJuggler
1116
1145
  # revenue directly generated by the resource is taken into account.
1117
1146
  def query_revenue(query)
1118
1147
  if query.revenueAccount
1119
- query.sortableResult = query.numericalResult =
1148
+ query.sortable = query.numerical = revenue =
1120
1149
  turnover(query.startIdx, query.endIdx, query.revenueAccount,
1121
1150
  query.scopeProperty)
1122
- query.result = query.currencyFormat.format(query.sortableResult)
1151
+ query.string = query.currencyFormat.format(revenue)
1123
1152
  else
1124
- query.result = 'No revenue account'
1153
+ query.string = 'No revenue account'
1125
1154
  end
1126
1155
  end
1127
1156
 
1157
+ def query_targets(query)
1158
+ targetList = PropertyList.new(@project.tasks, false)
1159
+ targets(targetList)
1160
+ targetList.delete(@property)
1161
+ targetList.setSorting([['start', true, @scenarioIdx],
1162
+ ['seqno', true, -1 ]])
1163
+ targetList.sort!
1164
+
1165
+ res = ''
1166
+ targetList.each do |task|
1167
+ date = task['start', @scenarioIdx].to_s(@property.project['timeFormat'])
1168
+ res += "# #{task.name} (#{task.fullId}) #{date}\n"
1169
+ end
1170
+ rText = RichText.new(res)
1171
+ query.rti = rText.generateIntermediateFormat
1172
+ end
1173
+
1174
+
1128
1175
  # Compute the total time _resource_ or all resources are allocated during
1129
1176
  # interval specified by _startIdx_ and _endIdx_.
1130
1177
  def getAllocatedTime(startIdx, endIdx, resource = nil)
@@ -1187,6 +1234,53 @@ class TaskJuggler
1187
1234
  end
1188
1235
  end
1189
1236
 
1237
+ # Check if the Task _task_ depends on this task. _depth_ specifies how
1238
+ # many dependent task are traversed at max. A value of 0 means no limit.
1239
+ def isDependencyOf(task, depth)
1240
+ return true if task == @property
1241
+
1242
+ # Check if any of the parent tasks is a dependency of _task_.
1243
+ t = @property.parent
1244
+ while t
1245
+ # If the parent is a dependency, than all childs are as well.
1246
+ return true if t.isDependencyOf(@scenarioIdx, task, depth)
1247
+ t = t.parent
1248
+ end
1249
+
1250
+
1251
+ a('startsuccs').each do |dep|
1252
+ unless dep[1]
1253
+ # must be a start->start dependency
1254
+ return true if dep[0].isDependencyOf(@scenarioIdx, task, depth)
1255
+ end
1256
+ end
1257
+
1258
+ return false if depth == 1
1259
+
1260
+ a('endsuccs').each do |dep|
1261
+ unless dep[1]
1262
+ # must be an end->start dependency
1263
+ return true if dep[0].isDependencyOf(@scenarioIdx, task, depth - 1)
1264
+ end
1265
+ end
1266
+
1267
+ false
1268
+ end
1269
+
1270
+ # Returns true of the _resource_ is assigned to this task or any of its
1271
+ # children.
1272
+ def hasResourceAllocated?(interval, resource)
1273
+ if @property.leaf?
1274
+ return resource.allocated?(@scenarioIdx, interval, @property)
1275
+ else
1276
+ @property.children.each do |t|
1277
+ return true if t.hasResourceAllocated?(@scenarioIdx, interval,
1278
+ resource)
1279
+ end
1280
+ end
1281
+ false
1282
+ end
1283
+
1190
1284
  private
1191
1285
  def scheduleSlot(slot, slotDuration)
1192
1286
  # Tasks must always be scheduled in a single contigous fashion. @lastSlot
@@ -1480,6 +1574,18 @@ class TaskJuggler
1480
1574
  !a(thisEnd + 'succs').empty? || !a(thisEnd + 'preds').empty?
1481
1575
  end
1482
1576
 
1577
+ # Return true if this task or any of its parent tasks has at least one
1578
+ # sucessor task.
1579
+ def hasSuccessors
1580
+ t = @property
1581
+ while t
1582
+ return true unless t['endsuccs', @scenarioIdx].empty?
1583
+ t = t.parent
1584
+ end
1585
+
1586
+ false
1587
+ end
1588
+
1483
1589
  def markAsRunaway
1484
1590
  warning('runaway', "Task #{@property.fullId} does not fit into " +
1485
1591
  "project time frame")
@@ -1620,19 +1726,31 @@ class TaskJuggler
1620
1726
  def calcCompletion
1621
1727
  # If the user provided a completion degree we are not touching it.
1622
1728
  if @property.provided('complete', @scenarioIdx)
1729
+ calcStatus
1623
1730
  return
1624
1731
  end
1625
1732
 
1626
1733
  if a('start').nil? || a('end').nil?
1627
1734
  @property['complete', @scenarioIdx] = 0.0
1735
+ @property['status', @scenarioIdx] = 'unknown'
1628
1736
  return
1629
1737
  end
1630
1738
 
1631
1739
  if a('milestone')
1632
1740
  @property['complete', @scenarioIdx] =
1633
1741
  @property['end', @scenarioIdx] <= @project['now'] ? 100.0 : 0.0
1742
+ @property['status', @scenarioIdx] =
1743
+ a('end') <= @project['now'] ? 'done' : 'not reached'
1634
1744
  elsif @property.container?
1635
1745
  #TODO
1746
+ @property['status', @scenarioIdx] =
1747
+ if a('end') < @project['now']
1748
+ 'done'
1749
+ elsif a('start') > @project['now']
1750
+ 'not started'
1751
+ else
1752
+ 'in progress'
1753
+ end
1636
1754
  else
1637
1755
  # Normal leaf task
1638
1756
  if a('end') <= @project['now']
@@ -1647,7 +1765,38 @@ class TaskJuggler
1647
1765
  (a('end') - a('start'))) * 100.0
1648
1766
  end
1649
1767
  @property['complete', @scenarioIdx] = completion
1768
+ calcStatus
1769
+ end
1770
+ end
1771
+
1772
+ # Calculate the status of the task based on the 'complete' attribute.
1773
+ def calcStatus
1774
+ @property['status', @scenarioIdx] =
1775
+ if a('complete') == 0.0
1776
+ 'not started'
1777
+ elsif a('complete') >= 100.0
1778
+ 'done'
1779
+ else
1780
+ 'in progress'
1781
+ end
1782
+ end
1783
+
1784
+ # Recursively compile a list of Task properties which depend on the
1785
+ # current task.
1786
+ def targets(list)
1787
+ # A target must be a leaf function that has no direct or indirect
1788
+ # (through parent) following tasks.
1789
+ if @property.leaf? && !hasSuccessors && !list.include?(@property)
1790
+ list << @property
1791
+ return
1650
1792
  end
1793
+
1794
+ a('endsuccs').each do |t, onEnd|
1795
+ t.targets(@scenarioIdx, list)
1796
+ end
1797
+
1798
+ # Check of indirect followers.
1799
+ @property.parent.targets(@scenarioIdx, list) if @property.parent
1651
1800
  end
1652
1801
 
1653
1802
  # Compute the turnover generated by this Task for a given Account _account_