Mailing List Archive

rt branch 5.0/allow-any-link-in-create-ticket-template created. rt-5.0.5-173-g581a2fcab0
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".

The branch, 5.0/allow-any-link-in-create-ticket-template has been created
at 581a2fcab07ce3261b3f8d4061f06f8c4a2c9de6 (commit)

- Log -----------------------------------------------------------------
commit 581a2fcab07ce3261b3f8d4061f06f8c4a2c9de6
Author: Brian Conry <bconry@bestpractical.com>
Date: Wed Mar 27 10:50:21 2024 -0500

Relax checks on link targets in create templates

Prior to this change it wasn't possible to copy or add links to anything
other than tickets in a CreateTicket template.

This change removes a template-specific check on what might be a valid
link and trusts that the AddLink method knows how to validate what was
passed to it.

diff --git a/lib/RT/Action/CreateTickets.pm b/lib/RT/Action/CreateTickets.pm
index 1fb0a78fb1..037a9fcd36 100644
--- a/lib/RT/Action/CreateTickets.pm
+++ b/lib/RT/Action/CreateTickets.pm
@@ -1213,14 +1213,15 @@ sub PostProcess {

} elsif ( $link !~ m/^\d+$/ ) {
my $key = "create-$link";
- if ( !exists $T::Tickets{$key} ) {
+ if ( exists $T::Tickets{$key} ) {
+ $RT::Logger->debug( "Building $type link for $link: "
+ . $T::Tickets{$key}->Id );
+ $link = $T::Tickets{$key}->Id;
+ }
+ else {
$RT::Logger->debug(
- "Skipping $type link for $key (non-existent)");
- next;
+ "Building $type link for $link");
}
- $RT::Logger->debug( "Building $type link for $link: "
- . $T::Tickets{$key}->Id );
- $link = $T::Tickets{$key}->Id;
} else {
$RT::Logger->debug("Building $type link for $link");
}

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


hooks/post-receive
--
rt
_______________________________________________
rt-commit mailing list
rt-commit@lists.bestpractical.com
https://lists.bestpractical.com/mailman/listinfo/rt-commit