taskjuggler 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +44 -0
- data/bin/tj3webd +4 -0
- data/data/css/tjreport.css +14 -5
- data/data/tjp.vim +22 -7
- data/examples/Fedora-20/reports.tji +2 -4
- data/examples/Scrum/Product Burndown.csv +26 -0
- data/examples/Scrum/Sprint 1 Burndown.csv +26 -0
- data/examples/Scrum/Sprint 2 Burndown.csv +26 -0
- data/examples/Scrum/Sprint 3 Burndown.csv +26 -0
- data/examples/Scrum/scrum.tjp +141 -0
- data/examples/Tutorial/tutorial.tjp +13 -7
- data/lib/taskjuggler/Attributes.rb +2 -3
- data/lib/taskjuggler/HTMLDocument.rb +25 -18
- data/lib/taskjuggler/Journal.rb +85 -65
- data/lib/taskjuggler/KeywordDocumentation.rb +25 -13
- data/lib/taskjuggler/LeaveList.rb +1 -1
- data/lib/taskjuggler/Limits.rb +3 -5
- data/lib/taskjuggler/MessageHandler.rb +173 -19
- data/lib/taskjuggler/Painter.rb +75 -0
- data/lib/taskjuggler/Painter/BasicShapes.rb +76 -0
- data/lib/taskjuggler/Painter/Color.rb +273 -0
- data/lib/taskjuggler/Painter/Element.rb +56 -0
- data/lib/taskjuggler/Painter/FontData.rb +221 -0
- data/lib/taskjuggler/Painter/FontMetrics.rb +125 -0
- data/lib/taskjuggler/Painter/FontMetricsData.rb +151 -0
- data/lib/taskjuggler/Painter/Group.rb +77 -0
- data/lib/taskjuggler/Painter/Points.rb +47 -0
- data/lib/taskjuggler/Painter/Primitives.rb +100 -0
- data/lib/taskjuggler/Painter/SVGSupport.rb +36 -0
- data/lib/taskjuggler/Painter/Text.rb +36 -0
- data/lib/taskjuggler/Project.rb +46 -29
- data/lib/taskjuggler/ProjectFileParser.rb +24 -22
- data/lib/taskjuggler/ProjectFileScanner.rb +2 -2
- data/lib/taskjuggler/PropertyTreeNode.rb +26 -34
- data/lib/taskjuggler/Query.rb +8 -5
- data/lib/taskjuggler/RealFormat.rb +3 -0
- data/lib/taskjuggler/Resource.rb +3 -5
- data/lib/taskjuggler/ResourceScenario.rb +19 -7
- data/lib/taskjuggler/RichText.rb +4 -6
- data/lib/taskjuggler/RichText/FunctionExample.rb +1 -1
- data/lib/taskjuggler/RichText/FunctionHandler.rb +5 -6
- data/lib/taskjuggler/RichText/Parser.rb +4 -6
- data/lib/taskjuggler/RichText/RTFNavigator.rb +1 -1
- data/lib/taskjuggler/RichText/RTFQuery.rb +2 -3
- data/lib/taskjuggler/RichText/RTFReport.rb +1 -1
- data/lib/taskjuggler/RichText/RTFReportLink.rb +1 -2
- data/lib/taskjuggler/RichText/RTFWithQuerySupport.rb +1 -1
- data/lib/taskjuggler/RichText/Scanner.rb +6 -6
- data/lib/taskjuggler/RichText/Snip.rb +1 -2
- data/lib/taskjuggler/RuntimeConfig.rb +9 -6
- data/lib/taskjuggler/ScenarioData.rb +4 -3
- data/lib/taskjuggler/Scoreboard.rb +6 -0
- data/lib/taskjuggler/SheetHandlerBase.rb +25 -8
- data/lib/taskjuggler/SimpleQueryExpander.rb +14 -5
- data/lib/taskjuggler/SyntaxReference.rb +1 -2
- data/lib/taskjuggler/TableColumnSorter.rb +84 -0
- data/lib/taskjuggler/Task.rb +3 -5
- data/lib/taskjuggler/TaskJuggler.rb +36 -29
- data/lib/taskjuggler/TaskScenario.rb +154 -66
- data/lib/taskjuggler/TextParser.rb +24 -17
- data/lib/taskjuggler/TextParser/Scanner.rb +16 -11
- data/lib/taskjuggler/TextParser/SourceFileInfo.rb +20 -15
- data/lib/taskjuggler/TimeSheets.rb +6 -12
- data/lib/taskjuggler/Tj3AppBase.rb +35 -16
- data/lib/taskjuggler/Tj3Config.rb +1 -1
- data/lib/taskjuggler/TjpSyntaxRules.rb +239 -49
- data/lib/taskjuggler/XMLElement.rb +9 -2
- data/lib/taskjuggler/apps/Tj3.rb +43 -37
- data/lib/taskjuggler/apps/Tj3Client.rb +62 -112
- data/lib/taskjuggler/apps/Tj3Daemon.rb +66 -29
- data/lib/taskjuggler/apps/Tj3Man.rb +5 -5
- data/lib/taskjuggler/apps/Tj3SsReceiver.rb +10 -13
- data/lib/taskjuggler/apps/Tj3SsSender.rb +13 -16
- data/lib/taskjuggler/apps/Tj3TsReceiver.rb +10 -13
- data/lib/taskjuggler/apps/Tj3TsSender.rb +12 -15
- data/lib/taskjuggler/apps/Tj3TsSummary.rb +12 -15
- data/lib/taskjuggler/apps/Tj3WebD.rb +99 -0
- data/lib/taskjuggler/daemon/Daemon.rb +50 -10
- data/lib/taskjuggler/daemon/DaemonConnector.rb +127 -0
- data/lib/taskjuggler/daemon/ProcessIntercom.rb +36 -21
- data/lib/taskjuggler/daemon/ProjectBroker.rb +122 -112
- data/lib/taskjuggler/daemon/ProjectServer.rb +78 -46
- data/lib/taskjuggler/daemon/ReportServer.rb +52 -28
- data/lib/taskjuggler/daemon/ReportServlet.rb +92 -21
- data/lib/taskjuggler/daemon/WebServer.rb +75 -22
- data/lib/taskjuggler/daemon/WelcomePage.rb +1 -0
- data/lib/taskjuggler/reports/AccountListRE.rb +3 -3
- data/lib/taskjuggler/reports/CSVFile.rb +9 -2
- data/lib/taskjuggler/reports/ChartPlotter.rb +453 -0
- data/lib/taskjuggler/reports/Navigator.rb +1 -0
- data/lib/taskjuggler/reports/NikuReport.rb +4 -4
- data/lib/taskjuggler/reports/Report.rb +6 -18
- data/lib/taskjuggler/reports/ReportBase.rb +9 -9
- data/lib/taskjuggler/reports/ReportContext.rb +2 -2
- data/lib/taskjuggler/reports/StatusSheetReport.rb +6 -6
- data/lib/taskjuggler/reports/TableReport.rb +24 -15
- data/lib/taskjuggler/reports/TimeSheetReport.rb +5 -5
- data/lib/taskjuggler/reports/TraceReport.rb +251 -0
- data/lib/tj3webd.rb +17 -0
- data/manual/Day_To_Day_Juggling +10 -3
- data/manual/Installation +38 -19
- data/manual/Software +25 -19
- data/manual/Tutorial +119 -110
- data/manual/html/Day_To_Day_Juggling.html +7 -5
- data/manual/html/Getting_Started.html +4 -4
- data/manual/html/How_To_Contribute.html +4 -4
- data/manual/html/Installation.html +19 -11
- data/manual/html/Intro.html +4 -4
- data/manual/html/Reporting_Bugs.html +4 -4
- data/manual/html/Rich_Text_Attributes.html +4 -4
- data/manual/html/Software.html +15 -11
- data/manual/html/TaskJuggler_2x_Migration.html +4 -4
- data/manual/html/TaskJuggler_Internals.html +4 -4
- data/manual/html/The_TaskJuggler_Syntax.html +4 -4
- data/manual/html/Tutorial.html +41 -32
- data/manual/html/account.html +4 -4
- data/manual/html/account.task.html +4 -4
- data/manual/html/accountprefix.html +4 -4
- data/manual/html/accountreport.html +27 -9
- data/manual/html/accountroot.html +5 -5
- data/manual/html/active.html +4 -4
- data/manual/html/adopt.task.html +4 -4
- data/manual/html/aggregate.html +4 -4
- data/manual/html/alert.html +4 -4
- data/manual/html/alertlevels.html +4 -4
- data/manual/html/allocate.html +5 -5
- data/manual/html/alphabet.html +4 -4
- data/manual/html/alternative.html +4 -4
- data/manual/html/author.html +4 -4
- data/manual/html/balance.html +5 -5
- data/manual/html/booking.resource.html +4 -4
- data/manual/html/booking.task.html +4 -4
- data/manual/html/caption.html +5 -5
- data/manual/html/cellcolor.column.html +43 -8
- data/manual/html/celltext.column.html +4 -4
- data/manual/html/center.html +5 -5
- data/manual/html/charge.html +4 -4
- data/manual/html/chargeset.html +4 -4
- data/manual/html/columnid.html +27 -15
- data/manual/html/columns.html +5 -5
- data/manual/html/complete.html +4 -4
- data/manual/html/copyright.html +4 -4
- data/manual/html/credits.html +4 -4
- data/manual/html/css/tjreport.css +14 -5
- data/manual/html/currency.html +4 -4
- data/manual/html/currencyformat.html +5 -5
- data/manual/html/dailymax.html +5 -5
- data/manual/html/dailymin.html +5 -5
- data/manual/html/dailyworkinghours.html +4 -4
- data/manual/html/date.extend.html +4 -4
- data/manual/html/date.html +5 -5
- data/manual/html/definitions.html +4 -4
- data/manual/html/depends.html +4 -4
- data/manual/html/details.html +4 -4
- data/manual/html/disabled.html +4 -4
- data/manual/html/duration.html +4 -4
- data/manual/html/efficiency.html +4 -4
- data/manual/html/effort.html +4 -4
- data/manual/html/email.html +4 -4
- data/manual/html/enabled.html +4 -4
- data/manual/html/end.column.html +4 -4
- data/manual/html/end.html +4 -4
- data/manual/html/end.limit.html +4 -4
- data/manual/html/end.report.html +5 -5
- data/manual/html/end.timesheet.html +4 -4
- data/manual/html/endcredit.html +4 -4
- data/manual/html/epilog.html +5 -5
- data/manual/html/export.html +4 -4
- data/manual/html/extend.html +4 -4
- data/manual/html/fail.html +43 -8
- data/manual/html/fdl.html +4 -4
- data/manual/html/flags.account.html +4 -4
- data/manual/html/flags.html +4 -4
- data/manual/html/flags.journalentry.html +4 -4
- data/manual/html/flags.report.html +5 -5
- data/manual/html/flags.resource.html +4 -4
- data/manual/html/flags.statussheet.html +4 -4
- data/manual/html/flags.task.html +4 -4
- data/manual/html/flags.timesheet.html +4 -4
- data/manual/html/fontcolor.column.html +43 -8
- data/manual/html/footer.html +5 -5
- data/manual/html/formats.html +5 -5
- data/manual/html/functions.html +4 -4
- data/manual/html/gapduration.html +4 -4
- data/manual/html/gaplength.html +4 -4
- data/manual/html/halign.center.html +4 -4
- data/manual/html/halign.column.html +43 -8
- data/manual/html/halign.left.html +4 -4
- data/manual/html/halign.right.html +4 -4
- data/manual/html/hasalert.html +4 -4
- data/manual/html/header.html +5 -5
- data/manual/html/headline.html +7 -7
- data/manual/html/height.html +72 -0
- data/manual/html/hideaccount.html +46 -11
- data/manual/html/hidejournalentry.html +5 -5
- data/manual/html/hidereport.html +43 -8
- data/manual/html/hideresource.html +44 -9
- data/manual/html/hidetask.html +44 -9
- data/manual/html/icalreport.html +4 -4
- data/manual/html/include.macro.html +4 -4
- data/manual/html/include.project.html +4 -4
- data/manual/html/include.properties.html +4 -4
- data/manual/html/index.html +2 -1
- data/manual/html/inherit.extend.html +4 -4
- data/manual/html/interval1.html +4 -4
- data/manual/html/interval2.html +4 -4
- data/manual/html/interval3.html +4 -4
- data/manual/html/interval4.html +4 -4
- data/manual/html/isactive.html +4 -4
- data/manual/html/ischildof.html +4 -4
- data/manual/html/isdependencyof.html +4 -4
- data/manual/html/isdutyof.html +4 -4
- data/manual/html/isfeatureof.html +4 -4
- data/manual/html/isleaf.html +4 -4
- data/manual/html/ismilestone.html +4 -4
- data/manual/html/isongoing.html +4 -4
- data/manual/html/isresource.html +4 -4
- data/manual/html/isresponsibilityof.html +4 -4
- data/manual/html/istask.html +4 -4
- data/manual/html/journalattributes.html +11 -7
- data/manual/html/journalentry.html +4 -4
- data/manual/html/journalmode.html +5 -5
- data/manual/html/leaveallowance.html +5 -5
- data/manual/html/leaves.html +5 -6
- data/manual/html/left.html +5 -5
- data/manual/html/length.html +4 -4
- data/manual/html/limits.allocate.html +4 -4
- data/manual/html/limits.html +4 -4
- data/manual/html/limits.resource.html +4 -4
- data/manual/html/limits.task.html +4 -4
- data/manual/html/listitem.column.html +4 -4
- data/manual/html/listtype.column.html +4 -4
- data/manual/html/loadunit.html +5 -5
- data/manual/html/logicalexpression.html +8 -44
- data/manual/html/logicalflagexpression.html +4 -4
- data/manual/html/macro.html +4 -4
- data/manual/html/managers.html +4 -4
- data/manual/html/mandatory.html +4 -4
- data/manual/html/maxend.html +4 -4
- data/manual/html/maximum.html +5 -5
- data/manual/html/maxstart.html +4 -4
- data/manual/html/milestone.html +4 -4
- data/manual/html/minend.html +4 -4
- data/manual/html/minimum.html +5 -5
- data/manual/html/minstart.html +4 -4
- data/manual/html/monthlymax.html +5 -5
- data/manual/html/monthlymin.html +5 -5
- data/manual/html/navbar.html +10 -4
- data/manual/html/navigator.html +4 -4
- data/manual/html/newtask.html +4 -4
- data/manual/html/nikureport.html +4 -4
- data/manual/html/note.task.html +4 -4
- data/manual/html/now.html +4 -4
- data/manual/html/numberformat.html +5 -5
- data/manual/html/onend.html +4 -4
- data/manual/html/onstart.html +4 -4
- data/manual/html/opennodes.html +5 -5
- data/manual/html/overtime.booking.html +4 -4
- data/manual/html/period.column.html +4 -4
- data/manual/html/period.limit.html +4 -4
- data/manual/html/period.report.html +5 -5
- data/manual/html/period.task.html +4 -4
- data/manual/html/persistent.html +4 -4
- data/manual/html/precedes.html +4 -4
- data/manual/html/priority.html +4 -4
- data/manual/html/priority.timesheet.html +4 -4
- data/manual/html/project.html +4 -4
- data/manual/html/projectid.html +4 -4
- data/manual/html/projectid.task.html +4 -4
- data/manual/html/projectids.html +4 -4
- data/manual/html/projection.html +5 -7
- data/manual/html/prolog.html +5 -5
- data/manual/html/properties.html +11 -5
- data/manual/html/purge.html +5 -5
- data/manual/html/rate.html +4 -4
- data/manual/html/rate.resource.html +4 -4
- data/manual/html/reference.extend.html +4 -4
- data/manual/html/remaining.html +4 -4
- data/manual/html/replace.html +4 -4
- data/manual/html/reportprefix.html +4 -4
- data/manual/html/resource.html +4 -10
- data/manual/html/resourceattributes.html +4 -4
- data/manual/html/resourceprefix.html +4 -4
- data/manual/html/resourcereport.html +28 -10
- data/manual/html/resourceroot.html +5 -5
- data/manual/html/resources.limit.html +4 -4
- data/manual/html/responsible.html +4 -4
- data/manual/html/richtext.extend.html +4 -4
- data/manual/html/right.html +5 -5
- data/manual/html/rollupaccount.html +44 -9
- data/manual/html/rollupresource.html +44 -9
- data/manual/html/rolluptask.html +44 -9
- data/manual/html/scale.column.html +4 -4
- data/manual/html/scenario.html +4 -22
- data/manual/html/scenario.ical.html +4 -4
- data/manual/html/scenarios.export.html +4 -4
- data/manual/html/scenarios.html +5 -5
- data/manual/html/scenariospecific.extend.html +4 -4
- data/manual/html/scheduled.html +4 -4
- data/manual/html/scheduling.html +4 -4
- data/manual/html/select.html +4 -4
- data/manual/html/selfcontained.html +5 -5
- data/manual/html/shift.allocate.html +4 -4
- data/manual/html/shift.html +4 -4
- data/manual/html/shift.resource.html +5 -5
- data/manual/html/shift.task.html +4 -4
- data/manual/html/shift.timesheet.html +4 -4
- data/manual/html/shifts.allocate.html +4 -4
- data/manual/html/shifts.resource.html +4 -4
- data/manual/html/shifts.task.html +4 -4
- data/manual/html/shorttimeformat.html +4 -4
- data/manual/html/sloppy.booking.html +4 -4
- data/manual/html/sloppy.projection.html +5 -5
- data/manual/html/sortaccounts.html +5 -5
- data/manual/html/sortjournalentries.html +5 -5
- data/manual/html/sortresources.html +5 -5
- data/manual/html/sorttasks.html +5 -5
- data/manual/html/start.column.html +4 -4
- data/manual/html/start.html +4 -4
- data/manual/html/start.limit.html +4 -4
- data/manual/html/start.report.html +5 -5
- data/manual/html/startcredit.html +4 -4
- data/manual/html/status.statussheet.html +4 -4
- data/manual/html/status.timesheet.html +4 -4
- data/manual/html/statussheet.html +4 -4
- data/manual/html/statussheetreport.html +4 -4
- data/manual/html/strict.projection.html +5 -5
- data/manual/html/summary.html +4 -4
- data/manual/html/supplement.html +4 -4
- data/manual/html/supplement.resource.html +4 -10
- data/manual/html/supplement.task.html +4 -28
- data/manual/html/tagfile.html +4 -4
- data/manual/html/task.html +4 -28
- data/manual/html/task.statussheet.html +4 -4
- data/manual/html/task.timesheet.html +4 -4
- data/manual/html/taskattributes.html +4 -4
- data/manual/html/taskprefix.html +4 -4
- data/manual/html/taskreport.html +28 -10
- data/manual/html/taskroot.html +5 -5
- data/manual/html/text.extend.html +4 -4
- data/manual/html/textreport.html +27 -9
- data/manual/html/timeformat.html +5 -5
- data/manual/html/timeoff.nikureport.html +4 -4
- data/manual/html/timesheet.html +4 -4
- data/manual/html/timesheetreport.html +23 -5
- data/manual/html/timezone.export.html +4 -4
- data/manual/html/timezone.html +4 -4
- data/manual/html/timezone.report.html +5 -5
- data/manual/html/timezone.shift.html +4 -4
- data/manual/html/timingresolution.html +4 -4
- data/manual/html/title.column.html +4 -4
- data/manual/html/title.html +5 -5
- data/manual/html/toc.html +207 -179
- data/manual/html/tooltip.column.html +45 -10
- data/manual/html/tracereport.html +405 -0
- data/manual/html/trackingscenario.html +6 -6
- data/manual/html/treelevel.html +4 -4
- data/manual/html/vacation.html +4 -4
- data/manual/html/vacation.resource.html +4 -4
- data/manual/html/vacation.shift.html +4 -4
- data/manual/html/warn.html +43 -8
- data/manual/html/weeklymax.html +5 -5
- data/manual/html/weeklymin.html +5 -5
- data/manual/html/weekstartsmonday.html +4 -4
- data/manual/html/weekstartssunday.html +6 -6
- data/manual/html/width.column.html +6 -6
- data/manual/html/width.html +72 -0
- data/manual/html/work.html +4 -4
- data/manual/html/workinghours.project.html +4 -4
- data/manual/html/workinghours.resource.html +4 -4
- data/manual/html/workinghours.shift.html +4 -4
- data/manual/html/yearlyworkingdays.html +4 -4
- data/spec/Color_spec.rb +60 -0
- data/spec/ProjectBroker_spec.rb +3 -2
- data/spec/StatusSheets_spec.rb +5 -4
- data/spec/TableColumnSorter_spec.rb +78 -0
- data/spec/TimeSheets_spec.rb +6 -2
- data/spec/Tj3Daemon_spec.rb +2 -2
- data/spec/TraceReport_spec.rb +117 -0
- data/taskjuggler.gemspec +1 -1
- data/test/MessageChecker.rb +3 -1
- data/test/ReferenceGenerator.rb +1 -1
- data/test/TestSuite/CSV-Reports/Leave.tjp +1 -1
- data/test/TestSuite/CSV-Reports/refs/resourcereport_with_tasks.csv +3 -0
- data/test/TestSuite/CSV-Reports/refs/taskcounter.csv +9 -0
- data/test/TestSuite/CSV-Reports/refs/taskreport_with_resources.csv +19 -16
- data/test/TestSuite/CSV-Reports/refs/weekly.csv +1 -0
- data/test/TestSuite/Export-Reports/refs/LogicalExpression.tjp +14 -2
- data/test/TestSuite/Export-Reports/refs/tutorial.tjp +98 -86
- data/test/TestSuite/Scheduler/Correct/Leaves.tjp +25 -0
- data/test/TestSuite/Syntax/Correct/Leave.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/LogicalExpression.tjp +9 -1
- data/test/TestSuite/Syntax/Correct/TraceReport.tjp +10 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +10 -4
- data/test/test_CSV-Reports.rb +3 -3
- data/test/test_Export-Reports.rb +91 -86
- data/test/test_Journal.rb +15 -12
- data/test/test_Limits.rb +3 -3
- data/test/test_Project.rb +1 -2
- data/test/test_ProjectFileScanner.rb +1 -1
- data/test/test_PropertySet.rb +1 -1
- data/test/test_Query.rb +5 -6
- data/test/test_ReportGenerator.rb +15 -7
- data/test/test_RichText.rb +4 -3
- data/test/test_Scheduler.rb +19 -7
- data/test/test_ShiftAssignments.rb +2 -2
- data/test/test_SimpleQueryExpander.rb +29 -2
- data/test/test_Syntax.rb +14 -5
- metadata +49 -10
- data/lib/taskjuggler/LogFile.rb +0 -73
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = Group.rb -- The TaskJuggler III Project Management Software
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
7
|
+
# by Chris Schlaeger <chris@linux.com>
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of version 2 of the GNU General Public License as
|
|
11
|
+
# published by the Free Software Foundation.
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
require 'taskjuggler/Painter/Primitives'
|
|
15
|
+
require 'taskjuggler/Painter/SVGSupport'
|
|
16
|
+
|
|
17
|
+
class TaskJuggler
|
|
18
|
+
|
|
19
|
+
class Painter
|
|
20
|
+
|
|
21
|
+
# The Group can be used to group Elements together and define common
|
|
22
|
+
# attributes in a single place.
|
|
23
|
+
class Group
|
|
24
|
+
|
|
25
|
+
include Primitives
|
|
26
|
+
include SVGSupport
|
|
27
|
+
|
|
28
|
+
def initialize(values, &block)
|
|
29
|
+
@attributes = [
|
|
30
|
+
:fill, :font_family, :font_size, :stroke, :stroke_width
|
|
31
|
+
]
|
|
32
|
+
values.each do |k, v|
|
|
33
|
+
unless @attributes.include?(k)
|
|
34
|
+
raise ArgumentError, "Unsupported attribute #{k}. " +
|
|
35
|
+
"Use one of #{@attributes.join(', ')}."
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
@values = values
|
|
40
|
+
@elements = []
|
|
41
|
+
|
|
42
|
+
if block
|
|
43
|
+
if block.arity == 1
|
|
44
|
+
# This is the traditional case where self is passed to the block.
|
|
45
|
+
# All Primitives methods now must be prefixed with the block
|
|
46
|
+
# variable to call them.
|
|
47
|
+
yield self
|
|
48
|
+
else
|
|
49
|
+
# In order to have the primitives easily available in the block,
|
|
50
|
+
# we use instance_eval to switch self to this object. But this
|
|
51
|
+
# makes the methods of the original self no longer accessible. We
|
|
52
|
+
# work around this by saving the original self and using
|
|
53
|
+
# method_missing to delegate the method call to the original self.
|
|
54
|
+
@originalSelf = eval('self', block.binding)
|
|
55
|
+
instance_eval(&block)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Delegator to @originalSelf.
|
|
61
|
+
def method_missing(method, *args, &block)
|
|
62
|
+
@originalSelf.send(method, *args, &block)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Convert the Group into an XMLElement tree using SVG syntax.
|
|
66
|
+
def to_svg
|
|
67
|
+
XMLElement.new('g', valuesToSVG) do
|
|
68
|
+
@elements.map { |el| el.to_svg }
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
end
|
|
77
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = Points.rb -- The TaskJuggler III Project Management Software
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
7
|
+
# by Chris Schlaeger <chris@linux.com>
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of version 2 of the GNU General Public License as
|
|
11
|
+
# published by the Free Software Foundation.
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
class TaskJuggler
|
|
15
|
+
|
|
16
|
+
class Painter
|
|
17
|
+
|
|
18
|
+
# Utility class to describe a list of x, y coordinates. Each coordinate is
|
|
19
|
+
# an Array with 2 elements. The whole list is another Array.
|
|
20
|
+
class Points
|
|
21
|
+
|
|
22
|
+
# Store the list after doing some error checking.
|
|
23
|
+
def initialize(arr)
|
|
24
|
+
arr.each do |point|
|
|
25
|
+
unless point.is_a?(Array) && point.length == 2
|
|
26
|
+
raise ArgumentError, 'Points must be an Array with 2 coordinates'
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
@points = arr
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Conver the list of coordinates into a String that is compatible with
|
|
33
|
+
# SVG syntax.
|
|
34
|
+
def to_s
|
|
35
|
+
str = ''
|
|
36
|
+
@points.each do |point|
|
|
37
|
+
str += "#{point[0]},#{point[1]} "
|
|
38
|
+
end
|
|
39
|
+
str
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
47
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = Primitives.rb -- The TaskJuggler III Project Management Software
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
7
|
+
# by Chris Schlaeger <chris@linux.com>
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of version 2 of the GNU General Public License as
|
|
11
|
+
# published by the Free Software Foundation.
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
require 'taskjuggler/Painter/Color'
|
|
15
|
+
require 'taskjuggler/Painter/Points'
|
|
16
|
+
|
|
17
|
+
class TaskJuggler
|
|
18
|
+
|
|
19
|
+
class Painter
|
|
20
|
+
|
|
21
|
+
# This module contains utility methods to create the canvas Elements with
|
|
22
|
+
# minimal overhead. The element is added to it's current parent and
|
|
23
|
+
# mandatory arguments are enforced. It also eliminates the need to call
|
|
24
|
+
# 'new' methods of each Element.
|
|
25
|
+
module Primitives
|
|
26
|
+
|
|
27
|
+
unless defined?(StrokeAttrs)
|
|
28
|
+
StrokeAttrs = [ :stroke, :stroke_opacity, :stroke_width ]
|
|
29
|
+
FillAttrs = [ :fill, :fill_opacity ]
|
|
30
|
+
FillAndStrokeAttrs = StrokeAttrs + FillAttrs
|
|
31
|
+
TextAttrs = FillAndStrokeAttrs + [ :font_family, :font_size ]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def color(*args)
|
|
35
|
+
Color.new(*args)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def points(arr)
|
|
39
|
+
Points.new(arr)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def group(attrs = {}, &block)
|
|
43
|
+
@elements << (g = Group.new(attrs, &block))
|
|
44
|
+
g
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def circle(cx, cy, r, attrs = {})
|
|
48
|
+
attrs[:cx] = cx
|
|
49
|
+
attrs[:cy] = cy
|
|
50
|
+
attrs[:r] = r
|
|
51
|
+
@elements << (c = Circle.new(attrs))
|
|
52
|
+
c
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def ellipse(cx, cy, rx, ry, attrs = {})
|
|
56
|
+
attrs[:cx] = cx
|
|
57
|
+
attrs[:cy] = cy
|
|
58
|
+
attrs[:rx] = rx
|
|
59
|
+
attrs[:ry] = ry
|
|
60
|
+
@elements << (e = Ellipse.new(attrs))
|
|
61
|
+
e
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def line(x1, y1, x2, y2, attrs = {})
|
|
65
|
+
attrs[:x1] = x1
|
|
66
|
+
attrs[:y1] = y1
|
|
67
|
+
attrs[:x2] = x2
|
|
68
|
+
attrs[:y2] = y2
|
|
69
|
+
@elements << (l = Line.new(attrs))
|
|
70
|
+
l
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def polyline(points, attrs = {})
|
|
74
|
+
attrs[:points] = points.is_a?(Array) ? Points.new(points) : points
|
|
75
|
+
@elements << (l = PolyLine.new(attrs))
|
|
76
|
+
l
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def rect(x, y, width, height, attrs = {})
|
|
80
|
+
attrs[:x] = x
|
|
81
|
+
attrs[:y] = y
|
|
82
|
+
attrs[:width] = width
|
|
83
|
+
attrs[:height] = height
|
|
84
|
+
@elements << (r = Rect.new(attrs))
|
|
85
|
+
r
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def text(x, y, str, attrs = {})
|
|
89
|
+
attrs[:x] = x
|
|
90
|
+
attrs[:y] = y
|
|
91
|
+
@elements << (t = Text.new(str, attrs))
|
|
92
|
+
t
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
end
|
|
100
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = SVGSupport.rb -- The TaskJuggler III Project Management Software
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
7
|
+
# by Chris Schlaeger <chris@linux.com>
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of version 2 of the GNU General Public License as
|
|
11
|
+
# published by the Free Software Foundation.
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
class TaskJuggler
|
|
15
|
+
|
|
16
|
+
class Painter
|
|
17
|
+
|
|
18
|
+
# Utility module to convert the attributes into SVG compatible syntax.
|
|
19
|
+
module SVGSupport
|
|
20
|
+
|
|
21
|
+
def valuesToSVG
|
|
22
|
+
values = {}
|
|
23
|
+
@values.each do |k, v|
|
|
24
|
+
unit = k == :font_size ? 'pt' : ''
|
|
25
|
+
# Convert the underscores to dashes and the symbols to Strings.
|
|
26
|
+
values[k.to_s.gsub(/[_]/, '-')] = v.to_s + unit
|
|
27
|
+
end
|
|
28
|
+
values
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = Text.rb -- The TaskJuggler III Project Management Software
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
7
|
+
# by Chris Schlaeger <chris@linux.com>
|
|
8
|
+
#
|
|
9
|
+
# This program is free software; you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of version 2 of the GNU General Public License as
|
|
11
|
+
# published by the Free Software Foundation.
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
require 'taskjuggler/XMLElement'
|
|
15
|
+
require 'taskjuggler/Painter/Element'
|
|
16
|
+
|
|
17
|
+
class TaskJuggler
|
|
18
|
+
|
|
19
|
+
class Painter
|
|
20
|
+
|
|
21
|
+
# A text element.
|
|
22
|
+
class Text < Element
|
|
23
|
+
|
|
24
|
+
# Create a text of _str_ at x, y coordinates.
|
|
25
|
+
def initialize(str, attrs)
|
|
26
|
+
super('text', [ :x, :y ] + TextAttrs, attrs)
|
|
27
|
+
@text = str
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
|
data/lib/taskjuggler/Project.rb
CHANGED
|
@@ -54,16 +54,15 @@ class TaskJuggler
|
|
|
54
54
|
# the list of known Attributes.
|
|
55
55
|
class Project
|
|
56
56
|
|
|
57
|
+
include MessageHandler
|
|
58
|
+
|
|
57
59
|
attr_reader :accounts, :shifts, :tasks, :resources, :scenarios,
|
|
58
|
-
:timeSheets, :reports, :
|
|
60
|
+
:timeSheets, :reports, :inputFiles
|
|
59
61
|
attr_accessor :reportContexts, :outputDir, :warnTsDeltas
|
|
60
62
|
|
|
61
63
|
# Create a project with the specified +id+, +name+ and +version+.
|
|
62
|
-
#
|
|
63
|
-
|
|
64
|
-
# constructor will set default values for all project attributes.
|
|
65
|
-
def initialize(id, name, version, messageHandler)
|
|
66
|
-
@messageHandler = messageHandler
|
|
64
|
+
# The constructor will set default values for all project attributes.
|
|
65
|
+
def initialize(id, name, version)
|
|
67
66
|
AttributeBase.setMode(0)
|
|
68
67
|
@attributes = {
|
|
69
68
|
# This nested Array defines the supported alert levels. The lowest
|
|
@@ -73,7 +72,7 @@ class TaskJuggler
|
|
|
73
72
|
# associated color as RGB byte array.
|
|
74
73
|
'alertLevels' => AlertLevelDefinitions.new,
|
|
75
74
|
'copyright' => nil,
|
|
76
|
-
'
|
|
75
|
+
'costaccount' => nil,
|
|
77
76
|
'currency' => "EUR",
|
|
78
77
|
'currencyFormat' => RealFormat.new([ '-', '', '', ',', 2 ]),
|
|
79
78
|
'dailyworkinghours' => 8.0,
|
|
@@ -91,7 +90,7 @@ class TaskJuggler
|
|
|
91
90
|
'projectid' => id || "prj",
|
|
92
91
|
'projectids' => [ id ],
|
|
93
92
|
'rate' => 0.0,
|
|
94
|
-
'
|
|
93
|
+
'revenueaccount' => nil,
|
|
95
94
|
'scheduleGranularity' => Project.maxScheduleGranularity,
|
|
96
95
|
'shortTimeFormat' => "%H:%M",
|
|
97
96
|
'start' => nil,
|
|
@@ -333,7 +332,7 @@ class TaskJuggler
|
|
|
333
332
|
attrs = [
|
|
334
333
|
# ID Name Type
|
|
335
334
|
# Inh. Inh.Prj Scen. Default
|
|
336
|
-
[ '
|
|
335
|
+
[ 'accountroot', 'Account Root', PropertyAttribute,
|
|
337
336
|
true, false, false, nil ],
|
|
338
337
|
[ 'bsi', 'BSI', StringAttribute,
|
|
339
338
|
false, false, false, "" ],
|
|
@@ -343,7 +342,7 @@ class TaskJuggler
|
|
|
343
342
|
true, false, false, nil ],
|
|
344
343
|
[ 'columns', 'Columns', ColumnListAttribute,
|
|
345
344
|
true, false, false, [] ],
|
|
346
|
-
[ '
|
|
345
|
+
[ 'costaccount', 'Cost Account', AccountAttribute,
|
|
347
346
|
true, true, false, nil ],
|
|
348
347
|
[ 'currencyFormat', 'Currency Format', RealFormatAttribute,
|
|
349
348
|
true, true, false, nil ],
|
|
@@ -373,6 +372,8 @@ class TaskJuggler
|
|
|
373
372
|
true, false, false, nil ],
|
|
374
373
|
[ 'hideTask', 'Hide Task', LogicalExpressionAttribute,
|
|
375
374
|
true, false, false, nil ],
|
|
375
|
+
[ 'height', 'Height', FixnumAttribute,
|
|
376
|
+
false, false, false, 480 ],
|
|
376
377
|
[ 'id', 'ID', StringAttribute,
|
|
377
378
|
false, false, false, nil ],
|
|
378
379
|
[ 'index', 'Index', FixnumAttribute,
|
|
@@ -399,9 +400,9 @@ class TaskJuggler
|
|
|
399
400
|
true, false, false, nil],
|
|
400
401
|
[ 'resourceAttributes', 'Resource Attributes', FormatListAttribute,
|
|
401
402
|
true, false, false, KeywordArray.new([ '*' ]) ],
|
|
402
|
-
[ '
|
|
403
|
+
[ 'resourceroot', 'resource Root', PropertyAttribute,
|
|
403
404
|
true, false, false, nil ],
|
|
404
|
-
[ '
|
|
405
|
+
[ 'revenueaccount', 'Revenue Account', AccountAttribute,
|
|
405
406
|
true, true, false, nil ],
|
|
406
407
|
[ 'right', 'Right', RichTextAttribute,
|
|
407
408
|
true, false, false, nil ],
|
|
@@ -431,7 +432,7 @@ class TaskJuggler
|
|
|
431
432
|
true, true, false, nil ],
|
|
432
433
|
[ 'taskAttributes', 'Task Attributes', FormatListAttribute,
|
|
433
434
|
true, false, false, KeywordArray.new([ '*' ]) ],
|
|
434
|
-
[ '
|
|
435
|
+
[ 'taskroot', 'Task Root', PropertyAttribute,
|
|
435
436
|
true, false, false, nil ],
|
|
436
437
|
[ 'timeFormat', 'Time Format', StringAttribute,
|
|
437
438
|
true, true, false, nil ],
|
|
@@ -446,7 +447,9 @@ class TaskJuggler
|
|
|
446
447
|
[ 'tree', 'Tree Index', StringAttribute,
|
|
447
448
|
false, false, false, "" ],
|
|
448
449
|
[ 'weekStartsMonday', 'Week Starts Monday', BooleanAttribute,
|
|
449
|
-
true, true, false, false ]
|
|
450
|
+
true, true, false, false ],
|
|
451
|
+
[ 'width', 'Width', FixnumAttribute,
|
|
452
|
+
true, false, false, 640 ]
|
|
450
453
|
]
|
|
451
454
|
attrs.each { |a| @reports.addAttributeType(AttributeDefinition.new(*a)) }
|
|
452
455
|
|
|
@@ -653,6 +656,24 @@ class TaskJuggler
|
|
|
653
656
|
true
|
|
654
657
|
end
|
|
655
658
|
|
|
659
|
+
# Add the CSV output format to all reports of type 'tracereport' if
|
|
660
|
+
# _enable_ is true. Otherwise remove all CSV output formats.
|
|
661
|
+
def enableTraceReports(enable)
|
|
662
|
+
@reports.each do |report|
|
|
663
|
+
next unless report.typeSpec == :tracereport
|
|
664
|
+
|
|
665
|
+
if enable
|
|
666
|
+
# Enable the CSV format for the tracereport
|
|
667
|
+
unless report.get('formats').include?(:csv)
|
|
668
|
+
report.get('formats') << :csv
|
|
669
|
+
end
|
|
670
|
+
else
|
|
671
|
+
# Disabe CSV format for the tracereport
|
|
672
|
+
report.get('formats').delete(:csv)
|
|
673
|
+
end
|
|
674
|
+
end
|
|
675
|
+
end
|
|
676
|
+
|
|
656
677
|
# Make sure that we have a least one report defined that has an output
|
|
657
678
|
# format.
|
|
658
679
|
def checkReports
|
|
@@ -665,8 +686,8 @@ class TaskJuggler
|
|
|
665
686
|
unless @accounts.empty?
|
|
666
687
|
@reports.each do |report|
|
|
667
688
|
if (report.typeSpec != :accountreport) &&
|
|
668
|
-
(report.get('
|
|
669
|
-
report.get('
|
|
689
|
+
(report.get('costaccount').nil? ||
|
|
690
|
+
report.get('revenueaccount').nil?)
|
|
670
691
|
warning('report_without_balance',
|
|
671
692
|
"The report #{report.fullId} has no 'balance' defined. " +
|
|
672
693
|
"No cost or revenue computation will be possible.",
|
|
@@ -690,7 +711,10 @@ class TaskJuggler
|
|
|
690
711
|
@reports.index
|
|
691
712
|
if maxCpuCores == 1
|
|
692
713
|
@reports.each do |report|
|
|
714
|
+
# Skip reports that don't have any format specified or trace reports
|
|
715
|
+
# when generateTraces is false.
|
|
693
716
|
next if report.get('formats').empty?
|
|
717
|
+
|
|
694
718
|
Log.startProgressMeter("Report #{report.name}")
|
|
695
719
|
@reportContexts.push(ReportContext.new(self, report))
|
|
696
720
|
report.generate
|
|
@@ -702,7 +726,11 @@ class TaskJuggler
|
|
|
702
726
|
# BatchProcessor queue.
|
|
703
727
|
bp = BatchProcessor.new(maxCpuCores)
|
|
704
728
|
@reports.each do |report|
|
|
705
|
-
|
|
729
|
+
# Skip reports that don't have any format specified or trace reports
|
|
730
|
+
# when generateTraces is false.
|
|
731
|
+
next if report.get('formats').empty? ||
|
|
732
|
+
(report.typeSpec == :trace && !generateTraces)
|
|
733
|
+
|
|
706
734
|
bp.queue(report) {
|
|
707
735
|
@reportContexts.push(ReportContext.new(self, report))
|
|
708
736
|
res = report.generate
|
|
@@ -751,7 +779,7 @@ class TaskJuggler
|
|
|
751
779
|
if dynamicAttributes
|
|
752
780
|
unless dynamicAttributes.empty?
|
|
753
781
|
context.attributeBackup = report.backupAttributes
|
|
754
|
-
parser = ProjectFileParser.new
|
|
782
|
+
parser = ProjectFileParser.new
|
|
755
783
|
parser.parseReportAttributes(report, dynamicAttributes)
|
|
756
784
|
end
|
|
757
785
|
report.set('interactive', true)
|
|
@@ -1013,17 +1041,6 @@ class TaskJuggler
|
|
|
1013
1041
|
str
|
|
1014
1042
|
end
|
|
1015
1043
|
|
|
1016
|
-
# Generate an error message via the message handler.
|
|
1017
|
-
def error(id, text, sourceFileInfo = nil)
|
|
1018
|
-
@messageHandler.error(id, text, sourceFileInfo)
|
|
1019
|
-
end
|
|
1020
|
-
|
|
1021
|
-
# Generate a warning message via the message handle.
|
|
1022
|
-
def warning(id, text, sourceFileInfo = nil)
|
|
1023
|
-
@messageHandler.warning(id, text, sourceFileInfo)
|
|
1024
|
-
end
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
1044
|
protected
|
|
1028
1045
|
|
|
1029
1046
|
def prepareScenario(scIdx)
|