to generate timesheet template from command line

173 views
Skip to first unread message

Lieven Theys

unread,
Jun 24, 2011, 9:02:03 AM6/24/11
to taskjugg...@googlegroups.com
Chris and all,

I have successfully swiched to tj3 and the tool is as working
brilliantly as tj2 was. Thank you very much again for this tool.

I am expanding my use of taskjuggler and want to start and experiment
with project tracking instead of just use it in the planning stage.

For this timesheets seem very important and I am getting my head around
them but now my question.

The manual and help pages outlines how to generate timesheets templates
that get sent out via email but can I generate this timesheet template
from the command line?

It would help me very much in understanding what the timesheet expects
and how tasks are handled that are worked on parttime.

Thanks again and reagards,

Lieven

Lieven

unread,
Jun 24, 2011, 2:48:42 PM6/24/11
to TaskJuggler Users
I found the answer myself. I have found "timesheetreport" which seems
to do the trick. I can continue looking into partime tasks now.

Chris Schlaeger

unread,
Jun 25, 2011, 7:15:45 AM6/25/11
to taskjugg...@googlegroups.com
On Fri, Jun 24, 2011 at 8:48 PM, Lieven <lie...@grijs.be> wrote:
>> The manual and help pages outlines how to generate timesheets templates
>> that get sent out via email but can I generate this timesheet template
>> from the command line?
>>
>> It would help me very much in understanding what the timesheet expects
>> and how tasks are handled that are worked on parttime.
>>
>> Thanks again and reagards,
>>
>> Lieven
>
> I found the answer myself.  I have found "timesheetreport" which seems
> to do the trick.  I can continue looking into partime tasks now.

That's the most low-level option. You could also use tj3client to feed
your report template to the tj3d. Or you can use 'tj3ts_sender
--dryrun' to get the report email printed to stdout.

Chris

Lieven Theys

unread,
Jun 25, 2011, 7:23:31 AM6/25/11
to taskjugg...@googlegroups.com
Op Sat, Jun 25, 2011 at 01:15:45PM +0200, schreef Chris Schlaeger:

Thanks for the instructions Chris.

I am sure it would work but I am still on version 1.8.7 of Ruby and the
method you outline requires version 1.9.2.

Until the Debian installation I have upgrades ruby I am happy with
timesheetreport.

Best regards,

Lieven

Chris Schlaeger

unread,
Jun 25, 2011, 2:09:37 PM6/25/11
to taskjugg...@googlegroups.com
I'd highly recommend to switch to 1.9.2 or later. It's much faster and
has many bugs fixed. You can safely install it in parallel to the
packaged ruby when you configure it with --program-suffix=19. It will
be installed under /usr/local/ and all binaries have a 19 appended.

Chris

Chris Schlaeger

unread,
Nov 25, 2012, 3:31:22 PM11/25/12
to taskjugg...@googlegroups.com
On Fri, Oct 12, 2012 at 7:16 AM, Michael von den Driesch <mdri...@googlemail.com> wrote:
Dear all,

I hope it is ok to a) jump on this topic pretty lately and b) just to sligthly extend the topic, but I think my question kind of fits nicely.

My use case is, that I'd like to use tj in some kind of proof of concept study. I do not want to get involved with out internal IT at this stage. Therefore I can not easily setup the server part of tj (specially the email part of it). Nevertheless I want to be able to use the "Generate TimeSheetReports" functionality (simply be distributing the generated reports via shared drive). I thought that the --dryrun option would do the trick. But this option seems to assume a "fully" configured server setup.

Here is what I get:
$ tj3ts_sender --dryrun
TaskJuggler v3.3.0 - A Project Management Software

Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012
              by Chris Schlaeger <chris######linux.com>

This program is free software; you can redistribute it and/or modify it under
the terms of version 2 of the GNU General Public License as published by the
Free Software Foundation.

'smtpServer' not configured

Can I generate timesheetreports in a "no server environment"?


Yes, you can. But you can't use the *sender or *receiver scripts. The time sheet templates are generated by tj3 which is just called from these scripts. They use a template that looks like this:

#{@sheetType}sheetreport #{reportId} \"#{templateFile}\" {
  hideresource ~(plan.id = \"#{res}\")
  period %{#{@date} - #{@intervalDuration}} +#{@intervalDuration}
  sorttasks id.up
}

The #{...} expression need to be replaced with the values for your situation. After that it's just a plain old report definition. It's TJ syntax that's fully documented in the manual. Of course the scripts do a lot more magic to handle the sheets which you need to do manually. But that's all possible.

Chris

tbra...@gmail.com

unread,
Dec 6, 2021, 12:58:26 PM12/6/21
to TaskJuggler Users
For the purposes of doing offline timesheet generation, can you explain the line?:
hideresource ~(plan.id = \"#{res}\")

is "plan.id" a <scenario>.<task id>? If so, I don't understand how that filters on a resource.. assuming "#(res)" is a volatile resource argument in the source code.
Reply all
Reply to author
Forward
0 new messages