-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 7.5.1, 7.13.0, 8.0.2
-
Component/s: Backup & Restore (non-migration)
-
None
-
7.05
-
2
-
Severity 3 - Minor
-
0
Summary
Import project return error even though Jira have same name custom field.
Steps to Reproduce
- Install Jira with Japanese language
- Create new project A
- Install WBS Gantt-Chart for Jira
- Add value use the WBS Gantt-Chart
- Create backup XML
- Delete all issues, versions and components of project A
- Import XML to same instance
Expected Results
Import project succeed.
Actual Results
Return following error.
2019-02-27 06:57:41,855 JiraTaskExectionThread-19 ERROR admin 417x3784x1 icuk9q 172.18.0.1 /secure/admin/ProjectImportSummary!reMapAndValidate.jspa [c.a.j.imports.project.DefaultProjectImportService] The custom field 'Finish date (WBSGantt)' of type '日付ピッカー' is required for the import but does not exist in the current JIRA instance. 2019-02-27 06:57:41,855 JiraTaskExectionThread-19 ERROR admin 417x3784x1 icuk9q 172.18.0.1 /secure/admin/ProjectImportSummary!reMapAndValidate.jspa [c.a.j.imports.project.DefaultProjectImportService] The custom field 'Start date (WBSGantt)' of type '日付ピッカー' is required for the import but does not exist in the current JIRA instance.
Workaround
- Unzip the exported XML
$ unzip xxx.zip
- Confirmed the line in entities.xml which needs to be fixed
$ grep -n '<english-custom-field-name>' entities.xml \ | grep '<CustomField id='
Please replace <english-custom-field-name> with the one you saw in the UI error - Check the Japanese translation of the custom field
$ grep '<english-custom-field-name>' entities.xml \ | grep '<CustomField id=' \ | cut -d '"' -f 2 \ | xargs -I{} grep "jira.translation.custom.fieldcustomfield_{}.name.ja_JP" entities.xml \ | cut -d '"' -f 2 \ | xargs -I{} grep '<OSPropertyString id="{}"' entities.xml \ | cut -d '"' -f 4
Please replace <english-custom-field-name> with the one you saw in the UI error - Replace row #2 name=xxxx to result of #3
- Recreate the XML
$ zip xxx-fixed.zip activeobjects.xml entities.xml
- Import xxx-fixed.zip as usual