[Rt-commit] rt branch, 4.4/article-link-to-ticket-option, created. rt-4.4.4-238-g647f42cf1c

? sunnavy sunnavy at bestpractical.com
Tue Feb 2 15:40:10 EST 2021


The branch, 4.4/article-link-to-ticket-option has been created
        at  647f42cf1c852f4ae378e71a2a714d29a5bc3335 (commit)

- Log -----------------------------------------------------------------
commit 5a1f467bbf7a9c934c71c487d57e8bedd3cda727
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date:   Thu Dec 6 01:47:48 2018 -0500

    Add option to disable ticket linking in articles by class

diff --git a/share/html/Admin/Articles/Classes/Modify.html b/share/html/Admin/Articles/Classes/Modify.html
index 43857a7053..6c985a5144 100644
--- a/share/html/Admin/Articles/Classes/Modify.html
+++ b/share/html/Admin/Articles/Classes/Modify.html
@@ -84,6 +84,14 @@
 
 <h3><&|/l&>When inserting articles in this class into emails:</&></h3>
 <ul>
+<li>
+    <input type="checkbox" id="Include-LinkToTicket" name="Include-LinkToTicket" value="1" <% $include{LinkToTicket} %>
+% if ( !RT->Config->Get('LinkArticlesOnInclude') ) {
+      disabled="disabled"
+% }
+    >
+    <label for="Include-LinkToTicket"><&|/l&>Link article to ticket</&></label>
+</li>
 <li>
     <input type="checkbox" id="Include-Name" name="Include-Name" value="1" <% $include{Name} %>>
     <label for="Include-Name"><&|/l&>Include article name</&></label>
@@ -192,6 +200,8 @@ if ((defined $Enabled && $Enabled == 1) or (not defined $Enabled and $Create)) {
 }
 
 my %include = (Name => 1, Summary => 1, EscapeHTML => 1);
+$include{LinkToTicket} = 1 if RT->Config->Get('LinkArticlesOnInclude');
+
 my $subject_cfs = [];
 my $subject_cf_labels = {};
 
diff --git a/share/html/Articles/Elements/BeforeMessageBox b/share/html/Articles/Elements/BeforeMessageBox
index b41b01d9d4..94d7c684aa 100644
--- a/share/html/Articles/Elements/BeforeMessageBox
+++ b/share/html/Articles/Elements/BeforeMessageBox
@@ -164,7 +164,7 @@ if ( $ARGS{id} && $ARGS{id} ne 'new' ) {
             Field => substr($arg, length($name_prefix)),
             Value => $ARGS{$arg},
         );
-        if ($article->Id) {
+        if ($article->Id and not $article->ClassObj->FirstAttribute('Skip-LinkToTicket')) {
             $uri{$article->URI}++;
         }
     }

commit 647f42cf1c852f4ae378e71a2a714d29a5bc3335
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date:   Thu Dec 6 16:28:49 2018 -0500

    Update Articles docs to include disabling ticket linking

diff --git a/docs/customizing/articles_introduction.pod b/docs/customizing/articles_introduction.pod
index 09b42d531c..770f8396e6 100644
--- a/docs/customizing/articles_introduction.pod
+++ b/docs/customizing/articles_introduction.pod
@@ -132,6 +132,21 @@ tags per article class. This can be done by unchecking the "Escape HTML"
 box on the Modify Class page. Please note this is potentially unsafe and
 its use should be limited to trusted administrators.
 
+=head3 Disabling Ticket Linking
+
+When an article is included in a ticket's comment or response, the article
+is automatically added as a link to the ticket. This means that the article
+will be listed under the Links portlet on ticket display page, and also on
+the article display page. Having these links listed can be very useful and
+is RT's default behavior. However, some instances of RT use articles
+heavily, and having a large list of links on the ticket or article display
+page, may not be ideal. You can disable this feature globally(via
+L<RT_Config/LinkArticlesOnInclude>) or by class. To disable it on class
+level, uncheck the "Link article to ticket" option under "When inserting
+articles in this class into emails" on class modify page. Note that
+disabling this feature will only affect future comments/replies on tickets.
+Existing links to articles will remain linked.
+
 =head2 Queue-Specific List of Articles 
 
 You can use Topics to organize a set of Queue-specific Articles.

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


More information about the rt-commit mailing list