IllegalArgumentException: Missing mandatory keys in arguments of Validator
要約
The following article helps to identify the error of missing mandatory keys in the workflow received during the Cloud to Cloud Migration.
概要
During the migration of a project between two cloud sites, an error occurs when any validator is missing from the workflow. The following error will be obtained in the migration log:
Chunk Migration Error: DefaultEntityMigrationError(dateTime=2023-05-10T15:53:29.186685Z, entityId=mri:mig:jira/classic:workflow:<workflow name>, reason=IllegalArgumentException: Missing mandatory keys in arguments of Validator creation bean: [WorkflowValidator{subType=FieldsRequiredValidator, parameters={hidFieldsList=assignee@@duedate@@}, id='0'}], actionToResolve=null, numDownstreamFailures=314085, severity=ERROR)
The below steps will help to identify the missing validator in the workflow and resolve the error
Fix Missing mandatory keys in the workflow
As per the error, we are having an issue with the validator assignee@@duedate@@. Follow the below steps to fix the issue:
Export the workflow in XML and locate the transition under which this validator is configured. In our scenario, it is configured under the Create transition.
<action id="1" name="Create"> <meta name="jira.i18n.submit">common.forms.create</meta> <meta name="jira.i18n.title">common.forms.create</meta> <validators> <validator name="" type="class"> <arg name="class.name">com.atlassian.jira.workflow.validator.FieldRequiredValidator</arg> <arg name="errorMessage"></arg> <arg name="hidFieldsList">assignee@@duedate@@</arg>
Navigate to the Create transition and modify the validator for assignee@@duedate@@.
Then, enable the Ignore context option and proceed to update the workflow.
Upon re-exporting the workflow, you will observe that the value has been altered as follows:
<action id="1" name="Create"> <meta name="jira.i18n.submit">common.forms.create</meta> <meta name="jira.i18n.title">common.forms.create</meta> <validators> <validator name="" type="class"> <arg name="class.name">com.atlassian.jira.workflow.validator.FieldRequiredValidator</arg> <arg name="contextHandling">ignore</arg> <arg name="errorMessage"></arg> <arg name="hidFieldsList">assignee@@duedate@@</arg>
Once you have resolved the missing dependency error, you should be able to rerun the migration of the affected project without encountering this workflow error.