[Rt-commit] rt branch, 4.4/article-autocomplete-refactor, created. rt-4.4.2-80-gb5f52e2fb

Jim Brandt jbrandt at bestpractical.com
Fri Jun 22 17:14:15 EDT 2018


The branch, 4.4/article-autocomplete-refactor has been created
        at  b5f52e2fbe0f2fdd0c87240a3aeba991790126ae (commit)

- Log -----------------------------------------------------------------
commit 070f14f890a0c5d2b56a48a24bdc94c108dac5fd
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jun 22 11:36:07 2018 -0400

    Refactor queue default for articles

diff --git a/share/html/Admin/Queues/DefaultValues.html b/share/html/Admin/Queues/DefaultValues.html
index ccb4fd5a5..331c97c00 100644
--- a/share/html/Admin/Queues/DefaultValues.html
+++ b/share/html/Admin/Queues/DefaultValues.html
@@ -73,7 +73,7 @@
     &>
 
     <tr><td class="label"><&|/l&>Article</&>:</td>
-        <td><& /Elements/SelectArticle, QueueObj => $queue &>
+        <td><& /Elements/SelectArticle, QueueObj => $queue, DefaultArticle => $queue->DefaultValue('Article') &>
     </td></tr>
 
     </table>
diff --git a/share/html/Elements/SelectArticle b/share/html/Elements/SelectArticle
index 948215ba8..afed6a934 100644
--- a/share/html/Elements/SelectArticle
+++ b/share/html/Elements/SelectArticle
@@ -46,12 +46,12 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 % if ( $autocomplete ) {
-<& "SelectArticleAutocomplete", QueueObj => $QueueObj, Default => $Default, Name => $Name &>
+<& "SelectArticleAutocomplete", QueueObj => $QueueObj, Default => $DefaultArticle, Name => $ArticleSelectName &>
 % } else {
-<select name="<% $Name %>">
+<select name="<% $ArticleSelectName %>">
 <option value="">-</option>
 % while (my $article = $articles->Next) {
-<option <% ( $article->Name eq $Default) ? qq[ selected="selected"] : '' |n %>
+<option <% ( $article->Name eq $DefaultArticle) ? qq[ selected="selected"] : '' |n %>
     value="<%$article->Id%>"
 ><% $article->Name %></option>
 % }
@@ -65,23 +65,24 @@ $articles->LimitAppliedClasses( Queue => $QueueObj );
 my $dropdown_limit = RT->Config->Get( 'DropdownMenuLimit' ) || 50;
 $m->callback( CallbackName => 'ModifyDropdownLimit', DropdownLimit => \$dropdown_limit );
 
-my $Default = '';
-
 my $autocomplete =  $articles->Count > $dropdown_limit ? 1 : 0;
 
-my $default_article = RT::Article->new($session{'CurrentUser'});
-
-if ( my $article_id = $QueueObj->DefaultValue('Article') ) {
-    my ($ret, $msg) = $default_article->Load( $article_id );
+if ( $DefaultArticle and $DefaultArticle =~ /^\d+$/ ){
+    # We got an id, look up the name
+    my $default_article = RT::Article->new($session{'CurrentUser'});
+    my ($ret, $msg) = $default_article->Load( $DefaultArticle );
     if ($ret) {
-         $Default = $default_article->Name;
-    } else{
-        RT::Logger->error($msg);
+         $DefaultArticle = $default_article->Name;
+    }
+    else {
+        RT::Logger->error("Unable to load article $DefaultArticle: $msg");
+        $DefaultArticle = '';
     }
 }
 </%INIT>
 
 <%ARGS>
 $QueueObj
-$Name => 'Article'
+$ArticleSelectName => 'Article'
+$DefaultArticle => ''
 </%ARGS>

commit f84532b3c970bd41b41d9f601950540db5ec6da7
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jun 22 13:26:20 2018 -0400

    Push default article loading toward create

diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index 74b7037c4..769ed4a58 100644
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <textarea autocomplete="off" class="messagebox <% $Type eq 'text/html' ? 'richtext' : '' %>" <% $width_attr %>="<% $Width %>" rows="<% $Height %>" <% $wrap_type |n %> name="<% $Name %>" id="<% $Name %>" placeholder="<% $Placeholder %>">
-% $m->comp('/Articles/Elements/IncludeArticle', %ARGS) if $IncludeArticle;
+% $m->comp('/Articles/Elements/IncludeArticle', %ARGS, ArticleId => $article_id) if $IncludeArticle;
 % $m->callback( %ARGS, SignatureRef => \$signature, DefaultRef => \$Default, MessageRef => $message );
 % if (RT->Config->Get("SignatureAboveQuote", $session{'CurrentUser'})) {
 <% $Default || '' %><% $signature %><% $message %></textarea>
@@ -101,6 +101,11 @@ if ( $IncludeSignature and $signature =~ /\S/ ) {
     $signature = '';
 }
 
+my $article_id;
+if ( $IncludeDefaultArticle && defined $QueueObj && $QueueObj->Id ) {
+    $article_id = $QueueObj->DefaultValue('Article') if $QueueObj->DefaultValue('Article');
+}
+
 # wrap="something" seems to really break IE + richtext
 my $wrap_type = $Type eq 'text/html' ? '' : 'wrap="soft"';
 
@@ -125,4 +130,6 @@ $IncludeArticle            => 1;
 $Type                      => RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'}) ? 'text/html' : 'text/plain';
 $SuppressAttachmentWarning => 0
 $Placeholder               => ''
+$IncludeDefaultArticle            => 0  # Preload a default article based on queue settings
+$QueueObj                  => undef
 </%ARGS>
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index e1b347d7a..db4d7a9b6 100644
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -240,9 +240,11 @@
 % }
 % $m->callback( %ARGS, QueueObj => $QueueObj, CallbackName => 'BeforeMessageBox' );
 % if (exists $ARGS{Content}) {
-<& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &>
+<& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0, IncludeDefaultArticle => 0 &>
+% } elsif ( $QuoteTransaction ) {
+<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction, IncludeDefaultArticle => 0 &>
 % } else {
-<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
+<& /Elements/MessageBox, QueueObj => $QueueObj, IncludeDefaultArticle => 1 &>
 %}
 % $m->callback( %ARGS, QueueObj => $QueueObj, CallbackName => 'AfterMessageBox' );
 

commit 80f31fe7d1b1b563fe9578e1759f268c4988646f
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jun 22 16:34:08 2018 -0400

    Refactor ticket create and update to use new SelectArticle
    
    Remove multiple article selection options from the ticket update
    page and replace with a single article selection control. This
    new article selector is a dropdown like the former hotlist,
    but converts to an autocomplete when the number of items in the list
    exceeds the DropdownLimit configuration.
    
    This change removes some extra code that worked to load a ticket
    object in IncludeArticle. The template no longer needs it, but
    it was also passed to a callback. Extensions that use this
    callback may need to make changes to handle receiving an empty
    ticket object.

diff --git a/share/html/Articles/Elements/BeforeMessageBox b/share/html/Articles/Elements/BeforeMessageBox
index 972688d19..9e40ac496 100644
--- a/share/html/Articles/Elements/BeforeMessageBox
+++ b/share/html/Articles/Elements/BeforeMessageBox
@@ -52,45 +52,11 @@
 <table class="articles-select-article">
 % unless (RT->Config->Get('HideArticleSearchOnReplyCreate')) {
 <tr>
-<td><&|/l&>Search for Articles matching</&></td>
-<td><input size=20 name="<% $name_prefix %>Articles_Content" /></td>
-</tr>
-<tr>
 <td><&|/l&>Include Article:</&></td>
-<td><input size=20 name="<% $name_prefix %>Articles-Include-Article-Named" /></td>
+<td><& /Elements/SelectArticle, QueueObj => $QueueObj, AutoSubmit => 1 &></td>
 <td><input type="submit" name="Go" value="Go" /></td>
 </tr>
 % }
-% if ($hotlist->Count) {
-<tr>
-<td><&|/l&>Select an Article to include</&></td>
-<td><select name="<% $name_prefix %>Articles-Include-Article-Named-Hotlist" onchange="this.form.submit()">
-<option value="" selected><&|/l&>-</&></option>
-% while (my $article = $hotlist->Next) {
-<option value="<% $article->Id %>"><%$article->Name|| loc('(no name)')%>: <%$article->Summary || ''%></option>
-% }
-</select>
-</td>
-<td><input type="submit" name="Go" value="Go" /></td>
-</tr>
-% }
-% my %dedupe_articles;
-% while (my $article = $articles_content->Next) {
-%   $dedupe_articles{$article->Id}++;
-<tr>
-<td> </td>
-<td><%$article->Name|| loc('(no name)')%>: <%$article->Summary%></td>
-<td><input type="submit" name="<% $name_prefix %>Articles-Include-Article-<%$article->Id%>" value="Go" /></td>
-</tr>
-% }
-% while (my $article = $articles_basics->Next) {
-%   next if $dedupe_articles{$article->Id};
-<tr>
-<td> </td>
-<td><%$article->Name || loc('(no name)')%>: <%$article->Summary || ''%></td>
-<td><input type="submit" name="<% $name_prefix %>Articles-Include-Article-<%$article->Id%>" value="Go" /></td>
-</tr>
-% }
 % if ( @$topics ) {
 <tr>
 <td>
@@ -114,7 +80,7 @@
 <&|/l, $included_topic->Name &>Select an Article from [_1]</&>
 </td>
 <td>
-<select name="<% $name_prefix %>Articles-Include-Article" onchange="this.form.submit()">
+<select name="IncludeArticleId" onchange="this.form.submit()">
 <option value="" selected>-</option>
 % while ( my $art = $topic_articles->Next ) {
 <option value="<% $art->id %>"><%$art->Name||loc('(no name)')%>: <%$art->Summary%></option>
diff --git a/share/html/Articles/Elements/IncludeArticle b/share/html/Articles/Elements/IncludeArticle
index 0f4becbe5..848b00e3a 100644
--- a/share/html/Articles/Elements/IncludeArticle
+++ b/share/html/Articles/Elements/IncludeArticle
@@ -46,65 +46,21 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
+# Nothing to do if we don't get an article id
+$IncludeArticleId //= $ARGS{'IncludeArticleId'};
+return unless $IncludeArticleId;
 
-my $parent_args = $m->caller_args(-1);
-my @articles;
+my $article = RT::Article->new($session{'CurrentUser'});
+my ($ret, $msg) = $article->Load($IncludeArticleId);
 
-my $name_prefix = '';
-$name_prefix = $ARGS{'Name'} .'-'
-    if $ARGS{'Name'}
-    && grep rindex($_, "$ARGS{'Name'}-Articles-", 0) == 0,
-        keys %$parent_args;
-
-my $Ticket = $ARGS{Ticket};
-if ( !$Ticket and $parent_args->{id} and $parent_args->{id} ne 'new' ) {
-    $Ticket = RT::Ticket->new($session{'CurrentUser'});
-    $Ticket->Load($parent_args->{id});
-    unless ( $Ticket->id ) {
-        $RT::Logger->error("Couldn't load ticket ". $parent_args->{id} )
-    }
-}
-
-foreach my $arg ( keys %$parent_args ) {
-    next if $name_prefix && substr($arg, 0, length($name_prefix)) ne $name_prefix;
-
-    my $Queue = RT::Queue->new($session{CurrentUser});
-    if ($Ticket && $Ticket->Id) {
-        $Queue = $Ticket->QueueObj;
-    }
-
-    my $article = RT::Article->new($session{'CurrentUser'});
-    $article->LoadByInclude(
-        Field => substr($arg, length($name_prefix)),
-        Value => $parent_args->{$arg},
-        Queue => $Queue->Id,
-    );
-    next unless $article && $article->id;
-    push (@articles, $article);
-}
-
-if ( !@articles && ( !$parent_args->{id} || $parent_args->{id} eq 'new' ) && $parent_args->{'Queue'} ) {
-    my $queue_id = $parent_args->{'Queue'};
-    my $QueueObj = RT::Queue->new($session{'CurrentUser'});
-    my ($ret, $msg) = $QueueObj->Load( $queue_id );
-    $RT::Logger->error($msg) unless ($ret);
-
-    if ( $QueueObj->id && $QueueObj->DefaultValue('Article') ) {
-        my $article = RT::Article->new($session{'CurrentUser'});
-        my ($ret, $msg) = $article->Load( $QueueObj->DefaultValue('Article') );
-        $RT::Logger->error($msg) unless ($ret);
-        if ($ret) {
-            push (@articles, $article);
-        }
-    }
-}
-
-foreach my $article (@articles) {
+if ( $ret && $article->Id ){
     my $formatted_article = $m->scomp('/Articles/Article/Elements/Preformatted',
-        Article => $article, Ticket => $Ticket
+        Article => $article
     );
 
-    $m->callback( Article => $article, Ticket => $Ticket, formatted_article => \$formatted_article );
+    # Ticket is provided in this callback for backward compatibility.
+    # However, after refactoring, less work is done to make sure a Ticket is available
+    $m->callback( Article => $article, Ticket => $ARGS{'Ticket'}, formatted_article => \$formatted_article );
 
     if (RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'})) {
         $formatted_article =~ s/>/>/g;
@@ -113,7 +69,11 @@ foreach my $article (@articles) {
         $formatted_article =~ s/\n/\n<br \/>/g;
     }
     $m->print($formatted_article);
-
 }
-return;
+else {
+    RT::Logger->error("Unable to load article $IncludeArticleId: $msg");
+}
 </%INIT>
+<%ARGS>
+$IncludeArticleId => undef
+</%ARGS>
diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index 769ed4a58..8f8f34607 100644
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <textarea autocomplete="off" class="messagebox <% $Type eq 'text/html' ? 'richtext' : '' %>" <% $width_attr %>="<% $Width %>" rows="<% $Height %>" <% $wrap_type |n %> name="<% $Name %>" id="<% $Name %>" placeholder="<% $Placeholder %>">
-% $m->comp('/Articles/Elements/IncludeArticle', %ARGS, ArticleId => $article_id) if $IncludeArticle;
+% $m->comp('/Articles/Elements/IncludeArticle', %ARGS, IncludeArticleId => $article_id) if $IncludeArticle;
 % $m->callback( %ARGS, SignatureRef => \$signature, DefaultRef => \$Default, MessageRef => $message );
 % if (RT->Config->Get("SignatureAboveQuote", $session{'CurrentUser'})) {
 <% $Default || '' %><% $signature %><% $message %></textarea>
@@ -103,8 +103,13 @@ if ( $IncludeSignature and $signature =~ /\S/ ) {
 
 my $article_id;
 if ( $IncludeDefaultArticle && defined $QueueObj && $QueueObj->Id ) {
+    # Load a default article
     $article_id = $QueueObj->DefaultValue('Article') if $QueueObj->DefaultValue('Article');
 }
+else {
+    # Load from the page, if provided
+    $article_id = $ARGS{'IncludeArticleId'} if $ARGS{'IncludeArticleId'};
+}
 
 # wrap="something" seems to really break IE + richtext
 my $wrap_type = $Type eq 'text/html' ? '' : 'wrap="soft"';
@@ -130,6 +135,6 @@ $IncludeArticle            => 1;
 $Type                      => RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'}) ? 'text/html' : 'text/plain';
 $SuppressAttachmentWarning => 0
 $Placeholder               => ''
-$IncludeDefaultArticle            => 0  # Preload a default article based on queue settings
+$IncludeDefaultArticle     => 0  # Preload a default article based on queue settings
 $QueueObj                  => undef
 </%ARGS>
diff --git a/share/html/Elements/SelectArticle b/share/html/Elements/SelectArticle
index afed6a934..a75fc3fee 100644
--- a/share/html/Elements/SelectArticle
+++ b/share/html/Elements/SelectArticle
@@ -48,12 +48,13 @@
 % if ( $autocomplete ) {
 <& "SelectArticleAutocomplete", QueueObj => $QueueObj, Default => $DefaultArticle, Name => $ArticleSelectName &>
 % } else {
-<select name="<% $ArticleSelectName %>">
+<select name="<% $ArticleSelectName %>" <% $AutoSubmit ? 'onchange="this.form.submit()"' : '' |n%>>
 <option value="">-</option>
 % while (my $article = $articles->Next) {
 <option <% ( $article->Name eq $DefaultArticle) ? qq[ selected="selected"] : '' |n %>
-    value="<%$article->Id%>"
-><% $article->Name %></option>
+    value="<%$article->Id%>">
+<%$article->Name || loc('(no name)')%><% $IncludeSummary ? ': ' . $article->Summary || '' : '' %>
+</option>
 % }
 </select>
 % }
@@ -83,6 +84,8 @@ if ( $DefaultArticle and $DefaultArticle =~ /^\d+$/ ){
 
 <%ARGS>
 $QueueObj
-$ArticleSelectName => 'Article'
-$DefaultArticle => ''
+$ArticleSelectName => 'IncludeArticleId'
+$DefaultArticle    => ''
+$AutoSubmit        => 0
+$IncludeSummary    => 1
 </%ARGS>
diff --git a/share/html/Elements/SelectArticleAutocomplete b/share/html/Elements/SelectArticleAutocomplete
index 18ada32fa..16a8300c7 100644
--- a/share/html/Elements/SelectArticleAutocomplete
+++ b/share/html/Elements/SelectArticleAutocomplete
@@ -45,10 +45,12 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<input data-autocomplete="Articles" <% $QueueObj && $QueueObj->id ? q{data-autocomplete-queue="} . $QueueObj->id . q{"} : '' |n %> data-autocomplete-return="Name" name="<% $Name %>" value="<% $Default %>">
+<input data-autocomplete="Articles" <% $QueueObj && $QueueObj->id ? q{data-autocomplete-queue="} . $QueueObj->id . q{"} : '' |n %> data-autocomplete-return="id" name="<% $Name %>" value="<% $Default %>"
+<% $AutoSubmit ? 'data-autocomplete-autosubmit=1' : '' %>>
 
 <%ARGS>
 $QueueObj => undef
 $Default => undef
 $Name => 'Article'
+$AutoSubmit => 1
 </%ARGS>
diff --git a/t/articles/queue-specific-class.t b/t/articles/queue-specific-class.t
index 5cd042910..98a850791 100644
--- a/t/articles/queue-specific-class.t
+++ b/t/articles/queue-specific-class.t
@@ -2,9 +2,10 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 56;
+use RT::Test tests => undef;
 
 my ( $url, $m ) = RT::Test->started_ok;
+diag "Running server at: $url";
 $m->login;
 
 my %class = map { $_ => '' } qw/foo bar/;
@@ -73,36 +74,8 @@ diag "update ticket to see if there is article foo"
 {
     $m->get_ok( '/Ticket/Update.html?Action=Comment&id=' . $ticket_id,
         'ticket update page' );
-    $m->content_contains( 'article foo:', 'got article foo in hotlist' );
-    $m->content_lacks( 'article bar:', 'no article bar in hotlist' );
-
-    $m->submit_form(
-        form_number => 3,
-        fields      => { 'Articles_Content' => 'article' },
-        button      => 'Go',
-    );
-    $m->content_like( qr/article foo.*article foo/s, 'selected article foo' );
-    $m->content_lacks( 'article bar', 'no article bar' );
-
-    $m->get_ok( '/Ticket/Update.html?Action=Comment&id=' . $ticket_id,
-        'ticket update page' );
-    $m->submit_form(
-        form_number => 3,
-        fields      => { 'Articles-Include-Article-Named' => 'article foo' },
-        button      => 'Go',
-    );
-    $m->content_like( qr/article foo.*article foo/s, 'selected article foo' );
-    $m->content_lacks( 'article bar', 'no article bar' );
-
-    $m->get_ok( '/Ticket/Update.html?Action=Comment&id=' . $ticket_id,
-        'ticket update page' );
-    $m->submit_form(
-        form_number => 3,
-        fields      => { 'Articles-Include-Article-Named' => 'articlei bar' },
-        button      => 'Go',
-    );
-    $m->content_unlike( qr/article foo.*article foo/s, 'no article foo' );
-    $m->content_lacks( 'article bar', 'no article bar' );
+    $m->content_contains( 'article foo:', 'got article foo in dropdown' );
+    $m->content_lacks( 'article bar:', 'no article bar in dropdown' );
 }
 
 diag "apply bar to globally" if $ENV{TEST_VERBOSE};
@@ -123,36 +96,15 @@ diag "update ticket to see if there are both article foo and bar"
 {
     $m->get_ok( '/Ticket/Update.html?Action=Comment&id=' . $ticket_id,
         'ticket update page' );
-    $m->content_contains( 'article foo:', 'got article foo in hotlist' );
-    $m->content_contains( 'article bar:', 'got article bar in hotlist' );
-
-    $m->submit_form(
-        form_number => 3,
-        fields      => { 'Articles_Content' => 'article' },
-        button      => 'Go',
-    );
-    $m->content_like( qr/article foo.*article foo/s, 'selected article foo' );
-    $m->content_like( qr/article bar.*article bar/s, 'selected article bar' );
+    $m->content_contains( 'article foo:', 'got article foo in dropdown' );
+    $m->content_contains( 'article bar:', 'got article bar in dropdown' );
 
-    $m->get_ok( '/Ticket/Update.html?Action=Comment&id=' . $ticket_id,
-        'ticket update page' );
     $m->submit_form(
         form_number => 3,
-        fields      => { 'Articles-Include-Article-Named' => 'article foo' },
+        fields      => { 'IncludeArticleId' => '1' },
         button      => 'Go',
     );
     $m->content_like( qr/article foo.*article foo/s, 'selected article foo' );
-    $m->content_unlike( qr/article bar.*article bar/s, 'no article bar' );
-
-    $m->get_ok( '/Ticket/Update.html?Action=Comment&id=' . $ticket_id,
-        'ticket update page' );
-    $m->submit_form(
-        form_number => 3,
-        fields      => { 'Articles-Include-Article-Named' => 'article bar' },
-        button      => 'Go',
-    );
-    $m->content_like( qr/article bar.*article bar/s, 'selected article bar' );
-    $m->content_unlike( qr/article foo.*article foo/s, 'no article foo' );
 }
 
 
@@ -174,7 +126,7 @@ diag "remove both foo and bar" if $ENV{TEST_VERBOSE};
         fields      => { 'RemoveClass-' . $class{bar} => 0 },
         button      => 'UpdateObjs',
     );
-    $m->content_contains( 'Object deleted', 'remoked bar' );
+    $m->content_contains( 'Object deleted', 'removed bar' );
 }
 
 diag "update ticket to see if there are both article foo and bar"
@@ -215,3 +167,4 @@ diag "update ticket to see if there are both article foo and bar"
     $m->content_lacks( 'article bar', 'no article bar' );
 }
 
+done_testing();

commit b5f52e2fbe0f2fdd0c87240a3aeba991790126ae
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jun 22 16:46:07 2018 -0400

    Add upgrading docs for 4.6

diff --git a/devel/docs/UPGRADING-4.6 b/devel/docs/UPGRADING-4.6
new file mode 100644
index 000000000..747e45e3d
--- /dev/null
+++ b/devel/docs/UPGRADING-4.6
@@ -0,0 +1,17 @@
+=head1 UPGRADING FROM RT 4.4.0 and greater
+
+This documentation notes internals changes between the 4.4 and 4.6
+series that are primarily of interest to developers writing extensions
+or local customizations.  It is not an exhaustive list.
+
+=over
+
+=item *
+
+The default callback in C<Articles/Elements/IncludeArticle> provides a ticket
+object. However, the template itself does not need this ticket object, so it
+is no longer guaranteed to be loaded when it is passed.
+
+=back
+
+=cut
diff --git a/docs/UPGRADING-4.6 b/docs/UPGRADING-4.6
new file mode 100644
index 000000000..f880b80e0
--- /dev/null
+++ b/docs/UPGRADING-4.6
@@ -0,0 +1,23 @@
+=head1 UPGRADING FROM RT 4.4.0 and greater
+
+The 4.6 release is a major upgrade and as such there are more changes
+than in a minor bugfix release (e.g., 4.4.2 to 4.4.3) and some of these
+changes are backward-incompatible. The following lists some of the notable
+changes, especially those that might require you to change a configuration
+option or other setting due to a change in RT. Read this section carefully
+before you upgrade and look for changes to features you currently use.
+
+See F<devel/docs/UPGRADING-4.4> for internals changes relevant to
+extension writers.
+
+=over
+
+=item *
+
+The articles interface on tickets has been simplified, now showing only
+a dropdown for selecting articles. This dropdown converts to an autocomplete
+box when the dropdown contains more than C<$DropdownMenuLimit> items.
+
+=back
+
+=cut

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


More information about the rt-commit mailing list