Unable to apply change 'type: addition, object: JiraConfigurationRoot#root/AgileSprint

Symptoms:

Trying to deploy a snapshot on a fresh Jira instance.

java.util.concurrent.ExecutionException: com.botronsoft.jira.rollout.impl.merge.MergeException: Unable to apply change 'type: addition, object: JiraConfigurationRoot#root/AgileSprint#Sample Board_admin_scrum_Started Sprint_ACTIVE_2017-09-04T16:53:56.388+03:00_2017-09-18T16:53:00.000+03:00, target object: JiraConfigurationRoot#root, feature: sprints'
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:47)
at com.botronsoft.jira.rollout.rest.internal.DeploymentResource.createResponse(DeploymentResource.java:396)
at com.botronsoft.jira.rollout.rest.internal.DeploymentResource.getDeploymentOperation(DeploymentResource.java:327)
Caused by: com.botronsoft.jira.rollout.impl.merge.MergeException: Unable to apply change 'type: addition, object: JiraConfigurationRoot#root/AgileSprint#Sample Board_admin_scrum_Started Sprint_ACTIVE_2017-09-04T16:53:56.388+03:00_2017-09-18T16:53:00.000+03:00, target object: JiraConfigurationRoot#root, feature: sprints'
at com.botronsoft.jira.rollout.impl.merge.AbstractMergeAdapter.notifyChanged(AbstractMergeAdapter.java:76)
at com.botronsoft.jira.rollout.impl.merge.di.CacheRefreshInterceptor.invoke(CacheRefreshInterceptor.java:30)
at com.botronsoft.jira.rollout.impl.merge.MainMergeAdapter.notifyChanged(MainMergeAdapter.java:61)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:356)
at org.eclipse.emf.compare.merge.AbstractMerger.addAt(AbstractMerger.java:180)
at com.botronsoft.jira.rollout.model.diff.AtomicityAwareReferenceMerger.addInTarget(AtomicityAwareReferenceMerger.java:96)
at org.eclipse.emf.compare.merge.ReferenceChangeMerger.copyLeftToRight(ReferenceChangeMerger.java:78)
at org.eclipse.emf.compare.merge.AbstractMerger.mergeDiff(AbstractMerger.java:132)
at org.eclipse.emf.compare.merge.AbstractMerger.mergeRequires(AbstractMerger.java:111)
at org.eclipse.emf.compare.merge.ReferenceChangeMerger.copyLeftToRight(ReferenceChangeMerger.java:73)
at org.eclipse.emf.compare.merge.BatchMerger.copyAllLeftToRight(BatchMerger.java:97)
at com.botronsoft.jira.rollout.impl.JiraConfigurationServiceImpl.importConfiguration(JiraConfigurationServiceImpl.java:350)
at com.botronsoft.jira.rollout.jobs.DeploymentJob.call(DeploymentJob.java:117)
at com.botronsoft.jira.rollout.jobs.DeploymentJob.call(DeploymentJob.java:50)
at com.botronsoft.jira.rollout.impl.jobs.JobSchedulingServiceImpl$ClusterTask.call(JobSchedulingServiceImpl.java:55)
Caused by: com.botronsoft.jira.rollout.impl.merge.MergeException: ErrorCollection[errors=[ErrorCollection.ErrorItem[contextId=<null>,messageKey=gh.rapid.plan.marker.plan.sprint.not.rankable,params=\{}]],reasons=[VALIDATION_FAILED]]
at com.botronsoft.jira.rollout.impl.merge.ConfigurationRootMergeAdapter.addAgileSprint(ConfigurationRootMergeAdapter.java:316)
at com.botronsoft.jira.rollout.impl.merge.di.CacheRefreshInterceptor.invoke(CacheRefreshInterceptor.java:30)
at com.botronsoft.jira.rollout.impl.merge.ConfigurationRootMergeAdapter.addFeature(ConfigurationRootMergeAdapter.java:265)
at com.botronsoft.jira.rollout.impl.merge.ConfigurationRootMergeAdapter.addFeature(ConfigurationRootMergeAdapter.java:128)
at com.botronsoft.jira.rollout.impl.merge.AbstractMergeAdapter.notifyChanged(AbstractMergeAdapter.java:65)
... 16 more
Caused by: com.botronsoft.jiraagileintegration.api.JiraAgileIntergationException: ErrorCollection[errors=[ErrorCollection.ErrorItem[contextId=<null>,messageKey=gh.rapid.plan.marker.plan.sprint.not.rankable,params=\{}]],reasons=[VALIDATION_FAILED]]
at com.botronsoft.jiraagileintegration.impl.AgileIntegrationUtils.handleErrors(AgileIntegrationUtils.java:48)
at com.botronsoft.jiraagileintegration.impl.AgileIntegrationUtils.handleErrors(AgileIntegrationUtils.java:36)
at com.botronsoft.jiraagileintegration.impl.AgileIntegrationUtils.handleInvalidServiceOutcome(AgileIntegrationUtils.java:32)
at com.botronsoft.jiraagileintegration.impl.managers.AbstractIntegrationManager.handleInvalidServiceOutcome(AbstractIntegrationManager.java:49)
at com.botronsoft.jiraagileintegration.impl.managers.SprintIntegrationManager72.createSprint(SprintIntegrationManager72.java:48)
at com.botronsoft.jiraagileintegration.impl.managers.AbstractSprintIntegrationManager.createSprint(AbstractSprintIntegrationManager.java:117)
at com.botronsoft.jiraagileintegration.impl.AbstractJiraAgileIntegration.createSprint(AbstractJiraAgileIntegration.java:195)
at com.botronsoft.jiraagileintegration.impl.JiraAgileIntegration72.createSprint(JiraAgileIntegration72.java:50)
at com.botronsoft.jiraagileintegration.impl.JiraAgileIntegrationFacade.createSprint(JiraAgileIntegrationFacade.java:117)
at com.botronsoft.jira.rollout.impl.merge.ConfigurationRootMergeAdapter.addAgileSprint(ConfigurationRootMergeAdapter.java:309)
... 20 more

Cause:

The root cause is gh.rapid.plan.marker.plan.sprint.not.rankable,params - meaning the Rank Custom Field is not present on target. Jira Software creates its custom fields (Story Points, Rank, etc) the first time a board is created.

Resolution:

Create a test board through Jira's UI to force Agile to populate its configuration, then retry snapshot deployment.