Considering the basis of your question as your requirement:
20 hours’ work required for a task, over 15 days duration with 30% resource allocation.
30% of a single day is 2.4 hours, times 15 days = 36 hours and not 20 hours.
There is a mismatch in your requirement between the 20 hours of work vs. 36 hours of work yielded from the 30% allocation.
You will need to 'freeze' some combination of your Duration, Work, % Resource Allocation and allow the other to ‘float’ in the calculation process. Here are some options below:
Freeze 15 days and 20 hours total work: either 16% or 17% resource allocation (running tests on MS Project 2010 standard; does not handle fractional % allocations – comes up with 17%)
Freeze 30% allocation and 15 days: 36 hours work
Freeze 30% allocation and 20 hours: 8.33 days duration
You can allow MS Project to perform the desired calculation by adjusting your Task type or 'fixed-ness’ by choosing the desired task and performing the following:
Task Information ==> Advanced tab ==> Task Type drop down
Then choose between
- Fixed Units
- Fixed Duration
- Fixed Work
An additional consideration is the effort driven check box, also on the advanced task. This mostly comes into play when you have more than one resource on a task, which did not seem to be a part of your requirement and question. From the Microsoft website at the second link below:
“When you assign or remove people from a task, Project lengthens or shortens the duration of the task based on the number of resources that are assigned to it, but Project does not change the total work for the task. This is called effort-driven scheduling and is the setting Project typically uses when you assign resources to tasks.”
Effort Driven checkbox