[Bps-public-commit] rt-extension-repeatticket branch initial-status-from-lifecycle created. 2.02-1-g415289e
BPS Git Server
git at git.bestpractical.com
Fri Dec 8 18:59:18 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-repeatticket".
The branch, initial-status-from-lifecycle has been created
at 415289e4ef780b8f91b3ebe49bc78b9aec8910c8 (commit)
- Log -----------------------------------------------------------------
commit 415289e4ef780b8f91b3ebe49bc78b9aec8910c8
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Dec 8 13:51:03 2023 -0500
Allow RT::Ticket::Create to set the correct Status on create
Setting the status to 'new' causes errors when RepeatTicket was
used on queues with a lifecycle that did not have a new
status. RT::Ticket::Create will automatically find the correct
default status for new tickets.
diff --git a/lib/RT/Extension/RepeatTicket.pm b/lib/RT/Extension/RepeatTicket.pm
index 11cd3f6..51496b1 100644
--- a/lib/RT/Extension/RepeatTicket.pm
+++ b/lib/RT/Extension/RepeatTicket.pm
@@ -585,8 +585,6 @@ sub _RepeatTicket {
$repeat->{"CustomField-$cf_id"} = \@cf_values;
}
- $repeat->{Status} = 'new';
-
for ( keys %$repeat ) {
$args{$_} = $repeat->{$_} if not defined $args{$_};
}
@@ -610,6 +608,10 @@ sub _RepeatTicket {
$parser->ParseMIMEEntityFromScalar(
$top->ContentAsMIME( Children => 1 )->as_string );
+ # Status is not set by design. The ticket Create method will
+ # automatically load the correct "DefaultOnCreate" from the lifecycle
+ # of the provided Queue.
+
my $ticket = RT::Ticket->new( $repeat_ticket->CurrentUser );
my ($new_id, $new_txn, $new_msg) = $ticket->Create(%args);
-----------------------------------------------------------------------
hooks/post-receive
--
rt-extension-repeatticket
More information about the Bps-public-commit
mailing list