Project deployment using the Configuration Manager for Jira app fails with the error "Creation failed for email channel"

 Problem

Project deployment fails with an error “Creation failed for email channel xxx@domain.com in project XXXX“.

Error logs:

ERROR /rest/configuration-manager/1.0/deployment/4 [rollout.impl.snapshot.SnapshotImportOperationService] Unable to perform deployment: Creation failed for email channel xxx@domain.com in project XXXXX. Something went wrong, we cannot store your email configuration com.botronsoft.jira.jiraservicedeskintegration.api.ServiceDeskIntegrationException: Creation failed for email channel xxx@domain.com in project XXXXX. Something went wrong, we cannot store your email configuration at com.botronsoft.jira.jiraservicedeskintegration.util.ServiceDeskErrorsUtil.handleError(ServiceDeskErrorsUtil.java:24)

 Solution

In this case, CMJ uses Jira API to create the email channel. However, the Jira API is unable to create the email channel configuration and returns an error. It could be a database constraint violation. Hence it should be checked what email channels are on target before import in AO_54307E_EMAILCHANNELSETTING table.

SELECT * FROM AO_54307E_EMAILCHANNELSETTING;

Also, make sure Jira Service Management is enabled and licensed on the target system.

Workaround 1:

  1. Try to delete the email channel xxx@domain.com before generating the snapshot from the source.

  2. Recreate the snapshot and then perform the deployment.

Workaround 2:

Remove the problematic email channel from the snapshot. For this, you will have to convert the snapshot to XML - . When you convert the binary files to XML, the conversion will create 

  • Main configuration.xml

  • Separate XML's for each project

  • Separate XML's for project-specific comments

  • Separate XML's for project-specific History

  • Separate XML's for project-specific contents

Separate XMLs are provided to ease the editing process, in case any manual changes are required. This is not recommended though. The configuration.xml file is the main file that contains all the configuration objects. Once the changes are done in the configuration.xml file, compress the folder and deploy the snapshot.

If you want to modify the snapshot file(as per workaround 2), please create a backup to avoid losing information.