[Bps-public-commit] r17380 - sd/trunk/lib/App/SD/Model

jesse at bestpractical.com jesse at bestpractical.com
Fri Dec 26 19:35:39 EST 2008


Author: jesse
Date: Fri Dec 26 19:35:39 2008
New Revision: 17380

Modified:
   sd/trunk/lib/App/SD/Model/Ticket.pm

Log:
* Improve component support

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	Fri Dec 26 19:35:39 2008
@@ -12,6 +12,10 @@
 
 
 
+sub default_prop_component { 
+    my $self = shift; 
+    return $self->app_handle->setting(label => 'default_component')->get()->[0];
+}
 
 sub default_prop_milestone { 
     my $self = shift; 
@@ -93,6 +97,11 @@
     return $self->validate_prop_from_recommended_values( 'status', \%args );
 }
 
+sub validate_prop_component {
+    my ( $self, %args ) = @_;
+    return $self->validate_prop_from_recommended_values( 'component', \%args );
+}
+
 sub validate_prop_milestone {
     my ( $self, %args ) = @_;
     return $self->validate_prop_from_recommended_values( 'milestone', \%args );
@@ -106,6 +115,10 @@
    return @{ shift->app_handle->setting( label => 'statuses' )->get() };
 }
 
+sub _recommended_values_for_prop_component {
+   return @{ shift->app_handle->setting( label => 'components' )->get() };
+}
+
 =head2 color_prop_status $value
 
 Returns the stats prop value C<$value> wrapped in colorization escape
@@ -148,7 +161,7 @@
 =cut
 
 sub props_to_show {
-    ('id', 'summary', 'status', 'owner', 'created', 'due', 'creator', 'reporter', 'milestone', 'original_replica')
+    ('id', 'summary', 'status', 'milestone', 'component', 'owner', 'created', 'due', 'creator', 'reporter', 'original_replica')
 }
 
 =head2 immutable_props



More information about the Bps-public-commit mailing list