Project and Portfolio Management Practitioners Forum
cancel

How to update tasks user data via web services? Is it possible?

Highlighted
roxor
Honored Contributor.

How to update tasks user data via web services? Is it possible?

Hello,

 

I am able to create task via webservices. But I don't know how can I update task via webservices. I need to update not only actuals and effort hours, but also user data fields.

 

Situation is: 

I have an output from third party service. In this message I have couple of tasks.

  • If task doesn''t exist in my PPM instance, I have to create new task via webservice. This is not a problem.
  • If task exists in my PPM I have to update user data fields in this task. This is my problem.

How to update user data fields?

 

List of available web service operations from documentation:
createProject
updateProject
executeWorkFlowTransition
createBlankWorkPlan
createWorkPlanFromTemplate
importWorkPlanTasks
addTasksToExistingWorkPlan
updateTaskActuals
readTasks
searchProjects
searchTasks
getProjectDetails
bulkImportProjects
updateWorkPlanStatus
exportWorkPlanFromProject

As far as I see there is only option to use updateTaskActuals, but I don't know how to change user data fields through this...

 

In case that webservices aren't way to do this is there any other way/possibility how to automaticaly update task?

I will apreciate any suggestion. Thank you very much.

4 REPLIES
Utkarsh_Mishra
Acclaimed Contributor.

Re: How to update tasks user data via web services? Is it possible?

Modify the "testUpdateTimeSheet()" in TimeServiceClient.java file to implement your changes. 

 

In the file modify the below code:

 

UserDataInfo userDataInfo = timeSheetLineBean.addNewUserDataBean();            userDataInfo.setUserData1("my userdata1");

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
roxor
Honored Contributor.

Re: How to update tasks user data via web services? Is it possible?

Hello Utkarsh,

 

many thanks for your help. From this it seem to me that only way how to modify tasks user data is thought time sheets? How to do it when no time sheet exists? I have only tasks.

roxor
Honored Contributor.

Re: How to update tasks user data via web services? Is it possible?

Hello again Utkarsh,

 

now I have realized that you are talking about Time Management User Data. We don't use this feature so at first it wasn't familiar to me but now I realized that this is something different from Tasks User Data.

 

Pls see attachment. I have some fields in tab User Data which belongs to Task.

Utkarsh_Mishra
Acclaimed Contributor.

Re: How to update tasks user data via web services? Is it possible?

The out of the box web service provided by HP does not provide the functionality to update the User data of any task.

 

As per your requirement, you need to create a custom java class to perform your task. This class you can call in your web service client.

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)