[Bps-public-commit] RT-Extension-FeaturedTickets branch, master, updated. 6cfc66bc56a57fe5d4bf4c4f4f03ea2e24733a4f

Jim Brandt jbrandt at bestpractical.com
Mon Jul 2 13:33:55 EDT 2018


The branch, master has been updated
       via  6cfc66bc56a57fe5d4bf4c4f4f03ea2e24733a4f (commit)
       via  0192f56e0919a92b0a4e3e81afa004d22fc87e2c (commit)
       via  1f552db3efa198b755888eb8f23a7378420d13de (commit)
      from  4c7d2eb31fcf3e9ac72b67fbfa3e2a44398002d2 (commit)

Summary of changes:
 Changes                             | 3 +++
 META.yml                            | 2 +-
 html/NoAuth/Helpers/NewSponsor      | 7 +------
 lib/RT/Extension/FeaturedTickets.pm | 2 +-
 4 files changed, 6 insertions(+), 8 deletions(-)

- Log -----------------------------------------------------------------
commit 1f552db3efa198b755888eb8f23a7378420d13de
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Jul 2 13:13:48 2018 -0400

    Add requestor as part of ticket create
    
    This allows that user to receive the autoreply message. Otherwise
    when "On Create" runs there is no requestor.

diff --git a/html/NoAuth/Helpers/NewSponsor b/html/NoAuth/Helpers/NewSponsor
index 62774e6..b7602ce 100644
--- a/html/NoAuth/Helpers/NewSponsor
+++ b/html/NoAuth/Helpers/NewSponsor
@@ -37,11 +37,9 @@ if( $ARGS{Email} ){
                 Queue         => RT->Config->Get('SponsorsQueue'),
                 DependedOnBy  => $ARGS{ticket_id},
                 'CustomField-' . $ticket->LoadCustomFieldByIdentifier('Amount')->Id => $ARGS{Amount},
+                Requestor     => $user->EmailAddress,
             );
             RT::Logger->error('Could Not Create Linked Ticket') unless $ret;
-
-            ($ret, $msg) = $ticket->AddWatcher( Type => 'Requestor', PrincipalId => $user->id );
-            RT::Logger->error('Couldn\'t Add user as Requestor') unless $ret;
         }
 
         ($ret, $msg) = $parent_ticket->AddWatcher( Type => 'Requestor', PrincipalId => $user->id );

commit 0192f56e0919a92b0a4e3e81afa004d22fc87e2c
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Jul 2 13:14:49 2018 -0400

    Only set the sponsor as requestor on the sponsor ticket
    
    Since we have their info on a sponsor ticket, don't add
    them as a requestor on the feature ticket.

diff --git a/html/NoAuth/Helpers/NewSponsor b/html/NoAuth/Helpers/NewSponsor
index b7602ce..006b08c 100644
--- a/html/NoAuth/Helpers/NewSponsor
+++ b/html/NoAuth/Helpers/NewSponsor
@@ -42,9 +42,6 @@ if( $ARGS{Email} ){
             RT::Logger->error('Could Not Create Linked Ticket') unless $ret;
         }
 
-        ($ret, $msg) = $parent_ticket->AddWatcher( Type => 'Requestor', PrincipalId => $user->id );
-        RT::Logger->debug('Couldn\'t Add user as Requestor') unless $ret;
-
         my $new_amount = $ARGS{Amount} + $parent_ticket->FirstCustomFieldValue('Amount');
 
         ($ret, $msg) = $parent_ticket->AddCustomFieldValue( Field => $parent_ticket->LoadCustomFieldByIdentifier('Amount')->Id, Value => $new_amount );

commit 6cfc66bc56a57fe5d4bf4c4f4f03ea2e24733a4f
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Jul 2 13:17:26 2018 -0400

    Verison 0.03

diff --git a/Changes b/Changes
index 9dc38a1..852a99f 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for RT-Extension-FeaturedTickets
 
+0.03 2018-07-02
+ - Update setting of requestor when handling a new sponsor
+
 0.02 2018-06-01
  - Style updates
 
diff --git a/META.yml b/META.yml
index 33859fa..1f2b8df 100644
--- a/META.yml
+++ b/META.yml
@@ -25,7 +25,7 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-featuredtickets
-version: '0.02'
+version: '0.03'
 x_module_install_rtx_version: '0.40'
 x_requires_rt: 4.4.0
 x_rt_too_new: 4.6.0
diff --git a/lib/RT/Extension/FeaturedTickets.pm b/lib/RT/Extension/FeaturedTickets.pm
index 17725c7..c450242 100644
--- a/lib/RT/Extension/FeaturedTickets.pm
+++ b/lib/RT/Extension/FeaturedTickets.pm
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 package RT::Extension::FeaturedTickets;
 
-our $VERSION = '0.02';
+our $VERSION = '0.03';
 
 RT->AddStyleSheets("featured-tickets.css");
 RT->AddJavaScript("featured-tickets.js");

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


More information about the Bps-public-commit mailing list