Re: Setting fixed task start and end date



Don't forget that Duration is always in working time according to your
calendar settings, ie 90 days Duration = 90/5 = 18 weeks or about 4 months
and a bit. Have you tried keying in the data rather than using vba to bring
it in? What results do you get then?

Mike Glen
Project MVP

Pr4gm4tik wrote:
Here's an example following using that approach:

//Add the task
tsk.ConstraintType = MSProject.PjConstraint.pjMFO;
tsk.ConstraintDate = "12/15/2008";
tsk.Duration = 432000;

Here I have basically said finish on 12/15/2008 no matter what, with a
duration of 90 days (from what I've read duration is mins * 10, with
an 8 hour day being 4800 so its 4800*90).

With that code I get tasks that end on 12/15/2008, but start on
3/27/07. Perhaps there is a problem with my duration value? I tried
experimenting with the duration settings under Tools > Options >
Schedule and it only made a difference in the way its displayed, the
dates came out the same.

"Mike Glen" wrote:

Project will only allow you to put a constraint on one end of a
task, not both. Try making one of them a Must... constraint and see
the other being driven by the Duration you enter.

Mike Glen
Project MVP

Pr4gm4tik wrote:
I'm unsure what made you feel the need to be combative. You
suggested I post to the server group, and I followed your suggestion
and that's the only reason I posted there. You now seem to be
contradicting your own advice at this point and chastizing me for
posting in both places.

I had no intention of wasting anyone's time who was not inclined or
able to help, I'm simply trying to use the groups for what they are
hear for, and I posted an MS Project Professional question in the
general group and was then asked to move it to the Server newsgroup.
I was simply pointing out that it was not a Project Server question;
I mentioned Project Server to provide insight into the higher level
task I need to solve.

Regarding letting Project do it's job, I understand what you're
saying and it's my personal opinion that Project is not the best
tool for the task my boss wants to accomplish. I suggested that I
can develop a custom app in C# in a relatively short that behaves
*exactly* as desired, but there is a basic philosophy of integrate
versus build here. If we cannot get Project Pro / Project Server to
behave as desired it makes an excellent case for developing a custom
solution.

To answer your question, the tasks do not have constraints
currently. I have experimented with constraints to see if they
solve the problem, but they don't. The constraint of As Soon As
Possible is the default. I have experimented with all of the
different constraint types and still have not found a way to
absolutely set the dates to, for example 1/1/2008 - 7/1/2008. Why
on earth would I want every task to have a six month duration?
That leads me back to where Project Server comes in... it will only
autopopulate timesheets with tasks if the task falls within that
time period. These tasks are being imported into Project from
another system, without scheduling information, so we need them to
appear in the user's time*** without regard to scheduling. The
six months timeframe is arbitrary, we need to be able to set it to
60 days, or 2 years, or whatever is needed to ensure it always
shows up in the user's time***.

If you or anyone can help, that's great. I'm uninterested in
engaging in unconstructive arguments.


"Mike Glen" wrote:

So you want someone here to give you an answer and waste someone
else's time in the server group?

The only way to fix a date is to use the Must Start On constraint
or the Must Finish On constraint. Any others won't do. Are they
the constraints you're using? In any event, you would do best to
make them all As Soon As Possible and put deadline dates to alert
you of problems. Project's job is to tell you want is possible
with the data you've entered - let it do it's job.

Mike Glen
Project MVP



Pr4gm4tik wrote:
Hi Mike,

I have posted this in the server group as well, although I do want
to point out I am trying to accomplish this in Project Pro 2007,
not in Project Server. Server plays into it in a sense, but it is
the thick client app that is adjusting the dates.

"Mike Glen" wrote:

Hi Pr4gm4tik ,

Try posting on the server newsgroup. Please see FAQ Item: 24.
Project Newsgroups. FAQs, companion products and other useful
Project information can be seen at this web address:
http://project.mvps.org/faqs.htm

Mike Glen
Project MVP


Pr4gm4tik wrote:
I am inserting tasks into the project from another system using
a .net utility running against the Project Pro 2007 object
model.

I need to set absolute start and end dates for tasks -- I do not
want Project Pro to change these dates for any reason. I have
turned off automatic calculation for the project, but it still
seems to adjust the dates as it seems fit.

The reason this is important is the project is being published
to Proj Server 2007, and tasks can only be auto-populated in the
user's time*** if the task is scheduled within the time***
period, so I need to make the date range wide enough to cover
all possible time*** periods.


.