From 2c14706b3db5025126c88a2d0340e8e663ac31e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 27 Oct 2015 15:00:52 +0100 Subject: [PATCH] SL::DB::Project: displayable_name-Methode --- SL/DB/Project.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SL/DB/Project.pm b/SL/DB/Project.pm index 40d1a844b..df5fe09ec 100644 --- a/SL/DB/Project.pm +++ b/SL/DB/Project.pm @@ -48,6 +48,12 @@ sub is_projectnumber_unique { return !SL::DB::Manager::Project->get_first(where => \@filter); } +sub displayable_name { + my ($self) = @_; + + return join ' ', grep $_, $self->projectnumber, $self->description; +} + sub full_description { my ($self, %params) = @_; @@ -113,6 +119,11 @@ Returns trueish if the project number is not used for any other project in the database. Also returns trueish if no project number has been set yet. +=item C + +Returns a human-readable description of the project, consisting of projectnumber +and description. + =item C Returns a full description for the project which can consist of the -- 2.20.1