Expand my Community achievements bar.

API: Convert Issue to task (convertToTask)

Avatar

Level 10

Hello,

 

I want to convert an issue to a task using the API. Therefore I found the action "convertToTask". But using this leads to a different behaviour than using "Convert to task" on an issue directly in Workfront.

I am using a custom form on the issue which is also available for tasks. I would like to attach the form to the created task as well what works, if I add the parameter "categoryID". But is it also somehow possible to keep all values entered into the custom form?

Or is it meant that these have to be inserted again manually afterwards? What exactly does the API function "convertToTask" do if no data is transferred from the issue?

 

Does anybody have any experiences with converting issues to tasks or projects using the API?

 

Regards

Lars

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi,

 

Converting an issue to another object via the API does not automatically carry over the custom data from the originating issue - annoying right! 

 

Unfortunately, you would need to read the custom fields on the originating issue and map them over to the custom fields on the task/project in a separate update record module within your fusion scenario (assuming you are using Fusion).

 

Best Regards,

Rich. 

Avatar

Level 10

Hello Rich,

 

thank you for your answer. I was wondering, what exactly this action already does in the conversion process in in contrast to creating the whole stuff on your own. So when calling this action without any parameters than the new task's name, it does not even create a connection between the old issue and the newly created task...

Avatar

Level 10

Sorry, that was wrong. I added 

 

"options": [
            'preserveIssue',
          ]

and now it works. 

Avatar

Community Advisor

I can only confirm what Rich wrote