Sometimes you have tasks that are more of a support or supervision nature, and their duration is not fixed but should be dependent on some other task.
A good example would be the work of a supervisor on a construction site. He comes in every day for 3 hours to see whether the site is making progress. Once the construction work is done, his job is finished.
How can we set up such tasks to have a flexible duration?
I will show you how.
Creating a task with a flexible duration
Let’s use the construction project as an example to create a flexible duration task in Microsoft Project. Look at the following schedule:
The project has 6 tasks, each of which has a duration of 5 days. I also entered a supervision task, whose duration is currently not set (indicated by the question mark).
I want this task to span the entire project duration, from project start until the last task, Task 6, is completed. This also means that if one of the “construction tasks” takes longer than planned, the supervision task should also be prolonged accordingly.
In technical terms, this is what we want to achieve:
- The start date of the Site supervision task should be equal to the start date of the first task (“Task 1”). This is equal to the project start date.
- The finish date of the Site supervision task should be equal to the finish date of the last task (“Task 6”).
In other words: we want to link the supervision task with the project start date and the finish date of the final task.
Fortunately, this is possible in Microsoft Project! (thank you, Bill Gates)
The solution: hammock task
We can link the duration of one task to the dates of another task. The official term for this concept is “hammock task”. Like a hammock (where I’m relaxing with my Pina Colada when I’m not writing these articles), the task will expand or contract flexibly depending on the dates we have linked the task to.
Let’s do this now.
To link the start and finish date of the supervisor task to the project start date and the end date of the last task, here is what we need to do:
Copy the start date of the first task (Task 1):
Next, set the cursor into the Start field of the Site supervision task. Then, from the Task ribbon, choose Paste → Paste special and then choose Paste link to paste the start date into the Start field of the Site supervision task:
After you have selected Paste Link, press OK.
Now the start date of the Site supervision task is linked to the start date of Task 1:
Next, copy the finish date of the last task (Task 6) and paste it into the Finish field of the Supervision task. Again, you have to paste the date as a link, just as you did before:
Look what has happened: The Supervision task starts on day 1 of the project and it finishes on the day the last task (Task 6) ends. The bar on the Gantt chart expands across the entire project — this is what we wanted to achieve!
Also, you may notice the little calendar icon in the first column. The icon indicates a constraint that Microsoft Project has set up for us. The constraint ensures that the supervision task does not start earlier than 01/19, which is the start date of Task 1.
Is the duration really flexible? Let’s make a test!
You’re probably wondering if our steps really have made the supervision task variable in its duration. We can verify this by changing the duration of one of the other tasks.
As a test, I’m changing the duration of Task 3 from 5 days to 20 days:
See what has happened?
The duration of the supervision task has been extended automatically. It spans the entire project duration. This is what we wanted. Wohoooo!
Test passed 🙂
The great thing is, you can also use this technique for milestones!
Before you head off to fumble around on your own project schedule, I want to highlight one downside of using such kind of “variable duration” tasks or hammock tasks in Microsoft Project.
The pitfalls of using flexible durations with hammock tasks
As you have seen in this example, the technique for making durations flexible is by linking the respective tasks to the start/finish dates of other tasks. This kind of linking through copy/paste is a perfectly fine way to achieve the desired result, and it is also recommended by Microsoft (see this article).
The problem with linking dates is that the information is not visible to someone going through your schedule. You have to know that there is a hammock task in the schedule where date fields are linked. The other problem is that the data can get corrupted when a lot of changes are made to the schedule, tasks are moved around or deleted, and so on. To make sure your hammock tasks always stay valid, I recommend you read Sam Huffman’s article for MPUG, Do’s and Don’ts: Using Hammock Tasks.
Did you find this article helpful?
Let me know in the comments if you found this article helpful for your work. If you want to improve your understanding of Microsoft Project, go check out my e-book, The 80/20 Guide to MS Project. It walks you through all the critical steps in Microsoft Project and you can use it as a quick reference.