1 package SL::Controller::CsvImport::Project;
6 use SL::DB::CustomVariable;
7 use SL::DB::CustomVariableConfig;
9 use parent qw(SL::Controller::CsvImport::Base);
11 use Rose::Object::MakeMethods::Generic
13 scalar => [ qw(table) ],
18 $self->class('SL::DB::Project');
21 sub init_all_cvar_configs {
24 return SL::DB::Manager::CustomVariableConfig->get_all(where => [ module => 'Projects' ]);
30 $self->controller->track_progress(phase => 'building data', progress => 0);
33 my $num_data = scalar @{ $self->controller->data };
34 foreach my $entry (@{ $self->controller->data }) {
35 $self->controller->track_progress(progress => $i/$num_data * 100) if $i % 100 == 0;
37 $self->handle_cvars($entry);
42 $self->add_cvar_raw_data_columns;
45 sub get_duplicate_check_fields {
48 label => $::locale->text('Project Number'),
55 sub setup_displayable_columns {
58 $self->SUPER::setup_displayable_columns;
59 $self->add_cvar_columns_to_displayable_columns;
61 $self->add_displayable_columns({ name => 'projectnumber', description => $::locale->text('number') },
62 { name => 'description', description => $::locale->text('Description') },
63 { name => 'active', description => $::locale->text('Active') },