taskjuggler 3.6.0 → 3.7.2
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.
- checksums.yaml +5 -5
- data/CHANGELOG +69 -0
- data/Rakefile +4 -1
- data/data/css/tjreport.css +4 -0
- data/data/tjp.vim +9 -3
- data/examples/ProjectTemplate/template.tjp +10 -10
- data/examples/Tutorial/tutorial.tjp +4 -4
- data/lib/taskjuggler/Allocation.rb +1 -1
- data/lib/taskjuggler/AppConfig.rb +1 -1
- data/lib/taskjuggler/AttributeBase.rb +10 -4
- data/lib/taskjuggler/Attributes.rb +2 -2
- data/lib/taskjuggler/BatchProcessor.rb +69 -58
- data/lib/taskjuggler/FileList.rb +1 -1
- data/lib/taskjuggler/Interval.rb +10 -12
- data/lib/taskjuggler/Journal.rb +2 -2
- data/lib/taskjuggler/LogicalFunction.rb +1 -1
- data/lib/taskjuggler/LogicalOperation.rb +7 -4
- data/lib/taskjuggler/MessageHandler.rb +1 -2
- data/lib/taskjuggler/PTNProxy.rb +1 -1
- data/lib/taskjuggler/Project.rb +27 -22
- data/lib/taskjuggler/PropertyList.rb +7 -1
- data/lib/taskjuggler/PropertySet.rb +1 -1
- data/lib/taskjuggler/PropertyTreeNode.rb +5 -3
- data/lib/taskjuggler/Query.rb +3 -3
- data/lib/taskjuggler/RealFormat.rb +1 -1
- data/lib/taskjuggler/Resource.rb +2 -2
- data/lib/taskjuggler/ResourceScenario.rb +66 -6
- data/lib/taskjuggler/RichText/Snip.rb +1 -1
- data/lib/taskjuggler/RuntimeConfig.rb +2 -2
- data/lib/taskjuggler/Scoreboard.rb +5 -2
- data/lib/taskjuggler/SheetHandlerBase.rb +5 -4
- data/lib/taskjuggler/Shift.rb +2 -2
- data/lib/taskjuggler/ShiftAssignments.rb +1 -1
- data/lib/taskjuggler/StatusSheetReceiver.rb +2 -2
- data/lib/taskjuggler/StatusSheetSender.rb +1 -1
- data/lib/taskjuggler/TaskJuggler.rb +4 -4
- data/lib/taskjuggler/TaskScenario.rb +7 -2
- data/lib/taskjuggler/TextParser/Scanner.rb +4 -4
- data/lib/taskjuggler/TextParser.rb +1 -1
- data/lib/taskjuggler/TimeSheetReceiver.rb +2 -2
- data/lib/taskjuggler/TimeSheetSender.rb +1 -1
- data/lib/taskjuggler/TimeSheets.rb +5 -4
- data/lib/taskjuggler/Tj3AppBase.rb +23 -9
- data/lib/taskjuggler/Tj3Config.rb +5 -3
- data/lib/taskjuggler/TjpExample.rb +3 -1
- data/lib/taskjuggler/TjpSyntaxRules.rb +166 -133
- data/lib/taskjuggler/UTF8String.rb +3 -3
- data/lib/taskjuggler/WorkingHours.rb +3 -3
- data/lib/taskjuggler/XMLDocument.rb +1 -1
- data/lib/taskjuggler/XMLElement.rb +12 -1
- data/lib/taskjuggler/apps/Tj3.rb +3 -1
- data/lib/taskjuggler/apps/Tj3Client.rb +3 -2
- data/lib/taskjuggler/apps/Tj3Daemon.rb +5 -3
- data/lib/taskjuggler/apps/Tj3Man.rb +4 -2
- data/lib/taskjuggler/apps/Tj3SsReceiver.rb +3 -1
- data/lib/taskjuggler/apps/Tj3SsSender.rb +3 -1
- data/lib/taskjuggler/apps/Tj3TsReceiver.rb +3 -1
- data/lib/taskjuggler/apps/Tj3TsSender.rb +3 -1
- data/lib/taskjuggler/apps/Tj3TsSummary.rb +3 -1
- data/lib/taskjuggler/apps/Tj3WebD.rb +4 -2
- data/lib/taskjuggler/daemon/ProjectServer.rb +2 -2
- data/lib/taskjuggler/deep_copy.rb +1 -1
- data/lib/taskjuggler/reports/CSVFile.rb +4 -4
- data/lib/taskjuggler/reports/ChartPlotter.rb +1 -1
- data/lib/taskjuggler/reports/GanttChart.rb +8 -2
- data/lib/taskjuggler/reports/GanttHeader.rb +11 -1
- data/lib/taskjuggler/reports/GanttLine.rb +6 -0
- data/lib/taskjuggler/reports/ICalReport.rb +1 -1
- data/lib/taskjuggler/reports/MspXmlRE.rb +5 -3
- data/lib/taskjuggler/reports/Report.rb +6 -6
- data/lib/taskjuggler/reports/ReportTableCell.rb +1 -1
- data/lib/taskjuggler/reports/TableReport.rb +7 -12
- data/lib/taskjuggler/reports/TjpExportRE.rb +1 -5
- data/lib/taskjuggler/reports/TraceReport.rb +2 -2
- data/lib/taskjuggler/version.rb +1 -0
- data/man/tj3.1 +130 -0
- data/man/tj3client.1 +145 -0
- data/man/tj3d.1 +93 -0
- data/man/tj3man.1 +76 -0
- data/man/tj3ss_receiver.1 +86 -0
- data/man/tj3ss_sender.1 +100 -0
- data/man/tj3ts_receiver.1 +86 -0
- data/man/tj3ts_sender.1 +92 -0
- data/man/tj3ts_summary.1 +104 -0
- data/man/tj3webd.1 +86 -0
- data/manual/Day_To_Day_Juggling +8 -8
- data/manual/Installation +6 -6
- data/manual/List_Attributes +1 -1
- data/manual/Rich_Text_Attributes +6 -5
- data/manual/Software +6 -6
- data/manual/TaskJuggler_Internals +4 -4
- data/manual/The_TaskJuggler_Syntax +5 -5
- data/manual/Tutorial +13 -11
- data/manual/html/Day_To_Day_Juggling.html +9 -9
- data/manual/html/Getting_Started.html +2 -2
- data/manual/html/How_To_Contribute.html +2 -2
- data/manual/html/Installation.html +8 -8
- data/manual/html/Intro.html +2 -2
- data/manual/html/List_Attributes.html +3 -3
- data/manual/html/Reporting_Bugs.html +2 -2
- data/manual/html/Rich_Text_Attributes.html +5 -5
- data/manual/html/Software.html +7 -7
- data/manual/html/TaskJuggler_2x_Migration.html +2 -2
- data/manual/html/TaskJuggler_Internals.html +6 -6
- data/manual/html/The_TaskJuggler_Syntax.html +6 -6
- data/manual/html/Tutorial.html +17 -14
- data/manual/html/account.html +3 -3
- data/manual/html/account.task.html +2 -2
- data/manual/html/accountprefix.html +2 -2
- data/manual/html/accountreport.html +3 -3
- data/manual/html/accountroot.html +2 -2
- data/manual/html/active.html +3 -3
- data/manual/html/adopt.task.html +2 -2
- data/manual/html/aggregate.html +2 -2
- data/manual/html/alert.html +3 -3
- data/manual/html/alertlevels.html +2 -2
- data/manual/html/allocate.html +3 -3
- data/manual/html/alphabet.html +1 -1
- data/manual/html/alternative.html +2 -2
- data/manual/html/author.html +2 -2
- data/manual/html/auxdir.html +2 -2
- data/manual/html/auxdir.report.html +2 -2
- data/manual/html/balance.html +2 -2
- data/manual/html/booking.resource.html +4 -4
- data/manual/html/booking.task.html +4 -4
- data/manual/html/caption.html +2 -2
- data/manual/html/cellcolor.column.html +3 -3
- data/manual/html/celltext.column.html +3 -3
- data/manual/html/center.html +2 -2
- data/manual/html/charge.html +2 -2
- data/manual/html/chargeset.html +2 -2
- data/manual/html/columnid.html +21 -14
- data/manual/html/columns.html +2 -2
- data/manual/html/complete.html +2 -2
- data/manual/html/copyright.html +2 -2
- data/manual/html/credits.html +2 -2
- data/manual/html/css/tjreport.css +4 -0
- data/manual/html/currency.html +2 -2
- data/manual/html/currencyformat.html +3 -3
- data/manual/html/dailymax.html +2 -2
- data/manual/html/dailymin.html +3 -3
- data/manual/html/dailyworkinghours.html +2 -2
- data/manual/html/date.extend.html +2 -2
- data/manual/html/date.html +5 -5
- data/manual/html/definitions.html +4 -4
- data/manual/html/depends.html +4 -4
- data/manual/html/details.html +2 -2
- data/manual/html/disabled.html +2 -2
- data/manual/html/duration.html +2 -2
- data/manual/html/efficiency.html +3 -3
- data/manual/html/effort.html +2 -2
- data/manual/html/effortdone.html +2 -2
- data/manual/html/effortleft.html +2 -2
- data/manual/html/email.html +2 -2
- data/manual/html/enabled.html +2 -2
- data/manual/html/end.column.html +3 -3
- data/manual/html/end.html +4 -4
- data/manual/html/end.limit.html +2 -2
- data/manual/html/end.report.html +2 -2
- data/manual/html/end.timesheet.html +3 -3
- data/manual/html/endcredit.html +3 -3
- data/manual/html/epilog.html +2 -2
- data/manual/html/export.html +3 -3
- data/manual/html/extend.html +3 -3
- data/manual/html/fail.html +3 -3
- data/manual/html/fdl.html +2 -2
- data/manual/html/flags.account.html +2 -2
- data/manual/html/flags.html +2 -2
- data/manual/html/flags.journalentry.html +2 -2
- data/manual/html/flags.report.html +2 -2
- data/manual/html/flags.resource.html +2 -2
- data/manual/html/flags.statussheet.html +2 -2
- data/manual/html/flags.task.html +2 -2
- data/manual/html/flags.timesheet.html +2 -2
- data/manual/html/fontcolor.column.html +3 -3
- data/manual/html/footer.html +2 -2
- data/manual/html/formats.export.html +3 -3
- data/manual/html/formats.html +3 -3
- data/manual/html/functions.html +5 -5
- data/manual/html/gapduration.html +2 -2
- data/manual/html/gaplength.html +2 -2
- data/manual/html/halign.center.html +2 -2
- data/manual/html/halign.column.html +3 -3
- data/manual/html/halign.left.html +2 -2
- data/manual/html/halign.right.html +2 -2
- data/manual/html/hasalert.html +2 -2
- data/manual/html/header.html +2 -2
- data/manual/html/headline.html +2 -2
- data/manual/html/height.html +3 -3
- data/manual/html/hideaccount.html +3 -3
- data/manual/html/hidejournalentry.html +2 -2
- data/manual/html/hidereport.html +3 -3
- data/manual/html/hideresource.html +3 -3
- data/manual/html/hidetask.html +3 -3
- data/manual/html/icalreport.html +9 -3
- data/manual/html/include.macro.html +3 -3
- data/manual/html/include.project.html +3 -3
- data/manual/html/include.properties.html +3 -3
- data/manual/html/index.html +1 -1
- 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 +2 -2
- data/manual/html/interval4.html +2 -2
- data/manual/html/isactive.html +2 -2
- data/manual/html/ischildof.html +2 -2
- data/manual/html/isdependencyof.html +2 -2
- data/manual/html/isdutyof.html +2 -2
- data/manual/html/isfeatureof.html +2 -2
- data/manual/html/isleaf.html +2 -2
- data/manual/html/ismilestone.html +2 -2
- data/manual/html/isongoing.html +3 -3
- data/manual/html/isresource.html +2 -2
- data/manual/html/isresponsibilityof.html +2 -2
- data/manual/html/istask.html +2 -2
- data/manual/html/isvalid.html +2 -2
- data/manual/html/journalattributes.html +2 -2
- data/manual/html/journalentry.html +3 -3
- data/manual/html/journalmode.html +3 -3
- data/manual/html/leaveallowance.html +3 -3
- data/manual/html/leaves.html +3 -3
- data/manual/html/left.html +2 -2
- data/manual/html/length.html +3 -3
- data/manual/html/limits.allocate.html +2 -2
- data/manual/html/limits.html +2 -2
- data/manual/html/limits.resource.html +2 -2
- data/manual/html/limits.task.html +2 -2
- data/manual/html/listitem.column.html +3 -3
- data/manual/html/listtype.column.html +2 -2
- data/manual/html/loadunit.html +2 -2
- data/manual/html/logicalexpression.html +4 -4
- data/manual/html/logicalflagexpression.html +4 -4
- data/manual/html/macro.html +4 -4
- data/manual/html/managers.html +2 -2
- data/manual/html/mandatory.html +4 -4
- data/manual/html/markdate.html +69 -0
- data/manual/html/maxend.html +4 -4
- data/manual/html/maximum.html +2 -2
- data/manual/html/maxstart.html +2 -2
- data/manual/html/milestone.html +3 -3
- data/manual/html/minend.html +2 -2
- data/manual/html/minimum.html +2 -2
- data/manual/html/minstart.html +2 -2
- data/manual/html/monthlymax.html +2 -2
- data/manual/html/monthlymin.html +3 -3
- data/manual/html/navbar.html +5 -1
- data/manual/html/navigator.html +2 -2
- data/manual/html/newtask.html +3 -3
- data/manual/html/nikureport.html +2 -2
- data/manual/html/note.task.html +4 -4
- data/manual/html/novevents.html +68 -0
- data/manual/html/now.html +4 -4
- data/manual/html/number.extend.html +2 -2
- data/manual/html/numberformat.html +2 -2
- data/manual/html/onend.html +2 -2
- data/manual/html/onstart.html +2 -2
- data/manual/html/opennodes.html +2 -2
- data/manual/html/outputdir.html +3 -3
- data/manual/html/overtime.booking.html +2 -2
- data/manual/html/period.column.html +2 -2
- data/manual/html/period.limit.html +2 -2
- data/manual/html/period.report.html +2 -2
- data/manual/html/period.task.html +2 -2
- data/manual/html/persistent.html +3 -3
- data/manual/html/precedes.html +5 -5
- data/manual/html/priority.html +4 -4
- data/manual/html/priority.timesheet.html +3 -3
- data/manual/html/project.html +4 -4
- data/manual/html/projectid.html +2 -2
- data/manual/html/projectid.task.html +3 -3
- data/manual/html/projectids.html +2 -2
- data/manual/html/projection.html +2 -2
- data/manual/html/prolog.html +2 -2
- data/manual/html/properties.html +3 -3
- data/manual/html/purge.html +2 -2
- data/manual/html/rate.html +2 -2
- data/manual/html/rate.resource.html +2 -2
- data/manual/html/rawhtmlhead.html +3 -3
- data/manual/html/reference.extend.html +2 -2
- data/manual/html/remaining.html +3 -3
- data/manual/html/replace.html +2 -2
- data/manual/html/reportprefix.html +2 -2
- data/manual/html/resource.html +3 -3
- data/manual/html/resourceattributes.html +2 -2
- data/manual/html/resourceprefix.html +2 -2
- data/manual/html/resourcereport.html +4 -4
- data/manual/html/resourceroot.html +3 -3
- data/manual/html/resources.limit.html +2 -2
- data/manual/html/responsible.html +2 -2
- data/manual/html/richtext.extend.html +2 -2
- data/manual/html/right.html +2 -2
- data/manual/html/rollupaccount.html +3 -3
- data/manual/html/rollupresource.html +3 -3
- data/manual/html/rolluptask.html +3 -3
- data/manual/html/scale.column.html +2 -2
- data/manual/html/scenario.html +3 -3
- data/manual/html/scenario.ical.html +3 -3
- data/manual/html/scenarios.export.html +2 -2
- data/manual/html/scenarios.html +2 -2
- data/manual/html/scenariospecific.extend.html +2 -2
- data/manual/html/scheduled.html +2 -2
- data/manual/html/scheduling.html +6 -6
- data/manual/html/schedulingmode.html +2 -2
- data/manual/html/select.html +4 -4
- data/manual/html/selfcontained.html +2 -2
- data/manual/html/shift.allocate.html +2 -2
- data/manual/html/shift.html +3 -3
- data/manual/html/shift.resource.html +4 -4
- data/manual/html/shift.task.html +2 -2
- data/manual/html/shift.timesheet.html +2 -2
- data/manual/html/shifts.allocate.html +2 -2
- data/manual/html/shifts.resource.html +2 -2
- data/manual/html/shifts.task.html +3 -3
- data/manual/html/shorttimeformat.html +3 -3
- data/manual/html/sloppy.booking.html +2 -2
- data/manual/html/sloppy.projection.html +2 -2
- data/manual/html/sortaccounts.html +2 -2
- data/manual/html/sortjournalentries.html +2 -2
- data/manual/html/sortresources.html +2 -2
- data/manual/html/sorttasks.html +2 -2
- data/manual/html/start.column.html +3 -3
- data/manual/html/start.html +4 -4
- data/manual/html/start.limit.html +2 -2
- data/manual/html/start.report.html +2 -2
- data/manual/html/startcredit.html +3 -3
- data/manual/html/status.statussheet.html +2 -2
- data/manual/html/status.timesheet.html +2 -2
- data/manual/html/statussheet.html +2 -2
- data/manual/html/statussheetreport.html +3 -3
- data/manual/html/strict.projection.html +2 -2
- data/manual/html/summary.html +2 -2
- data/manual/html/supplement.html +2 -2
- data/manual/html/supplement.resource.html +2 -2
- data/manual/html/supplement.task.html +2 -2
- 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 +2 -2
- data/manual/html/taskattributes.html +2 -2
- data/manual/html/taskprefix.html +2 -2
- data/manual/html/taskreport.html +4 -4
- data/manual/html/taskroot.export.html +2 -2
- data/manual/html/taskroot.html +2 -2
- data/manual/html/text.extend.html +2 -2
- data/manual/html/textreport.html +4 -4
- data/manual/html/timeformat.html +3 -3
- data/manual/html/timeformat1.html +2 -2
- data/manual/html/timeformat2.html +2 -2
- data/manual/html/timeoff.nikureport.html +2 -2
- data/manual/html/timesheet.html +3 -3
- data/manual/html/timesheetreport.html +3 -3
- data/manual/html/timezone.export.html +2 -2
- data/manual/html/timezone.html +2 -2
- data/manual/html/timezone.report.html +2 -2
- data/manual/html/timezone.shift.html +2 -2
- data/manual/html/timingresolution.html +2 -2
- data/manual/html/title.column.html +2 -2
- data/manual/html/title.html +2 -2
- data/manual/html/toc.html +157 -143
- data/manual/html/tooltip.column.html +3 -3
- data/manual/html/tracereport.html +7 -7
- data/manual/html/trackingscenario.html +3 -3
- data/manual/html/treelevel.html +2 -2
- data/manual/html/vacation.html +2 -2
- data/manual/html/vacation.resource.html +2 -2
- data/manual/html/vacation.shift.html +2 -2
- data/manual/html/warn.html +4 -4
- data/manual/html/weeklymax.html +2 -2
- data/manual/html/weeklymin.html +3 -3
- data/manual/html/weekstartsmonday.html +2 -2
- data/manual/html/weekstartssunday.html +2 -2
- data/manual/html/width.column.html +2 -2
- data/manual/html/width.html +3 -3
- data/manual/html/work.html +3 -3
- data/manual/html/workinghours.project.html +3 -3
- data/manual/html/workinghours.resource.html +2 -2
- data/manual/html/workinghours.shift.html +2 -2
- data/manual/html/yearlyworkingdays.html +2 -2
- data/spec/ProjectBroker_spec.rb +6 -6
- data/spec/StatusSheets_spec.rb +1 -1
- data/spec/TimeSheets_spec.rb +1 -1
- data/spec/TraceReport_spec.rb +1 -1
- data/spec/support/DaemonControl.rb +2 -3
- data/taskjuggler.gemspec +7 -10
- data/tasks/changelog.rake +2 -0
- data/tasks/gem.rake +3 -1
- data/tasks/help2man.rake +18 -0
- data/tasks/kate.rake +2 -0
- data/tasks/manual.rake +3 -1
- data/tasks/test.rake +5 -0
- data/tasks/vim.rake +2 -0
- data/test/TestSuite/CSV-Reports/quotes.tjp +20 -0
- data/test/TestSuite/CSV-Reports/refs/quotes.csv +5 -0
- data/test/TestSuite/Export-Reports/refs/AccountReport.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/AdoptedTasks.tjp +0 -2
- data/test/TestSuite/Export-Reports/refs/AlertLevels.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Allocate-1.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/AutoID.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/AutoMacros.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Currencyformat.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/CustomAttributes.tjp +0 -2
- data/test/TestSuite/Export-Reports/refs/Depends1.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Durations.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Efficiency.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Gap.tjp +0 -3
- data/test/TestSuite/Export-Reports/refs/Include.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Journal.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Macro-1.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Macro-2.tjp +0 -2
- data/test/TestSuite/Export-Reports/refs/Macro-3.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Manager.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Milestone.tjp +0 -2
- data/test/TestSuite/Export-Reports/refs/Numberformat.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Precedes1.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Project.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/ProjectIDs.tjp +0 -3
- data/test/TestSuite/Export-Reports/refs/Reports.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Resource.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/ResourceRoot.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/RollupResource.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Scenario.tjp +0 -2
- data/test/TestSuite/Export-Reports/refs/Timezone.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/Vacation.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/navigator.tjp +0 -4
- data/test/TestSuite/Export-Reports/refs/template.tjp +0 -6
- data/test/TestSuite/Export-Reports/refs/textreport.tjp +0 -1
- data/test/TestSuite/Export-Reports/refs/tutorial.tjp +0 -8
- data/test/TestSuite/Syntax/Correct/Booking.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/Currencyformat.tjp +1 -1
- data/test/TestSuite/Syntax/Correct/template.tjp +3 -3
- data/test/TestSuite/Syntax/Correct/tutorial.tjp +8 -3
- data/test/test_BatchProcessor.rb +6 -3
- data/test/test_ProjectFileScanner.rb +8 -8
- metadata +47 -11
|
@@ -139,7 +139,7 @@ class TaskJuggler
|
|
|
139
139
|
# 2nd arg must be a scenario index.
|
|
140
140
|
return false if (scenarioIdx = project.scenarioIdx(args[1])).nil?
|
|
141
141
|
# 3rd arg must be an integer number.
|
|
142
|
-
return false unless args[2].is_a?(
|
|
142
|
+
return false unless args[2].is_a?(Integer)
|
|
143
143
|
|
|
144
144
|
property.isDependencyOf(scenarioIdx, task, args[2])
|
|
145
145
|
end
|
|
@@ -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, 2012, 2013, 2014
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019
|
|
7
7
|
# by Chris Schlaeger <cs@taskjuggler.org>
|
|
8
8
|
#
|
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
|
@@ -64,7 +64,7 @@ class TaskJuggler
|
|
|
64
64
|
coerceTime(o, expr)
|
|
65
65
|
end
|
|
66
66
|
return res
|
|
67
|
-
elsif opnd1.is_a?(
|
|
67
|
+
elsif opnd1.is_a?(Integer) || opnd1.is_a?(Float)
|
|
68
68
|
return evalBinaryOperation(opnd1, operator, opnd2) do |o|
|
|
69
69
|
coerceNumber(o, expr)
|
|
70
70
|
end
|
|
@@ -145,14 +145,14 @@ class TaskJuggler
|
|
|
145
145
|
# An empty String means false, else true.
|
|
146
146
|
return !val.empty? if val.is_a?(String)
|
|
147
147
|
# In TJP logic 'non 0' means false.
|
|
148
|
-
return val != 0 if val.is_a?(
|
|
148
|
+
return val != 0 if val.is_a?(Integer)
|
|
149
149
|
|
|
150
150
|
expr.error("Operand #{val} can't be evaluated to true or false.")
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Force the _val_ into a number. In case this fails, an exception is raised.
|
|
154
154
|
def coerceNumber(val, expr)
|
|
155
|
-
unless val.is_a?(
|
|
155
|
+
unless val.is_a?(Integer) || val.is_a?(Float)
|
|
156
156
|
expr.error("Operand #{val} of type #{val.class} must be a number.")
|
|
157
157
|
end
|
|
158
158
|
val
|
|
@@ -216,6 +216,9 @@ class TaskJuggler
|
|
|
216
216
|
query.scenarioIdx = @scenario.sequenceNo - 1
|
|
217
217
|
query.attributeId = @operand1
|
|
218
218
|
query.process
|
|
219
|
+
unless query.ok
|
|
220
|
+
return "Error in conversion to String: #{query.errorMessage}"
|
|
221
|
+
end
|
|
219
222
|
query.to_s
|
|
220
223
|
else
|
|
221
224
|
"#{@scenario.fullId}.#{@operand1}"
|
|
@@ -230,7 +230,7 @@ class TaskJuggler
|
|
|
230
230
|
private
|
|
231
231
|
|
|
232
232
|
def checkLevel(level)
|
|
233
|
-
if level.is_a?(
|
|
233
|
+
if level.is_a?(Integer)
|
|
234
234
|
if level < 0 || level > 5
|
|
235
235
|
raise ArgumentError, "Unsupported level #{level}"
|
|
236
236
|
end
|
|
@@ -248,7 +248,6 @@ class TaskJuggler
|
|
|
248
248
|
|
|
249
249
|
timeStamp = Time.new.strftime("%Y-%m-%d %H:%M:%S")
|
|
250
250
|
begin
|
|
251
|
-
@logFile.untaint
|
|
252
251
|
File.open(@logFile, 'a') do |f|
|
|
253
252
|
f.write("#{timeStamp} #{type} #{@appName}[#{Process.pid}]: " +
|
|
254
253
|
"#{message}\n")
|
data/lib/taskjuggler/PTNProxy.rb
CHANGED
|
@@ -104,7 +104,7 @@ class TaskJuggler
|
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
# Return the 'index' attributes of this property, prefixed by the 'index'
|
|
107
|
-
# attributes of all its parents. The result is an Array of
|
|
107
|
+
# attributes of all its parents. The result is an Array of Integers.
|
|
108
108
|
def getIndicies
|
|
109
109
|
idcs = []
|
|
110
110
|
p = self
|
data/lib/taskjuggler/Project.rb
CHANGED
|
@@ -78,6 +78,7 @@ class TaskJuggler
|
|
|
78
78
|
'currencyFormat' => RealFormat.new([ '-', '', '', ',', 2 ]),
|
|
79
79
|
'dailyworkinghours' => 8.0,
|
|
80
80
|
'end' => nil,
|
|
81
|
+
'markdate' => nil,
|
|
81
82
|
'flags' => [],
|
|
82
83
|
'journal' => Journal.new,
|
|
83
84
|
'limits' => nil,
|
|
@@ -126,7 +127,7 @@ class TaskJuggler
|
|
|
126
127
|
false, false, false, true ],
|
|
127
128
|
[ 'projection', 'Projection Mode', BooleanAttribute,
|
|
128
129
|
true, false, false, false ],
|
|
129
|
-
[ 'seqno', 'No',
|
|
130
|
+
[ 'seqno', 'No', IntegerAttribute,
|
|
130
131
|
false, false, false, nil ],
|
|
131
132
|
]
|
|
132
133
|
attrs.each { |a| @scenarios.addAttributeType(AttributeDefinition.new(*a)) }
|
|
@@ -139,7 +140,7 @@ class TaskJuggler
|
|
|
139
140
|
false, false, false, "" ],
|
|
140
141
|
[ 'id', 'ID', StringAttribute,
|
|
141
142
|
false, false, false, nil ],
|
|
142
|
-
[ 'index', 'Index',
|
|
143
|
+
[ 'index', 'Index', IntegerAttribute,
|
|
143
144
|
false, false, false, -1 ],
|
|
144
145
|
[ 'leaves', 'Leaves', LeaveListAttribute,
|
|
145
146
|
true, true, true, LeaveList.new ],
|
|
@@ -147,7 +148,7 @@ class TaskJuggler
|
|
|
147
148
|
false, false, false, nil ],
|
|
148
149
|
[ 'replace', 'Replace', BooleanAttribute,
|
|
149
150
|
true, false, true, false ],
|
|
150
|
-
[ 'seqno', 'No',
|
|
151
|
+
[ 'seqno', 'No', IntegerAttribute,
|
|
151
152
|
false, false, false, nil ],
|
|
152
153
|
[ 'timezone', 'Time Zone', StringAttribute,
|
|
153
154
|
true, true, true, TjTime.timeZone ],
|
|
@@ -170,13 +171,13 @@ class TaskJuggler
|
|
|
170
171
|
false, false, true, [] ],
|
|
171
172
|
[ 'id', 'ID', StringAttribute,
|
|
172
173
|
false, false, false, nil ],
|
|
173
|
-
[ 'index', 'Index',
|
|
174
|
+
[ 'index', 'Index', IntegerAttribute,
|
|
174
175
|
false, false, false, -1 ],
|
|
175
176
|
[ 'flags', 'Flags', FlagListAttribute,
|
|
176
177
|
true, false, true, [] ],
|
|
177
178
|
[ 'name', 'Name', StringAttribute,
|
|
178
179
|
false, false, false, nil ],
|
|
179
|
-
[ 'seqno', 'No',
|
|
180
|
+
[ 'seqno', 'No', IntegerAttribute,
|
|
180
181
|
false, false, false, nil ],
|
|
181
182
|
[ 'tree', 'Tree Index', StringAttribute,
|
|
182
183
|
false, false, false, "" ]
|
|
@@ -201,7 +202,7 @@ class TaskJuggler
|
|
|
201
202
|
false, false, true, [] ],
|
|
202
203
|
[ 'efficiency','Efficiency', FloatAttribute,
|
|
203
204
|
true, false, true, 1.0 ],
|
|
204
|
-
[ 'effort', 'Total Effort',
|
|
205
|
+
[ 'effort', 'Total Effort', IntegerAttribute,
|
|
205
206
|
false, false, true, 0 ],
|
|
206
207
|
[ 'email', 'Email', StringAttribute,
|
|
207
208
|
false, false, false, nil ],
|
|
@@ -209,7 +210,7 @@ class TaskJuggler
|
|
|
209
210
|
false, false, false, [] ],
|
|
210
211
|
[ 'flags', 'Flags', FlagListAttribute,
|
|
211
212
|
true, false, true, [] ],
|
|
212
|
-
[ 'index', 'Index',
|
|
213
|
+
[ 'index', 'Index', IntegerAttribute,
|
|
213
214
|
false, false, false, -1 ],
|
|
214
215
|
[ 'leaveallowances', 'Leave Allowances', LeaveAllowanceListAttribute,
|
|
215
216
|
true, false, true, LeaveAllowanceList.new ],
|
|
@@ -223,7 +224,7 @@ class TaskJuggler
|
|
|
223
224
|
true, true, true, 0.0 ],
|
|
224
225
|
[ 'reports', 'Reports', ResourceListAttribute,
|
|
225
226
|
false, false, true, [] ],
|
|
226
|
-
[ 'seqno', 'No',
|
|
227
|
+
[ 'seqno', 'No', IntegerAttribute,
|
|
227
228
|
false, false, false, nil ],
|
|
228
229
|
[ 'shifts', 'Shifts', ShiftAssignmentsAttribute,
|
|
229
230
|
true, false, true, nil ],
|
|
@@ -264,9 +265,9 @@ class TaskJuggler
|
|
|
264
265
|
false, false, true, 0 ],
|
|
265
266
|
[ 'effort', 'Effort', DurationAttribute,
|
|
266
267
|
false, false, true, 0 ],
|
|
267
|
-
[ 'effortdone', 'Completed Effort',
|
|
268
|
+
[ 'effortdone', 'Completed Effort', IntegerAttribute,
|
|
268
269
|
false, false, true, nil ],
|
|
269
|
-
[ 'effortleft', 'Remaining Effort',
|
|
270
|
+
[ 'effortleft', 'Remaining Effort', IntegerAttribute,
|
|
270
271
|
false, false, true, nil ],
|
|
271
272
|
[ 'end', 'End', DateAttribute,
|
|
272
273
|
false, false, true, nil ],
|
|
@@ -284,7 +285,7 @@ class TaskJuggler
|
|
|
284
285
|
false, false, true, nil ],
|
|
285
286
|
[ 'id', 'ID', StringAttribute,
|
|
286
287
|
false, false, false, nil ],
|
|
287
|
-
[ 'index', 'Index',
|
|
288
|
+
[ 'index', 'Index', IntegerAttribute,
|
|
288
289
|
false, false, false, -1 ],
|
|
289
290
|
[ 'length', 'Length', DurationAttribute,
|
|
290
291
|
false, false, true, 0 ],
|
|
@@ -308,7 +309,7 @@ class TaskJuggler
|
|
|
308
309
|
false, false, true, 0.0 ],
|
|
309
310
|
[ 'precedes', 'Following tasks', DependencyListAttribute,
|
|
310
311
|
true, false, true, [] ],
|
|
311
|
-
[ 'priority', 'Priority',
|
|
312
|
+
[ 'priority', 'Priority', IntegerAttribute,
|
|
312
313
|
true, true, true, 500 ],
|
|
313
314
|
[ 'projectid', 'Project ID', SymbolAttribute,
|
|
314
315
|
true, true, true, nil ],
|
|
@@ -318,7 +319,7 @@ class TaskJuggler
|
|
|
318
319
|
true, false, true, false ],
|
|
319
320
|
[ 'projectionmode', 'Projection Mode', BooleanAttribute,
|
|
320
321
|
true, false, true, false ],
|
|
321
|
-
[ 'seqno', 'No',
|
|
322
|
+
[ 'seqno', 'No', IntegerAttribute,
|
|
322
323
|
false, false, false, nil ],
|
|
323
324
|
[ 'shifts', 'Shifts', ShiftAssignmentsAttribute,
|
|
324
325
|
true, false, true, nil ],
|
|
@@ -361,6 +362,8 @@ class TaskJuggler
|
|
|
361
362
|
true, false, false, KeywordArray.new([ '*' ]) ],
|
|
362
363
|
[ 'end', 'End', DateAttribute,
|
|
363
364
|
true, true, false, nil ],
|
|
365
|
+
[ 'markdate', 'Markdate', DateAttribute,
|
|
366
|
+
true, true, false, nil ],
|
|
364
367
|
[ 'epilog', 'Epilog', RichTextAttribute,
|
|
365
368
|
true, false, false, nil ],
|
|
366
369
|
[ 'flags', 'Flags', FlagListAttribute,
|
|
@@ -383,11 +386,11 @@ class TaskJuggler
|
|
|
383
386
|
true, false, false, nil ],
|
|
384
387
|
[ 'hideTask', 'Hide Task', LogicalExpressionAttribute,
|
|
385
388
|
true, false, false, nil ],
|
|
386
|
-
[ 'height', 'Height',
|
|
389
|
+
[ 'height', 'Height', IntegerAttribute,
|
|
387
390
|
false, false, false, 480 ],
|
|
388
391
|
[ 'id', 'ID', StringAttribute,
|
|
389
392
|
false, false, false, nil ],
|
|
390
|
-
[ 'index', 'Index',
|
|
393
|
+
[ 'index', 'Index', IntegerAttribute,
|
|
391
394
|
false, false, false, -1 ],
|
|
392
395
|
[ 'interactive', 'Interactive', BooleanAttribute,
|
|
393
396
|
false, false, false, false ],
|
|
@@ -429,7 +432,7 @@ class TaskJuggler
|
|
|
429
432
|
true, false, false, [ 0 ] ],
|
|
430
433
|
[ 'selfcontained', 'Selfcontained', BooleanAttribute,
|
|
431
434
|
true, false, false, false ],
|
|
432
|
-
[ 'seqno', 'No',
|
|
435
|
+
[ 'seqno', 'No', IntegerAttribute,
|
|
433
436
|
false, false, false, nil ],
|
|
434
437
|
[ 'shortTimeFormat', 'Short Time Format', StringAttribute,
|
|
435
438
|
true, true, false, nil ],
|
|
@@ -461,8 +464,10 @@ class TaskJuggler
|
|
|
461
464
|
false, false, false, "" ],
|
|
462
465
|
[ 'weekStartsMonday', 'Week Starts Monday', BooleanAttribute,
|
|
463
466
|
true, true, false, false ],
|
|
464
|
-
[ 'width', 'Width',
|
|
465
|
-
true, false, false, 640 ]
|
|
467
|
+
[ 'width', 'Width', IntegerAttribute,
|
|
468
|
+
true, false, false, 640 ],
|
|
469
|
+
[ 'novevents', 'No vevents in icalreports', BooleanAttribute,
|
|
470
|
+
true, false, false, false ]
|
|
466
471
|
]
|
|
467
472
|
attrs.each { |a| @reports.addAttributeType(AttributeDefinition.new(*a)) }
|
|
468
473
|
|
|
@@ -560,7 +565,7 @@ class TaskJuggler
|
|
|
560
565
|
#
|
|
561
566
|
# Return the Scenario with the given _id_ or _index_.
|
|
562
567
|
def scenario(arg)
|
|
563
|
-
if arg.is_a?(
|
|
568
|
+
if arg.is_a?(Integer)
|
|
564
569
|
@scenarios.each do |sc|
|
|
565
570
|
return sc if sc.sequenceNo - 1 == arg
|
|
566
571
|
end
|
|
@@ -866,7 +871,7 @@ class TaskJuggler
|
|
|
866
871
|
# isWorkingTime(startTime, endTime) -> true or false
|
|
867
872
|
# isWorkingTime(interval) -> true or false
|
|
868
873
|
#
|
|
869
|
-
# Return true if the slot or interval is
|
|
874
|
+
# Return true if the slot or interval is within globally defined working
|
|
870
875
|
# time or false if not. If the argument is a TimeInterval, all slots of
|
|
871
876
|
# the interval must be working time to return true as result. Global work
|
|
872
877
|
# time means, no global leaves defined and the slot lies within a
|
|
@@ -874,7 +879,7 @@ class TaskJuggler
|
|
|
874
879
|
def isWorkingTime(*args)
|
|
875
880
|
# Normalize argument(s) to TimeInterval
|
|
876
881
|
if args.length == 1
|
|
877
|
-
if args[0].is_a?(
|
|
882
|
+
if args[0].is_a?(Integer)
|
|
878
883
|
return @scoreboard[args[0]].nil?
|
|
879
884
|
elsif args[0].is_a?(TjTime)
|
|
880
885
|
return @scoreboard[dateToIdx(args[0])].nil?
|
|
@@ -969,7 +974,7 @@ class TaskJuggler
|
|
|
969
974
|
|
|
970
975
|
def collectTimeOffIntervals(iv, minDuration)
|
|
971
976
|
@scoreboard.collectIntervals(iv, minDuration) do |val|
|
|
972
|
-
val.is_a?(
|
|
977
|
+
val.is_a?(Integer) && (val & 0x3E) != 0
|
|
973
978
|
end
|
|
974
979
|
end
|
|
975
980
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = PropertyList.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019
|
|
7
7
|
# by Chris Schlaeger <cs@taskjuggler.org>
|
|
8
8
|
#
|
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
|
@@ -271,10 +271,16 @@ class TaskJuggler
|
|
|
271
271
|
|
|
272
272
|
@query.property = a
|
|
273
273
|
@query.process
|
|
274
|
+
unless @query.ok
|
|
275
|
+
fatal "List sort failed: #{@query.errorMessage}"
|
|
276
|
+
end
|
|
274
277
|
aVal = @query.to_sort
|
|
275
278
|
|
|
276
279
|
@query.property = b
|
|
277
280
|
@query.process
|
|
281
|
+
unless @query.ok
|
|
282
|
+
fatal "List sort failed: #{@query.errorMessage}"
|
|
283
|
+
end
|
|
278
284
|
bVal = @query.to_sort
|
|
279
285
|
else
|
|
280
286
|
# In case we don't have a query, we use the static mechanism.
|
|
@@ -51,7 +51,7 @@ class TaskJuggler
|
|
|
51
51
|
[
|
|
52
52
|
[ 'id', 'ID', StringAttribute, false, false, false, '' ],
|
|
53
53
|
[ 'name', 'Name', StringAttribute, false, false, false, '' ],
|
|
54
|
-
[ 'seqno', 'Seq. No',
|
|
54
|
+
[ 'seqno', 'Seq. No', IntegerAttribute, false, false, false, 0 ]
|
|
55
55
|
].each { |a| addAttributeType(AttributeDefinition.new(*a)) }
|
|
56
56
|
end
|
|
57
57
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = PropertyTreeNode.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019
|
|
7
7
|
# by Chris Schlaeger <cs@taskjuggler.org>
|
|
8
8
|
#
|
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
|
@@ -331,7 +331,7 @@ class TaskJuggler
|
|
|
331
331
|
end
|
|
332
332
|
|
|
333
333
|
# Return the 'index' attributes of this property, prefixed by the 'index'
|
|
334
|
-
# attributes of all its parents. The result is an Array of
|
|
334
|
+
# attributes of all its parents. The result is an Array of Integers.
|
|
335
335
|
def getIndicies
|
|
336
336
|
idcs = []
|
|
337
337
|
p = self
|
|
@@ -702,11 +702,13 @@ class TaskJuggler
|
|
|
702
702
|
res += '-' * 75 + "\n"
|
|
703
703
|
end
|
|
704
704
|
|
|
705
|
+
alias to_str to_s
|
|
706
|
+
|
|
705
707
|
# Many PropertyTreeNode functions are scenario specific. These functions are
|
|
706
708
|
# provided by the class *Scenario classes. In case we can't find a function
|
|
707
709
|
# called for the base class we try to find it in corresponding *Scenario
|
|
708
710
|
# class.
|
|
709
|
-
def method_missing(func, scenarioIdx, *args, &block)
|
|
711
|
+
def method_missing(func, scenarioIdx = 0, *args, &block)
|
|
710
712
|
@data[scenarioIdx].send(func, *args, &block)
|
|
711
713
|
end
|
|
712
714
|
|
data/lib/taskjuggler/Query.rb
CHANGED
|
@@ -81,7 +81,7 @@ class TaskJuggler
|
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
def startIdx=(idx)
|
|
84
|
-
if idx.is_a?(
|
|
84
|
+
if idx.is_a?(Integer)
|
|
85
85
|
@startIdx = idx
|
|
86
86
|
@start = @project.idxToDate(idx)
|
|
87
87
|
else
|
|
@@ -99,7 +99,7 @@ class TaskJuggler
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
def endIdx=(idx)
|
|
102
|
-
if idx.is_a?(
|
|
102
|
+
if idx.is_a?(Integer)
|
|
103
103
|
@endIdx = idx
|
|
104
104
|
@end = @project.idxToDate(idx)
|
|
105
105
|
else
|
|
@@ -239,7 +239,7 @@ class TaskJuggler
|
|
|
239
239
|
@attr ? @attr.to_s(self) : (@rti ? @rti.to_s : (@string || ''))
|
|
240
240
|
end
|
|
241
241
|
|
|
242
|
-
# Return the result of the Query as
|
|
242
|
+
# Return the result of the Query as Integer or Float. The result may be
|
|
243
243
|
# nil.
|
|
244
244
|
def to_num
|
|
245
245
|
@attr ? @attr.to_num : @numerical
|
|
@@ -24,7 +24,7 @@ class TaskJuggler
|
|
|
24
24
|
# thousandsSeparator: Separator used after 3 integer digits. (String)
|
|
25
25
|
# fractionSeparator: Separator used between the inter part and the
|
|
26
26
|
# fractional part. (String)
|
|
27
|
-
# fractionDigits: Number of fractional digits to show. (
|
|
27
|
+
# fractionDigits: Number of fractional digits to show. (Integer)
|
|
28
28
|
class RealFormat
|
|
29
29
|
|
|
30
30
|
attr_reader :signPrefix, :signSuffix, :thousandsSeparator,
|
data/lib/taskjuggler/Resource.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = Resource.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019
|
|
7
7
|
# by Chris Schlaeger <cs@taskjuggler.org>
|
|
8
8
|
#
|
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
|
@@ -37,7 +37,7 @@ class TaskJuggler
|
|
|
37
37
|
# provided by the class ResourceScenario. In case we can't find a
|
|
38
38
|
# function called for the Resource class we try to find it in
|
|
39
39
|
# ResourceScenario.
|
|
40
|
-
def method_missing(func, scenarioIdx, *args, &block)
|
|
40
|
+
def method_missing(func, scenarioIdx = 0, *args, &block)
|
|
41
41
|
@data[scenarioIdx].method(func).call(*args, &block)
|
|
42
42
|
end
|
|
43
43
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = ResourceScenario.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2020
|
|
7
7
|
# by Chris Schlaeger <cs@taskjuggler.org>
|
|
8
8
|
#
|
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
|
@@ -20,7 +20,7 @@ class TaskJuggler
|
|
|
20
20
|
def initialize(resource, scenarioIdx, attributes)
|
|
21
21
|
super
|
|
22
22
|
|
|
23
|
-
# Scoreboard may be nil, a Task, or a bit vector encoded as
|
|
23
|
+
# Scoreboard may be nil, a Task, or a bit vector encoded as an Integer
|
|
24
24
|
# nil: Value has not been determined yet.
|
|
25
25
|
# Task: A reference to a Task object
|
|
26
26
|
# Bit 0: Reserved
|
|
@@ -279,6 +279,23 @@ class TaskJuggler
|
|
|
279
279
|
query.string = query.scaleLoad(val)
|
|
280
280
|
end
|
|
281
281
|
|
|
282
|
+
# Compute a list of the annual leave days within the period specified by
|
|
283
|
+
# the _query_. The result is a list of dates and how much of that day was
|
|
284
|
+
# taken.
|
|
285
|
+
def query_annualleavelist(query)
|
|
286
|
+
iv_list = collectLeaveIntervals(Interval.new(query.start, query.end), :annual)
|
|
287
|
+
iv_list.map! do |iv|
|
|
288
|
+
# The interval is at most one working day. We list the date of that
|
|
289
|
+
# day.
|
|
290
|
+
day = iv.start.strftime(@project['timeFormat'])
|
|
291
|
+
# And how much of the working day was taken. A full working day is
|
|
292
|
+
# 1.0, a half working day 0.5.
|
|
293
|
+
days = (iv.end - iv.start) / (60 * 60 * @project['dailyworkinghours'])
|
|
294
|
+
"#{day} (#{'%.1f' % days})"
|
|
295
|
+
end
|
|
296
|
+
query.assignList(iv_list)
|
|
297
|
+
end
|
|
298
|
+
|
|
282
299
|
def query_annualleavebalance(query)
|
|
283
300
|
if @property.leaf?
|
|
284
301
|
leave = getLeave(query.startIdx, query.endIdx, :annual)
|
|
@@ -305,6 +322,34 @@ class TaskJuggler
|
|
|
305
322
|
end
|
|
306
323
|
end
|
|
307
324
|
|
|
325
|
+
# A list of the tasks that the resource has been allocated to work on in
|
|
326
|
+
# the report time frame.
|
|
327
|
+
def query_duties(query)
|
|
328
|
+
list = []
|
|
329
|
+
iv = TimeInterval.new(query.start, query.end)
|
|
330
|
+
@duties.each do |task|
|
|
331
|
+
if task.hasResourceAllocated?(@scenarioIdx, iv, @property)
|
|
332
|
+
if query.listItem
|
|
333
|
+
rti = RichText.new(query.listItem, RTFHandlers.create(@project)).
|
|
334
|
+
generateIntermediateFormat
|
|
335
|
+
unless rti
|
|
336
|
+
error('bad_resource_ts_query',
|
|
337
|
+
"Syntax error in query statement for task attribute " +
|
|
338
|
+
"'resources'.")
|
|
339
|
+
end
|
|
340
|
+
q = query.dup
|
|
341
|
+
q.property = task
|
|
342
|
+
q.scopeProperty = @property
|
|
343
|
+
rti.setQuery(q)
|
|
344
|
+
list << "<nowiki>#{rti.to_s}</nowiki>"
|
|
345
|
+
else
|
|
346
|
+
list << "<nowiki>#{task.name} (#{task.id})</nowiki>"
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
query.assignList(list)
|
|
351
|
+
end
|
|
352
|
+
|
|
308
353
|
# The effort allocated to the Resource in the specified interval. In case a
|
|
309
354
|
# Task is given as scope property only the effort allocated to this Task is
|
|
310
355
|
# taken into account.
|
|
@@ -685,7 +730,22 @@ class TaskJuggler
|
|
|
685
730
|
initScoreboard if @scoreboard.nil?
|
|
686
731
|
|
|
687
732
|
@scoreboard.collectIntervals(iv, minDuration) do |val|
|
|
688
|
-
val.is_a?(
|
|
733
|
+
val.is_a?(Integer) && (val & 0x3E) != 0
|
|
734
|
+
end
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# Return a list of scoreboard intervals that are at least _minDuration_ long
|
|
738
|
+
# and only contain leave slots of the given type. The result is an Array of
|
|
739
|
+
# [ start, end ] TjTime values.
|
|
740
|
+
def collectLeaveIntervals(iv, type)
|
|
741
|
+
# Time-off intervals are only useful for leaf resources. Group resources
|
|
742
|
+
# would just default to the global working hours.
|
|
743
|
+
return [] unless @property.leaf?
|
|
744
|
+
|
|
745
|
+
initScoreboard if @scoreboard.nil?
|
|
746
|
+
|
|
747
|
+
@scoreboard.collectIntervals(iv, 60 * 60) do |val|
|
|
748
|
+
val.is_a?(Integer) && (val & 0x3E) == (Leave::Types[type] << 2)
|
|
689
749
|
end
|
|
690
750
|
end
|
|
691
751
|
|
|
@@ -723,7 +783,7 @@ class TaskJuggler
|
|
|
723
783
|
# leave.
|
|
724
784
|
def getLeaveSlots(startIdx, endIdx, type)
|
|
725
785
|
countSlots(startIdx, endIdx) do |val|
|
|
726
|
-
val.is_a?(
|
|
786
|
+
val.is_a?(Integer) && (val & 0x3E) == (Leave::Types[type] << 2)
|
|
727
787
|
end
|
|
728
788
|
end
|
|
729
789
|
|
|
@@ -739,7 +799,7 @@ class TaskJuggler
|
|
|
739
799
|
def getTimeOffSlots(startIdx, endIdx)
|
|
740
800
|
countSlots(startIdx, endIdx) do |val|
|
|
741
801
|
# Bit 1 needs to be unset and the leave bits must not be 0.
|
|
742
|
-
val.is_a?(
|
|
802
|
+
val.is_a?(Integer) && (val & 0x2) == 0 && (val & 0x3C) != 0
|
|
743
803
|
end
|
|
744
804
|
end
|
|
745
805
|
|
|
@@ -900,7 +960,7 @@ class TaskJuggler
|
|
|
900
960
|
initScoreboard unless @scoreboard
|
|
901
961
|
|
|
902
962
|
val = @scoreboard[sbIdx]
|
|
903
|
-
return true unless val.is_a?(
|
|
963
|
+
return true unless val.is_a?(Integer)
|
|
904
964
|
|
|
905
965
|
leave_type = (val >> 2) & 0xF
|
|
906
966
|
leave_type < Leave::Types[:unemployed]
|
|
@@ -27,7 +27,7 @@ class TaskJuggler
|
|
|
27
27
|
|
|
28
28
|
# Create a RichTextSnip object. _document_ is a reference to the
|
|
29
29
|
# RichTextDocument. _fileName_ is the name of the structured text file
|
|
30
|
-
# using RichText syntax. _sectionCounter_ is an 3 item
|
|
30
|
+
# using RichText syntax. _sectionCounter_ is an 3 item Integer Array. These
|
|
31
31
|
# 3 numbers are used to store the section counters over multiple
|
|
32
32
|
# RichTextSnip objects.
|
|
33
33
|
def initialize(document, fileName, sectionCounter)
|
|
@@ -45,10 +45,10 @@ class RuntimeConfig
|
|
|
45
45
|
def configure(object, section)
|
|
46
46
|
debug("Configuring object of type #{object.class}")
|
|
47
47
|
sections = section.split('.')
|
|
48
|
-
p = @config
|
|
48
|
+
return false unless (p = @config)
|
|
49
49
|
sections.each do |sec|
|
|
50
50
|
p = p['_' + sec]
|
|
51
|
-
unless p
|
|
51
|
+
unless p && p.is_a?(Hash)
|
|
52
52
|
debug("Section #{section} not found in config file")
|
|
53
53
|
return false
|
|
54
54
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = Scoreboard.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019
|
|
7
7
|
# by Chris Schlaeger <cs@taskjuggler.org>
|
|
8
8
|
#
|
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
|
@@ -175,9 +175,12 @@ class TaskJuggler
|
|
|
175
175
|
end
|
|
176
176
|
|
|
177
177
|
def inspect
|
|
178
|
+
s = ''
|
|
178
179
|
0.upto(@sb.length - 1) do |i|
|
|
179
|
-
|
|
180
|
+
s << "#{idxToDate(i)}: #{@sb[i]}"
|
|
180
181
|
end
|
|
182
|
+
|
|
183
|
+
s
|
|
181
184
|
end
|
|
182
185
|
|
|
183
186
|
end
|
|
@@ -166,11 +166,12 @@ class TaskJuggler
|
|
|
166
166
|
inReplyTo = nil)
|
|
167
167
|
case @emailDeliveryMethod
|
|
168
168
|
when 'smtp'
|
|
169
|
-
|
|
170
|
-
delivery_method :smtp, {
|
|
169
|
+
settings_dto = {
|
|
171
170
|
:address => @smtpServer,
|
|
172
|
-
:port => 25
|
|
173
|
-
|
|
171
|
+
:port => 25,
|
|
172
|
+
}
|
|
173
|
+
Mail.defaults do
|
|
174
|
+
delivery_method :smtp, settings_dto
|
|
174
175
|
end
|
|
175
176
|
when 'sendmail'
|
|
176
177
|
Mail.defaults do
|
data/lib/taskjuggler/Shift.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# = Shift.rb -- The TaskJuggler III Project Management Software
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
|
|
6
|
+
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019
|
|
7
7
|
# by Chris Schlaeger <cs@taskjuggler.org>
|
|
8
8
|
#
|
|
9
9
|
# This program is free software; you can redistribute it and/or modify
|
|
@@ -34,7 +34,7 @@ class TaskJuggler
|
|
|
34
34
|
# provided by the class ShiftScenario. In case we can't find a
|
|
35
35
|
# function called for the Shift class we try to find it in
|
|
36
36
|
# ShiftScenario.
|
|
37
|
-
def method_missing(func, scenarioIdx, *args)
|
|
37
|
+
def method_missing(func, scenarioIdx = 0, *args)
|
|
38
38
|
@data[scenarioIdx].method(func).call(*args)
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -79,7 +79,7 @@ class TaskJuggler
|
|
|
79
79
|
# To optimize memory usage and computation time the Scoreboard objects for
|
|
80
80
|
# similar ShiftAssignments are shared.
|
|
81
81
|
#
|
|
82
|
-
# Scoreboard may be nil or a bit vector encoded as
|
|
82
|
+
# Scoreboard may be nil or a bit vector encoded as an Integer
|
|
83
83
|
# nil: Value has not been determined yet.
|
|
84
84
|
# Bit 0: 0: No assignment
|
|
85
85
|
# 1: Has assignement
|
|
@@ -35,9 +35,9 @@ class TaskJuggler
|
|
|
35
35
|
@logFile = 'statussheets.log'
|
|
36
36
|
|
|
37
37
|
# Regular expression to identify status sheets.
|
|
38
|
-
@sheetHeader = /^[ ]*statussheet\s([a-
|
|
38
|
+
@sheetHeader = /^[ ]*statussheet\s([a-zA-Z_][a-zA-Z0-9_]*)\s[0-9\-:+]*\s-\s([0-9]*-[0-9]*-[0-9]*)/
|
|
39
39
|
# Regular expression to extract the sheet signature (time period).
|
|
40
|
-
@signatureFilter = /^[ ]*statussheet\s[a-
|
|
40
|
+
@signatureFilter = /^[ ]*statussheet\s[a-zA-Z_][a-zA-Z0-9_]*\s([0-9:\-+]*\s-\s[0-9:\-+]*)/
|
|
41
41
|
@emailSubject = "Status report from %s for %s"
|
|
42
42
|
end
|
|
43
43
|
|
|
@@ -39,7 +39,7 @@ class TaskJuggler
|
|
|
39
39
|
# The log file
|
|
40
40
|
@logFile = 'statussheets.log'
|
|
41
41
|
|
|
42
|
-
@signatureFilter = /^[ ]*statussheet\s[a-
|
|
42
|
+
@signatureFilter = /^[ ]*statussheet\s[a-zA-Z_][a-zA-Z0-9_]*\s([0-9:\-+]*\s-\s[0-9:\-+]*)/
|
|
43
43
|
@introText = <<'EOT'
|
|
44
44
|
Please find enclosed your weekly status report template. Please fill out the
|
|
45
45
|
form and send it back to the sender of this email. You can either use the
|