Hello today I'll show an example code to duplicate an workitem using the Jazz API. In order to facilitate the customization to any template, in this example we will be able to choose which fields to copy using a vector.

Finally, we will create a link between the two workitems, one was a duplicate of another.

First, let's create the main functions:

Now, fill the vector fields and call the function, as in the example below: