[Bps-public-commit] r15081 - in sd/trunk: .
spang at bestpractical.com
spang at bestpractical.com
Tue Aug 12 09:31:29 EDT 2008
Author: spang
Date: Tue Aug 12 09:31:28 2008
New Revision: 15081
Modified:
sd/trunk/ (props changed)
sd/trunk/lib/App/SD/Model/Ticket.pm
Log:
r47740 at loki: spang | 2008-08-05 18:54:37 +0100
complete pod for Model/Ticket.pm
Modified: sd/trunk/lib/App/SD/Model/Ticket.pm
==============================================================================
--- sd/trunk/lib/App/SD/Model/Ticket.pm (original)
+++ sd/trunk/lib/App/SD/Model/Ticket.pm Tue Aug 12 09:31:28 2008
@@ -10,13 +10,7 @@
=head2 default_prop_status
-The default value of the status prop. Returns a string.
-
-=cut
-
-sub default_prop_status { 'new' }
-
-sub _default_summary_format { '%s,$luid | %s,summary | %s,status' }
+Returns a string of the default value of the status prop.
=cut
@@ -54,6 +48,13 @@
}
+=head2 color_prop_status $value
+
+Returns the stats prop value C<$value> wrapped in colorization escape
+codes (from L<Term::ANSIColor>).
+
+=cut
+
sub color_prop_status {
my ($self, $value) = @_;
@@ -67,6 +68,13 @@
return colored($value, $color);
}
+=head2 color_prop_due $due
+
+Returns the due prop value C<$due> wrapped in colorization escape
+codes if it is overdue.
+
+=cut
+
sub color_prop_due {
my ($self, $due) = @_;
@@ -85,6 +93,15 @@
('id', 'summary', 'status', 'owner', 'created', 'due', 'creator', 'reported_by', 'CF-Broken in', 'CF-Severity')
}
+=head2 is_overdue [$date]
+
+Takes an ISO date (or uses the C<date> prop value if no date is given).
+
+Returns false if the date is not a valid ISO date or its due date is
+in the future. Returns true if the due date has passed.
+
+=cut
+
# this expects ISO dates. we should improve it in the future to require
sub is_overdue {
my $self = shift;
More information about the Bps-public-commit
mailing list