taskjuggler 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +61 -0
- data/README.rdoc +43 -27
- data/data/css/tjreport.css +30 -0
- data/data/tjp.vim +100 -89
- data/examples/ProjectTemplate/template.tjp +338 -0
- data/examples/ToDo-List/todolist.tjp +84 -0
- data/examples/{tutorial.tjp → Tutorial/tutorial.tjp} +9 -7
- data/lib/header.tmpl +1 -1
- data/lib/taskjuggler/Account.rb +2 -2
- data/lib/taskjuggler/AccountCredit.rb +29 -0
- data/lib/taskjuggler/AccountScenario.rb +73 -7
- data/lib/taskjuggler/AlertLevelDefinitions.rb +104 -0
- data/lib/taskjuggler/AlgorithmDiff.rb +2 -2
- data/lib/taskjuggler/Allocation.rb +1 -1
- data/lib/taskjuggler/AppConfig.rb +1 -1
- data/lib/taskjuggler/AttributeBase.rb +1 -1
- data/lib/taskjuggler/AttributeDefinition.rb +1 -1
- data/lib/taskjuggler/Attributes.rb +40 -3
- data/lib/taskjuggler/BatchProcessor.rb +15 -14
- data/lib/taskjuggler/Booking.rb +1 -1
- data/lib/taskjuggler/Charge.rb +2 -2
- data/lib/taskjuggler/ChargeSet.rb +1 -1
- data/lib/taskjuggler/DataCache.rb +24 -12
- data/lib/taskjuggler/FileList.rb +1 -1
- data/lib/taskjuggler/HTMLDocument.rb +1 -1
- data/lib/taskjuggler/HTMLElements.rb +1 -1
- data/lib/taskjuggler/ICalendar.rb +1 -1
- data/lib/taskjuggler/Interval.rb +1 -1
- data/lib/taskjuggler/IntervalList.rb +1 -1
- data/lib/taskjuggler/Journal.rb +61 -41
- data/lib/taskjuggler/KeywordArray.rb +1 -1
- data/lib/taskjuggler/KeywordDocumentation.rb +121 -33
- data/lib/taskjuggler/LeaveList.rb +103 -0
- data/lib/taskjuggler/Limits.rb +1 -1
- data/lib/taskjuggler/Log.rb +6 -3
- data/lib/taskjuggler/LogFile.rb +1 -1
- data/lib/taskjuggler/LogicalExpression.rb +1 -1
- data/lib/taskjuggler/LogicalFunction.rb +16 -2
- data/lib/taskjuggler/LogicalOperation.rb +3 -1
- data/lib/taskjuggler/MessageHandler.rb +13 -4
- data/lib/taskjuggler/PTNProxy.rb +118 -0
- data/lib/taskjuggler/Project.rb +58 -67
- data/lib/taskjuggler/ProjectFileParser.rb +39 -5
- data/lib/taskjuggler/ProjectFileScanner.rb +1 -1
- data/lib/taskjuggler/PropertyList.rb +26 -2
- data/lib/taskjuggler/PropertySet.rb +8 -1
- data/lib/taskjuggler/PropertyTreeNode.rb +36 -32
- data/lib/taskjuggler/Query.rb +1 -1
- data/lib/taskjuggler/RealFormat.rb +4 -2
- data/lib/taskjuggler/Resource.rb +3 -3
- data/lib/taskjuggler/ResourceScenario.rb +219 -140
- data/lib/taskjuggler/RichText.rb +1 -1
- data/lib/taskjuggler/RichText/Document.rb +2 -2
- data/lib/taskjuggler/RichText/Element.rb +2 -2
- data/lib/taskjuggler/RichText/FunctionExample.rb +2 -2
- data/lib/taskjuggler/RichText/FunctionHandler.rb +2 -2
- data/lib/taskjuggler/RichText/Parser.rb +2 -2
- data/lib/taskjuggler/RichText/RTFHandlers.rb +1 -1
- data/lib/taskjuggler/RichText/RTFNavigator.rb +1 -1
- data/lib/taskjuggler/RichText/RTFQuery.rb +1 -1
- data/lib/taskjuggler/RichText/RTFReport.rb +1 -1
- data/lib/taskjuggler/RichText/RTFReportLink.rb +1 -1
- data/lib/taskjuggler/RichText/RTFWithQuerySupport.rb +1 -1
- data/lib/taskjuggler/RichText/Scanner.rb +18 -4
- data/lib/taskjuggler/RichText/Snip.rb +2 -2
- data/lib/taskjuggler/RichText/SyntaxRules.rb +6 -14
- data/lib/taskjuggler/RichText/TOCEntry.rb +16 -7
- data/lib/taskjuggler/RichText/TableOfContents.rb +3 -2
- data/lib/taskjuggler/RuntimeConfig.rb +1 -1
- data/lib/taskjuggler/Scenario.rb +1 -1
- data/lib/taskjuggler/ScenarioData.rb +1 -1
- data/lib/taskjuggler/Scoreboard.rb +1 -1
- data/lib/taskjuggler/SheetHandlerBase.rb +1 -1
- data/lib/taskjuggler/SheetReceiver.rb +1 -1
- data/lib/taskjuggler/SheetSender.rb +3 -3
- data/lib/taskjuggler/Shift.rb +2 -2
- data/lib/taskjuggler/ShiftAssignments.rb +24 -19
- data/lib/taskjuggler/ShiftScenario.rb +4 -4
- data/lib/taskjuggler/SimpleQueryExpander.rb +1 -1
- data/lib/taskjuggler/StatusSheetReceiver.rb +1 -1
- data/lib/taskjuggler/StatusSheetSender.rb +1 -1
- data/lib/taskjuggler/StdIoWrapper.rb +1 -1
- data/lib/taskjuggler/SyntaxReference.rb +5 -2
- data/lib/taskjuggler/TableColumnDefinition.rb +1 -1
- data/lib/taskjuggler/Task.rb +4 -8
- data/lib/taskjuggler/TaskDependency.rb +1 -1
- data/lib/taskjuggler/TaskJuggler.rb +1 -1
- data/lib/taskjuggler/TaskScenario.rb +131 -51
- data/lib/taskjuggler/TernarySearchTree.rb +6 -4
- data/lib/taskjuggler/TextFormatter.rb +9 -2
- data/lib/taskjuggler/TextParser.rb +13 -3
- data/lib/taskjuggler/TextParser/MacroTable.rb +1 -1
- data/lib/taskjuggler/TextParser/Pattern.rb +52 -8
- data/lib/taskjuggler/TextParser/Rule.rb +11 -5
- data/lib/taskjuggler/TextParser/Scanner.rb +1 -1
- data/lib/taskjuggler/TextParser/SourceFileInfo.rb +1 -1
- data/lib/taskjuggler/TextParser/StackElement.rb +1 -1
- data/lib/taskjuggler/TextParser/State.rb +2 -2
- data/lib/taskjuggler/TextParser/TokenDoc.rb +1 -1
- data/lib/taskjuggler/TimeSheetReceiver.rb +1 -1
- data/lib/taskjuggler/TimeSheetSender.rb +1 -1
- data/lib/taskjuggler/TimeSheetSummary.rb +1 -1
- data/lib/taskjuggler/TimeSheets.rb +4 -6
- data/lib/taskjuggler/Tj3AppBase.rb +18 -1
- data/lib/taskjuggler/Tj3Config.rb +4 -4
- data/lib/taskjuggler/Tj3SheetAppBase.rb +1 -1
- data/lib/taskjuggler/TjException.rb +1 -1
- data/lib/taskjuggler/TjTime.rb +1 -1
- data/lib/taskjuggler/TjpExample.rb +1 -1
- data/lib/taskjuggler/TjpSyntaxRules.rb +920 -392
- data/lib/taskjuggler/URLParameter.rb +1 -1
- data/lib/taskjuggler/UTF8String.rb +1 -1
- data/lib/taskjuggler/UserManual.rb +1 -1
- data/lib/taskjuggler/VimSyntax.rb +9 -6
- data/lib/taskjuggler/WorkingHours.rb +12 -1
- data/lib/taskjuggler/XMLDocument.rb +1 -1
- data/lib/taskjuggler/XMLElement.rb +1 -1
- data/lib/taskjuggler/apps/Tj3.rb +8 -3
- data/lib/taskjuggler/apps/Tj3Client.rb +1 -1
- data/lib/taskjuggler/apps/Tj3Daemon.rb +1 -1
- data/lib/taskjuggler/apps/Tj3Man.rb +1 -1
- data/lib/taskjuggler/apps/Tj3SsReceiver.rb +2 -2
- data/lib/taskjuggler/apps/Tj3SsSender.rb +1 -1
- data/lib/taskjuggler/apps/Tj3TsReceiver.rb +1 -1
- data/lib/taskjuggler/apps/Tj3TsSender.rb +1 -1
- data/lib/taskjuggler/apps/Tj3TsSummary.rb +1 -1
- data/lib/taskjuggler/daemon/Daemon.rb +1 -1
- data/lib/taskjuggler/daemon/ProcessIntercom.rb +1 -1
- data/lib/taskjuggler/daemon/ProjectBroker.rb +1 -1
- data/lib/taskjuggler/daemon/ProjectServer.rb +1 -1
- data/lib/taskjuggler/daemon/ReportServer.rb +2 -2
- data/lib/taskjuggler/daemon/ReportServlet.rb +1 -1
- data/lib/taskjuggler/daemon/WebServer.rb +1 -1
- data/lib/taskjuggler/daemon/WelcomePage.rb +1 -1
- data/lib/taskjuggler/deep_copy.rb +1 -1
- data/lib/taskjuggler/reports/AccountListRE.rb +115 -0
- data/lib/taskjuggler/reports/CSVFile.rb +1 -1
- data/lib/taskjuggler/reports/CollisionDetector.rb +1 -1
- data/lib/taskjuggler/reports/ColumnTable.rb +1 -1
- data/lib/taskjuggler/reports/GanttChart.rb +1 -1
- data/lib/taskjuggler/reports/GanttContainer.rb +1 -3
- data/lib/taskjuggler/reports/GanttHeader.rb +1 -1
- data/lib/taskjuggler/reports/GanttHeaderScaleItem.rb +1 -1
- data/lib/taskjuggler/reports/GanttLine.rb +23 -12
- data/lib/taskjuggler/reports/GanttLoadStack.rb +1 -1
- data/lib/taskjuggler/reports/GanttMilestone.rb +1 -1
- data/lib/taskjuggler/reports/GanttRouter.rb +1 -1
- data/lib/taskjuggler/reports/GanttTaskBar.rb +1 -1
- data/lib/taskjuggler/reports/HTMLGraphics.rb +1 -1
- data/lib/taskjuggler/reports/ICalReport.rb +5 -2
- data/lib/taskjuggler/reports/Navigator.rb +1 -1
- data/lib/taskjuggler/reports/NikuReport.rb +1 -1
- data/lib/taskjuggler/reports/Report.rb +29 -4
- data/lib/taskjuggler/reports/ReportBase.rb +15 -1
- data/lib/taskjuggler/reports/ReportContext.rb +1 -1
- data/lib/taskjuggler/reports/ReportTable.rb +1 -1
- data/lib/taskjuggler/reports/ReportTableCell.rb +1 -1
- data/lib/taskjuggler/reports/ReportTableColumn.rb +1 -1
- data/lib/taskjuggler/reports/ReportTableLegend.rb +1 -1
- data/lib/taskjuggler/reports/ReportTableLine.rb +1 -1
- data/lib/taskjuggler/reports/ResourceListRE.rb +3 -5
- data/lib/taskjuggler/reports/StatusSheetReport.rb +2 -2
- data/lib/taskjuggler/reports/TableReport.rb +336 -204
- data/lib/taskjuggler/reports/TableReportColumn.rb +30 -0
- data/lib/taskjuggler/reports/TagFile.rb +2 -2
- data/lib/taskjuggler/reports/TaskListRE.rb +3 -6
- data/lib/taskjuggler/reports/TextReport.rb +1 -1
- data/lib/taskjuggler/reports/TimeSheetReport.rb +3 -3
- data/lib/taskjuggler/reports/TjpExportRE.rb +4 -1
- data/lib/tj3.rb +1 -1
- data/lib/tj3client.rb +1 -1
- data/lib/tj3d.rb +1 -1
- data/lib/tj3man.rb +1 -1
- data/lib/tj3ss_receiver.rb +1 -1
- data/lib/tj3ss_sender.rb +1 -1
- data/lib/tj3ts_receiver.rb +1 -1
- data/lib/tj3ts_sender.rb +1 -1
- data/lib/tj3ts_summary.rb +1 -1
- data/lib/updateheader.sh +4 -1
- data/manual/Getting_Started +7 -4
- data/manual/How_To_Contribute +26 -5
- data/manual/Installation +26 -18
- data/manual/Intro +55 -33
- data/manual/Reporting_Bugs +18 -8
- data/manual/Rich_Text_Attributes +16 -3
- data/manual/Software +2 -2
- data/manual/TaskJuggler_2x_Migration +2 -2
- data/manual/The_TaskJuggler_Syntax +10 -0
- data/manual/Tutorial +2 -2
- data/manual/html/Day_To_Day_Juggling.html +16 -12
- data/manual/html/Getting_Started.html +9 -7
- data/manual/html/How_To_Contribute.html +18 -10
- data/manual/html/Installation.html +18 -15
- data/manual/html/Intro.html +44 -28
- data/manual/html/Reporting_Bugs.html +9 -7
- data/manual/html/Rich_Text_Attributes.html +11 -8
- data/manual/html/Software.html +5 -5
- data/manual/html/TaskJuggler_2x_Migration.html +4 -4
- data/manual/html/TaskJuggler_Internals.html +3 -3
- data/manual/html/The_TaskJuggler_Syntax.html +6 -3
- data/manual/html/Tutorial.html +12 -12
- data/manual/html/account.html +19 -10
- data/manual/html/account.task.html +5 -28
- data/manual/html/accountprefix.html +5 -5
- data/manual/html/{report.html → accountreport.html} +140 -23
- data/manual/html/accountroot.html +142 -0
- data/manual/html/active.html +5 -5
- data/manual/html/adopt.task.html +7 -8
- data/manual/html/aggregate.html +145 -0
- data/manual/html/alert.html +12 -11
- data/manual/html/alertlevels.html +102 -0
- data/manual/html/allocate.html +6 -6
- data/manual/html/alphabet.html +1 -1
- data/manual/html/alternative.html +3 -3
- data/manual/html/author.html +3 -3
- data/manual/html/balance.html +84 -11
- data/manual/html/booking.resource.html +3 -3
- data/manual/html/booking.task.html +3 -3
- data/manual/html/caption.html +6 -4
- data/manual/html/cellcolor.column.html +3 -3
- data/manual/html/celltext.column.html +3 -3
- data/manual/html/center.html +28 -4
- data/manual/html/charge.html +3 -3
- data/manual/html/chargeset.html +5 -5
- data/manual/html/columnid.html +40 -9
- data/manual/html/columns.html +6 -4
- data/manual/html/complete.html +15 -9
- data/manual/html/copyright.html +5 -5
- data/manual/html/{credit.html → credits.html} +15 -12
- data/manual/html/css/tjreport.css +30 -0
- data/manual/html/currency.html +28 -15
- data/manual/html/currencyformat.html +4 -4
- data/manual/html/dailymax.html +3 -3
- data/manual/html/dailymin.html +3 -3
- data/manual/html/dailyworkinghours.html +3 -3
- data/manual/html/date.extend.html +3 -3
- data/manual/html/date.html +3 -3
- data/manual/html/definitions.html +3 -3
- data/manual/html/depends.html +3 -3
- data/manual/html/details.html +3 -3
- data/manual/html/disabled.html +9 -3
- data/manual/html/duration.html +3 -3
- data/manual/html/efficiency.html +3 -3
- data/manual/html/effort.html +3 -3
- data/manual/html/email.html +3 -3
- data/manual/html/enabled.html +9 -3
- data/manual/html/end.column.html +3 -3
- data/manual/html/end.html +3 -3
- data/manual/html/end.limit.html +3 -3
- data/manual/html/end.report.html +4 -4
- data/manual/html/end.timesheet.html +3 -3
- data/manual/html/endcredit.html +18 -9
- data/manual/html/epilog.html +6 -4
- data/manual/html/export.html +10 -6
- data/manual/html/extend.html +3 -3
- data/manual/html/fail.html +3 -3
- data/manual/html/fdl.html +3 -3
- data/manual/html/flags.account.html +3 -3
- data/manual/html/flags.html +3 -3
- data/manual/html/flags.journalentry.html +3 -3
- data/manual/html/flags.report.html +6 -4
- data/manual/html/flags.resource.html +3 -3
- data/manual/html/flags.statussheet.html +3 -3
- data/manual/html/flags.task.html +3 -3
- data/manual/html/flags.timesheet.html +3 -3
- data/manual/html/fontcolor.column.html +3 -3
- data/manual/html/footer.html +28 -4
- data/manual/html/formats.html +4 -4
- data/manual/html/functions.html +4 -4
- data/manual/html/gapduration.html +3 -3
- data/manual/html/gaplength.html +4 -4
- data/manual/html/halign.center.html +3 -3
- data/manual/html/halign.column.html +3 -3
- data/manual/html/halign.left.html +3 -3
- data/manual/html/halign.right.html +3 -3
- data/manual/html/hasalert.html +3 -3
- data/manual/html/header.html +28 -4
- data/manual/html/headline.html +6 -6
- data/manual/html/hideaccount.html +73 -0
- data/manual/html/hidejournalentry.html +6 -6
- data/manual/html/hidereport.html +3 -3
- data/manual/html/hideresource.html +4 -4
- data/manual/html/hidetask.html +4 -4
- data/manual/html/icalreport.html +3 -3
- data/manual/html/include.macro.html +4 -4
- data/manual/html/include.project.html +5 -6
- data/manual/html/include.properties.html +5 -97
- data/manual/html/index.html +2 -2
- data/manual/html/inherit.extend.html +3 -3
- data/manual/html/interval1.html +3 -3
- data/manual/html/interval2.html +3 -3
- data/manual/html/interval3.html +3 -3
- data/manual/html/interval4.html +3 -3
- data/manual/html/isactive.html +3 -3
- data/manual/html/ischildof.html +3 -3
- data/manual/html/isdependencyof.html +3 -3
- data/manual/html/isdutyof.html +3 -3
- data/manual/html/isfeatureof.html +3 -3
- data/manual/html/isleaf.html +3 -3
- data/manual/html/ismilestone.html +3 -3
- data/manual/html/isongoing.html +3 -3
- data/manual/html/isresource.html +5 -5
- data/manual/html/{alert level.html → isresponsibilityof.html} +19 -14
- data/manual/html/istask.html +5 -5
- data/manual/html/journalattributes.html +6 -4
- data/manual/html/journalentry.html +3 -3
- data/manual/html/journalmode.html +8 -6
- data/manual/html/leaveallowance.html +139 -0
- data/manual/html/leaves.html +140 -0
- data/manual/html/left.html +30 -6
- data/manual/html/length.html +4 -4
- data/manual/html/limits.allocate.html +5 -32
- data/manual/html/limits.html +3 -3
- data/manual/html/limits.resource.html +3 -3
- data/manual/html/limits.task.html +3 -3
- data/manual/html/listitem.column.html +3 -3
- data/manual/html/listtype.column.html +3 -3
- data/manual/html/loadunit.html +6 -4
- data/manual/html/logicalexpression.html +3 -3
- data/manual/html/logicalflagexpression.html +3 -3
- data/manual/html/macro.html +3 -3
- data/manual/html/managers.html +3 -3
- data/manual/html/mandatory.html +3 -3
- data/manual/html/maxend.html +3 -3
- data/manual/html/maximum.html +3 -3
- data/manual/html/maxstart.html +3 -3
- data/manual/html/milestone.html +3 -3
- data/manual/html/minend.html +3 -3
- data/manual/html/minimum.html +3 -3
- data/manual/html/minstart.html +3 -3
- data/manual/html/monthlymax.html +3 -3
- data/manual/html/monthlymin.html +3 -3
- data/manual/html/navbar.html +23 -5
- data/manual/html/navigator.html +34 -3
- data/manual/html/newtask.html +3 -3
- data/manual/html/nikureport.html +3 -3
- data/manual/html/note.task.html +3 -3
- data/manual/html/now.html +3 -3
- data/manual/html/numberformat.html +4 -4
- data/manual/html/onend.html +3 -3
- data/manual/html/onstart.html +3 -3
- data/manual/html/opennodes.html +6 -4
- data/manual/html/overtime.booking.html +4 -4
- data/manual/html/period.column.html +3 -3
- data/manual/html/period.limit.html +3 -3
- data/manual/html/period.report.html +4 -4
- data/manual/html/period.task.html +3 -3
- data/manual/html/persistent.html +3 -3
- data/manual/html/precedes.html +3 -3
- data/manual/html/priority.html +3 -3
- data/manual/html/priority.timesheet.html +3 -3
- data/manual/html/project.html +4 -4
- data/manual/html/projectid.html +3 -3
- data/manual/html/projectid.task.html +3 -3
- data/manual/html/projectids.html +3 -3
- data/manual/html/projection.html +9 -3
- data/manual/html/prolog.html +6 -4
- data/manual/html/properties.html +193 -9
- data/manual/html/purge.html +5 -5
- data/manual/html/rate.html +3 -3
- data/manual/html/rate.resource.html +3 -3
- data/manual/html/reference.extend.html +3 -3
- data/manual/html/remaining.html +3 -3
- data/manual/html/replace.html +9 -6
- data/manual/html/reportprefix.html +5 -5
- data/manual/html/resource.html +22 -4
- data/manual/html/resourceattributes.html +6 -6
- data/manual/html/resourceprefix.html +3 -3
- data/manual/html/resourcereport.html +311 -8
- data/manual/html/resourceroot.html +6 -4
- data/manual/html/resources.limit.html +4 -4
- data/manual/html/responsible.html +3 -3
- data/manual/html/richtext.extend.html +3 -3
- data/manual/html/right.html +30 -6
- data/manual/html/rollupaccount.html +69 -0
- data/manual/html/rollupresource.html +6 -6
- data/manual/html/rolluptask.html +4 -4
- data/manual/html/scale.column.html +3 -3
- data/manual/html/scenario.html +3 -3
- data/manual/html/scenario.ical.html +3 -3
- data/manual/html/scenarios.export.html +3 -3
- data/manual/html/scenarios.html +6 -4
- data/manual/html/scenariospecific.extend.html +3 -3
- data/manual/html/scheduled.html +3 -3
- data/manual/html/scheduling.html +3 -3
- data/manual/html/select.html +3 -3
- data/manual/html/selfcontained.html +6 -4
- data/manual/html/shift.allocate.html +77 -0
- data/manual/html/shift.html +13 -7
- data/manual/html/shift.resource.html +11 -5
- data/manual/html/shift.task.html +9 -3
- data/manual/html/shift.timesheet.html +4 -4
- data/manual/html/shifts.allocate.html +6 -6
- data/manual/html/shifts.resource.html +3 -3
- data/manual/html/shifts.task.html +3 -3
- data/manual/html/shorttimeformat.html +3 -3
- data/manual/html/sloppy.booking.html +4 -4
- data/manual/html/sloppy.projection.html +12 -6
- data/manual/html/sortaccounts.html +73 -0
- data/manual/html/sortjournalentries.html +8 -6
- data/manual/html/sortresources.html +4 -4
- data/manual/html/sorttasks.html +4 -4
- data/manual/html/start.column.html +3 -3
- data/manual/html/start.html +3 -3
- data/manual/html/start.limit.html +3 -3
- data/manual/html/start.report.html +4 -4
- data/manual/html/startcredit.html +10 -4
- data/manual/html/status.statussheet.html +5 -5
- data/manual/html/status.timesheet.html +5 -5
- data/manual/html/statussheet.html +3 -3
- data/manual/html/statussheetreport.html +10 -6
- data/manual/html/strict.projection.html +10 -4
- data/manual/html/summary.html +3 -3
- data/manual/html/supplement.html +5 -5
- data/manual/html/supplement.resource.html +22 -4
- data/manual/html/supplement.task.html +4 -4
- data/manual/html/tagfile.html +3 -3
- data/manual/html/task.html +3 -3
- data/manual/html/task.statussheet.html +3 -3
- data/manual/html/task.timesheet.html +3 -3
- data/manual/html/taskattributes.html +3 -3
- data/manual/html/taskprefix.html +3 -3
- data/manual/html/taskreport.html +347 -8
- data/manual/html/taskroot.html +6 -4
- data/manual/html/text.extend.html +3 -3
- data/manual/html/textreport.html +333 -8
- data/manual/html/timeformat.html +4 -4
- data/manual/html/timeoff.nikureport.html +3 -3
- data/manual/html/timesheet.html +3 -3
- data/manual/html/timesheetreport.html +10 -6
- data/manual/html/timezone.export.html +3 -3
- data/manual/html/timezone.html +3 -3
- data/manual/html/timezone.report.html +6 -4
- data/manual/html/timezone.shift.html +3 -3
- data/manual/html/timingresolution.html +3 -3
- data/manual/html/title.column.html +3 -3
- data/manual/html/title.html +4 -4
- data/manual/html/toc.html +1705 -658
- data/manual/html/tooltip.column.html +3 -3
- data/manual/html/trackingscenario.html +3 -3
- data/manual/html/treelevel.html +3 -3
- data/manual/html/vacation.html +3 -3
- data/manual/html/vacation.resource.html +4 -4
- data/manual/html/vacation.shift.html +4 -4
- data/manual/html/warn.html +3 -3
- data/manual/html/weeklymax.html +3 -3
- data/manual/html/weeklymin.html +3 -3
- data/manual/html/weekstartsmonday.html +3 -3
- data/manual/html/weekstartssunday.html +3 -3
- data/manual/html/width.column.html +3 -3
- data/manual/html/work.html +3 -3
- data/manual/html/workinghours.project.html +3 -3
- data/manual/html/workinghours.resource.html +3 -3
- data/manual/html/workinghours.shift.html +3 -3
- data/manual/html/yearlyworkingdays.html +4 -4
- data/spec/ICalendar_spec.rb +4 -2
- data/spec/IntervalList_spec.rb +1 -1
- data/spec/ProjectBroker_spec.rb +2 -6
- data/spec/StatusSheets_spec.rb +1 -1
- data/spec/TernarySearchTree_spec.rb +2 -2
- data/spec/TimeSheets_spec.rb +1 -1
- data/spec/Tj3Daemon_spec.rb +1 -1
- data/spec/Tj3_spec.rb +1 -1
- data/spec/support/DaemonControl.rb +1 -1
- data/spec/support/spec_helper.rb +19 -0
- data/taskjuggler.gemspec +1 -0
- data/test/MessageChecker.rb +1 -1
- data/test/ReferenceGenerator.rb +1 -1
- data/test/TestSuite/CSV-Reports/Leave.tjp +37 -0
- data/test/TestSuite/CSV-Reports/celltext.tjp +1 -1
- data/test/TestSuite/CSV-Reports/efficiency.tjp +20 -0
- data/test/TestSuite/CSV-Reports/headcount.tjp +31 -0
- data/test/TestSuite/CSV-Reports/refs/Leave.csv +5 -0
- data/test/TestSuite/CSV-Reports/refs/alert.csv +6 -0
- data/test/TestSuite/CSV-Reports/refs/celltext.csv +6 -0
- data/test/TestSuite/CSV-Reports/refs/efficiency.csv +5 -0
- data/test/TestSuite/CSV-Reports/refs/headcount.csv +4 -0
- data/test/TestSuite/CSV-Reports/refs/sortByTree.csv +6 -0
- data/test/TestSuite/CSV-Reports/refs/sortBy_duration.down.csv +6 -0
- data/test/TestSuite/CSV-Reports/refs/sortBy_effort.up.csv +6 -0
- data/test/TestSuite/CSV-Reports/refs/sortBy_plan.start.down.csv +6 -0
- data/test/TestSuite/CSV-Reports/refs/taskreport.csv +6 -0
- data/test/TestSuite/CSV-Reports/refs/taskreport_with_resources.csv +14 -0
- data/test/TestSuite/CSV-Reports/resourcereport.tjp +1 -1
- data/test/TestSuite/CSV-Reports/resourcereport_with_tasks.tjp +1 -1
- data/test/TestSuite/CSV-Reports/sortByTree.tjp +1 -1
- data/test/TestSuite/CSV-Reports/sortBy_plan.start.down.tjp +1 -1
- data/test/TestSuite/CSV-Reports/taskreport.tjp +1 -1
- data/test/TestSuite/CSV-Reports/taskreport_with_resources.tjp +1 -1
- data/test/TestSuite/Export-Reports/refs/AccountReport.tjp +1089 -0
- data/test/TestSuite/Export-Reports/refs/AlertLevels.tjp +24 -0
- data/test/TestSuite/Export-Reports/refs/Complete.tjp +5 -25
- data/test/TestSuite/Export-Reports/refs/navigator.tjp +58 -0
- data/test/TestSuite/Export-Reports/refs/template.tjp +142 -0
- data/test/TestSuite/Export-Reports/refs/textreport.tjp +19 -0
- data/test/TestSuite/ReportGenerator/Correct/Alerts.tjp +26 -7
- data/test/TestSuite/ReportGenerator/Correct/refs/Alerts-1.csv +177 -141
- data/test/TestSuite/ReportGenerator/Correct/refs/FTE-1.csv +1 -1
- data/test/TestSuite/Scheduler/Correct/Allocate.tjp +2 -2
- data/test/TestSuite/Scheduler/Correct/Shift2.tjp +4 -4
- data/test/TestSuite/Syntax/Correct/Account.tjp +23 -10
- data/test/TestSuite/Syntax/Correct/AccountReport.tjp +74 -0
- data/test/TestSuite/Syntax/Correct/AdoptedTasks.tjp +4 -0
- data/test/TestSuite/Syntax/Correct/AlertLevels.tjp +25 -0
- data/test/TestSuite/Syntax/Correct/Celltext.tjp +3 -3
- data/test/TestSuite/Syntax/Correct/Complete.tjp +8 -5
- data/test/TestSuite/Syntax/Correct/Leave.tjp +37 -0
- data/test/TestSuite/Syntax/Correct/Reports.tjp +4 -4
- data/test/TestSuite/Syntax/Correct/Shift.tjp +4 -4
- data/test/TestSuite/Syntax/Correct/manual2example.rb +4 -3
- data/test/TestSuite/Syntax/Correct/navigator.tjp +31 -0
- data/test/TestSuite/Syntax/Correct/template.tjp +338 -0
- data/test/TestSuite/Syntax/Correct/textreport.tjp +21 -0
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +12 -10
- data/test/TestSuite/Syntax/Errors/{adopt_duplicate_child.tjp → adopt_duplicate_child-1.tjp} +0 -0
- data/test/TestSuite/Syntax/Errors/{adopt_common_root.tjp → adopt_duplicate_child-2.tjp} +1 -1
- data/test/TestSuite/Syntax/Errors/{adopt_duplicate_parent.tjp → adopt_duplicate_child-3.tjp} +1 -1
- data/test/TestSuite/Syntax/Errors/adopt_self.tjp +7 -0
- data/test/TestSuite/Syntax/Errors/alert_level_redef.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/alert_name_redef.tjp +8 -0
- data/test/TestSuite/Syntax/Errors/too_few_alert_levels.tjp +5 -0
- data/test/TjpGen.rb +1 -1
- data/test/all.rb +1 -1
- data/test/test_AlgorithmDiff.rb +1 -1
- data/test/test_BatchProcessor.rb +23 -10
- data/test/test_CSV-Reports.rb +1 -1
- data/test/test_CSVFile.rb +1 -1
- data/test/test_CollisionDetector.rb +1 -1
- data/test/test_Export-Reports.rb +1 -1
- data/test/test_Journal.rb +42 -15
- data/test/test_Limits.rb +1 -1
- data/test/test_LogicalExpression.rb +1 -1
- data/test/test_MacroTable.rb +8 -3
- data/test/test_Project.rb +1 -1
- data/test/test_ProjectFileScanner.rb +1 -1
- data/test/test_PropertySet.rb +1 -1
- data/test/test_Query.rb +1 -1
- data/test/test_RealFormat.rb +1 -1
- data/test/test_ReportGenerator.rb +1 -1
- data/test/test_RichText.rb +1 -1
- data/test/test_Scheduler.rb +1 -1
- data/test/test_ShiftAssignments.rb +1 -1
- data/test/test_SimpleQueryExpander.rb +1 -1
- data/test/test_Syntax.rb +1 -1
- data/test/test_TextFormatter.rb +1 -1
- data/test/test_TjTime.rb +1 -1
- data/test/test_TjpExample.rb +1 -1
- data/test/test_URLParameter.rb +1 -1
- data/test/test_UTF8String.rb +1 -1
- data/test/test_WorkingHours.rb +1 -1
- data/test/test_deep_copy.rb +1 -1
- metadata +318 -248
- data/test/TestSuite/Syntax/Errors/purge_no_list.tjp +0 -8
data/lib/taskjuggler/Charge.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = Charge.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -15,7 +15,7 @@ require 'taskjuggler/TjTime'
|
|
15
15
|
|
16
16
|
class TaskJuggler
|
17
17
|
|
18
|
-
# This class describes a one-time or per time charge that can be
|
18
|
+
# This class describes a one-time or per time charge that can be associated
|
19
19
|
# with a Task. The charge can take effect either on starting the task,
|
20
20
|
# finishing it, or per time interval.
|
21
21
|
class Charge
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = ChargeSet.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = DataCache.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -20,11 +20,14 @@ class TaskJuggler
|
|
20
20
|
# counter. The counter can be read and written externally.
|
21
21
|
class DataCacheEntry
|
22
22
|
|
23
|
+
attr_reader :unhashedKey
|
23
24
|
attr_accessor :hits
|
24
25
|
|
25
|
-
# Create a new DataCacheEntry for the _value_.
|
26
|
-
# to
|
27
|
-
|
26
|
+
# Create a new DataCacheEntry for the _value_. We also store the unhashed
|
27
|
+
# key to be able to detect hash collisions. The access counter is set to 1
|
28
|
+
# to increase the chance that it is not flushed immedidate.
|
29
|
+
def initialize(unhashedKey, value)
|
30
|
+
@unhashedKey = unhashedKey
|
28
31
|
@value = value
|
29
32
|
@hits = 1
|
30
33
|
end
|
@@ -60,6 +63,8 @@ class TaskJuggler
|
|
60
63
|
@hits = 0
|
61
64
|
# Counter for the number of not found values.
|
62
65
|
@misses = 0
|
66
|
+
# Counter for hash collisions
|
67
|
+
@collisions = 0
|
63
68
|
end
|
64
69
|
|
65
70
|
# For now, we use this randomly determined size.
|
@@ -90,17 +95,24 @@ class TaskJuggler
|
|
90
95
|
|
91
96
|
# _args_ is a set of arguments that unambigously identify the data entry.
|
92
97
|
# It's converted into a hash to store or recover a previously stored
|
93
|
-
# entry. If we have a value for the key, return the value. Otherwise call
|
94
|
-
# block to compute the value, store it and return it.
|
98
|
+
# entry. If we have a value for the key, return the value. Otherwise call
|
99
|
+
# the block to compute the value, store it and return it.
|
95
100
|
def cached(*args)
|
96
101
|
key = args.hash
|
97
102
|
if @entries.has_key?(key)
|
98
103
|
e = @entries[key]
|
99
|
-
|
100
|
-
|
104
|
+
if e.unhashedKey != args
|
105
|
+
# Two different args produce the same hash key. This should be a
|
106
|
+
# very rare event!
|
107
|
+
@collisions += 1
|
108
|
+
yield
|
109
|
+
else
|
110
|
+
@hits += 1
|
111
|
+
e.value
|
112
|
+
end
|
101
113
|
else
|
102
114
|
@misses += 1
|
103
|
-
store(yield, key)
|
115
|
+
store(yield, args, key)
|
104
116
|
end
|
105
117
|
end
|
106
118
|
|
@@ -108,7 +120,7 @@ class TaskJuggler
|
|
108
120
|
|
109
121
|
def to_s
|
110
122
|
<<"EOT"
|
111
|
-
Entries: #{@entries.size} Stores: #{@stores}
|
123
|
+
Entries: #{@entries.size} Stores: #{@stores} Collisions: #{@collisions}
|
112
124
|
Hits: #{@hits} Misses: #{@misses}
|
113
125
|
Hit Rate: #{@hits * 100.0 / (@hits + @misses)}%
|
114
126
|
EOT
|
@@ -119,7 +131,7 @@ EOT
|
|
119
131
|
# Store _value_ into the cache using _key_ to tag it. _key_ must be unique
|
120
132
|
# and must be used to load the value from the cache again. You cannot
|
121
133
|
# store nil values!
|
122
|
-
def store(value, key)
|
134
|
+
def store(value, unhashedKey, key)
|
123
135
|
@stores += 1
|
124
136
|
|
125
137
|
if @entries.size > @highWaterMark
|
@@ -133,7 +145,7 @@ EOT
|
|
133
145
|
end
|
134
146
|
end
|
135
147
|
|
136
|
-
@entries[key] = DataCacheEntry.new(value)
|
148
|
+
@entries[key] = DataCacheEntry.new(unhashedKey, value)
|
137
149
|
|
138
150
|
value
|
139
151
|
end
|
data/lib/taskjuggler/FileList.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = FileList.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = HTMLDocument.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = HTMLElements.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = ICalendar.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
data/lib/taskjuggler/Interval.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = Interval.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = IntervalList.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
data/lib/taskjuggler/Journal.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = Journal.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -22,7 +22,7 @@ class TaskJuggler
|
|
22
22
|
class JournalEntry
|
23
23
|
|
24
24
|
attr_reader :date, :headline, :property, :sourceFileInfo
|
25
|
-
attr_accessor :author, :summary, :details, :alertLevel, :flags,
|
25
|
+
attr_accessor :author, :moderators, :summary, :details, :alertLevel, :flags,
|
26
26
|
:timeSheetRecord
|
27
27
|
|
28
28
|
# Create a new JournalEntry object.
|
@@ -40,6 +40,8 @@ class TaskJuggler
|
|
40
40
|
@sourceFileInfo = sourceFileInfo
|
41
41
|
# A reference to a Resource.
|
42
42
|
@author = nil
|
43
|
+
# A list of Resource objects that have moderated this entry.
|
44
|
+
@moderators = []
|
43
45
|
# An introductory or summarizing RichText paragraph.
|
44
46
|
@summary = nil
|
45
47
|
# A RichText of arbitrary length.
|
@@ -63,10 +65,11 @@ class TaskJuggler
|
|
63
65
|
if query.journalAttributes.include?('alert')
|
64
66
|
levelRecord = query.project['alertLevels'][alertLevel]
|
65
67
|
if query.selfContained
|
66
|
-
alertName = "<nowiki>[
|
68
|
+
alertName = "<nowiki>[</nowiki><fcol:#{levelRecord.color}><nowiki>" +
|
69
|
+
"#{levelRecord.name}</nowiki></fcol><nowiki>]</nowiki>"
|
67
70
|
else
|
68
|
-
alertName = "[[File:icons/flag-#{levelRecord
|
69
|
-
"alt=[#{levelRecord
|
71
|
+
alertName = "[[File:icons/flag-#{levelRecord.id}.png|" +
|
72
|
+
"alt=[#{levelRecord.name}]|text-bottom]] "
|
70
73
|
end
|
71
74
|
else
|
72
75
|
alertName = ''
|
@@ -243,6 +246,11 @@ class TaskJuggler
|
|
243
246
|
end
|
244
247
|
end
|
245
248
|
|
249
|
+
# Like Array::delete
|
250
|
+
def delete(e)
|
251
|
+
@entries.delete(e)
|
252
|
+
end
|
253
|
+
|
246
254
|
# Like Array::delete_if
|
247
255
|
def delete_if
|
248
256
|
@entries.delete_if { |e| yield(e) }
|
@@ -349,12 +357,30 @@ class TaskJuggler
|
|
349
357
|
|
350
358
|
return if entry.property.nil?
|
351
359
|
|
352
|
-
|
353
|
-
|
360
|
+
# When we store the property into the @propertyToEntries hash, we need
|
361
|
+
# to make sure that we store the PropertyTreeNode object and not a
|
362
|
+
# PTNProxy object.
|
363
|
+
unless @propertyToEntries.include?(entry.property.ptn)
|
364
|
+
@propertyToEntries[entry.property.ptn] = JournalEntryList.new
|
365
|
+
end
|
366
|
+
@propertyToEntries[entry.property.ptn] << entry
|
367
|
+
end
|
368
|
+
|
369
|
+
def getEntries(property)
|
370
|
+
@propertyToEntries[property.ptn]
|
371
|
+
end
|
372
|
+
|
373
|
+
# Delete all entries of the Journal for which the block yields true.
|
374
|
+
def delete_if
|
375
|
+
@entries.delete_if do |e|
|
376
|
+
res = yield(e)
|
377
|
+
@propertyToEntries[e.property.ptn].delete(e) if res
|
378
|
+
res
|
354
379
|
end
|
355
|
-
@propertyToEntries[entry.property] << entry
|
356
380
|
end
|
357
381
|
|
382
|
+
|
383
|
+
|
358
384
|
def to_rti(query)
|
359
385
|
entries = JournalEntryList.new
|
360
386
|
|
@@ -408,8 +434,8 @@ class TaskJuggler
|
|
408
434
|
# each task (incl. sub tasks) are included.
|
409
435
|
if query.property
|
410
436
|
if query.property.is_a?(Task)
|
411
|
-
entries += currentEntriesR(query.end, query.property, 0,
|
412
|
-
query.hideJournalEntry)
|
437
|
+
entries += currentEntriesR(query.end, query.property, 0,
|
438
|
+
query.start, query.hideJournalEntry)
|
413
439
|
end
|
414
440
|
else
|
415
441
|
query.project.tasks.each do |task|
|
@@ -482,10 +508,10 @@ class TaskJuggler
|
|
482
508
|
logExp = nil, task = nil, alertLevel = nil)
|
483
509
|
list = JournalEntryList.new
|
484
510
|
@entries.each do |entry|
|
485
|
-
if entry.author == resource &&
|
511
|
+
if entry.author == resource.ptn &&
|
486
512
|
(startDate.nil? || entry.date > startDate) &&
|
487
513
|
(endDate.nil? || entry.date <= endDate) &&
|
488
|
-
(task.nil? || entry.property == task) &&
|
514
|
+
(task.nil? || entry.property == task.ptn) &&
|
489
515
|
(alertLevel.nil? || entry.alertLevel >= alertLevel) &&
|
490
516
|
!entry.headline.empty? && !hidden(entry, logExp)
|
491
517
|
list << entry
|
@@ -503,7 +529,7 @@ class TaskJuggler
|
|
503
529
|
resource = nil, alertLevel = nil)
|
504
530
|
list = JournalEntryList.new
|
505
531
|
@entries.each do |entry|
|
506
|
-
if entry.property == task &&
|
532
|
+
if entry.property == task.ptn &&
|
507
533
|
(startDate.nil? || entry.date >= startDate) &&
|
508
534
|
(endDate.nil? || entry.date < endDate) &&
|
509
535
|
(resource.nil? || entry.author == resource) &&
|
@@ -539,8 +565,8 @@ class TaskJuggler
|
|
539
565
|
@entries.each do |entry|
|
540
566
|
if (startDate.nil? || startDate <= entry.date) &&
|
541
567
|
(endDate.nil? || endDate >= entry.date) &&
|
542
|
-
(property.nil? || property == entry.property ||
|
543
|
-
entry.property.isChildOf?(property)) &&
|
568
|
+
(property.nil? || property.ptn == entry.property ||
|
569
|
+
entry.property.isChildOf?(property.ptn)) &&
|
544
570
|
(alertLevel.nil? || alertLevel == entry.alertLevel) &&
|
545
571
|
!hidden(entry, logExp)
|
546
572
|
list << entry
|
@@ -589,8 +615,8 @@ class TaskJuggler
|
|
589
615
|
# with at least the required alert level _minLevel_ are returned. Messages
|
590
616
|
# with alert level _minLevel_ must be newer than _minDate_.
|
591
617
|
def currentEntries(date, property, minLevel, minDate, logExp)
|
592
|
-
pEntries =
|
593
|
-
|
618
|
+
pEntries = getEntries(property) ? getEntries(property).last(date) :
|
619
|
+
JournalEntryList.new
|
594
620
|
# Remove entries below the minium alert level or before the timeout
|
595
621
|
# date.
|
596
622
|
pEntries.delete_if do |e|
|
@@ -602,8 +628,8 @@ class TaskJuggler
|
|
602
628
|
# Check parents for a more important or more up-to-date message.
|
603
629
|
p = property.parent
|
604
630
|
while p do
|
605
|
-
ppEntries =
|
606
|
-
|
631
|
+
ppEntries = getEntries(p) ?
|
632
|
+
getEntries(p).last(date) : JournalEntryList.new
|
607
633
|
|
608
634
|
# A parent has a more up-to-date message.
|
609
635
|
if !ppEntries.empty? && ppEntries.first.date >= pEntries.first.date
|
@@ -630,8 +656,8 @@ class TaskJuggler
|
|
630
656
|
def currentEntriesR(date, property, minLevel = 0, minDate = nil,
|
631
657
|
logExp = nil)
|
632
658
|
# See if this property has any current JournalEntry objects.
|
633
|
-
pEntries =
|
634
|
-
|
659
|
+
pEntries = getEntries(property) ? getEntries(property).last(date) :
|
660
|
+
JournalEntryList.new
|
635
661
|
# Remove entries below the minium alert level or before the timeout
|
636
662
|
# date.
|
637
663
|
pEntries.delete_if do |e|
|
@@ -645,9 +671,13 @@ class TaskJuggler
|
|
645
671
|
maxPAlertLevel = e.alertLevel if e.alertLevel > maxPAlertLevel
|
646
672
|
end
|
647
673
|
|
648
|
-
|
674
|
+
cEntries = JournalEntryList.new
|
649
675
|
latestDate = nil
|
650
676
|
maxAlertLevel = 0
|
677
|
+
# If we have an entry from this property, we only care about child
|
678
|
+
# entries that are from a later date.
|
679
|
+
minDate = pEntries.first.date + 1 unless pEntries.empty?
|
680
|
+
|
651
681
|
# Now gather all current entries of the child properties and find the
|
652
682
|
# date that is closest to and right before the given _date_.
|
653
683
|
property.kids.each do |p|
|
@@ -656,30 +686,20 @@ class TaskJuggler
|
|
656
686
|
latestDate = e.date if latestDate.nil? || e.date > latestDate
|
657
687
|
# Find the highest alert level.
|
658
688
|
maxAlertLevel = e.alertLevel if e.alertLevel > maxAlertLevel
|
659
|
-
|
689
|
+
cEntries << e
|
660
690
|
end
|
661
691
|
end
|
662
|
-
|
663
|
-
# higher alert level than this property and this property has
|
664
|
-
# JournalEntry objects, than those are taken.
|
692
|
+
|
665
693
|
if !pEntries.empty? && (maxPAlertLevel > maxAlertLevel ||
|
666
694
|
latestDate.nil? ||
|
667
695
|
pEntries.first.date >= latestDate)
|
668
|
-
|
669
|
-
#
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
end
|
676
|
-
|
677
|
-
# Remove all child entries that are older than the current parent
|
678
|
-
# entries (if we have parent entries).
|
679
|
-
unless pEntries.empty?
|
680
|
-
entries.delete_if do |e|
|
681
|
-
e.date <= pEntries.first.date
|
682
|
-
end
|
696
|
+
# If no child property has a more current JournalEntry or one with a
|
697
|
+
# higher alert level than this property and this property has
|
698
|
+
# JournalEntry objects, than those are taken.
|
699
|
+
entries = pEntries
|
700
|
+
else
|
701
|
+
# Otherwise we take the entries from the kids.
|
702
|
+
entries = cEntries
|
683
703
|
end
|
684
704
|
|
685
705
|
# Remove all entries that are filtered by logExp.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = KeywordArray.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#
|
4
4
|
# = KeywordDocumentation.rb -- The TaskJuggler III Project Management Software
|
5
5
|
#
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
7
7
|
# by Chris Schlaeger <chris@linux.com>
|
8
8
|
#
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
@@ -11,6 +11,7 @@
|
|
11
11
|
# published by the Free Software Foundation.
|
12
12
|
#
|
13
13
|
|
14
|
+
require 'term/ansicolor'
|
14
15
|
require 'taskjuggler/HTMLDocument'
|
15
16
|
require 'taskjuggler/RichText'
|
16
17
|
require 'taskjuggler/TjpExample'
|
@@ -32,6 +33,7 @@ class TaskJuggler
|
|
32
33
|
class KeywordDocumentation
|
33
34
|
|
34
35
|
include HTMLElements
|
36
|
+
include Term::ANSIColor
|
35
37
|
|
36
38
|
attr_reader :keyword, :names, :pattern, :references, :optionalAttributes
|
37
39
|
attr_accessor :contexts, :scenarioSpecific, :inheritedFromProject,
|
@@ -40,7 +42,7 @@ class TaskJuggler
|
|
40
42
|
# Construct a new KeywordDocumentation object. _rule_ is the
|
41
43
|
# TextParser::Rule and _pattern_ is the corresponding TextParser::Pattern.
|
42
44
|
# _syntax_ is an expanded syntax representation of the _pattern_. _args_
|
43
|
-
# is
|
45
|
+
# is an Array of TextParser::TokenDoc that describe the arguments of the
|
44
46
|
# _pattern_. _optAttrPatterns_ is an Array with references to
|
45
47
|
# TextParser::Patterns that are optional attributes to this keyword.
|
46
48
|
def initialize(rule, pattern, syntax, args, optAttrPatterns, manual)
|
@@ -79,10 +81,11 @@ class TaskJuggler
|
|
79
81
|
# (task, resources, etc.). A TJP property can be nested.
|
80
82
|
def isProperty?
|
81
83
|
# I haven't found a good way to automatically detect all the various
|
82
|
-
# report types as properties.
|
83
|
-
#
|
84
|
-
return true if %w( export nikureport
|
85
|
-
|
84
|
+
# report types as properties. They don't directly include themselves as
|
85
|
+
# attributes.
|
86
|
+
return true if %w( accountreport export nikureport resourcereport
|
87
|
+
taskreport textreport timesheetreport
|
88
|
+
statussheetreport).include?(keyword)
|
86
89
|
@optionalAttributes.include?(self)
|
87
90
|
end
|
88
91
|
|
@@ -122,10 +125,14 @@ class TaskJuggler
|
|
122
125
|
@optAttrPatterns.each do |pattern, scenarioSpecific|
|
123
126
|
next unless checkReference(pattern)
|
124
127
|
|
128
|
+
# Check if all the attributes are documented. We ignore undocumented
|
129
|
+
# keywords that are deprecated or removed.
|
125
130
|
if (kwd = keywords[pattern.keyword]).nil?
|
126
|
-
|
127
|
-
|
128
|
-
|
131
|
+
unless [ :deprecated, :removed ].include?(pattern.supportLevel)
|
132
|
+
token = pattern.terminalTokens(rules)
|
133
|
+
$stderr.puts "Keyword #{keyword} has undocumented optional " +
|
134
|
+
"attribute #{token[0]}"
|
135
|
+
end
|
129
136
|
else
|
130
137
|
@optionalAttributes << kwd
|
131
138
|
kwd.contexts << self unless kwd.contexts.include?(self)
|
@@ -145,7 +152,9 @@ class TaskJuggler
|
|
145
152
|
def computeInheritance(keywords, rules)
|
146
153
|
property = nil
|
147
154
|
@contexts.each do |kwd|
|
148
|
-
if %w( task resource account
|
155
|
+
if %w( task resource account shift scenario
|
156
|
+
accountreport resourcereport taskreport textreport ).
|
157
|
+
include?(kwd.keyword)
|
149
158
|
property = kwd.keyword
|
150
159
|
break
|
151
160
|
end
|
@@ -159,12 +168,12 @@ class TaskJuggler
|
|
159
168
|
project.resources
|
160
169
|
when 'account'
|
161
170
|
project.accounts
|
162
|
-
when 'report'
|
163
|
-
project.reports
|
164
171
|
when 'shift'
|
165
172
|
project.shifts
|
166
173
|
when 'scenario'
|
167
174
|
project.scenarios
|
175
|
+
else
|
176
|
+
project.reports
|
168
177
|
end
|
169
178
|
keyword = @keyword
|
170
179
|
keyword = keyword.split('.')[0] if keyword.include?('.')
|
@@ -192,19 +201,39 @@ class TaskJuggler
|
|
192
201
|
textW = 79
|
193
202
|
|
194
203
|
# Top line with multiple elements
|
195
|
-
str = "Keyword: #{@keyword}
|
196
|
-
|
197
|
-
|
204
|
+
str = "#{blue('Keyword:')} #{bold(@keyword)}\n\n"
|
205
|
+
|
206
|
+
if @pattern.supportLevel != :supported
|
207
|
+
msg = supportLevelMessage
|
208
|
+
|
209
|
+
if [ :deprecated, :removed ].include?(@pattern.supportLevel) &&
|
210
|
+
@seeAlso.length > 0
|
211
|
+
msg += "\n\nPlease use "
|
212
|
+
alsoStr = ''
|
213
|
+
@seeAlso.each do |also|
|
214
|
+
unless alsoStr.empty?
|
215
|
+
alsoStr += ', '
|
216
|
+
end
|
217
|
+
alsoStr += also.keyword
|
218
|
+
end
|
219
|
+
msg += "#{alsoStr} instead!"
|
220
|
+
end
|
198
221
|
|
199
|
-
|
200
|
-
|
222
|
+
str += red("Warning: #{format(tagW, msg, textW)}\n")
|
223
|
+
end
|
201
224
|
|
225
|
+
# Don't show further details if the keyword has been removed.
|
226
|
+
return str if @pattern.supportLevel == :removed
|
227
|
+
|
228
|
+
str += blue('Purpose:') +
|
229
|
+
" #{format(tagW, newRichText(@pattern.doc).to_s,
|
230
|
+
textW)}\n"
|
202
231
|
if @syntax != '[{ <attributes> }]'
|
203
|
-
str +=
|
232
|
+
str += blue('Syntax:') + " #{format(tagW, @syntax, textW)}\n"
|
204
233
|
|
205
|
-
str +=
|
234
|
+
str += blue('Arguments:') + " "
|
206
235
|
if @args.empty?
|
207
|
-
str += format(tagW, "none\n
|
236
|
+
str += format(tagW, "none\n", textW)
|
208
237
|
else
|
209
238
|
argStr = ''
|
210
239
|
@args.each do |arg|
|
@@ -228,7 +257,7 @@ class TaskJuggler
|
|
228
257
|
str += "\n"
|
229
258
|
end
|
230
259
|
|
231
|
-
str += 'Context: '
|
260
|
+
str += blue('Context:') + ' '
|
232
261
|
if @contexts.empty?
|
233
262
|
str += format(tagW, 'Global scope', textW)
|
234
263
|
else
|
@@ -242,7 +271,7 @@ class TaskJuggler
|
|
242
271
|
str += format(tagW, cxtStr, textW)
|
243
272
|
end
|
244
273
|
|
245
|
-
str += "\n
|
274
|
+
str += "\n#{blue('Attributes:')} "
|
246
275
|
if @optionalAttributes.empty?
|
247
276
|
str += "none\n\n"
|
248
277
|
else
|
@@ -260,34 +289,37 @@ class TaskJuggler
|
|
260
289
|
attr.inheritedFromParent
|
261
290
|
first = true
|
262
291
|
showLegend = true
|
263
|
-
|
292
|
+
tag = '['
|
264
293
|
if attr.scenarioSpecific
|
265
|
-
|
294
|
+
tag += 'sc'
|
266
295
|
first = false
|
267
296
|
end
|
268
297
|
if attr.inheritedFromProject
|
269
|
-
|
270
|
-
|
298
|
+
tag += ':' unless first
|
299
|
+
tag += 'ig'
|
271
300
|
first = false
|
272
301
|
end
|
273
302
|
if attr.inheritedFromParent
|
274
|
-
|
275
|
-
|
303
|
+
tag += ':' unless first
|
304
|
+
tag += 'ip'
|
276
305
|
end
|
277
|
-
|
306
|
+
tag += ']'
|
307
|
+
attrStr += cyan(tag)
|
278
308
|
end
|
279
309
|
end
|
280
310
|
if showLegend
|
281
|
-
attrStr += "\n\n[sc] : Attribute is scenario specific" +
|
282
|
-
"\
|
283
|
-
"
|
311
|
+
attrStr += "\n\n#{cyan('[sc]')} : Attribute is scenario specific" +
|
312
|
+
"\r#{cyan('[ig]')} : " +
|
313
|
+
"Value can be inherited from global setting" +
|
314
|
+
"\r#{cyan('[ip]')} : " +
|
315
|
+
"Value can be inherited from parent property"
|
284
316
|
end
|
285
317
|
str += format(tagW, attrStr, textW)
|
286
318
|
str += "\n"
|
287
319
|
end
|
288
320
|
|
289
321
|
unless @seeAlso.empty?
|
290
|
-
str +=
|
322
|
+
str += blue('See also:') + " "
|
291
323
|
alsoStr = ''
|
292
324
|
@seeAlso.each do |also|
|
293
325
|
unless alsoStr.empty?
|
@@ -322,6 +354,7 @@ class TaskJuggler
|
|
322
354
|
DIV.new('style' => 'margin-left:5%; margin-right:5%') do
|
323
355
|
[
|
324
356
|
generateHTMLKeywordBox,
|
357
|
+
generateHTMLSupportLevel,
|
325
358
|
generateHTMLDescriptionBox,
|
326
359
|
generateHTMLOptionalAttributesBox,
|
327
360
|
generateHTMLExampleBox
|
@@ -406,6 +439,22 @@ class TaskJuggler
|
|
406
439
|
TextFormatter.new(width, indent).format(str)[indent..-1]
|
407
440
|
end
|
408
441
|
|
442
|
+
def generateHTMLSupportLevel
|
443
|
+
if @pattern.supportLevel != :supported
|
444
|
+
[
|
445
|
+
P.new do
|
446
|
+
newRichText("<fcol:red>#{supportLevelMessage}</fcol>").to_html
|
447
|
+
end,
|
448
|
+
[ :deprecated, :removed ].include?(@pattern.supportLevel) ?
|
449
|
+
P.new do
|
450
|
+
useInsteadMessage
|
451
|
+
end : nil
|
452
|
+
]
|
453
|
+
else
|
454
|
+
nil
|
455
|
+
end
|
456
|
+
end
|
457
|
+
|
409
458
|
def generateHTMLKeywordBox
|
410
459
|
# Box with keyword name.
|
411
460
|
P.new do
|
@@ -423,6 +472,8 @@ class TaskJuggler
|
|
423
472
|
end
|
424
473
|
|
425
474
|
def generateHTMLDescriptionBox
|
475
|
+
return nil if @pattern.supportLevel == :removed
|
476
|
+
|
426
477
|
# Box with purpose, syntax, arguments and context.
|
427
478
|
P.new do
|
428
479
|
TABLE.new({ 'align' => 'center', 'class' => 'table' }) do
|
@@ -521,6 +572,8 @@ class TaskJuggler
|
|
521
572
|
end
|
522
573
|
|
523
574
|
def generateHTMLTableLine(col1, col2, col3 = nil, col1rows = nil)
|
575
|
+
return nil if @pattern.supportLevel == :removed
|
576
|
+
|
524
577
|
TR.new('align' => 'left') do
|
525
578
|
columns = []
|
526
579
|
attrs = { 'class' => 'tag' }
|
@@ -535,6 +588,8 @@ class TaskJuggler
|
|
535
588
|
end
|
536
589
|
|
537
590
|
def generateHTMLOptionalAttributesBox
|
591
|
+
return nil if @pattern.supportLevel == :removed
|
592
|
+
|
538
593
|
# Box with attributes.
|
539
594
|
unless @optionalAttributes.empty?
|
540
595
|
@optionalAttributes.sort! do |a, b|
|
@@ -618,6 +673,8 @@ class TaskJuggler
|
|
618
673
|
end
|
619
674
|
|
620
675
|
def generateHTMLExampleBox
|
676
|
+
return nil if @pattern.supportLevel == :removed
|
677
|
+
|
621
678
|
if @pattern.exampleFile
|
622
679
|
exampleDir = AppConfig.dataDirs('test')[0] + "TestSuite/Syntax/Correct/"
|
623
680
|
example = TjpExample.new
|
@@ -634,6 +691,37 @@ class TaskJuggler
|
|
634
691
|
end
|
635
692
|
end
|
636
693
|
|
694
|
+
def supportLevelMessage
|
695
|
+
case @pattern.supportLevel
|
696
|
+
when :experimental
|
697
|
+
"This keyword is currently in an experimental state. " +
|
698
|
+
"The implementation is probably still incomplete and " +
|
699
|
+
"use of this keyword may lead to wrong results. Do not " +
|
700
|
+
"use this keyword unless you were specifically directed " +
|
701
|
+
"by the developers to try it."
|
702
|
+
when :beta
|
703
|
+
"This keyword has not yet been fully tested yet. You are " +
|
704
|
+
"welcome to try it, but it may lead to wrong results. " +
|
705
|
+
"The syntax may still change with future versions. " +
|
706
|
+
"The developers appreciate any feedback on this keyword."
|
707
|
+
when :deprecated
|
708
|
+
"This keyword should no longer be used. It will be removed " +
|
709
|
+
"in future versions of this software."
|
710
|
+
when :removed
|
711
|
+
"This keyword is no longer supported."
|
712
|
+
end
|
713
|
+
end
|
714
|
+
|
715
|
+
def useInsteadMessage
|
716
|
+
return nil if @seeAlso.empty?
|
717
|
+
|
718
|
+
descr = [ 'Use ' ]
|
719
|
+
@seeAlso.each do |a|
|
720
|
+
descr << ', ' unless descr.length <= 1
|
721
|
+
descr << A.new('href' => "#{a.keyword}.html") { a.title }
|
722
|
+
end
|
723
|
+
descr << " instead."
|
724
|
+
end
|
637
725
|
end
|
638
726
|
|
639
727
|
end
|