Commit 5f259b48 authored by Keith Jolley's avatar Keith Jolley

Disable classification group field setup.

Support for fields additional to the group id will require quite a lot
of code. The tables are in place, but we need to get ready for a
release.
parent 35475000
......@@ -621,13 +621,6 @@ sub _check_scheme_fields {## no critic (ProhibitUnusedPrivateSubroutines) #Calle
sub _check_classification_group_fields { ## no critic (ProhibitUnusedPrivateSubroutines) #Called by dispatch table
my ( $self, $newdata, $problems ) = @_;
#special case to check that only one primary key field is set for a scheme field
if ( $newdata->{'primary_key'} eq 'true' && !@$problems ) {
my $existing_pk = $self->{'datastore'}->run_query('SELECT field FROM classification_group_fields WHERE cg_scheme_id=? AND primary_key',$newdata->{'cg_scheme_id'});
if ( $existing_pk ) {
push @$problems, "This scheme already has a primary key field set ($existing_pk).";
}
}
#special case to check that scheme field is not called 'id' (this causes problems when joining tables)
if ( $newdata->{'field'} eq 'id' ) {
......
......@@ -233,7 +233,7 @@ sub _get_admin_links {
}
my $set_string = $self->_get_set_string;
push @tables, qw (schemes scheme_members scheme_fields scheme_groups scheme_group_scheme_members
scheme_group_group_members classification_schemes classification_group_fields);
scheme_group_group_members classification_schemes);
foreach my $table (@tables) {
if ( $self->can_modify_table($table) && ( !@skip_table || none { $table eq $_ } @skip_table ) ) {
my $function = "_print_$table";
......
......@@ -1992,7 +1992,7 @@ sub get_classification_group_fields_table_attributes {
required => 'yes',
primary_key => 'yes',
foreign_key => 'classification_schemes',
labels => '|$description|',
labels => '|$name|',
dropdown_query => 'yes'
},
{ name => 'field', type => 'text', required => 'yes', primary_key => 'yes', regex => '^[a-zA-Z][\w_]*$' },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment