Our team captures metadata on deliverables as parent tasks, which are made up of the steps represented by the subtasks. I typically create reports based on the parent tasks to show the status of each deliverable. I'd like to add a column to a report with the planned completion date of the first subtask (the first task nested under the parent task that is displayed in the report). Is this possible? I should also mention that our projects typically contain more than one of these parent tasks, so the first subtask won't always be task No. 2 in the project.
Solved! Go to Solution.
Views
Replies
Total Likes
To do this in a report you're going to have to iterate over the child tasks of each of the tasks you show in the report, and then determine whether to show that row's first child (there is no "firstChild" property, only the collection children)
Example:
You can use the taskNumber property to show only the first child task:
valueexpression=if({numberOfChildren}=0 && sum({taskNumber},-1)={parent}.{taskNumber},{name}+" due "+{plannedCompletionDate},"")
listdelimiter=‍
listmethod=nested(children).lists
valueformat=HTML
displayname=Iterate
textmode=true
type=iterate
This block
To do this in a report you're going to have to iterate over the child tasks of each of the tasks you show in the report, and then determine whether to show that row's first child (there is no "firstChild" property, only the collection children)
Example:
You can use the taskNumber property to show only the first child task:
valueexpression=if({numberOfChildren}=0 && sum({taskNumber},-1)={parent}.{taskNumber},{name}+" due "+{plannedCompletionDate},"")
listdelimiter=‍
listmethod=nested(children).lists
valueformat=HTML
displayname=Iterate
textmode=true
type=iterate
This block
Nice Sven! Of course you found a more elegant method.
I hope you're doing well my friend.
Views
Replies
Total Likes
Hah - small world
Greetings Teale! And congrats on the new gig!
Views
Replies
Total Likes
@Sven-iX amazing, this worked perfectly! I removed the name and "due" for my specific situation—all of the first subtasks in my report are the due date of an initial draft, so I just renamed the column to "target draft due date." Our content managers are going to love this. Thank you!
Views
Replies
Total Likes
Hi Shannon,
On a task report, I was able to pull the subtasks using the following textmode code in a column. If possible, I suggest using the canStart field also but don't know if your tasks have any dependencies. If they don't, then you won't be able to use that. If they do you can use the first valueexpression below to eliminate all of the subtasks from appearing. Also, you'll notice that I added the Task Number. That's simply for if you can't eliminate all of the subtasks from view, to make it easier to identify which one is first beneath the parent task.
valueexpression=IF({canStart}), CONCAT({taskNumber}, "-",{name},"-",{plannedCompletionDate})
valueexpression=CONCAT({taskNumber}, "-",{name},"-",{plannedCompletionDate})
listdelimiter=<div>
listmethod=nested(children).lists
valueformat=HTML
displayname=Sub Task PCD
type=iterate
Hope this helps,
Teale
Views
Replies
Total Likes
Thank you, @TealeMc4! Most, if not all the tasks will have dependencies; most won't have a predecessor, but some might.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies