I have an item descriptor in the Task WS that is called Project Start Date and I have an item descriptor in the Project Management WS. If the task is related to the project, the dates should be the same. Is there a way that this items field would be the same? It is applicable to any other item field. Maybe with scripting
Thanks
Solved! Go to Solution.
Solved by adminplm360. Go to Solution.
Hi,
You could perhaps consider using a derived field to achieve this but it will require selecting in the task item details the correct project in a picklist to derive the project start date value set on the project into the corresponding date field in the task.
Regards,
Ok, how can I select the related project via scripting? I tried the project title and it didn't work. I'm receiving this error
[createTaskForProject] org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO WS_PROJECT_MANAGEMENT_MULTI_TEAM (dmsid, lookup_id) SELECT ?, lookup_id FROM CUSTOM_LOOKUP_ALL_USERS_VIEW WHERE true = false]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'true'.
Thanks
Hi Elias,
Could you please upload a screenshot of the definition of your project picklist field found in your task item details?
Regards,
Here is the screenshot.
What I'm doing is that when I create a project I want to create several tasks using script. Those task are related to the project that I'm currently creating in the script. Maybe the way of doing it is not when the project is being created but when the task is being created. Meaning that realitng the task to a project is a behavior script of the task and not of the project management. But I don't know a way of doing it unless I know the id or something of the project. The thing is that I don't want to know it manually, I want to do it automatically.
You need to create the project first then the task otherwise you will not be able to derive field data from the project into the task object.
Could you modify your picklist definition to use the project Title field instead of item descriptor and see if that helps?
The thing is that if I select the title instead of the descriptor when I use the derive data type, the picklist is not recognized as a pivot.
Sorry for this, I overlooked the fact that not using the item descriptor would break the derived field.
Could you reconfigure the picklist to use item descriptor and see if you could use item.descriptor.descriptor in your script to access the project object item descriptor value?
Ok but how would I relate the project that I just created? I need to do it manually which I don't want. All the time the projects related to a task will be diferent.
The solution is
taskObj.RELATED_PROJECT_PICKLIST_FIELDID = projectObj.descriptor.descriptor
And if you have a derive field it will automatically update it