OSDN Git Service

- Added more examples for reference manual.
authorcs <cs@e1914e07-63f8-0310-9059-d6d858d7cdca>
Tue, 31 May 2005 06:44:55 +0000 (06:44 +0000)
committercs <cs@e1914e07-63f8-0310-9059-d6d858d7cdca>
Tue, 31 May 2005 06:44:55 +0000 (06:44 +0000)
git-svn-id: https://www.taskjuggler.org/svn/taskjuggler/trunk@1068 e1914e07-63f8-0310-9059-d6d858d7cdca

13 files changed:
TestSuite/Misc/export/projectReference_a_1.tjp
TestSuite/Misc/export/project_a.tjp
TestSuite/Misc/export/project_b1.tjp
TestSuite/Misc/export/project_b2.tjp
TestSuite/Misc/export/project_b3.tjp
TestSuite/Syntax/Correct/Allocate-1.tjp
TestSuite/Syntax/Correct/Buffer.tjp
TestSuite/Syntax/Correct/Columns.tjp [new file with mode: 0644]
TestSuite/Syntax/Correct/Gap.tjp [new file with mode: 0644]
TestSuite/Syntax/Correct/Project.tjp [new file with mode: 0644]
TestSuite/Syntax/Correct/Scenario.tjp [new file with mode: 0644]
TestSuite/Syntax/Correct/Shift.tjp
TestSuite/Syntax/Correct/Supplement.tjp

index 59e7c51..a2cb63a 100644 (file)
@@ -6,6 +6,7 @@ project test "Test" "$Id" 2000-01-01-00:00:00-MST 2000-03-09-23:59:59-MST {
     text UserText "User Text" 
     reference UserRef "User Reference" 
   }
+  timezone "MST"
   dailyworkinghours 8
   yearlyworkingdays 260.714
   timingresolution 60min
index b50abda..6404664 100644 (file)
@@ -1,4 +1,5 @@
-project test "Test" "$Id" 2000-01-01 2000-03-10 {
+project test "Test" "$Id" 2000-01-01-00:00:00-MST 2000-03-10-00:00:00-MST {
+       timezone "MST"
        extend task {
                text UserText "User Text"
                reference UserRef "User Reference"
index 1197536..89b3587 100644 (file)
@@ -1,4 +1,6 @@
-project test "Test" "$Id" 2000-01-01 2000-02-31
+project test "Test" "$Id" 2000-01-01-00:00:00-MST 2000-02-31-00:00:00-MST {
+  timezone "MST"
+}
 
 include "workforce.tji"
 
index 1f3e983..8cc6967 100644 (file)
@@ -1,4 +1,5 @@
-project test "Test" "$Id" 2000-01-01 2000-03-10 {
+project test "Test" "$Id" 2000-01-01-00:00:00-MST 2000-03-10-00:00:00-MST {
+       timezone "MST"
        extend task {
                text UserText "User Text"
                reference UserRef "User Reference"
index fe0326c..4cf58d6 100644 (file)
@@ -1,4 +1,6 @@
-project test "Test" "$Id" 2000-01-01 2000-03-10
+project test "Test" "$Id" 2000-01-01-00:00:00-MST 2000-03-10-00:00:00-MST {
+       timezone "MST"
+}
 
 include "workforce.tji"
 
index f57eecf..939c47f 100644 (file)
@@ -5,10 +5,16 @@ resource r2 "Resource 2"
 
 task t1 "Task 1" {
   start 2003-06-05
+       # All sub-tasks inherit this allocation of r1
   allocate r1
   task t2 "Task 2" {
     effort 10d
   }
+       task t3 "Task 3" {
+               effort 20d
+               # This task has r1 and r2 allocated
+               allocate r2
+       }
   task m1 "Milestone 1" {
     milestone
   }
index d42d756..f5f78f7 100644 (file)
@@ -1,55 +1,23 @@
-project simple "Simple Project" "$Id" 2000-01-01 2000-01-20 {
-  scenario plan "Plan" {
-    scenario actual "Actual"
-  }
-}
-
-vacation "Free1" 2000-01-04
-vacation "Free2" 2000-01-13
+project simple "Simple Project" "$Id" 2000-01-01 2000-01-20
 
 resource tux1 "Tux1"
-resource tux2 "Tux2"
-resource tux3 "Tux3"
 
 task t1 "Task1" {
   start 2000-01-01
-  actual:start 2000-01-05
   length 10d
+       # 20% of the working time of this task are marked as buffer at the
+       # beginning.
   startbuffer 20
-  endbuffer 20
+       # An additional 10% of the working time of this task are marked as
+       # buffer at the end.
+  endbuffer 10.0
   allocate tux1
 }
 
-task t2 "Task2" {
-  start 2000-01-01
-  actual:start 2000-01-05
-  duration 10d
-  startbuffer 20.0
-  endbuffer 20.0
-  allocate tux2
-}
-
-task t3 "Task3" {
-  start 2000-01-01
-  actual:start 2000-01-05
-  effort 10d
-  allocate tux3
-  startbuffer 20
-  endbuffer 20
-}
-
-task t4 "Task4" {
-  start 2000-01-01
-  actual:start 2000-01-05
-  end 2000-01-15
-  startbuffer 20
-  endbuffer 20
-}
-
+# Generate a report that lists the start end end dates for the
+# buffers.
 htmltaskreport "Buffer.html" {
   columns no, name, start, startbufferend, endbufferstart, end,
   startbuffer, endbuffer, duration, effort, daily
-  sorttasks nameup
-  scenarios plan, actual
   hideresource 0
 }
diff --git a/TestSuite/Syntax/Correct/Columns.tjp b/TestSuite/Syntax/Correct/Columns.tjp
new file mode 100644 (file)
index 0000000..3effe7c
--- /dev/null
@@ -0,0 +1,53 @@
+project prj  "Project" "1.0" 2005-01-01 2005-03-01
+
+resource r "Resource"
+
+task t "Task" {
+       task s "SubTask" {
+         start 2005-01-01
+         effort 5d
+               allocate r
+       }
+}
+
+# Just a very basic report with some standard columns
+htmltaskreport "SimpleReport.html" {
+       columns hierarchindex, name, start, end, weekly
+}
+
+# Report with custom colum title
+htmltaskreport "CustomTitle.html" {
+       columns hierarchindex, name { title "Work Item" }, effort
+}
+
+# Report with custom colum title and subtitle
+htmltaskreport "CustomSubTitle.html" {
+       columns hierarchindex, name,
+                                       monthly { title " " subtitle "$${month} $${year}" }
+       loadunit days
+}
+
+# Report with efforts only for leaf tasks 
+htmltaskreport "LeafEfforts.html" {
+       columns hierarchindex, name,
+                                       effort { hidecelltext ~isLeaf() }
+}
+
+# Report with link in title of calendar
+htmltaskreport "LinkURL.html" {
+       columns hierarchindex, name,
+                                       monthly { subtitleurl "Monthly-Detail-$${month}.html" }
+}
+
+# Report with link to page with furter task details
+htmltaskreport "LinkToTaskDetails.html" {
+       columns hierarchindex,
+                                       name { cellurl "TaskDetails-$${taskid}.html"
+                                                    hidecellurl ~isLeaf() }, start, end
+}
+
+# Report with index and task name combined in one single column
+htmltaskreport "CombinedColumn.html" {
+       columns name { celltext "$${hierarchno} $${0}"}, start, end, weekly
+}
+
diff --git a/TestSuite/Syntax/Correct/Gap.tjp b/TestSuite/Syntax/Correct/Gap.tjp
new file mode 100644 (file)
index 0000000..5e3e235
--- /dev/null
@@ -0,0 +1,15 @@
+project prj "Example Project" "1.0" 2005-05-29 2005-07-01
+
+task t1 "Task 1" {
+       start 2005-05-29
+}
+
+task t2 "Task 2" {
+       # starts 5 calendar days after t1
+       depends !t1 { gapduration 5d }
+}
+
+task t3 "Task 3" {
+       # starts 5 working days after t1
+       depends !t1 { gaplength 5d }
+}
diff --git a/TestSuite/Syntax/Correct/Project.tjp b/TestSuite/Syntax/Correct/Project.tjp
new file mode 100644 (file)
index 0000000..d6f9631
--- /dev/null
@@ -0,0 +1,26 @@
+project prj "Example Project" "1.0" 2000-01-01 2000-03-09 {
+  # The following attributes are all optional. They illustrate the
+       # default values. These attributes are only needed if you want to
+       # specify different values than those listed below. 
+       dailyworkinghours 8
+  yearlyworkingdays 260.714
+  timingresolution 60min
+  timeformat "%Y-%m-%d %H:%M"
+  shorttimeformat "%H:%M"
+  currencyformat "(" ")" "," "." 0
+  weekstartsmonday
+    workinghours sun off
+    workinghours mon 9:00 - 12:00, 13:00 - 18:00
+    workinghours tue 9:00 - 12:00, 13:00 - 18:00
+    workinghours wed 9:00 - 12:00, 13:00 - 18:00
+    workinghours thu 9:00 - 12:00, 13:00 - 18:00
+    workinghours fri 9:00 - 12:00, 13:00 - 18:00
+    workinghours sat off
+  scenario plan "Plan" {
+  }
+}
+
+task t "Task" {
+       start 2000-01-01
+}
+
diff --git a/TestSuite/Syntax/Correct/Scenario.tjp b/TestSuite/Syntax/Correct/Scenario.tjp
new file mode 100644 (file)
index 0000000..d8e523e
--- /dev/null
@@ -0,0 +1,15 @@
+project prj "Example" "1.0" 2005-05-29 2005-07-01 {
+  scenario plan "Planned Scenario" {
+               scenario actual "Actual Scenario"
+               scenario test "Test Scenario" {
+                 disabled
+               }
+       }
+}
+
+task t "Task" {
+       start 2005-05-29
+       actual:start 2005-06-03
+       test:start 2005-06-07
+}
+
index 888a8de..5fb0239 100644 (file)
@@ -1,11 +1,14 @@
-project test "Test" "$Id" 2000-01-01 2000-01-31
+project prj "Example" "1.0" 2000-01-01 2000-01-31
 
 shift s1 "Shift1" {
+       # Special working hours Monday to Wednesday. Use program defaults
+       # for other days.
   workinghours mon 10:00 - 12:00, 13:00-15:00
   workinghours tue 9:00-14:00
   workinghours wed off
 
   shift s2 "Shift2" {
+               # Like s1 but with different times on Monday
     workinghours mon 10:00 - 17:00
   }
 }
@@ -17,6 +20,9 @@ resource r1 "Resource1" {
 
 task t1 "Task1" {
   start 2000-01-01
-  milestone
+  length 200h
+       # During the specified interval only work at the shift s2 working
+       # hours.
+       shift s2 2000-01-09 - 2000-01-17
 }
 
index eed0f19..3807e2e 100644 (file)
@@ -1,5 +1,9 @@
 project test "Test Project" "$Id" 2000-01-01 2000-01-04
 
+flags important
+
+resource joe "Joe"
+
 task top "Top Task" {
   start 2000-01-01
 
@@ -10,3 +14,11 @@ task top "Top Task" {
   }
 }
 
+supplement resource joe {
+       vacation 2000-02-10 - 2000-02-20
+}
+
+supplement task top {
+       flags important
+}
+