In resourcereport show only resources with task on the report

545 views
Skip to first unread message

Jean-Jacques Merillon

unread,
Jul 28, 2011, 6:24:28 AM7/28/11
to TaskJuggler Users

Hi,

I need to generate resourcereport that only show resources with actives tasks on the report. That is the hideresource filter to use ?

Consider the following example.
* I have 2 tasks & 2 reports (1 report per task).
* resource1 & resource3 resources works on 2 tasks
* resource2 resource works only on task task2
* resource4 resource works only on task task1

In report ResourceReportDev1 I want see only resources working on task1 (I don't want to see resource2 because he is not working on task1)
In report ResourceReportDev2 I want see only resources working on task2  (I don't want to see resource4 because he is not working on task2)

project test "Projet de test"  2011-07-01 +40m {
  now 2011-07-19-22:00
  scenario plan "Plan" {
  }
}

resource resource1 "resource 1"
resource resource2 "resource 2"
resource resource3 "resource 3"
resource resource4 "resource 4"

task task1 "task1" {
    effort 4w
    allocate resource1, resource3, resource4
}


task task2 "task2" {
        effort 2w
        allocate resource1, resource2, resource3
}

resourcereport ResourceReportDev1 "ResourceReportDev1" {
    formats html
    headline "Resource Allocation Graph - task 1"
    columns no, name, effort, rate, daily {width 1000}
    loadunit hours 
    hidetask ~(isleaf() & isleaf_()) | ~isdependencyof(task1, plan, 0)
    sorttasks plan.end.up
}


resourcereport ResourceReportDev2 "ResourceReportDev2" {
    formats html
    headline "Resource Allocation Graph - task 2"
    columns no, name, effort, rate, daily {width 1000}
    loadunit hours 
    hidetask ~(isleaf() & isleaf_()) | ~isdependencyof(task2, plan, 0)
    sorttasks plan.end.up
}



feng

unread,
Jul 28, 2011, 2:54:05 PM7/28/11
to TaskJuggler Users
Jean,

Here is what I have been using:

hidetask ~(isleaf() & isleaf_() & isongoing(actual))

Resource report will only show leaf task and leaf resource, and will
show resource if s/he has task assigned within that time period.

Feng

Jean-Jacques Merillon

unread,
Jul 28, 2011, 3:58:07 PM7/28/11
to taskjugg...@googlegroups.com
Feng,

Thank for your answer but it does not work because resources I want to hide in report have tasks assigned within that time period but not on task displayed in the report.


JJay

> --
> You received this message because you are subscribed to the "TaskJuggler Users" group.
> To post to this group, send email to taskjugg...@googlegroups.com
> To unsubscribe from this group, send email to
> taskjuggler-us...@googlegroups.com
> For more information about TaskJuggler visit http://www.taskjuggler.org

Chris Schlaeger

unread,
Jul 28, 2011, 4:01:15 PM7/28/11
to taskjugg...@googlegroups.com
On Thu, Jul 28, 2011 at 9:58 PM, Jean-Jacques Merillon
<jjmer...@free.fr> wrote:
> Feng,
>
> Thank for your answer but it does not work because resources I want to hide in report have tasks assigned within that time period but not on task displayed in the report.

A plan.effort = 0.0 should catch that case.

Chris

Jean-Jacques Merillon

unread,
Jul 28, 2011, 4:06:25 PM7/28/11
to taskjugg...@googlegroups.com

Unfortunately not, for same raisons, effort for resource = 0.0 for task in my report but not for tasks in scenario plan.

JJay


Chris Schlaeger

unread,
Jul 28, 2011, 4:07:50 PM7/28/11
to taskjugg...@googlegroups.com
On Thu, Jul 28, 2011 at 10:06 PM, Jean-Jacques Merillon

<jjmer...@free.fr> wrote:
> Le Jul 28, 2011 à 10:01 PM, Chris Schlaeger a écrit :
>
>> On Thu, Jul 28, 2011 at 9:58 PM, Jean-Jacques Merillon
>> <jjmer...@free.fr> wrote:
>>> Feng,
>>>
>>> Thank for your answer but it does not work because resources I want to hide in report have tasks assigned within that time period but not on task displayed in the report.
>>
>> A plan.effort = 0.0 should catch that case.
>
> Unfortunately not, for same raisons, effort for resource = 0.0 for task in my report but not for tasks in scenario plan.

The effort in this case should not be the total effort but the effort
in the report time frame.

Chris

Jean-Jacques Merillon

unread,
Jul 28, 2011, 4:13:43 PM7/28/11
to taskjugg...@googlegroups.com
Have a look on the project. Resources I want to hide has effort in the report time frame in scenario but on other tasks not displayed in report.

project test "Projet de test"  2011-07-01 +40m {
  now 2011-07-19-22:00
  scenario plan "Plan" {
  }
}

resource resource1 "resource 1"
resource resource2 "resource 2"
resource resource3 "resource 3"
resource resource4 "resource 4"

task task1 "task1" {
effort 4w
  allocate resource1, resource3, resource4
}


task task2 "task2" {
effort 2w
allocate resource1, resource2, resource3
}

resourcereport ResourceReportDev1 "ResourceReportDev1" {
formats html
headline "Resource Allocation Graph - task 1"
columns no, name, effort, rate, daily {width 1000}
loadunit hours 
hidetask ~(isleaf() & isleaf_()) | ~isdependencyof(task1, plan, 0)
sorttasks plan.end.up
hideresource plan.effort = 0
}


resourcereport ResourceReportDev2 "ResourceReportDev2" {
formats html
headline "Resource Allocation Graph - task 2"
columns no, name, effort, rate, daily {width 1000}
loadunit hours 
hidetask ~(isleaf() & isleaf_()) | ~isdependencyof(task2, plan, 0)
sorttasks plan.end.up
hideresource plan.effort = 0
}

feng

unread,
Aug 1, 2011, 11:43:52 AM8/1/11
to TaskJuggler Users
Hi Jean,

Let me give it another stab :)

For your purpose, I would use two flags: called it "dev" and "qa" for
illustration. So your resource definition would change into:

resource resource1 "resource 1" {flags dev,qa}
resource resource2 "resource 2" {flags dev}
resource resource3 "resource 3" {flags dev,qa}
resource resource4 "resource 4" {flags qa}

As you can see, the difference is resource 1 & 3 has both flags, 2 & 4
has one. I'm sure you get the idea by now. So in reports, you can now
filter the resource by doing:

hideresource ~(qa), this should exclude resource 4 from showing up.
Similar for hiding "dev".
So the complete report would be like this:

resourcereport ResourceReportDev1 "ResourceReportDev1" {
formats html
headline "Resource Allocation Graph - task 1"
columns no, name, effort, rate, daily {width 1000}
loadunit hours
hidetask ~(isleaf() & isleaf_())
hideresource ~(qa)
sorttasks plan.end.up
}

I didn't test the files, but conceptually I think it should work.
Everything else about filtering tasks should have nothing to do then
with what resource are being included in the report.

Best,
Feng


On Jul 28, 6:24 am, Jean-Jacques Merillon <jjmeril...@free.fr> wrote:

Jean-Jacques Merillon

unread,
Aug 1, 2011, 6:13:57 PM8/1/11
to taskjugg...@googlegroups.com
Hi Feng,

Thanks you Feng for your solution !

But in this sample it is easy to add flags on resources, but in real life with lot of resources and tasks, I think my "Project Manager" will not agree adding flags on each resources.
I think taskjuggled should to do this job.

Jean-Jacques Mérillon


PS: It's not a big deal but my firstname is Jean-Jacques !

Matthias Berse

unread,
Aug 2, 2011, 1:52:08 AM8/2/11
to taskjugg...@googlegroups.com
Hi Jean-Jacques ;)

