[Rt-commit] rt branch, 4.4/include-article-queue, repushed
Craig Kaiser
craig at bestpractical.com
Tue Feb 27 09:33:45 EST 2018
The branch 4.4/include-article-queue was deleted and repushed:
was 1dedf31437b5ec3b7660730405af2c3c8cf7025e
now 09ca40b2b3e1e24ffe5794fe941497d22e8fa72a
1: cc9e85ec7 ! 1: 1fb3ea0dc Add default value for Articles in Queues
@@ -2,7 +2,7 @@
Add default value for Articles in Queues
- Automatically add Default Article content to Tickets on create for Queue.
+ Automatically add default article content to tickets on create for queue.
diff --git a/lib/RT/Queue.pm b/lib/RT/Queue.pm
--- a/lib/RT/Queue.pm
@@ -109,13 +109,13 @@
+ push (@articles, $article);
+}
+
-+if ( ( !$parent_args->{id} || $parent_args->{id} eq 'new' ) && $parent_args->{'Queue'} ) {
++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') ) {
++ 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);
@@ -193,7 +193,6 @@
+
+<%INIT>
+my $articles = RT::Articles->new( $session{'CurrentUser'} );
-+$articles->LimitHotlistClasses;
+$articles->LimitAppliedClasses( Queue => $QueueObj );
+
+my $Default = '';
2: ee67f9cf8 ! 2: 74e658547 Add autocomplete for articles
@@ -1,6 +1,6 @@
Author: craig Kaiser <craig at bestpractical.com>
- Add Autocomplete for Articles
+ Add autocomplete for articles
diff --git a/share/html/Elements/SelectArticle b/share/html/Elements/SelectArticle
--- a/share/html/Elements/SelectArticle
@@ -10,7 +10,7 @@
%#
%# END BPS TAGGED BLOCK }}}
+% if ( $autocomplete ) {
-+<& "SelectArticleAutocomplete", articles => $articles, QueueObj => $QueueObj, Default => $Default &>
++<& "SelectArticleAutocomplete", QueueObj => $QueueObj, Default => $Default, Name => $Name &>
+% } else {
<select name="<% $Name %>">
<option value="">-</option>
@@ -23,10 +23,9 @@
<%INIT>
my $articles = RT::Articles->new( $session{'CurrentUser'} );
- $articles->LimitHotlistClasses;
$articles->LimitAppliedClasses( Queue => $QueueObj );
-+my $dropdown_limit = 50;
++my $dropdown_limit = RT->Config->Get( 'DropdownMenuLimit' ) || 50;
+$m->callback( CallbackName => 'ModifyDropdownLimit', DropdownLimit => \$dropdown_limit );
+
my $Default = '';
@@ -175,7 +174,6 @@
+$m->callback( CallbackName => 'ModifyMaxResults', max => \$max );
+
+my $articles = RT::Articles->new( $session{CurrentUser} );
-+$articles->LimitHotlistClasses;
+if( $queue ) {
+ $articles->LimitAppliedClasses( Queue => $queue );
+}
3: 1dedf3143 ! 3: 09ca40b2b Test default article content on ticket create
@@ -1,6 +1,6 @@
Author: craig Kaiser <craig at bestpractical.com>
- Test Default Article content on Ticket create
+ Test default article content on ticket create
diff --git a/t/web/ticket-create-utf8.t b/t/web/ticket-create-utf8.t
--- a/t/web/ticket-create-utf8.t
More information about the rt-commit
mailing list