none
Duplicating Add Task Form - Task Location Pre-pop RRS feed

  • Question

  • Hello,

    We want users to be able to add tasks (create assignments) in Project Server from within other local applications.  So far I envision it being a standalone web application that will contain a form with the necessary fields to be filled out by the user, after which, upon Submit, PSI services will be invoked to create an assignment based on the information entered.

    The form will be almost identical to the "Add New Task" form that Project Server provides.  My question is on pre-popping the Task Location fields (see image below).  First drow-down pre-pops projects that the user is a resource on, and the second one - all summary tasks for a particular project chosen.

    1. For the 1st drop-down, is there an easier way to get those projects that the user is a resource on, rather than getting a list of all project, reading the project team on each and seeing if the current user is part of the project team?

    2. For the 2nd drop-down, if you look at ProjectWebService description (http://msdn.microsoft.com/en-us/library/websvcproject_di_pj14mref.aspx), one of the things that it claims could be done is "Getting All Summary Tasks".  Does anyone know how that is accomplished?

    Thank you,
    Ilya

    Wednesday, February 8, 2012 6:23 PM

All replies

  • Hi did you try ResourcePlan class for your first question? Secondly did you try looking into ProjectDataset's Task table? I don't think there specific method to get summary task but of course you can filter out the table for it.


    Thanks, Kashif

    Thursday, February 9, 2012 8:33 AM
  • You can use Statusing.ReadStatus for all assignments for a specific periode. To obtain from those assignments the project and task hierarchy use Statusing.ReadSummaryTaskPath.


    Jan Cirpka

    Thursday, February 9, 2012 12:50 PM
  • Thanks for your answers, guys! 

    The problems, however, are the following:

    1. Statusing.ReadStatus will give you only the projects where a user has assignments on, but it won't give you the projects where a user is a Team Member and hasn't been assigned anything yet.
    2. ResroucePlan requires elevated permissions, and a user with simple "Team Member" project server permisions cannot invoke ResourcePlan methods.
    3. Project.ReadProjectStatus gives you the list of projects for which a user has "Open Project" permission, but, again, won't give you projects where the user is just on the Resource Team.  You could potentially use ReadProjectTeam method and iterate through projects, but permissions is the issue here again.  You can't get the list of necessary projects to feed into ReadProjectTeam in the first place.  The only way for a user with low permissions to get some kind of a list of projects is to use ReadProjectStatus method, but it does not return all the required projects for my scenario (users who are simply on the Project Team do not necessarily have permission to open project in Project Center).

    Any other ideas in the light of the above?

    Also, is impersonation a common approach to use in the PRODUCTION environment?  So far it seems like it's my only bet, otherwise I can invoke barely any PSI methods.

    Thank you,
    Ilya

    Monday, February 13, 2012 6:28 PM