Attribute "ruleKey" must be declared for element type "validator".
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
While importing the workflow from Jira cloud to Jira server, the user gets the error 'Attribute "ruleKey" must be declared for element type "validator"'.
1
Error parsing workflow XML: Attribute "ruleKey" must be declared for element type "validator". Please see log for more details.
Environment
Jira Serverand Data Center
Cause
Jira Cloud has a new workflow editor: Changing your default workflow editor.
When a workflow is edited in this new editor, it adds more attributes in the workflow XML, which are associated with the cloud team-managed projects. As Team-managed projects are not available on the Jira server, these attributes cause failure during the import process.
1
2
3
4
5
6
7
8
9
10
11
12
<action id="1" name="Create">
<meta name="jira.description"></meta>
<meta name="jira.i18n.title">common.forms.create</meta>
<meta name="jira.nextgen.transition.id">1</meta>
<meta name="opsbar-sequence">0</meta>
<validators>
<validator name="" type="class" ruleKey="PermissionValidator">
<arg name="class.name">com.atlassian.jira.workflow.validator.PermissionValidator</arg>
<arg name="permissionKey">CREATE_ISSUES</arg>
</validator>
</validators>
<results>
Team-managed attributes that cause the failures:
1
2
3
<meta name="jira.nextgen.transition.id">1</meta>
ruleKey="PermissionValidator"
<arg name="permissionKey">CREATE_ISSUES</arg>
New Editor View:

Solution
In Jira Cloud, open the workflow in the old editor and re-save it. All the Team-managed attributes from the workflow will be removed, and XML can be used in Jira server.
1
2
3
4
5
6
7
8
9
10
<initial-actions>
<action id="1" name="Create">
<meta name="jira.i18n.title">common.forms.create</meta>
<meta name="opsbar-sequence">0</meta>
<validators>
<validator name="" type="class">
<arg name="class.name">com.atlassian.jira.workflow.validator.PermissionValidator</arg>
<arg name="permission">Create Issue</arg>
</validator>
</validators>
Old Editor View:

Was this helpful?