Operation Scheme Mapping Entries
To map operation scheme entries, select Operation Scheme or Incoming Events in the "Teamworkx Connector" section in the app configuration.
Depending on your selection one of the following dialogs is displayed:
- "Operation Schemes"
- "Incoming Events"
Edit Mapping Entry
You can edit the mapping entries for a specific scheme by clicking on the link Edit mapping Entries in the "Actions" column.
Currently 3 different operations are supported:
- Create Issue
Update Issue
Transition
Each of these operation has a mandatory set of mapping entries.
Create Issue
At least one entry for project key is mandatory. The target must be "Project Key (id:projectKey)".
At least one entry for issue type is mandatory. The target must be "Issue Type (id:issuetype)".
Update Issue
One entry of type IDENTIFY is mandatory. - The type must be "Identify Issue".
Transition
One entry of type IDENTIFY is mandatory. The type must be "Identify Issue".
One entry for workflow transition is mandatory. The target must be "WF Transition (id:wf_transition)".
Set an Entry
To set an Entry do the following:
- Set the source
- Select the target
- Select the type
- optionally: Add velocity (this field has multiple functions)
- optionally: Add additional information (only descriptive Information)
- Edit value mappings (if necessary - This depends on the chosen type)
Set the source of your entry
For Jira to Jira connection the source can be:
- project
- projectKey
- issuetype
- issueKey
- components
- timespent
- timeoriginalestimate
- summary
- description
- fixVersions
- aggregatetimespent
- resolution
- resolutiondate
- timetracking
- attachment
- aggregatetimeestimate
- workratio
- lastViewed
- watches
- creator
- reporter
- assignee
- subtasks
- created
- updated
- aggregateprogress
- priority
- labels
- environment
- timeestimate
- aggregatetimeoriginalestimate
- versions
- progress
- issuelinks
- votes
- status
- any customfield_xxxxx
For Jira to SAP connection the source values can differ. Please see the CAS Connector documentation for more information.
Select a Target
This is where the data should be displayed. The drop-down contains the Jira fields and some additional fields such as:
- Issue Key (id:issuekey)
- Project Key (id:projectKey)
- Velocity Evaluation (id:velocity_evaluation)
- WF Transition (id:wf_transition)
These are helper fields used for identifying issues or projects, setting external links and transition an issue.
Choose a Type
The source data will be handled by this type before writing data to the target field.
- Copy Value: Copy the value from the source field to the target field.
- Single Value Mapping: Map the value from source field and write it to he target field. (a mapping has to be provided after adding the entry)
- Multi Value Mapping: Splits the value from source field by "," and maps every data before concatenating the result by ",". (a mapping has to be provided after adding the entry)
- Identify Issue: This is used to identify an issue. You can identify the issue by any field or issuekey. (It is recommended to use issuekey)
- Velocity: This type activates the Velocity field and evaluates it as plain velocity. The source can be any valid data but won't be handled.
After evaluating the velocity code, the output will be written to the target field.
If the target field is set to "Velocity Evaluation" the velocity will be executed and no data will be written.
With this feature you are able to create external Links.
Velocity Field
This multi-line field is used for multiple functions. Depending on your selections of "Target" and "Type" this field changes its functionality.
Execute Velocity without writing data
When the Target is set to "Velocity Evaluation" and the Type is "Velocity" the multi-line field will be executed as plain Velocity. Inside Velocity every source data is accessible using the data accessor. E.g. $data.get("<source>")
. Also a second helper class ('system') can be used to execute functions described below.
Execute with writing data
When the Target is set to an issue field and the Type is "Velocity" the multi-line field will be executed as plain Velocity. Inside Velocity every source data is accessible by typing $<sourcename>
. Also a little "MyHelper" can be used. The result will be written to the issue field.
Condition
When the Target is set to an issue field and the Type is either "Copy Value", "Single Value Mapping" or "Multi Value Mapping" the Velocity will be handled as condition.
When the condition returns true the target will be set. When the condition returns false or no value the field will not be set.
Info
This field is for describing the use. It is just for administrators.The field is not evaluated.
System
The helper can be used by typing $system.<method> in the Velocity field.
Currently the helper provides 3 methods to use:
This method creates a Link with the given URL parameter. In Jira it will be displayed with the given title. This method does not have a return value. createExternalLink(String title, String url)
This method converts a String value into a List<Map<String, String>>. A null value will return an empty List. return List<Map<String, String>> getAsList(String value)
This method searches for an issue with the searchValue in the given searchField. return String issuekey or null getIssueKeyFromSearch(String searchField, String searchValue)
Single-/Multi-Value Mapping
The most common mappings are:
target | mapping type | mapped value |
---|---|---|
projectKey | Single Value Mapping | <projectKey> |
issuetype | Single Value Mapping | <issueTypeId>/<issueTypeName> |
priority | Single Value Mapping | <priorityId>/<priorityName> |
<selectfield> | Single/Multi Value Mapping | <selectfieldOptionId> |
<checkboxfield> | Multi Value Mapping | <checkboxOptionId> |
<TWX Issue Picker> | Multi Value Mapping | <Issue Key> |
If the ids are the same in both instances the mapping is not needed. Instead you can use the type Copy Value.