Issue data deployment failing due to comment(s) restricted to missing project role(s)

Symptoms:

Deployment fails during issue data import with the following error:

Example error code

java.util.concurrent.ExecutionException: com.botronsoft.jira.rollout.snapshot.SnapshotOperationFailedException: Unable to perform deployment: Unable to find transformation object for method invocation public void com.botronsoft.jira.rollout.impl.merge.issuedata.CommentMerger.mergeComment(com.atlassian.jira.issue.Issue,com.botronsoft.jira.model.server.jiraconfiguration.issuedata.JiraIssueComment,java.util.Set) with arguments [XYZ-123, com.botronsoft.jira.model.server.jiraconfiguration.issuedata.impl.JiraIssueCommentImpl@5164a7dc (nativeId: 10547, body: Comment content, created: Fri Mar 20 16:55:42 EET 2020, updated: Fri Mar 20 16:55:42 EET 2020), []]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at com.botronsoft.jira.rollout.impl.jobs.AbstractAsyncOperation.getResult(AbstractAsyncOperation.java:61)
	at com.botronsoft.jira.rollout.rest.internal.snapshot.DeploymentResource.createResponse(DeploymentResource.java:876)
	at com.botronsoft.jira.rollout.rest.internal.snapshot.DeploymentResource.getDeploymentOperationResult(DeploymentResource.java:570)
	at sun.reflect.GeneratedMethodAccessor978.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker.lambda$_dispatch$0(DispatchProviderHelper.java:181)
	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.lambda$invokeMethodWithInterceptors$0(DispatchProviderHelper.java:81)
	at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53)
	at com.botronsoft.jira.rollout.impl.rest.authorization.PermissionResourceInterceptor.checkPermissions(PermissionResourceInterceptor.java:43)
	at com.botronsoft.jira.rollout.impl.rest.authorization.PermissionResourceInterceptor.intercept(PermissionResourceInterceptor.java:27)
Caused by: com.botronsoft.jira.rollout.snapshot.SnapshotOperationFailedException: Unable to perform deployment: Unable to find transformation object for method invocation public void com.botronsoft.jira.rollout.impl.merge.issuedata.CommentMerger.mergeComment(com.atlassian.jira.issue.Issue,com.botronsoft.jira.model.server.jiraconfiguration.issuedata.JiraIssueComment,java.util.Set) with arguments [XYZ-123, com.botronsoft.jira.model.server.jiraconfiguration.issuedata.impl.JiraIssueCommentImpl@5164a7dc (nativeId: 10547, body: Comment content, created: Fri Mar 20 16:55:42 EET 2020, updated: Fri Mar 20 16:55:42 EET 2020), []]
	at com.botronsoft.jira.rollout.impl.snapshot.SnapshotImportOperationService.importSnapshot(SnapshotImportOperationService.java:204)
	at platform.java.analytics.di.impl.AnalyticsInterceptor.invoke(AnalyticsInterceptor.java:54)
	at com.botronsoft.jira.rollout.impl.snapshot.SnapshotImportServiceImpl.importSnapshot(SnapshotImportServiceImpl.java:264)
	at com.botronsoft.jira.rollout.jobs.InternalDeploymentJob.call(InternalDeploymentJob.java:27)
	at com.botronsoft.jira.rollout.jobs.InternalDeploymentJob.call(InternalDeploymentJob.java:11)
	at com.botronsoft.jira.rollout.impl.jobs.JobSchedulingServiceImpl$ClusterTask.call(JobSchedulingServiceImpl.java:62)
Caused by: java.lang.IllegalStateException: Unable to find transformation object for method invocation public void com.botronsoft.jira.rollout.impl.merge.issuedata.CommentMerger.mergeComment(com.atlassian.jira.issue.Issue,com.botronsoft.jira.model.server.jiraconfiguration.issuedata.JiraIssueComment,java.util.Set) with arguments [XYZ-123, com.botronsoft.jira.model.server.jiraconfiguration.issuedata.impl.JiraIssueCommentImpl@5164a7dc (nativeId: 10547, body: Comment content, created: Fri Mar 20 16:55:42 EET 2020, updated: Fri Mar 20 16:55:42 EET 2020), []]
	at com.botronsoft.jira.rollout.impl.issuedata.IssueDataMergeInterceptor.getMergedObjectTarget(IssueDataMergeInterceptor.java:247)
	at com.botronsoft.jira.rollout.impl.issuedata.IssueDataMergeInterceptor.handleError(IssueDataMergeInterceptor.java:86)
	at com.botronsoft.jira.rollout.impl.issuedata.IssueDataMergeInterceptor.invoke(IssueDataMergeInterceptor.java:74)
	at com.botronsoft.jira.rollout.impl.merge.issuedata.IssueDataMergerImpl.mergeComments(IssueDataMergerImpl.java:208)
	at com.botronsoft.jira.rollout.impl.merge.issuedata.IssueDataMergerImpl.mergeIssues(IssueDataMergerImpl.java:144)
	at com.botronsoft.jira.rollout.impl.merge.issuedata.IssueDataMergerImpl.merge(IssueDataMergerImpl.java:121)
	at com.botronsoft.jira.rollout.merge.issuedata.IssueImportProgressInterceptor.invoke(IssueImportProgressInterceptor.java:37)
	at com.botronsoft.jira.rollout.impl.deploy.IssueDataImportServiceImpl.importIssues(IssueDataImportServiceImpl.java:222)
	at com.botronsoft.jira.rollout.impl.deploy.IssueDataImportServiceImpl.importData(IssueDataImportServiceImpl.java:127)
	at com.botronsoft.jira.rollout.impl.snapshot.SnapshotImportOperationService.importSnapshot(SnapshotImportOperationService.java:149)
	... 5 more

Cause:

Deploying snapshot with issues with comments restricted to a particular project role(s) and those role(s) are missing on target instance and user has check "

Resolution:

There are couple of ways to cope with this scenario:

  1. Re-run deployment with "
  2. If for some reason option "
    1. remove comment visibility restrictions to role(s) on source prior to taking new snapshot.

IMPORTANT: In case of such failure and deployment re-run any already created Jira issue won't be updated! Issue causing the error in prior run will miss any comments after along with the one causing the error.

For that reason the issue from the error message MUST BE DELETED prior to deployment re-run in order to be recreated along with all comments.


Note:

If after the deployment some issue comments are not visible to the admin due to comment restrictions, see
Issue comment is not visible to the admin