(table_path, item, app_ids_and_versions, auto_select=True)
return column
Creates a default ExportColumn given an item

        :param table_path: The path of the table_path that the item belongs to
        :param item: An ExportItem instance
        :param app_ids_and_versions: A dictionary of app ids that map to latest build version
        :param auto_select: Automatically select the column
        :returns: An ExportColumn instance
Creates a default ExportColumn given an item
Creates a default ExportColumn given an item
def create_default_from_export_item(table_path, item, app_ids_and_versions, auto_select=True):
        """Creates a default ExportColumn given an item

        :param table_path: The path of the table_path that the item belongs to
        :param item: An ExportItem instance
        :param app_ids_and_versions: A dictionary of app ids that map to latest build version
        :param auto_select: Automatically select the column
        :returns: An ExportColumn instance
        """
        is_case_update = item.tag == PROPERTY_TAG_CASE and not isinstance(item, CaseIndexItem)
        is_case_id = is_case_update and item.path[-1].name == '@case_id'
        is_case_history_update = item.tag == PROPERTY_TAG_UPDATE
        is_label_question = isinstance(item, LabelItem)

        is_main_table = table_path == MAIN_TABLE
        constructor_args = {
            "item": item,
            "label": item.readable_path if not is_case_history_update else item.label,
            "is_advanced": not is_case_id and (is_case_update or is_label_question),
        }

        if isinstance(item, GeopointItem):
            column = SplitGPSExportColumn(**constructor_args)
        elif isinstance(item, MultiMediaItem):
            column = MultiMediaExportColumn(**constructor_args)
        elif isinstance(item, StockItem):
            column = StockFormExportColumn(**constructor_args)
        elif isinstance(item, MultipleChoiceItem):
            column = SplitExportColumn(**constructor_args)
        elif isinstance(item, CaseIndexItem):
            column = CaseIndexExportColumn(
                help_text=_('The ID of the associated {} case type').format(item.case_type),
                **constructor_args
            )
        elif get_request_domain() and feature_previews.SPLIT_MULTISELECT_CASE_EXPORT.enabled(get_request_domain()):
            column = SplitUserDefinedExportColumn(**constructor_args)
        else:
            column = ExportColumn(**constructor_args)
        column.update_properties_from_app_ids_and_versions(app_ids_and_versions)
        column.selected = (
            auto_select and
            not column._is_deleted(app_ids_and_versions) and
            not is_case_update and
            not is_label_question and
            is_main_table
        )
        return column
def create_default_from_export_item ( table_path , item , app_ids_and_versions , auto_select = True ) : is_case_update = item . tag == PROPERTY_TAG_CASE and not isinstance ( item , CaseIndexItem ) is_case_id = is_case_update and item . path [ - 1 ] . name == '@case_id' is_case_history_update = item . tag == PROPERTY_TAG_UPDATE is_label_question = isinstance ( item , LabelItem ) is_main_table = table_path == MAIN_TABLE constructor_args = { "item" : item , "label" : item . readable_path if not is_case_history_update else item . label , "is_advanced" : not is_case_id and ( is_case_update or is_label_question ) , } if isinstance ( item , GeopointItem ) : column = SplitGPSExportColumn ( * * constructor_args ) elif isinstance ( item , MultiMediaItem ) : column = MultiMediaExportColumn ( * * constructor_args ) elif isinstance ( item , StockItem ) : column = StockFormExportColumn ( * * constructor_args ) elif isinstance ( item , MultipleChoiceItem ) : column = SplitExportColumn ( * * constructor_args ) elif isinstance ( item , CaseIndexItem ) : column = CaseIndexExportColumn ( help_text = _ ( 'The ID of the associated {} case type' ) . format ( item . case_type ) , * * constructor_args ) elif get_request_domain ( ) and feature_previews . SPLIT_MULTISELECT_CASE_EXPORT . enabled ( get_request_domain ( ) ) : column = SplitUserDefinedExportColumn ( * * constructor_args ) else : column = ExportColumn ( * * constructor_args ) column . update_properties_from_app_ids_and_versions ( app_ids_and_versions ) column . selected = ( auto_select and not column . _is_deleted ( app_ids_and_versions ) and not is_case_update and not is_label_question and is_main_table ) return column