[Bps-public-commit] SD branch, master, updated. d15e489bbb0aec5721fa0b50097f42f186f5e636

spang at bestpractical.com spang at bestpractical.com
Thu Aug 20 10:51:45 EDT 2009


The branch, master has been updated
       via  d15e489bbb0aec5721fa0b50097f42f186f5e636 (commit)
       via  6f19c6323b7ff68fa8780c061e3bb96882307126 (commit)
      from  4b0b745c0c98ef60e78f64183ce4ae5498a85d25 (commit)

Summary of changes:
 lib/App/SD/CLI/Dispatcher.pm |    2 +-
 lib/App/SD/Model/Ticket.pm   |   11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 6f19c6323b7ff68fa8780c061e3bb96882307126
Author: Christine Spang <spang at bestpractical.com>
Date:   Thu Aug 20 14:25:33 2009 +0100

    Update error message for claim/take with no email set

diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index 4b236d5..c25a53f 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -156,7 +156,7 @@ under ticket => sub {
             run('ticket update', $self, @_);
         } else {
             die "Could not determine email address to assign ticket to ".
-                "(set \$EMAIL\nor the 'email' config variable.)\n";
+                "(set the 'user.email-address' config variable.)\n";
         }
     };
 

commit d15e489bbb0aec5721fa0b50097f42f186f5e636
Author: Christine Spang <spang at bestpractical.com>
Date:   Thu Aug 20 14:37:10 2009 +0100

    Complain loudly if we can't figure out an email address for the user.

diff --git a/lib/App/SD/Model/Ticket.pm b/lib/App/SD/Model/Ticket.pm
index a453f47..4fa2f4e 100644
--- a/lib/App/SD/Model/Ticket.pm
+++ b/lib/App/SD/Model/Ticket.pm
@@ -53,7 +53,16 @@ the environmental variable C<EMAIL>.)
 =cut
 
 sub default_prop_reporter {
-    shift->app_handle->current_user_email;
+    my $self = shift;
+    my $reporter = $self->app_handle->current_user_email;
+    if ( $reporter ) {
+        return $reporter;
+    }
+    else {
+        die "Cannot determine an email to attribute your changes to."
+           ." You can\nfix this by setting the config variable"
+           ." 'user.email-address'.\n";
+    }
 }
 
 =head2 canonicalize_prop_status

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



More information about the Bps-public-commit mailing list