PPM / Reuse PWGanttAction methods for modifying WBS task structure

Martin Pavlov
Tera Expert

Hi all, 

I am struggling with an interesting topic related to PPM Planning Console. I need to create an UI Action so that a specific template is applied to an existing project. Now the tricky part - that template must be positioned on a specific place in the task structure => needs to have a specific WBS.

 

In other words - after applying the template, the task would go to the bottom of all tasks. Then the client must go to the planning console and click the UP arrow to move the task to the desired position. I want to automate that process.

 

What I've found so far:

 

The PC Header is a widget - [sp_widget] table - id: "pc-header"

There is a broadcast with id "gantt.call.to.action" (should be on line 44 in client controller)

A different widget is "listening" - dhtmlx-gantt. This one is using the "PWGanttAction" class to execute the transaction.

 

And here is my issue - I cannot find where this class is defined, called, whatever.. and also how the task and project sys ids are passed as parameters. The only parameter that the PWGanttAction.execute is receiving is the action name.

 

I will appreciate any help and additional information about this class or any other way to reuse an OOTB API to change a task's WBS and all other related to it.

 

Thanks,
Martin

3 REPLIES 3

Shweta S Hegde
Tera Contributor

Did you find a way?

Nope, not yet

Shweta S Hegde
Tera Contributor

Hi Martin,

 

You can create ui action to apply template and after template is applied try to modify the wbs order based on your requirement. With script , query the planned task table with top task and try to update wbs for each project task , child project task , based on your requirement.