Signature
| Helper | nodeHelper |
| Signature | createComponent(IHubIssue issue, String componentName, String description, String leadAccountId, String assigneeType) |
| Description |
Creates a new IHubComponent in the project that the issue belongs to. |
| Introduced in | 1.2.0 |
Parameters
| issue | The issue where the component needs to be created |
| componentName | The component name |
| description | The description for the component, e.g. Database |
| leadAccountId | The account Id of a lead |
| assigneeType |
The type assignee - can be one of following (strings)
|
Example use
issue.components = replica.components.collect {
remoteComponent -> nodeHelper.createComponent(
issue, remoteComponent.name, remoteComponent.description, null, "PROJECT_DEFAULT"
)
}Comments
- The Component is NOT automatically added to any of the fields of the issue.
- If a version with the same name already exists, then the existing component is returned and no new component ia created.
- The component is created in the project where the issue resides.
- Returns a component or null if the version could not be created.
- Set leadAccountId to 'null' in case no lead should be set.
- When assigneeType is null, createComponent returns null.