taskjuggler 3.0.0 → 3.1.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 +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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = LeaveList.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
|
+
# This class describes a leave.
|
|
17
|
+
class Leave
|
|
18
|
+
|
|
19
|
+
attr_reader :interval, :type, :reason
|
|
20
|
+
|
|
21
|
+
# This Hash defines the supported leave types. It maps the symbol to its
|
|
22
|
+
# index. The index sequence is important when multiple leaves are defined
|
|
23
|
+
# for the same time slot. A subsequent definition with a type with a
|
|
24
|
+
# larger index will override the old leave type.
|
|
25
|
+
Types = {
|
|
26
|
+
:project => 1,
|
|
27
|
+
:annual => 2,
|
|
28
|
+
:special => 3,
|
|
29
|
+
:sick => 4,
|
|
30
|
+
:unpaid => 5,
|
|
31
|
+
:holiday => 6
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
# Create a new Leave object. _interval_ should be an Interval describing
|
|
35
|
+
# the leave period. _type_ must be one of the supported leave types
|
|
36
|
+
# (:holiday, :annual, :special, :unpaid, :sick and :project ). The
|
|
37
|
+
# _reason_ is an optional String that describes the leave reason.
|
|
38
|
+
def initialize(type, interval, reason = nil)
|
|
39
|
+
unless Types[type]
|
|
40
|
+
raise ArgumentError, "Unsupported leave type #{type}"
|
|
41
|
+
end
|
|
42
|
+
@type = type
|
|
43
|
+
@interval = interval
|
|
44
|
+
@reason = reason
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def typeIdx
|
|
48
|
+
Types[@type]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def to_s
|
|
52
|
+
"#{@type} #{@description ? "\"#{@description}\"" : ""} #{@interval}"
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# A list of leaves.
|
|
58
|
+
class LeaveList < Array
|
|
59
|
+
|
|
60
|
+
def initialize(*args)
|
|
61
|
+
super(*args)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
class LeaveAllowance < Struct.new(:type, :date, :slots)
|
|
67
|
+
|
|
68
|
+
def initialize(type, date, slots)
|
|
69
|
+
unless Leave::Types[type]
|
|
70
|
+
raise ArgumentError, "Unsupported leave type #{type}"
|
|
71
|
+
end
|
|
72
|
+
super
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# The LeaveAllowanceList can store lists of LeaveAllowance objects.
|
|
78
|
+
# Allowances are counted in time slots and can be negative to substract
|
|
79
|
+
# expired allowances.
|
|
80
|
+
class LeaveAllowanceList < Array
|
|
81
|
+
|
|
82
|
+
# Create a new empty LeaveAllowanceList.
|
|
83
|
+
def initialize(*args)
|
|
84
|
+
super(*args)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def balance(type, startDate, endDate)
|
|
88
|
+
unless Leave::Types[type]
|
|
89
|
+
raise ArgumentError, "Unsupported leave type #{type}"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
balance = 0.0
|
|
93
|
+
each do |al|
|
|
94
|
+
balance += al.slots if al.type == type && al.date >= startDate &&
|
|
95
|
+
al.date < endDate
|
|
96
|
+
end
|
|
97
|
+
balance
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
end
|
|
103
|
+
|
data/lib/taskjuggler/Limits.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = Limits.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/Log.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = Log.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
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
require 'singleton'
|
|
15
15
|
require 'monitor'
|
|
16
|
+
require 'term/ansicolor'
|
|
16
17
|
|
|
17
18
|
class TaskJuggler
|
|
18
19
|
|
|
@@ -133,7 +134,8 @@ class TaskJuggler
|
|
|
133
134
|
def Log.stopProgressMeter
|
|
134
135
|
return if @@silent
|
|
135
136
|
|
|
136
|
-
$stdout.print("#{@@progressMeter} [
|
|
137
|
+
$stdout.print("#{@@progressMeter} [ " +
|
|
138
|
+
Term::ANSIColor.green("Done") + " ]\n")
|
|
137
139
|
end
|
|
138
140
|
|
|
139
141
|
# This function may only be called when Log#startProgressMeter has been
|
|
@@ -162,7 +164,8 @@ class TaskJuggler
|
|
|
162
164
|
bar = '=' * full + ' ' * (length - full)
|
|
163
165
|
label = (percent * 100.0).to_i.to_s + '%'
|
|
164
166
|
bar[length / 2 - label.length / 2, label.length] = label
|
|
165
|
-
$stdout.print("#{@@progressMeter} [
|
|
167
|
+
$stdout.print("#{@@progressMeter} [" +
|
|
168
|
+
Term::ANSIColor.green("#{bar}") + "]\r")
|
|
166
169
|
end
|
|
167
170
|
|
|
168
171
|
end
|
data/lib/taskjuggler/LogFile.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = LogFile.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
|
# = LogicalExpression.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
|
# = LogicalFunction.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
|
|
@@ -34,6 +34,7 @@ class TaskJuggler
|
|
|
34
34
|
'ismilestone' => 1,
|
|
35
35
|
'isongoing' => 1,
|
|
36
36
|
'isresource' => 0,
|
|
37
|
+
'isresponsibilityof' => 2,
|
|
37
38
|
'istask' => 0,
|
|
38
39
|
'treelevel' => 0
|
|
39
40
|
}
|
|
@@ -114,7 +115,7 @@ class TaskJuggler
|
|
|
114
115
|
end
|
|
115
116
|
|
|
116
117
|
query = expr.query
|
|
117
|
-
property.getAllocatedTime(scenarioIdx, query.
|
|
118
|
+
property.getAllocatedTime(scenarioIdx, query.startIdx, query.endIdx,
|
|
118
119
|
scopeProperty) > 0.0
|
|
119
120
|
end
|
|
120
121
|
|
|
@@ -211,6 +212,19 @@ class TaskJuggler
|
|
|
211
212
|
property.is_a?(Resource)
|
|
212
213
|
end
|
|
213
214
|
|
|
215
|
+
def isresponsibilityof(expr, args)
|
|
216
|
+
property = properties(expr)[0]
|
|
217
|
+
# The result can only be true when called for a Task property.
|
|
218
|
+
return false unless (task = property).is_a?(Task)
|
|
219
|
+
project = task.project
|
|
220
|
+
# 1st arg must be a resource ID.
|
|
221
|
+
return false if (resource = project.resource(args[0])).nil?
|
|
222
|
+
# 2nd arg must be a scenario index.
|
|
223
|
+
return false if (scenarioIdx = project.scenarioIdx(args[1])).nil?
|
|
224
|
+
|
|
225
|
+
task['responsible', scenarioIdx].include?(resource)
|
|
226
|
+
end
|
|
227
|
+
|
|
214
228
|
def istask(expr, args)
|
|
215
229
|
property = properties(expr)[0]
|
|
216
230
|
return false unless property
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = LogicalOperation.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,8 @@
|
|
|
11
11
|
# published by the Free Software Foundation.
|
|
12
12
|
#
|
|
13
13
|
|
|
14
|
+
require 'taskjuggler/TjTime'
|
|
15
|
+
require 'taskjuggler/RichText'
|
|
14
16
|
require 'taskjuggler/TjException'
|
|
15
17
|
|
|
16
18
|
class TaskJuggler
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = MessageHandler.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,11 @@
|
|
|
11
11
|
# published by the Free Software Foundation.
|
|
12
12
|
#
|
|
13
13
|
|
|
14
|
+
if RUBY_VERSION < "1.9.0"
|
|
15
|
+
require 'rubygems'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
require 'term/ansicolor'
|
|
14
19
|
require 'taskjuggler/TextParser/SourceFileInfo'
|
|
15
20
|
|
|
16
21
|
class TaskJuggler
|
|
@@ -19,6 +24,8 @@ class TaskJuggler
|
|
|
19
24
|
# application can send out.
|
|
20
25
|
class Message
|
|
21
26
|
|
|
27
|
+
include Term::ANSIColor
|
|
28
|
+
|
|
22
29
|
attr_reader :type, :id, :message, :sourceFileInfo, :line
|
|
23
30
|
|
|
24
31
|
# Create a new Message object. The _type_ specifies what tpye of message
|
|
@@ -69,11 +76,13 @@ class TaskJuggler
|
|
|
69
76
|
str += "#{@sourceFileInfo.fileName}:#{sourceFileInfo.lineNo}: "
|
|
70
77
|
end
|
|
71
78
|
if @scenario
|
|
72
|
-
|
|
79
|
+
tag = "#{@type.to_s.capitalize} in scenario #{@scenario.id}: "
|
|
73
80
|
else
|
|
74
|
-
|
|
81
|
+
tag = "#{@type.to_s.capitalize}: "
|
|
75
82
|
end
|
|
76
|
-
|
|
83
|
+
colors = { :fatal => red, :error => red, :warning => magenta,
|
|
84
|
+
:info => blue, :debug => green }
|
|
85
|
+
str += colors[@type] + tag + @message + reset
|
|
77
86
|
str += "\n" + @line if @line
|
|
78
87
|
str
|
|
79
88
|
end
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -w
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
#
|
|
4
|
+
# = PTNProxy.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
|
+
# This class provides objects that represent PropertyTreeNode objects that
|
|
17
|
+
# were adopted (directly or indirectly) in their new parental context. Such
|
|
18
|
+
# objects are used as elements of a PropertyList which can only hold each
|
|
19
|
+
# PropertyTreeNode objects once. By using this class, we can add such
|
|
20
|
+
# objects more than once, each time with a new parental context that was
|
|
21
|
+
# created by an adoption.
|
|
22
|
+
class PTNProxy
|
|
23
|
+
|
|
24
|
+
attr_reader :parent
|
|
25
|
+
|
|
26
|
+
def initialize(ptn, parent)
|
|
27
|
+
@ptn = ptn
|
|
28
|
+
raise "Adopted classes must have a parent" unless parent
|
|
29
|
+
@parent = parent
|
|
30
|
+
@indext = nil
|
|
31
|
+
@tree = nil
|
|
32
|
+
@level = -1
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def set(attribute, val)
|
|
36
|
+
if attribute == 'index'
|
|
37
|
+
@index = val
|
|
38
|
+
elsif attribute == 'tree'
|
|
39
|
+
@tree = val
|
|
40
|
+
else
|
|
41
|
+
@ptn.set(attribute, val)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def get(attribute)
|
|
46
|
+
if attribute == 'index'
|
|
47
|
+
@index
|
|
48
|
+
elsif attribute == 'tree'
|
|
49
|
+
@tree
|
|
50
|
+
else
|
|
51
|
+
@ptn.get(attribute)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def [](attribute, scenarioIdx)
|
|
56
|
+
if attribute == 'index'
|
|
57
|
+
@index
|
|
58
|
+
elsif attribute == 'tree'
|
|
59
|
+
@tree
|
|
60
|
+
else
|
|
61
|
+
@ptn[attribute, scenarioIdx]
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns the level that this property is on. Top-level properties return
|
|
66
|
+
# 0, their children 1 and so on. This value is cached internally, so it does
|
|
67
|
+
# not have to be calculated each time the function is called.
|
|
68
|
+
def level
|
|
69
|
+
return @level if @level >= 0
|
|
70
|
+
|
|
71
|
+
t = self
|
|
72
|
+
@level = 0
|
|
73
|
+
until (t = t.parent).nil?
|
|
74
|
+
@level += 1
|
|
75
|
+
end
|
|
76
|
+
@level
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Find out if this property is a direct or indirect child of _ancestor_.
|
|
80
|
+
def isChildOf?(ancestor)
|
|
81
|
+
parent = self
|
|
82
|
+
while parent = parent.parent
|
|
83
|
+
return true if (parent == ancestor)
|
|
84
|
+
end
|
|
85
|
+
false
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Return the 'index' attributes of this property, prefixed by the 'index'
|
|
89
|
+
# attributes of all its parents. The result is an Array of Fixnums.
|
|
90
|
+
def getIndicies
|
|
91
|
+
idcs = []
|
|
92
|
+
p = self
|
|
93
|
+
begin
|
|
94
|
+
parent = p.parent
|
|
95
|
+
idcs.insert(0, p.get('index'))
|
|
96
|
+
p = parent
|
|
97
|
+
end while p
|
|
98
|
+
idcs
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def method_missing(func, *args, &block)
|
|
102
|
+
@ptn.send(func, *args, &block)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
alias_method :respond_to_?, :respond_to?
|
|
106
|
+
|
|
107
|
+
def respond_to?(method)
|
|
108
|
+
respond_to_?(method) || @ptn.respond_to?(method)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def is_a?(type)
|
|
112
|
+
@ptn.is_a?(type)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
end
|
|
118
|
+
|
data/lib/taskjuggler/Project.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = Project.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,11 @@ require 'taskjuggler/TjException'
|
|
|
15
15
|
require 'taskjuggler/MessageHandler'
|
|
16
16
|
require 'taskjuggler/FileList'
|
|
17
17
|
require 'taskjuggler/TjTime'
|
|
18
|
+
require 'taskjuggler/AlertLevelDefinitions'
|
|
19
|
+
require 'taskjuggler/AccountCredit'
|
|
18
20
|
require 'taskjuggler/Booking'
|
|
21
|
+
require 'taskjuggler/DataCache'
|
|
22
|
+
require 'taskjuggler/LeaveList'
|
|
19
23
|
require 'taskjuggler/PropertySet'
|
|
20
24
|
require 'taskjuggler/Attributes'
|
|
21
25
|
require 'taskjuggler/RealFormat'
|
|
@@ -67,10 +71,7 @@ class TaskJuggler
|
|
|
67
71
|
# Currently, these levels are hardcoded. Each level entry has 3
|
|
68
72
|
# members: the tjp syntax token, the user visible name and the
|
|
69
73
|
# associated color as RGB byte array.
|
|
70
|
-
'alertLevels' =>
|
|
71
|
-
[ 'green', 'Green', '#008000' ],
|
|
72
|
-
[ 'yellow', 'Yellow', '#BEA800' ],
|
|
73
|
-
[ 'red', 'Red', '#C00000' ] ],
|
|
74
|
+
'alertLevels' => AlertLevelDefinitions.new,
|
|
74
75
|
'copyright' => nil,
|
|
75
76
|
'costAccount' => nil,
|
|
76
77
|
'currency' => "EUR",
|
|
@@ -80,6 +81,7 @@ class TaskJuggler
|
|
|
80
81
|
'flags' => [],
|
|
81
82
|
'journal' => Journal.new,
|
|
82
83
|
'limits' => nil,
|
|
84
|
+
'leaves' => LeaveList.new,
|
|
83
85
|
'loadUnit' => :days,
|
|
84
86
|
'name' => name,
|
|
85
87
|
'navigators' => {},
|
|
@@ -96,7 +98,6 @@ class TaskJuggler
|
|
|
96
98
|
'timeFormat' => "%Y-%m-%d",
|
|
97
99
|
'timezone' => TjTime.timeZone,
|
|
98
100
|
'trackingScenarioIdx' => nil,
|
|
99
|
-
'vacations' => [],
|
|
100
101
|
'version' => version || "1.0",
|
|
101
102
|
'weekStartsMonday' => true,
|
|
102
103
|
'workinghours' => nil,
|
|
@@ -134,24 +135,24 @@ class TaskJuggler
|
|
|
134
135
|
attrs = [
|
|
135
136
|
# ID Name Type
|
|
136
137
|
# Inh. Inh.Prj Scen. Default
|
|
137
|
-
[ 'bsi', 'BSI',
|
|
138
|
+
[ 'bsi', 'BSI', StringAttribute,
|
|
138
139
|
false, false, false, "" ],
|
|
139
|
-
[ 'id', 'ID',
|
|
140
|
+
[ 'id', 'ID', StringAttribute,
|
|
140
141
|
false, false, false, nil ],
|
|
141
142
|
[ 'index', 'Index', FixnumAttribute,
|
|
142
143
|
false, false, false, -1 ],
|
|
143
|
-
[ '
|
|
144
|
+
[ 'leaves', 'Leaves', LeaveListAttribute,
|
|
145
|
+
true, true, true, LeaveList.new ],
|
|
146
|
+
[ 'name', 'Name', StringAttribute,
|
|
144
147
|
false, false, false, nil ],
|
|
145
148
|
[ 'replace', 'Replace', BooleanAttribute,
|
|
146
149
|
true, false, true, false ],
|
|
147
|
-
[ 'seqno', 'No',
|
|
150
|
+
[ 'seqno', 'No', FixnumAttribute,
|
|
148
151
|
false, false, false, nil ],
|
|
149
152
|
[ 'timezone', 'Time Zone', StringAttribute,
|
|
150
153
|
true, true, true, TjTime.timeZone ],
|
|
151
154
|
[ 'tree', 'Tree Index', StringAttribute,
|
|
152
155
|
false, false, false, "" ],
|
|
153
|
-
[ 'vacations', 'Vacations', TimeIntervalListAttribute,
|
|
154
|
-
true, true, true, [] ],
|
|
155
156
|
[ 'workinghours', 'Working Hours', WorkingHoursAttribute,
|
|
156
157
|
true, true, true, nil ]
|
|
157
158
|
]
|
|
@@ -161,8 +162,12 @@ class TaskJuggler
|
|
|
161
162
|
attrs = [
|
|
162
163
|
# ID Name Type
|
|
163
164
|
# Inh. Inh.Prj Scen. Default
|
|
165
|
+
[ 'aggregate', 'Aggregate', SymbolAttribute,
|
|
166
|
+
true, false, false, :tasks ],
|
|
164
167
|
[ 'bsi', 'BSI', StringAttribute,
|
|
165
168
|
false, false, false, "" ],
|
|
169
|
+
[ 'credits', 'Credits', AccountCreditListAttribute,
|
|
170
|
+
false, false, true, [] ],
|
|
166
171
|
[ 'id', 'ID', StringAttribute,
|
|
167
172
|
false, false, false, nil ],
|
|
168
173
|
[ 'index', 'Index', FixnumAttribute,
|
|
@@ -186,6 +191,8 @@ class TaskJuggler
|
|
|
186
191
|
false, false, true, 0.0 ],
|
|
187
192
|
[ 'bsi', 'BSI', StringAttribute,
|
|
188
193
|
false, false, false, "" ],
|
|
194
|
+
[ 'chargeset', 'Charge Sets', ChargeSetListAttribute,
|
|
195
|
+
true, false, true, [] ],
|
|
189
196
|
[ 'criticalness', 'Criticalness', FloatAttribute,
|
|
190
197
|
false, false, true, 0.0 ],
|
|
191
198
|
[ 'duties', 'Duties', TaskListAttribute,
|
|
@@ -202,10 +209,12 @@ class TaskJuggler
|
|
|
202
209
|
false, false, false, [] ],
|
|
203
210
|
[ 'flags', 'Flags', FlagListAttribute,
|
|
204
211
|
true, false, true, [] ],
|
|
205
|
-
[ 'headcount', 'Headcount', FixnumAttribute,
|
|
206
|
-
false, false, true, 1 ],
|
|
207
212
|
[ 'index', 'Index', FixnumAttribute,
|
|
208
213
|
false, false, false, -1 ],
|
|
214
|
+
[ 'leaveallowances', 'Leave Allowances', LeaveAllowanceListAttribute,
|
|
215
|
+
true, false, true, LeaveAllowanceList.new ],
|
|
216
|
+
[ 'leaves', 'Leaves', LeaveListAttribute,
|
|
217
|
+
true, true, true, LeaveList.new ],
|
|
209
218
|
[ 'limits', 'Limits', LimitsAttribute,
|
|
210
219
|
true, true, true, nil ],
|
|
211
220
|
[ 'managers', 'Managers', ResourceListAttribute,
|
|
@@ -220,8 +229,6 @@ class TaskJuggler
|
|
|
220
229
|
true, false, true, nil ],
|
|
221
230
|
[ 'tree', 'Tree Index', StringAttribute,
|
|
222
231
|
false, false, false, "" ],
|
|
223
|
-
[ 'vacations', 'Vacations', TimeIntervalListAttribute,
|
|
224
|
-
true, true, true, [] ],
|
|
225
232
|
[ 'warn', 'Warning Condition', LogicalExpressionListAttribute,
|
|
226
233
|
false, false, false, [] ],
|
|
227
234
|
[ 'workinghours', 'Working Hours', WorkingHoursAttribute,
|
|
@@ -267,6 +274,8 @@ class TaskJuggler
|
|
|
267
274
|
true, false, true, [] ],
|
|
268
275
|
[ 'forward', 'Scheduling', BooleanAttribute,
|
|
269
276
|
true, false, true, true ],
|
|
277
|
+
[ 'gauge', 'Schedule gauge', StringAttribute,
|
|
278
|
+
false, false, true, nil ],
|
|
270
279
|
[ 'id', 'ID', StringAttribute,
|
|
271
280
|
false, false, false, nil ],
|
|
272
281
|
[ 'index', 'Index', FixnumAttribute,
|
|
@@ -324,6 +333,8 @@ class TaskJuggler
|
|
|
324
333
|
attrs = [
|
|
325
334
|
# ID Name Type
|
|
326
335
|
# Inh. Inh.Prj Scen. Default
|
|
336
|
+
[ 'accountRoot', 'Account Root', PropertyAttribute,
|
|
337
|
+
true, false, false, nil ],
|
|
327
338
|
[ 'bsi', 'BSI', StringAttribute,
|
|
328
339
|
false, false, false, "" ],
|
|
329
340
|
[ 'caption', 'Caption', RichTextAttribute,
|
|
@@ -354,6 +365,8 @@ class TaskJuggler
|
|
|
354
365
|
true, false, false, nil ],
|
|
355
366
|
[ 'headline', 'Headline', RichTextAttribute,
|
|
356
367
|
true, false, false, nil ],
|
|
368
|
+
[ 'hideAccount', 'Hide Account', LogicalExpressionAttribute,
|
|
369
|
+
true, false, false, nil ],
|
|
357
370
|
[ 'hideJournalEntry', 'Hide JournalEntry', LogicalExpressionAttribute,
|
|
358
371
|
true, false, false, nil ],
|
|
359
372
|
[ 'hideResource', 'Hide Resource', LogicalExpressionAttribute,
|
|
@@ -392,6 +405,8 @@ class TaskJuggler
|
|
|
392
405
|
true, true, false, nil ],
|
|
393
406
|
[ 'right', 'Right', RichTextAttribute,
|
|
394
407
|
true, false, false, nil ],
|
|
408
|
+
[ 'rollupAccount', 'Rollup Account', LogicalExpressionAttribute,
|
|
409
|
+
true, false, false, nil ],
|
|
395
410
|
[ 'rollupResource', 'Rollup Resource', LogicalExpressionAttribute,
|
|
396
411
|
true, false, false, nil ],
|
|
397
412
|
[ 'rollupTask', 'Rollup Task', LogicalExpressionAttribute,
|
|
@@ -404,6 +419,8 @@ class TaskJuggler
|
|
|
404
419
|
false, false, false, nil ],
|
|
405
420
|
[ 'shortTimeFormat', 'Short Time Format', StringAttribute,
|
|
406
421
|
true, true, false, nil ],
|
|
422
|
+
[ 'sortAccounts', 'Sort Accounts', SortListAttribute,
|
|
423
|
+
true, false, false, [[ 'seqno', true, -1 ]] ],
|
|
407
424
|
[ 'sortJournalEntries', 'Sort Journal Entries', JournalSortListAttribute,
|
|
408
425
|
true, false, false, [[ :alert, 1 ], [ :date, 1 ], [ :seqno, 1 ]] ],
|
|
409
426
|
[ 'sortResources', 'Sort Resources', SortListAttribute,
|
|
@@ -440,10 +457,10 @@ class TaskJuggler
|
|
|
440
457
|
|
|
441
458
|
@timeSheets = TimeSheets.new
|
|
442
459
|
|
|
443
|
-
# A scoreboard that reflects the global working hours and
|
|
460
|
+
# A scoreboard that reflects the global working hours and leaves.
|
|
444
461
|
@scoreboard = nil
|
|
445
|
-
# A scoreboard that reflects the global working hours but no
|
|
446
|
-
@
|
|
462
|
+
# A scoreboard that reflects the global working hours but no leaves.
|
|
463
|
+
@scoreboardNoLeaves = nil
|
|
447
464
|
|
|
448
465
|
# The ReportContext provides additional settings to the report that can
|
|
449
466
|
# complement or replace the report attributes. Reports can include other
|
|
@@ -495,48 +512,15 @@ class TaskJuggler
|
|
|
495
512
|
@scenarios.items
|
|
496
513
|
end
|
|
497
514
|
|
|
498
|
-
# Try to match _levelName_ to a defined alert level name and return the
|
|
499
|
-
# index of it. If no level is found, nil is returned.
|
|
500
|
-
def alertLevelIndex(levelName)
|
|
501
|
-
@attributes['alertLevels'].length.times do |i|
|
|
502
|
-
if @attributes['alertLevels'][i][0] == levelName
|
|
503
|
-
return i
|
|
504
|
-
end
|
|
505
|
-
end
|
|
506
|
-
nil
|
|
507
|
-
end
|
|
508
|
-
|
|
509
|
-
# Return the ID or keyword of the alert level with the given _levelIndex_.
|
|
510
|
-
# Or nil if the level does not exist.
|
|
511
|
-
def alertLevelId(levelIndex)
|
|
512
|
-
return 'unknown' unless @attributes['alertLevels'][levelIndex]
|
|
513
|
-
@attributes['alertLevels'][levelIndex][0]
|
|
514
|
-
end
|
|
515
|
-
|
|
516
|
-
# Return the user readable name of the alert level with the given
|
|
517
|
-
# _levelIndex_. Or nil if the level does not exist.
|
|
518
|
-
def alertLevelName(levelIndex)
|
|
519
|
-
return 'unknown' unless @attributes['alertLevels'][levelIndex]
|
|
520
|
-
@attributes['alertLevels'][levelIndex][1]
|
|
521
|
-
end
|
|
522
|
-
|
|
523
|
-
# Return the color of the alert level with the given _levelIndex_. Or nil
|
|
524
|
-
# if the level does not exist. The color is an RGB encoded byte array,
|
|
525
|
-
# stored as hexadecimal String, prefixed with a pound sign.
|
|
526
|
-
def alertLevelColor(levelIndex)
|
|
527
|
-
return 'unknown' unless @attributes['alertLevels'][levelIndex]
|
|
528
|
-
@attributes['alertLevels'][levelIndex][2]
|
|
529
|
-
end
|
|
530
|
-
|
|
531
515
|
# Return the average number of working hours per day. This defaults to 8 but
|
|
532
516
|
# can be set to other values by the user.
|
|
533
517
|
def dailyWorkingHours
|
|
534
518
|
@attributes['dailyworkinghours'].to_f
|
|
535
519
|
end
|
|
536
520
|
|
|
537
|
-
# Return the average number of working days per week.
|
|
538
521
|
def weeklyWorkingDays
|
|
539
|
-
@attributes['
|
|
522
|
+
@attributes['workinghours'].weeklyWorkingHours /
|
|
523
|
+
@attributes['dailyworkinghours']
|
|
540
524
|
end
|
|
541
525
|
|
|
542
526
|
# Return the average number of working days per month.
|
|
@@ -625,7 +609,7 @@ class TaskJuggler
|
|
|
625
609
|
def schedule
|
|
626
610
|
initScoreboards
|
|
627
611
|
|
|
628
|
-
[ @shifts, @resources, @tasks ].each do |p|
|
|
612
|
+
[ @accounts, @shifts, @resources, @tasks ].each do |p|
|
|
629
613
|
# Set all index counters to their proper values.
|
|
630
614
|
p.index
|
|
631
615
|
end
|
|
@@ -680,7 +664,9 @@ class TaskJuggler
|
|
|
680
664
|
|
|
681
665
|
unless @accounts.empty?
|
|
682
666
|
@reports.each do |report|
|
|
683
|
-
if report.
|
|
667
|
+
if (report.typeSpec != :accountreport) &&
|
|
668
|
+
(report.get('costAccount').nil? ||
|
|
669
|
+
report.get('revenueAccount').nil?)
|
|
684
670
|
warning('report_without_balance',
|
|
685
671
|
"The report #{report.fullId} has no 'balance' defined. " +
|
|
686
672
|
"No cost or revenue computation will be possible.",
|
|
@@ -738,6 +724,7 @@ class TaskJuggler
|
|
|
738
724
|
Log.stopProgressMeter
|
|
739
725
|
end
|
|
740
726
|
end
|
|
727
|
+
DataCache.instance.flush
|
|
741
728
|
end
|
|
742
729
|
|
|
743
730
|
def generateReport(reportId, regExpMode, formats = nil,
|
|
@@ -828,6 +815,10 @@ class TaskJuggler
|
|
|
828
815
|
@reports.addProperty(report)
|
|
829
816
|
end
|
|
830
817
|
|
|
818
|
+
def removeAccount(account) # :nodoc:
|
|
819
|
+
@accounts.removeProperty(account)
|
|
820
|
+
end
|
|
821
|
+
|
|
831
822
|
# call-seq:
|
|
832
823
|
# isWorkingTime(slotIdx) -> true or false
|
|
833
824
|
# isWorkingTime(slot) -> true or false
|
|
@@ -837,7 +828,7 @@ class TaskJuggler
|
|
|
837
828
|
# Return true if the slot or interval is withing globally defined working
|
|
838
829
|
# time or false if not. If the argument is a TimeInterval, all slots of
|
|
839
830
|
# the interval must be working time to return true as result. Global work
|
|
840
|
-
# time means, no global
|
|
831
|
+
# time means, no global leaves defined and the slot lies within a
|
|
841
832
|
# defined global working time period.
|
|
842
833
|
def isWorkingTime(*args)
|
|
843
834
|
# Normalize argument(s) to TimeInterval
|
|
@@ -869,7 +860,7 @@ class TaskJuggler
|
|
|
869
860
|
# hasWorkingTime(interval) -> true or false
|
|
870
861
|
#
|
|
871
862
|
# Return true if the interval overlaps with a globally defined working
|
|
872
|
-
# time or false if not. Global work time means, no global
|
|
863
|
+
# time or false if not. Global work time means, no global leaves defined
|
|
873
864
|
# and the slot lies within a defined global working time period.
|
|
874
865
|
def hasWorkingTime(*args)
|
|
875
866
|
# Normalize argument(s) to TimeInterval
|
|
@@ -941,20 +932,20 @@ class TaskJuggler
|
|
|
941
932
|
end
|
|
942
933
|
end
|
|
943
934
|
|
|
944
|
-
# Return the number of working days (ignoring global
|
|
935
|
+
# Return the number of working days (ignoring global leaves) during the
|
|
945
936
|
# given _interval_.
|
|
946
937
|
def workingDays(interval)
|
|
947
938
|
startIdx = dateToIdx(interval.start)
|
|
948
939
|
endIdx = dateToIdx(interval.end)
|
|
949
940
|
slots = 0
|
|
950
941
|
startIdx.upto(endIdx) do |idx|
|
|
951
|
-
slots += 1 unless @
|
|
942
|
+
slots += 1 unless @scoreboardNoLeaves[idx]
|
|
952
943
|
end
|
|
953
944
|
slotsToDays(slots)
|
|
954
945
|
end
|
|
955
946
|
|
|
956
947
|
# Return the number of global working slots during the given time interval
|
|
957
|
-
# specified by _startIdx_ and _endIdx_. This method takes global
|
|
948
|
+
# specified by _startIdx_ and _endIdx_. This method takes global leaves
|
|
958
949
|
# into account.
|
|
959
950
|
def getWorkSlots(startIdx, endIdx)
|
|
960
951
|
slots = 0
|
|
@@ -1244,7 +1235,7 @@ class TaskJuggler
|
|
|
1244
1235
|
@scoreboard = Scoreboard.new(@attributes['start'], @attributes['end'],
|
|
1245
1236
|
@attributes['scheduleGranularity'], 2)
|
|
1246
1237
|
# And the same for another scoreboard.
|
|
1247
|
-
@
|
|
1238
|
+
@scoreboardNoLeaves =
|
|
1248
1239
|
Scoreboard.new(@attributes['start'], @attributes['end'],
|
|
1249
1240
|
@attributes['scheduleGranularity'], 2)
|
|
1250
1241
|
|
|
@@ -1256,15 +1247,15 @@ class TaskJuggler
|
|
|
1256
1247
|
scoreboardSize.times do |i|
|
|
1257
1248
|
if workinghours.onShift?(date)
|
|
1258
1249
|
@scoreboard[i] = nil
|
|
1259
|
-
@
|
|
1250
|
+
@scoreboardNoLeaves[i] = nil
|
|
1260
1251
|
end
|
|
1261
1252
|
date += delta
|
|
1262
1253
|
end
|
|
1263
1254
|
|
|
1264
|
-
# Mark all global
|
|
1265
|
-
@attributes['
|
|
1266
|
-
startIdx = @scoreboard.dateToIdx(
|
|
1267
|
-
endIdx = @scoreboard.dateToIdx(
|
|
1255
|
+
# Mark all global leave slots as such
|
|
1256
|
+
@attributes['leaves'].each do |leave|
|
|
1257
|
+
startIdx = @scoreboard.dateToIdx(leave.interval.start)
|
|
1258
|
+
endIdx = @scoreboard.dateToIdx(leave.interval.end)
|
|
1268
1259
|
startIdx.upto(endIdx - 1) do |i|
|
|
1269
1260
|
# If the slot is nil or set to 4 then don't set the time-off bit.
|
|
1270
1261
|
sb = @scoreboard[i]
|