1 package SL::DB::Manager::RequirementSpec;
5 use SL::DB::Helper::Manager;
6 use base qw(SL::DB::Helper::Manager);
8 use SL::DB::Helper::Paginated;
9 use SL::DB::Helper::Sorted;
11 sub object_class { 'SL::DB::RequirementSpec' }
13 __PACKAGE__->make_manager_methods;
17 default => [ 'title', 1 ],
20 customer => 'lower(customer.name)',
21 type => 'type.position',
22 status => 'status.position',
23 projectnumber => 'project.projectnumber',
24 map { ( $_ => "lower(requirement_specs.${_})" ) } qw(title),
28 sub working_copy_filter {
29 return (working_copy_id => undef);
32 sub not_empty_filter {
33 my @tables = qw(requirement_spec_items requirement_spec_text_blocks requirement_spec_parts);
34 my @filter = map { \"id IN (SELECT nef_${_}.requirement_spec_id FROM ${_} nef_${_})" } @tables;
36 return (or => \@filter);