[Bps-public-commit] r17532 - in Net-Trac/trunk: .
trs at bestpractical.com
trs at bestpractical.com
Fri Jan 2 14:48:57 EST 2009
Author: trs
Date: Fri Jan 2 14:48:57 2009
New Revision: 17532
Modified:
Net-Trac/trunk/ (props changed)
Net-Trac/trunk/TODO
Net-Trac/trunk/lib/Net/Trac/Ticket.pm
Log:
r43408 at zot: tom | 2009-01-02 14:48:50 -0500
refactor props a little
Modified: Net-Trac/trunk/TODO
==============================================================================
--- Net-Trac/trunk/TODO (original)
+++ Net-Trac/trunk/TODO Fri Jan 2 14:48:57 2009
@@ -10,5 +10,4 @@
grep for XXX TODO as well
-Pull ticket data from a specific search, not the ticket's own CSV
Get history from RSS feed for a ticket
Modified: Net-Trac/trunk/lib/Net/Trac/Ticket.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/Ticket.pm (original)
+++ Net-Trac/trunk/lib/Net/Trac/Ticket.pm Fri Jan 2 14:48:57 2009
@@ -37,6 +37,9 @@
description keywords component milestone version time changetime )
}
+sub valid_create_props { grep { !/^(?:resolution|time|changetime)$/i } $_[0]->valid_props }
+sub valid_update_props { grep { !/^(?:time|changetime)$/i } $_[0]->valid_props }
+
for my $prop ( __PACKAGE__->valid_props ) {
no strict 'refs';
*{ "Net::Trac::Ticket::" . $prop } = sub { shift->state->{$prop} };
@@ -173,7 +176,7 @@
my $self = shift;
my %args = validate(
@_,
- $self->_metadata_validation_rules( 'create' => grep { !/resolution/ } $self->valid_props )
+ $self->_metadata_validation_rules( 'create' => $self->valid_create_props )
);
my ($form,$form_num) = $self->_get_new_ticket_form();
@@ -204,7 +207,7 @@
{
comment => 0,
no_auto_status => { default => 0 },
- %{$self->_metadata_validation_rules( 'update' => $self->valid_props )}
+ %{$self->_metadata_validation_rules( 'update' => $self->valid_update_props )}
}
);
More information about the Bps-public-commit
mailing list