[Rt-commit] rt branch 5.0/include-articles-msg-fix created. rt-5.0.4-115-ge38592a7c3

BPS Git Server git at git.bestpractical.com
Sat Aug 19 10:57:31 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".

The branch, 5.0/include-articles-msg-fix has been created
        at  e38592a7c3c95824c54f5b60cd85cfe6f64e2184 (commit)

- Log -----------------------------------------------------------------
commit e38592a7c3c95824c54f5b60cd85cfe6f64e2184
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Aug 19 13:19:48 2023 +0300

    no support for muliple articles included at the same time
    
    In rare cases the UI may send multiple values. The rest of the code
    either assumes scalar value or takes first value from the array.
    
    It's easier to normalize to first scalar value.

diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index aa412c30f8..e1a07caf51 100644
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -458,6 +458,9 @@ if ($CloneTicket) {
 
 }
 
+# no support for muliple articles included at the same time
+$ARGS{IncludeArticleId} = $ARGS{IncludeArticleId}[0] if ref($ARGS{IncludeArticleId}) eq 'ARRAY';
+
 my @results;
 
 my $QueueObj = RT::Queue->new($current_user);
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 6446e46042..fd529af560 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -339,6 +339,9 @@ my $TicketObj = LoadTicket($id);
 
 my @results;
 
+# no support for muliple articles included at the same time
+$ARGS{IncludeArticleId} = $ARGS{IncludeArticleId}[0] if ref($ARGS{IncludeArticleId}) eq 'ARRAY';
+
 if ($ARGS{IncludeArticleId}) {
     my $article = RT::Article->new($session{'CurrentUser'});
     my ($ret, $msg) = $article->Load( $ARGS{IncludeArticleId} );

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list