Follow these steps to allow users of your application to enter a new work item by copying information from an existing work item. Through a data transform, you can control which properties in the existing work item are copied.
These instructions assume the harness is in the SmartFrames format.
You can offer work item copying in your application through a labeled button at the bottom of the user form or through an icon on the header. Development steps are similar.
CUSTOM
as the Type.iconCopy
CopyWork
for the Do Action field as the activity to execute when the icon or button is clicked.In Current Window
as the place where activity results are desired. Do not select In Pop-up Window
. pyCopyDefault
in the work type of the objects to be copied. Specify Set actions in the data transform for all properties that are to be copied from the current work item to the new object. (These may or may not correspond to fields that users can enter or overtype.) Be careful not to copy values that are unique to a work item, such as the work item ID. When users click the Copy icon on a user form, the application presents a copy. The user can enter data and submit the copy as another way to create a work item. The form for the original work item is closed (and locks on it are released; any unsubmitted changes are lost).
The new work item has the same work type as the original. Only one work item is covered. If the original work item is a cover, the new work item is also a cover, with no covered members.
The history of the new work item identifies the original work item, and the date and time of the copy.
If you don't create a data transform named pyCopyDefault, the standard data transform Work-.pyDefault is applied. This copies only pyLabel and pyDescription properties.
If the data transform doesn't set a value for the pyFlowName property, the system starts the flow on the new work item recorded in the pyFlowName value of the original work item.
Your application can override the Work-.CopyWork activity to provide additional capabilities if needed by your application.