From bdeb81e40fcf1c0de16705435c86349033515b16 Mon Sep 17 00:00:00 2001 From: cs Date: Sat, 25 May 2002 17:00:04 +0000 Subject: [PATCH] - Partial fix for timezone handling. - export reports now support resource usage export - documentation updated - extended test suite to contain arbitrary tests in Misc directory - changed version number to 1.1 (getting ready for next release) git-svn-id: https://www.taskjuggler.org/svn/taskjuggler/trunk@140 e1914e07-63f8-0310-9059-d6d858d7cdca --- Makefile.am | 2 +- TestSuite/.cvsignore | 3 + TestSuite/Makefile.am | 3 + TestSuite/Misc/export/project_a.tjp | 45 +++++++ TestSuite/Misc/export/project_b1.tjp | 27 ++++ TestSuite/Misc/export/project_b2.tjp | 30 +++++ TestSuite/Misc/export/runtest | 16 +++ TestSuite/Misc/export/workforce.tjsp | 24 ++++ TestSuite/Misc/testdir | 20 +++ TestSuite/runtests | 6 +- docs/en/index.sgml.in | 34 ++++- taskjuggler/CoreAttributes.cpp | 4 +- taskjuggler/ExportReport.cpp | 91 +++++++++---- taskjuggler/ExportReport.h | 2 + taskjuggler/ProjectFile.cpp | 202 ++++++++++++++++++++--------- taskjuggler/ProjectFile.h | 6 +- taskjuggler/ReportHtml.cpp | 2 + taskjuggler/ResourceList.cpp | 240 +++++++++++++++++++++++++---------- taskjuggler/ResourceList.h | 65 ++++++---- taskjuggler/Task.cpp | 2 + taskjuggler/Task.h | 11 +- taskjuggler/Utility.cpp | 36 ++++++ taskjuggler/Utility.h | 4 + 23 files changed, 693 insertions(+), 182 deletions(-) create mode 100644 TestSuite/.cvsignore create mode 100644 TestSuite/Makefile.am create mode 100644 TestSuite/Misc/export/project_a.tjp create mode 100644 TestSuite/Misc/export/project_b1.tjp create mode 100644 TestSuite/Misc/export/project_b2.tjp create mode 100755 TestSuite/Misc/export/runtest create mode 100644 TestSuite/Misc/export/workforce.tjsp create mode 100755 TestSuite/Misc/testdir diff --git a/Makefile.am b/Makefile.am index 41066b34..492cc4a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ####### kdevelop will overwrite this part!!! (begin)########## -SUBDIRS = taskjuggler docs +SUBDIRS = taskjuggler docs TestSuite EXTRA_DIST = taskjuggler.kdevprj admin AUTHORS COPYING ChangeLog INSTALL README TODO taskjuggler.lsm diff --git a/TestSuite/.cvsignore b/TestSuite/.cvsignore new file mode 100644 index 00000000..d436efd0 --- /dev/null +++ b/TestSuite/.cvsignore @@ -0,0 +1,3 @@ +Makefile.in +Makefile + diff --git a/TestSuite/Makefile.am b/TestSuite/Makefile.am new file mode 100644 index 00000000..9698266c --- /dev/null +++ b/TestSuite/Makefile.am @@ -0,0 +1,3 @@ +all: + @ ./runtests + diff --git a/TestSuite/Misc/export/project_a.tjp b/TestSuite/Misc/export/project_a.tjp new file mode 100644 index 00000000..5d60f2ec --- /dev/null +++ b/TestSuite/Misc/export/project_a.tjp @@ -0,0 +1,45 @@ +project test "Test" "$Id" 2000-01-01 2000-03-10 + +include "workforce.tjsp" + +task t1 "Task1" { + start 2000-01-01 + effort 10d + allocate r1 +} + +task t2 "Task2" { + depends t1 + effort 10d + allocate r2 +} + +task t3 "Task3" { + start 2000-01-01 + length 13d + allocate r3 +} + +task t4 "Task4" { + depends t3 + duration 26d +} + +task t5 "Task5" { + depends t1 + priority 1000 + length 5d + allocate r2 +} + +htmltaskreport "project_a.html" { + columns name, start, end, daily + sorttasks nameup + hideresource 0 +} + +htmlresourcereport "project_a_res.html" { + columns name, daily + hidetask 0 + sorttasks nameup +} diff --git a/TestSuite/Misc/export/project_b1.tjp b/TestSuite/Misc/export/project_b1.tjp new file mode 100644 index 00000000..7dc17c48 --- /dev/null +++ b/TestSuite/Misc/export/project_b1.tjp @@ -0,0 +1,27 @@ +project test "Test" "$Id" 2000-01-01 2000-02-31 + +include "workforce.tjsp" + +task t1 "Task1" { + start 2000-01-01 + effort 10d + allocate r1 +} + +task t3 "Task3" { + start 2000-01-01 + length 13d + allocate r3 +} + +task t5 "Task5" { + depends t1 + priority 1000 + length 5d + allocate r2 +} + +export "project_b1_export.tjsp" { + hideresource 0 +} + diff --git a/TestSuite/Misc/export/project_b2.tjp b/TestSuite/Misc/export/project_b2.tjp new file mode 100644 index 00000000..a3a629ec --- /dev/null +++ b/TestSuite/Misc/export/project_b2.tjp @@ -0,0 +1,30 @@ +project test "Test" "$Id" 2000-01-01 2000-03-10 + +include "workforce.tjsp" + +include "project_b1_export.tjsp" + + +task t2 "Task2" { + depends t1 + effort 10d + allocate r2 +} + +task t4 "Task4" { + depends t3 + duration 26d +} + +htmltaskreport "project_b.html" { + columns name, start, end, daily + sorttasks nameup + hideresource 0 +} + +htmlresourcereport "project_b_res.html" { + columns name, daily + hidetask 0 + sorttasks nameup +} + diff --git a/TestSuite/Misc/export/runtest b/TestSuite/Misc/export/runtest new file mode 100755 index 00000000..3242972f --- /dev/null +++ b/TestSuite/Misc/export/runtest @@ -0,0 +1,16 @@ +../../../taskjuggler/taskjuggler project_a.tjp +../../../taskjuggler/taskjuggler project_b1.tjp +../../../taskjuggler/taskjuggler project_b2.tjp + +cmp project_a.html project_b.html +if [ $? -ne 0 ] ; then + exit 1 +fi + +cmp project_a_res.html project_b_res.html +if [ $? -ne 0 ] ; then + exit 1 +fi + +rm *.html project_b1_export.tjsp + diff --git a/TestSuite/Misc/export/workforce.tjsp b/TestSuite/Misc/export/workforce.tjsp new file mode 100644 index 00000000..04e4342e --- /dev/null +++ b/TestSuite/Misc/export/workforce.tjsp @@ -0,0 +1,24 @@ +vacation "Monday off" 2000-01-03 +vacation "Wednesday off" 2000-01-05 +vacation "Few days off" 2000-01-12 - 2000-01-15 + +resource team "Team" { + vacation 2000-01-21 - 2000-01-25 + + resource r1 "Resource1" { + vacation 2000-01-17 + } + + resource r2 "Resource2" { + efficiency 0.5 + } +} + +supplement resource r2 { + vacation 2000-01-18 +} + +resource r3 "Resource3" { +} + + diff --git a/TestSuite/Misc/testdir b/TestSuite/Misc/testdir new file mode 100755 index 00000000..6e4b5d70 --- /dev/null +++ b/TestSuite/Misc/testdir @@ -0,0 +1,20 @@ +#! /bin/sh + +set errors=0 + +dirs=`find * -type d -maxdepth 0` + +for d in $dirs ; do + if [ $d != "CVS" ] ; then + cd $d + ./runtest + errors=$(( $errors + $? )) + if [ $? -ne 0 ] ; then + echo "Test $d failed" + fi + cd .. + fi +done + +exit $errors + diff --git a/TestSuite/runtests b/TestSuite/runtests index a293fbb9..82878459 100755 --- a/TestSuite/runtests +++ b/TestSuite/runtests @@ -8,7 +8,11 @@ for d in $dirs ; do if [ $d != "CVS" ] ; then echo "Testing in $d" cd $d - ../testdir + if [ -x ./testdir ] ; then + ./testdir + else + ../testdir + fi errors=$(( $errors + $? )) cd .. fi diff --git a/docs/en/index.sgml.in b/docs/en/index.sgml.in index 39e530c7..8b22138f 100644 --- a/docs/en/index.sgml.in +++ b/docs/en/index.sgml.in @@ -102,13 +102,20 @@ contain functions as well. Currently there is support for 'istask', Property reference is now sorted in alphabetical order. -Added missing 'export' report to documentation. +Added missing 'export' report to documentation. Export reports +can now contain the scheduled tasks as well as the resource +allocations. + +New keywords 'planbooking' and 'actualbooking' to enter fixed +bookings of resources in the resource declaration. Added new example project to illustrate the use of export in big projects that are split into sub projects. HTML comment in HTML report files is now using correct syntax. +Partial fix for correct timezone handling. +

@@ -354,8 +361,11 @@ beginning and is used in relative IDs. A '!' means one level up. string may include line breaks.