WorkItemPorter

This plugin is designed for quick and easy copying of work items between different organizations and projects with support for field and value mapping.

How to create porting configuration

In the Settings tab, click the "Add porting configuration" button.
A new tab appears on the left called "New configuration".
In this new configuration, you're presented with 5 tabs; Setup, Settings, Configure, Post-porting actions and Other actions.

Setup

In setup you define where you're porting from and to, as well as which work item type you will be using.
Source is where you're porting from and Target is where you're porting to.

Settings

This is the Settings panel for this specific configuration. It has the following options:

Configure

In this section, you're presented with a list of fields present in the Target Work Item Type.
This is the main part of the configuration, where you can set how fields are populated based on the Source item.
When setting field values you will have the option to select between different value types:

Post-porting actions

Once a porting has been successfully completed, post-porting actions can be taken.
These actions follow the same logic as the regular actions of the configuration, but are only executed once a work item has been successfully ported.
This can be useful in order to change assignments or add tags in order to indicate that the process was successful and that a work item should not be ported again.
You can still reference fields in post-porting actions, but the reference changes a little.
In order to reference the fields of the newly created item, you need to prefix the field reference name with "n.", so it would be written [n.System.Id].
The same goes for references to fields in the source item in port-porting actions, which will be prefixed with "s.", [s.System.Id].

When using the static value scripting, there are a few options you have in order to enhance how this value works. For example, you may. You may choose to reference a work item field by putting the field reference name into square brackets For example [System.Description], This will reference the description field and put that value in its place

Macros:

WorkItemPorter supports a collection of different macros that can be defined as part of a Static value. They are as following:
Function Output Arguments Example Description
contains boolean string: string to search in, string: value to find contains(string,string) Returns a boolean value for whether the string you're searching for is present in the string to search.
isnull boolena any Returns a boolean value for whether the contents of the macro is empty or not. isnull(any)
left string string: string to reduce, int: n characters to take left(string,2) Takes the n leftmost characters of the string.
plaintext string any: content to turn to plaintext plaintext(any) Turns any input into plaintext, preventing further evaluation of macros.
replace string string: original string, string: what to find, string: replacement replace(abc,def,ghi) Tries to find a given string within another and replace it with another value.
and boolean boolean: first value, boolean: second value and(first, second) Evaluates whether 2 booleans are both true
if boolean boolean: condition, any: true output, any: false output if(condition,trueValue,falseValue) Evaluates a condition and returns a value depending on the outcome.
nor boolean boolean: firstCondition, boolean: secondCondition nor(firstCondition,secondCondition) Evaluates whether 2 booleans are both false
not boolean boolean: value to invert not(boolean) Inverts the value of a boolean
or boolean boolean: firstCondition, boolean: secondCondition or(firstCondition,secondCondition) Evaluates whether either of 2 given booleans are true
xor boolean boolean: firstCondition, boolean: secondCondition xor(firstCondition,secondCondition) Evaluates whether only 1 of 2 given booleans are true