From b02d6653cd566105298484fda7cc1177141575e8 Mon Sep 17 00:00:00 2001 From: Peter Edmond Date: Tue, 7 Jan 2025 16:57:32 +0000 Subject: [PATCH] Updated text, and removal of unwanted hidden unicode chars --- FacilitatorEmail.txt | 6 ++-- Scrip1.txt | 72 -------------------------------------- Scrip2.txt | 82 -------------------------------------------- 3 files changed, 4 insertions(+), 156 deletions(-) delete mode 100644 Scrip1.txt delete mode 100644 Scrip2.txt diff --git a/FacilitatorEmail.txt b/FacilitatorEmail.txt index 7fa9eca..c8ae8e4 100644 --- a/FacilitatorEmail.txt +++ b/FacilitatorEmail.txt @@ -1,8 +1,10 @@ From: Davis Method -Subject: {$Ticket->Subject} +Subject: Davis Method Facilitator Enquiry Content-Type: text/html -

Congratulations! You have received a referral from the Davis Facilitator Directory. You can find the details of the lead by going to https://support.davismethod.com/form?id={$Ticket->id}&email={$Ticket->FirstCustomFieldValue('Facilitator Email')}&uuid={$Ticket->FirstCustomFieldValue('uuid')}.

+

Congratulations! You have received a referral from the Davis Facilitator Directory. You can view it by visiting this link.

+ +

If you have any issues clicking on the link above, please copy and paste the following link into your browser https://support.davismethod.com/form?id={$Ticket->id}&email={$Ticket->FirstCustomFieldValue('Facilitator Email')}&uuid={$Ticket->FirstCustomFieldValue('uuid')}

Please accept or reject the lead in the next 48 hours. If we do not hear from you, the referral will be reassigned.

diff --git a/Scrip1.txt b/Scrip1.txt deleted file mode 100644 index 8ef9696..0000000 --- a/Scrip1.txt +++ /dev/null @@ -1,72 +0,0 @@ -# On create: -# - Sent email to requestor -# - Check queue, and transfer to new queue if required - -# Custom condition: - -my $txn = $self->TransactionObj; -my $type = $txn->Type; -my $ticket = $self->TicketObj; - -#return 0 unless $type eq "Status" || ( $type eq 'Set' && $txn->Field eq 'Status'); -# To test by triggering change of status (Condition ^ above!) - -#Only act in test-queue (safety for testing) -return 0 unless $ticket->QueueObj->Name eq "test-queue"; -#Only act on creation -return 0 unless $txn->Type eq "Create"; - -return 1; - - -# Custom action preparation code: -require RT::Action::SendEmail; -use strict; -use vars qw/@ISA/; -@ISA = qw(RT::Action::SendEmail); -$self->SetRecipients(); -$self->SUPER::Prepare(); -$self->SUPER::Commit(); - -sub SetRecipients { -my $self = shift; -my $ticket = $self->TicketObj; -my ( @To, @PseudoTo, @Cc, @Bcc ); -my $arg ='Owner,Requestor,AdminCc,Cc'; -##Requestor -#push @To, $ticket->Requestors->MemberEmailAddresses; -push @To, $ticket->FirstCustomFieldValue('Client Email'); - -my $creator = "Davis Admin"; -@{ $self->{'To'} } = @To; - -} - -1; - -# Custom action commit code: -my $ticket = $self->TicketObj; -my $queue = $ticket->FirstCustomFieldValue('Hub Queue'); - -#if ($ticket->Status() ne "new") { -# return 1; -#} - -#$ticket->Comment(Content => 'Script #21 - sending email to requestor'); -#$ticket->Comment(Content => 'Status is: '.$self->TicketObj->Status()); -$ticket->Comment(Content => 'AUTO: Email sent to requestor is: '.$ticket->FirstCustomFieldValue('Client Email')); -# $ticket->Comment(Content => 'To is: '.@{ $self->{'To'} }); - -#Now change Queue -#Get list of queues?: -if ($queue eq "test-queue") { - $ticket->Comment(Content => 'AUTO: Leaving in current queue'); -} else { - $ticket->Comment(Content => 'AUTO: Changing queue to'.$queue); - my ($status, $msg) = $ticket->SetQueue( $queue); -} -return 1; - - - - diff --git a/Scrip2.txt b/Scrip2.txt deleted file mode 100644 index 56d92cc..0000000 --- a/Scrip2.txt +++ /dev/null @@ -1,82 +0,0 @@ -# On create: -# - Sent email to requestor -# - Check queue, and transfer to new queue if required - -# Custom condition: - -my $txn = $self->TransactionObj; -my $type = $txn->Type; -my $ticket = $self->TicketObj; - -return 0 unless $type eq "Status" || ( $type eq 'Set' && $txn->Field eq 'Status'); -return 0 unless $txn->OldValue eq "new"; -return 0 unless $txn->NewValue eq "Hub Not Assigned"; -# To test by triggering change of status (Condition ^ above!) - -#Only act in test-queue (safety for testing) -return 0 unless $ticket->QueueObj->Name eq "test-queue"; -#Only act on creation -#return 0 unless $txn->Type eq "Create"; - -return 1; - -# Custom action preparation code: -require RT::Action::SendEmail; -use strict; -use vars qw/@ISA/; -@ISA = qw(RT::Action::SendEmail); - -#STOP RACE CONDITION! -if ($self->TicketObj->Status() ne "Hub Not Assigned") { - return 0; -} - -$self->SetRecipients(); -$self->SUPER::Prepare(); -$self->SUPER::Commit(); -sub SetRecipients { -my $self = shift; -my $ticket = $self->TicketObj; -my ( @To, @PseudoTo, @Cc, @Bcc ); -my $arg ='Owner,Requestor,AdminCc,Cc'; -##Requestor -#push @To, $ticket->Requestors->MemberEmailAddresses; -push @To, $ticket->FirstCustomFieldValue('Facilitator Email'); - -my $creator = "Davis Admin"; -@{ $self->{'To'} } = @To; - -} - -1; - - - -# Custom action commit code: -#Move to Redacted Facilitator email sent. - -my $ticket = $self->TicketObj; -my $facilitator = $ticket->FirstCustomFieldValue('Facilitator Email'); - -if ($ticket->FirstCustomFieldValue('Facilitator Email') eq '') { - return 0; -} - -#if ($ticket->Status() ne "new") { -# return 1; -#} - -#$ticket->Comment(Content => 'Script #22 - sending email to facilitator'); -#$ticket->Comment(Content => 'Status is: '.$self->TicketObj->Status()); - - - -$ticket->Comment(Content => 'AUTO: Email sent. Facilitator is: '.$ticket->FirstCustomFieldValue('Facilitator Email')); - -$ticket->Comment(Content => 'AUTO: Changing status to "Redacted Facilitator Email Sent"'); -my ($status, $msg) = $ticket->SetStatus('Redacted Facilitator Email Sent'); - -return 1; - - -