Automatically importing tasks into project 2007

K

Kev

Hi
I am hoping somone out there can help me, I have been searching the net for
Days and havent found anything yet.

Basically I have a Quality managment software that records enhancments and
defects,
I have full access to this data and can export it to any format i wish,
What i would like to do is create a task in Project 2007 for every
outstanding issue in my QM software.
How can i create tasks programatically from ths data wthout having to
manually add them in in the project Inerface, ie into the DB directly or via
some automation tool

Regards
K
 
J

Jim Aksel

Here's one approach. From your software, export to a known format such as
*.txt or *.csv. Make sure you have all the information you need in the
output.

Using VBA, you can open a text file and read the information in the file one
line at a time (assuming all the task data is on one line). Create a new
task programmatically, add the task to the activeproject.tasks using
activeproject.tasks.add method. Process the information and add to the task.

You might want to start with a user form where the new file can be keyed in,
and other information could be added such as "Add after task number:", and
perhaps some linking information for predecessors.

Should VBA not afford you the desired flexibility, you can approach the
problem from .NET as well.
--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 
K

Kev

Jim Thanks for your Response,
You see I have never used VBA before so I am not familiar with this approach,
I am fairly proficient in CSharp and would like to be able to do it this way.
I have writen a Csharp App to export the data from my QM software so
integrating this with the import to project 2007 would be hugely beneficial.
Do you know of some clear documentation on how to create tasks/projects from
CSharp
Or have you any code examples that I could work back from
Regards

K
 
A

Adam Behrle

Kev,

You can do this with the PSI using C#. Checkout the Project Server
2007 SDK on MSDN.

Hope that helps...

Adam Behrle
QuantumPM
 
K

Kev

Adam Thanks for the reply,
Have you ever used this SDK before?
Once I have downloaded it should I be able to access this through Visual
Studio, or how do I go about begining development

I have been looking at the MSDN documentation, but I would love if someone
had a some sample code that they have written that does something like this
(just the initial steps )and then i can add in the more complex functions
when i have upskilled myself.
Basically what I am looking for is 'project server development for dummies' :)
 
S

Stephan Steiner

Or in case you're looking at the standalone Project Client, you'll need to
get the Office PIA and automate Project through COM.

It's probably a bit trickier to get started than PSI since the only
documentation is the VBA documentation - it does match the interop
assemblies, but it's difficult to place methods, events and such to the
individual objects.

By the way, Adam, this strikes me as a scenario where manual publishing of
new tasks is undesired. Are you sure PSI is enough for that (specifically
can you use it to publish new tasks and assignment without the use of the
project client? There's a method to queue publish of a project which sounds
promising.. but I have yet to find anyone who can confirm that this indeed
pushes out the tasks and assignments without somebody having to open the
project client or otherwise click somewhere sommehow - it's the one reason
that is a major drag in my workplace with Project Server 2003 where there's
just no way to PDS to publish tasks and assignments so that people can start
reporting time without having somebody who opens the project and does a
"publish new and changed assignments")

Cheers
Stephan
 
K

Kev

Yes Stephan you are correct,
the tasks I am talking about here need to be added and published without any
user intervention,
I.e it will be an automated task that happens once every hour or so.
It would be ideal if this could all be automated through a C# application.
and i gather this can only be done using PSI?
 
A

Adam Behrle

Stephan,

We have successfully created new tasks/assignments and published them
through the PSI. We definitly had to do some massaging to get
enterprise resources to work smoothly (with required resource fields),
but it's definitely possible.

Regarding if the assignments show up in user's timesheets, I haven't
verified this myself so I couldn't say I'm positive on that one.
However if it is a requirement that the users be able to apply time
against these new assignments and they don't show up after publishing,
then the task/assignment could be created (and subsequently approved)
through the Statusing web service of the PSI. In other words the task
creation would originate from the timesheet.

Kev,

You can automate Project through COM via C# by referencing the PIA's
(the .NET bridge or interop to the COM references) as Stephan says. So
the PSI isn't your only choice if you want your solution in C#.
However automating project from a windows session that doesn't have a
UI (like a windows service or the scheduling service) can be littered
with dangers too. Sometimes this works smoothly, sometimes it needs
some system tweaking such as specifying a user account in DCOM,
etc...

If you do decide to look into the PSI, there are some examples in the
SDK. The ProjTool example has a lot of PSI usage. Also there are some
How To's and getting started articles in the SDK documentation.

Hope this helps at least a little...

Adam Behrle
QuantumPM
 
V

Vadim Gerya, PMP

If you use PSI, you will not be able to work with local fields of projects in
easy manner. PSI object model inteds to works with "ALL projects, resources,
assignments.. of your EPM "
If you like to programmatically control one project at time it is easy to
use VBA.
Hope this helps..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top