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::Filtered;
9 use SL::DB::Helper::Paginated;
10 use SL::DB::Helper::Sorted;
12 sub object_class { 'SL::DB::RequirementSpec' }
14 __PACKAGE__->make_manager_methods;
18 default => [ 'title', 1 ],
21 customer => 'lower(customer.name)',
22 type => 'type.position',
23 status => 'status.position',
24 projectnumber => 'project.projectnumber',
25 map { ( $_ => "lower(requirement_specs.${_})" ) } qw(title),
29 sub working_copy_filter {
30 return (working_copy_id => undef);
33 sub not_empty_filter {
34 my @tables = qw(requirement_spec_items requirement_spec_text_blocks requirement_spec_parts);
35 my @filter = map { \"id IN (SELECT nef_${_}.requirement_spec_id FROM ${_} nef_${_})" } @tables;
37 return (or => \@filter);