Making the custom field project importable
As of JIRA 3.13, individual projects can be imported from an existing JIRA backup file. More information on this can be found at http://confluence.atlassian.com/display/JIRA/Restoring+a+Project+from+Backup.
While importing projects, JIRA lets you copy all the issue data across, but only if it is asked to do so! Let us see how we can make the custom fields' project importable, or in simple words, inform JIRA that our fields are okay to be imported!
How to do it...
All we need to do to tag our custom field project as importable is to implement the following interface: com.atlassian.jira.imports.project.customfield.ProjectImportableCustomField
.
You will have to then implement the following method:
ProjectCustomFieldImporter getProjectImporter();
There are already existing implementations for the ProjectCustomFieldImporter
class like the SelectCustomFieldImporter
class, which we can reuse. It is in this class that we check whether the value getting imported...