Lookup and calculate value of children for a parent list - google-sheets

I'm calculating the total hours of my member spending for working in each task by count the hours they spend for each subtask of that task.
I have a list of tasks (include parent tasks and subtasks). Each task in that list has Parent Key column (available if it is a subtask),Key colum, Task Name, Task Type, Assigned Persron and Time (hourse spent for that task of that person).
Each Task could have multiple subtask which could be assigned to multiple Person
Each Person could have multiple subtasks of one Parent Task.
Now I need to create a list of Task (without subtask) and calculate the total hours each member spent for that task:
If that Task doesn't have subtask, the time will be the spent time of that task.
If that Task has subtask, the time will be the total time spent for subtask (It means don't calculate time spent for the parent task)
If a member they have 2 or more subtasks in a single Task, the total hours will be sum of their subtasks.
Example sheet: https://docs.google.com/spreadsheets/d/1mSLDyRFyG71HxCFwds7M3uoCH3cgNogoREJZZbA3lD0/edit#gid=0
I could get a list of Parent task but I cannot sum the multiple subtasks of each Person.

Can you try:
=let(
a,filter({E:E&xlookup(A:A,B:B,C:C,),F:F},D:D="SUBTASK"),
b,filter({E:E&C:C,F:F},D:D="TASK",not(regexmatch(B:B&"","\b("&textjoin("|",1,A2:A)&")\b"))),
d,sort(unique(filter({B2:B,C2:C},D2:D="Task")),1,1),
e,transpose(sort(unique(filter(E2:E,E2:E<>"")),1,1)),
{{"Task key","Parent Task";d},
{e;makearray(counta(index(d,,2)),counta(e),lambda(r,c,ifna(sum(filter(index(a,,2),index(e,,c)&indeX(index(d,,2),r)=index(a,,1))),ifna(sum(filter(index(b,,2),index(e,,c)&indeX(index(d,,2),r)=index(b,,1)))))))}})

Related

How to get power charts and reports for tfs

I want to get some different reports and charts from Tfs activities and history (most based on task tags and assigned users). for example after 3 monthes I want to know how many hours a user moved her tasks to next iteration, ...
Is there any tools for this?
No such a tool can exactly achieve that. There is an extension Team Capacity Management, but seems it's not apply for you.
If you want to know how many hours a user moved her tasks to next iteration, then you need to get the planned hours then subtract the completed hours in current iteration. Alternatively you can add tags on the work items which moved to the next iteration, then create a query which filter by the tags to get the sum of hours.
e.g.:
Create a query 'RemainingWork' with the column Assigned
to and Remaining Work added in "next iteration" (e.g.: iteration
2 here) to filter the moved work items from pervious iteration with the tag.
Save it in Shared queries
Add Chart for Work items widget in your project dashborad, then
configure the widget. Then you can see the hours a user moved tasks
to next iteration in the chart:

Maintaining a Relative Order of Flex Tasks in a SQL DB

I have a task scheduling app that allows people to create 2 types of tasks...
•Strict- tasks with a set start time and duration
•Flex- tasks that have a duration, but no specific start time
Its also important to understand how flex tasks operate- Flex tasks will continuously reschedule themselves throughout your day in the nearest time you have open...so for example if the only task on your schedule today is a flex task like "Go workout - duration:60mins" and you open the app at 4pm it will have "Go workout" scheduled from 4-5pm for you , if you dont click the checkbox indicating you completed the task and open the app again at 5PM "Go workout will be rescheduled to 5-6pm so that the stuff you are meaning to get done is constantly in your face and trying to fit itself into the gaps of your life.
When a user views their schedule here are the steps I go through:
•Grab a array of all strict tasks
•Grab a array of all flex tasks
•Loop through each strict task and figure out how big of a time gap there is between the task currently being looped's end time and the next tasks start time.
•if a gap exists loop through the flex tasks and see if any of them will fit in the time gap in question. if a flex task is small enough to fit in the time gap add it to the strictTasksArray between the task being currently looped and the next task.
This works great as long as there is no need for any kind of ordering when it comes to flex tasks, but now we have added the ability for users to drag and drop flex tasks into a specific relative order aka if I have Task A,B,C,D
and I drag Task D & B to the front so that its now D,B,A,C it needs to save that ordering so that if you close and reopen the app the app will still remember to try to fit task D in , followed by B, A & C .....but im having big trouble thinking of a efficient way to do considering the ordering is relative and not strict...any ideas how to save relative ordering in a SQLIte DB without having to update every tasks's DB record every time a user drag/drops a task and changes the relative ordering?
If you have ever coded in Basic, you might remember numbering code lines. It was advisable to number in increments of 10 so that if later on you would have to insert a line or two you won't have to re-number all the code, just assign a new number in-between those of the previous and the next lines.
So, in your situation I would create a numeric field for Rank and for each new Flex task assign Rank = max(Rank) + 1024 (for example). Afterwards if the tasks are rearranged I would update just one "moved" task's Rank with the average Rank of it's new previous and next neighbours. That way any Rank change would be an update for one row only. Of cause if the Rank is int and I run out of integers in-between two tasks I would have to update them all, but that should be a rear occasion and I would just re-Rank them in new increments of 1024.
Sounds like you'd need some sort of either priority or order_number column to set the order in which the tasks come in. Just make it an int, and weight them accordingly. If you needed the DBMS to keep them in order using a query, you'd have to use sorting:
SELECT task_id, task_group_id, task_name, completed, priority
FROM tasks WHERE user = ? and task_group_id = ? and completed = 0 ORDER BY priority ASC
you can use some sort of foreign key to a task_group table to actually group certain tasks together if they're multipart, and then build a query to find all the ones that are either complete or incomplete. The weightage assigned would still be correct, because the tasks don't refer to each other by ID.

TFS 2012 Burndown Chart Not Updating

I've got some problems with my TFS Burndown Chart. I've just created an Iteration (Sprint) with no start - end date. Then added some Working Items - Tasks each with their corresponding start - end date (lets say 10/06/2014). 6 days have passed since I realized that my whole Iteration (Sprint) did not have start - ending dates (10/06/2014 - 27/06/2014), so I've added those, but now... my Burndown chart is showing the progress only from dates 16/06/2014 to the current date, up to the finish date: 27/06/2014
Most of My Working Items (tasks) inside the Iteration - Sprint have their Start, In Progress and Finished within the current dates: 10/06/2014 - 16/06/2014.
Please Advice.
Not sure how your tasks have starting/ending dates. I thought all the default templates had Work Remaining on Tasks. Anyways, the burndown operates off the Work Remaining fields of the Tasks, you need to update that appropriately.
You should set start and end dates for the sprints themselves. Without start/end dates for the sprint itself, it can't project how much time you have left given the total task work at the beginning of the sprint. An iteration path (i.e. sprint) is inherently a period of time for doing your work (i.e. 2-4 weeks).

Task in daily products generated not in duration

I have a project which contains a task for creation 1000 products in 10 days (daily 100 products).
I have distributed that in 10 employees mean every employee have to create daily 10 products not matter how many hours he spent. I am unable to find how to create that task and monitor accordingly.
You cannot use MS-Project to model this kind of task scheduling behaviour since its resource loading and task scheduling is based on knowing how much work (expressed as time) is needed to complete a task.
You can force MS-Project to have a 10-day duration, irrespective of the resources applied, by setting Work=10d and making the task Fixed Duration (both before adding any resources), but that cannot be used to divide up piece-work amongst resources assigned to that task.

Greedy Algorithm implementation

So I have some questions concerning the solution to the problem of scheduling n activities that may overlap using the least amount of classrooms possible. The solution is below:
Find the smallest number of classrooms to schedule a set of activities S in. To do this efefficiently
move through the activities according to starting and finishing times. Maintain two lists of classrooms: Rooms that are busy at time t and rooms that are free at time t. When t is the starting time
for some activity schedule this activity to a free room and move the room to the busy list.
Similarly, move the room to the free list when the activity stops. Initially start with zero rooms. If
there are no rooms in the free list create a new room.
The algorithm can be implemented by sorting the activities. At each start or finish time we can
schedule the activities and move the rooms between the lists in constant time. The total time is thus
dominated by sorting and is therefore O(n lg n).
My questions are
1) First, how do you move through the activities by both starting and finishing time at the same time?
2) I don't quite understand how it's possible to move the rooms between lists in constant time. If you want to move rooms from the busy list to the free list, don't you have to iterate over all the rooms in the busy list and see which ones have end times that have already passed?
3) Are there any 'state' variables that we need to keep track of while doing this to make it work?
The way the algorithm works, you need to create a list containing an element for each start time and an element for each end time (so 2n elements in total if there are n activities). Sort this list. When an end time and a start time are equal, sort the end time first -- this will cause back-to-back bookings for halls to work.
If you use linked lists for holding the free and booked halls, you can have the elements you created in step 1 hold pointers back to an activity structure, and this structure can hold a pointer to the list element containing the hall that this activity is assigned to. This will be NULL initially, and will take on a value when that hall is used for that activity. Then when that activity ends, its hall can be looked up in constant time by following two pointers from the activity-end element (first to the activity object, and from there to the hall element).
That should be clear from the above description, hopefully.

Resources