projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc743b5
)
SL::DB::Project: displayable_name-Methode
author
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Tue, 27 Oct 2015 14:00:52 +0000
(15:00 +0100)
committer
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Tue, 27 Oct 2015 14:00:52 +0000
(15:00 +0100)
SL/DB/Project.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Project.pm
b/SL/DB/Project.pm
index
40d1a84
..
df5fe09
100644
(file)
--- 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);
}
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) = @_;
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.
project in the database. Also returns trueish if no project number has
been set yet.
+=item C<displayable_name>
+
+Returns a human-readable description of the project, consisting of projectnumber
+and description.
+
=item C<full_description %params>
Returns a full description for the project which can consist of the
=item C<full_description %params>
Returns a full description for the project which can consist of the