no big deal, you can nest resources like all other things in taskjuggler:

resources devs "Developers"{
flags dev
resource resource1 "resource 1" {flags qa}
resource resource2 "resource 2 " {}
resource resource3 "resource 3" {flags qa}
}

resource resource4 "resource 4" {flags qa}

That should help with most scenarios...

Thanks,

Matthias

Jean-Jacques Merillon

unread,
Aug 2, 2011, 4:31:44 AM8/2/11
to taskjugg...@googlegroups.com
Hi all,

I think there is no solution for my need with TJ resources filters, it's not a problem  because TJ is free software and I made a patch to remove resources not assigned in current report. My patch is not ready for production because it always removes unassigned resources in current resourcerreport. This solution is not acceptable (except for me :) ) because it's impossible to see unassigned resources and It breaks report compatibility with older version.

Maybe a new filter option something like that could be great :
hideresource report.effort = 0
But I don't see any elegant solution to do that (probably because I am a newbie with ruby)

If you are interested by my patch it is available here :

Once again thanks Chris for TJ and thanks to put it under GPL
Thanks everybody for your answers !

JJay

Chris Schlaeger

unread,
Aug 30, 2011, 3:35:58 PM8/30/11
to taskjugg...@googlegroups.com
On Tue, Aug 2, 2011 at 10:31 AM, Jean-Jacques Merillon
<jjmer...@free.fr> wrote:
> Maybe a new filter option something like that could be great :
> hideresource report.effort = 0
> But I don't see any elegant solution to do that (probably because I am a
> newbie with ruby)
> If you are interested by my patch it is available here :
> https://github.com/J-Jay/TaskJuggler/commit/c87eb1c318d176c441ccc72d96ea4871cb8550b7
> Once again thanks Chris for TJ and thanks to put it under GPL
> Thanks everybody for your answers !

Thanks JJay for the patch! As you say, it's not a solution that can be
included. I'm sure this new behavior would hurt more users that it
would help. But there is currently no way to achieve this kind of
filtering. The right way to go would be to add another logical
function that does that job. Probably the hardest part is to come up
with a good name for it. If you want to have another go at it, I'm
still open for a patch.

Chris

Marc Rosskopf

unread,
Sep 26, 2013, 7:47:27 AM9/26/13
to taskjugg...@googlegroups.com, jjmer...@free.fr
I am also interested in a solution to this. Maybe the name

isallocatedto( <ID> )

works for you.

After having more than 200 people in the resource definition files, it would be great to hide those who are not part of your project (or not part of subtasks of your project).

Let me know if anyone has a nice workaround for this which is not mentioned in this thread yet.

Thanks & Best regards,
Marc
Reply all
Reply to author
Forward
0 new messages