def _attach_fields_to_project(self, project_id):
        for yt_field in self._get_custom_fields_for_projects([project_id]):
            if not yt_field[u'auto_attached']:
                # this means, that field was not attached to project yet
                field_name = yt_field[NAME]
                try:
                    self._target.createProjectCustomFieldDetailed(project_id, field_name, u'No ' + field_name)
                except YouTrackException:
                    print(u'Field [%s] is already attached' % field_name)
dataset/ETHPy150Open JetBrains/youtrack-rest-python-library/python/youtrackImporter.py/YouTrackImporter._attach_fields_to_project/original