[Bps-public-commit] net-lighthouse branch, master, updated. be038b9daa3892f33dbb6665a185b9610ba30c09

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Sep 8 20:48:01 EDT 2009


The branch, master has been updated
       via  be038b9daa3892f33dbb6665a185b9610ba30c09 (commit)
      from  4334b11ed15d6fc3697e5520a0bdab5adbdb1cbd (commit)

Summary of changes:
 lib/Net/Lighthouse/Project.pm           |    2 +-
 lib/Net/Lighthouse/Project/Message.pm   |    2 +-
 lib/Net/Lighthouse/Project/Milestone.pm |    2 +-
 lib/Net/Lighthouse/Project/Ticket.pm    |    8 +++++++-
 lib/Net/Lighthouse/Project/TicketBin.pm |    2 +-
 lib/Net/Lighthouse/User.pm              |    2 +-
 6 files changed, 12 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit be038b9daa3892f33dbb6665a185b9610ba30c09
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Sep 9 08:47:56 2009 +0800

    add default update values

diff --git a/lib/Net/Lighthouse/Project.pm b/lib/Net/Lighthouse/Project.pm
index 25d80d5..fde98fd 100644
--- a/lib/Net/Lighthouse/Project.pm
+++ b/lib/Net/Lighthouse/Project.pm
@@ -150,7 +150,7 @@ sub update {
             public   => { optional => 1, type => BOOLEAN },
         }
     );
-    my %args = @_;
+    my %args = ( ( map { $_ => $self->$_ } qw/archived name public/ ), @_ );
 
     if ( defined $args{name} ) {
         $args{name} = { content => $args{name} };
diff --git a/lib/Net/Lighthouse/Project/Message.pm b/lib/Net/Lighthouse/Project/Message.pm
index f4bdbcb..ecbca24 100644
--- a/lib/Net/Lighthouse/Project/Message.pm
+++ b/lib/Net/Lighthouse/Project/Message.pm
@@ -184,7 +184,7 @@ sub update {
             body  => { optional => 1, type     => SCALAR },
         }
     );
-    my %args = @_;
+    my %args = ( ( map { $_ => $self->$_ } qw/title body/ ), @_ );
 
     for my $field (qw/title body/) {
         next unless exists $args{$field};
diff --git a/lib/Net/Lighthouse/Project/Milestone.pm b/lib/Net/Lighthouse/Project/Milestone.pm
index b55dc16..d942a7b 100644
--- a/lib/Net/Lighthouse/Project/Milestone.pm
+++ b/lib/Net/Lighthouse/Project/Milestone.pm
@@ -123,7 +123,7 @@ sub update {
             due_on => { optional => 1, type => SCALAR },
         }
     );
-    my %args = @_;
+    my %args = ( ( map { $_ => $self->$_ } qw/title goals due_on/ ), @_ );
 
     for my $field (qw/goals title due_on/) {
         next unless exists $args{$field};
diff --git a/lib/Net/Lighthouse/Project/Ticket.pm b/lib/Net/Lighthouse/Project/Ticket.pm
index 1bc0b21..b9bcc1f 100644
--- a/lib/Net/Lighthouse/Project/Ticket.pm
+++ b/lib/Net/Lighthouse/Project/Ticket.pm
@@ -199,7 +199,13 @@ sub update {
             tag => { optional => 1, type => SCALAR },
         }
     );
-    my %args = @_;
+    my %args = (
+        (
+            map { $_ => $self->$_ }
+              qw/title body state assigned_user_id milestone_id tag/
+        ),
+        @_
+    );
 
     for my $field (qw/title body state assigned_user_id milestone_id tag/) {
         next unless exists $args{$field};
diff --git a/lib/Net/Lighthouse/Project/TicketBin.pm b/lib/Net/Lighthouse/Project/TicketBin.pm
index a7da13f..1863425 100644
--- a/lib/Net/Lighthouse/Project/TicketBin.pm
+++ b/lib/Net/Lighthouse/Project/TicketBin.pm
@@ -140,7 +140,7 @@ sub update {
             default => { optional => 1, type => BOOLEAN },
         }
     );
-    my %args = @_;
+    my %args = ( ( map { $_ => $self->$_ } qw/name query default/ ), @_ );
 
     if ( exists $args{default} ) {
         if ( $args{default} ) {
diff --git a/lib/Net/Lighthouse/User.pm b/lib/Net/Lighthouse/User.pm
index 7ad592b..5e66f1d 100644
--- a/lib/Net/Lighthouse/User.pm
+++ b/lib/Net/Lighthouse/User.pm
@@ -64,7 +64,7 @@ sub update {
             website => { optional => 1, type => SCALAR },
         }
     );
-    my %args = @_;
+    my %args = ( ( map { $_ => $self->$_ } qw/name job website/ ), @_ );
 
     for my $field (qw/name job website/) {
         next unless exists $args{$field};

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list