It's all about the answers!

Ask a question

Calculated value or query from parent?


Richard Segal (111) | asked Apr 17 '12, 9:01 p.m.
I have work items arranged into a hierarchy using parent/child links. I would like to display information from the parent work item in the editor for the child. For example, consider two work items:

Type: ParentWI

id: 1
Summary: Big Task
Due Date: 5/1/2012

Type: ChildWI
id: 2
Summary: Sub Task


I would like to have the editor for ChildWI display the due date from the parent work item. I looked at implementing the above using "Script Based Calculated Values" but it appears that there is no easy way to access the children of a work item from within the script. Can this be done in a calculated value script? Is there another alternative? Suggestions?

Similarly, I would like to have the results of a query for all ChildWIs display the parent's due date in the results. If I can get the calculated value working then this becomes easy. If not, is there another way to get the parent's due date to be displayed in a query's results?

- Rich

One answer



permanent link
Paul Wellman (71119) | answered May 07 '12, 3:39 p.m.
Hi Rich,
By any chance were you able to figure this out? I am looking for a similar solution.

Thanks.
Paul

I have work items arranged into a hierarchy using parent/child links. I would like to display information from the parent work item in the editor for the child. For example, consider two work items:

Type: ParentWI

id: 1
Summary: Big Task
Due Date: 5/1/2012

Type: ChildWI
id: 2
Summary: Sub Task


I would like to have the editor for ChildWI display the due date from the parent work item. I looked at implementing the above using "Script Based Calculated Values" but it appears that there is no easy way to access the children of a work item from within the script. Can this be done in a calculated value script? Is there another alternative? Suggestions?

Similarly, I would like to have the results of a query for all ChildWIs display the parent's due date in the results. If I can get the calculated value working then this becomes easy. If not, is there another way to get the parent's due date to be displayed in a query's results?

- Rich

Your answer


Register or to post your answer.