def process_field(self, key, project_id, result, value):
        # we do not need fields with empty values
        if value is None:
            return
        if isinstance(value, list) and not len(value):
            return
        if (isinstance(value, str) or isinstance(value, unicode)) and not len(value):
            return

        #get yt field name and field type
        field_name = self._get_field_name(key, project_id)
        if field_name is None or field_name == NUMBER_IN_PROJECT:
            return
        field_type = self._get_field_type(field_name)
        if (field_type is None) and (field_name not in youtrack.EXISTING_FIELDS):
            return
        value = self.get_field_value(field_name, field_type, value)
        if isinstance(value, list):
            for v in value:
                self._add_value_to_field(project_id, field_name, field_type, v)
        else:
            self._add_value_to_field(project_id, field_name, field_type, value)
        if (field_type is not None) and field_type.startswith(u'user'):
            if isinstance(value, list):
                value = [v.login for v in value]
            else:
                value = value.login
        if not isinstance(value, list):
            value = str(value)
        result[field_name] = value
dataset/ETHPy150Open JetBrains/youtrack-rest-python-library/python/youtrackImporter.py/YouTrackImporter.process_field/original