Project::full_description: style=full für »kein Kunde verknüpft« gefixt
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 25 Sep 2015 06:35:42 +0000 (08:35 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 25 Sep 2015 06:36:40 +0000 (08:36 +0200)
SL/DB/Project.pm

index aa97f76..40d1a84 100644 (file)
@@ -60,7 +60,7 @@ sub full_description {
   } elsif ($params{style} =~ m/description/) {
     $description = $self->description;
 
   } elsif ($params{style} =~ m/description/) {
     $description = $self->description;
 
-  } elsif ($params{style} =~ m/full/) {
+  } elsif (($params{style} =~ m/full/) && $self->customer) {
     $description = $self->projectnumber;
     if ($self->description && do { my $desc = quotemeta $self->description; $self->projectnumber !~ m/$desc/ }) {
       $description .= ' ' . $self->description;
     $description = $self->projectnumber;
     if ($self->description && do { my $desc = quotemeta $self->description; $self->projectnumber !~ m/$desc/ }) {
       $description .= ' ' . $self->description;
@@ -143,6 +143,9 @@ description in parenthesis (e.g. "Evil Corp (12345 World
 domination)"). If the project's description is already part of the
 project's number then it will not be appended.
 
 domination)"). If the project's description is already part of the
 project's number then it will not be appended.
 
+If this project isn't linked to a customer then the style C<both> is
+used instead.
+
 =back
 
 =back
 =back
 
 =back