[Rt-commit] rt branch, 4.6/configurable-linked-queue-portlets, repushed
Maureen Mirville
maureen at bestpractical.com
Fri Nov 9 13:01:57 EST 2018
The branch 4.6/configurable-linked-queue-portlets was deleted and repushed:
was 4293902e364448d543678e7da989869457464568
now bcf17d2d06628f2b2d4890187490393038ecffeb
1: 0c9134a7c ! 1: 4e0e83f93 Add a configurable queue portlet to ticket display page
@@ -99,7 +99,9 @@
+}
+
+$Format = RT->Config->Get( 'LinkedQueuesPortletFormat' );
-+
++$FullList = "/Ticket/ModifyLinks.html?id=" . $TicketObj->id . "&Queue=" . $QueueId;
++
++$m->callback( CallbackName => 'MassagePortlets', ARGSRef => \%ARGS, Format => \$Format, FullList => \$FullList );
+</%INIT>
+
+<%ARGS>
@@ -116,6 +118,7 @@
+ at LinkTypes
+$QueueName
+$TicketObj
++$QueueId
+</%ARGS>
diff --git a/share/html/Ticket/Elements/ShowLinkedQueues b/share/html/Ticket/Elements/ShowLinkedQueues
@@ -171,38 +174,57 @@
+%#
+%# END BPS TAGGED BLOCK }}}
+<%PERL>
++my ( $title_href, $titleright_raw, $title_class, $class );
++
+foreach my $on_queue ( @show_portlet_on_queues ) {
+ if ( $on_queue eq $TicketObj->QueueObj->Name ) {
-+ my %queues = %{ $portlet_config{ $on_queue } };
-+ foreach my $queue_name ( keys %queues ) {
-+ my $queue_obj = RT::Queue->new( $session{ CurrentUser } );
-+ my ( $ret, $msg ) = $queue_obj->Load( $queue_name );
-+ RT::Logger->error( $msg ) unless $ret;
-+ next unless $ret;
-+ my @link_types = @{ $queues{ $queue_name } };
++ foreach my $queues ( @{ $portlet_config{ $on_queue } } ) {
++ foreach my $queue_name ( keys %{ $queues } ) {
++ my $queue_obj = RT::Queue->new( $session{ CurrentUser } );
++ my ( $ret, $msg ) = $queue_obj->Load( $queue_name );
++ RT::Logger->error( $msg ) unless $ret;
++ next unless $ret;
++ foreach my $link_types ( $queues->{ $queue_name } ) {
++
++$m->callback( CallbackName => 'MassageTitleBox',
++ ARGSRef => \%ARGS,
++ queue_name => $queue_name,
++ title_href => \$title_href,
++ titleright_raw => \$titleright_raw,
++ title_class => \$title_class,
++ class => \$class,
++);
++
+</%PERL>
-+
+<&| /Widgets/TitleBox,
-+ title => $queue_name,
-+&>
++ title => $queue_name,
++ title_href => $title_href,
++ titleright_raw => $titleright_raw,
++ title_class => $title_class,
++ class => $class,
++&>
++
+<& /Elements/ShowLinksCollectionList, %ARGS,
+ TicketObj => $TicketObj,
-+ LinkTypes => @link_types,
++ LinkTypes => $link_types,
+ QueueName => $queue_name,
+ Rows => $Rows,
+ ExtraQuery => "Status = '__Active__'",
+ NoTicketsCaption => loc('No active [_1] tickets', loc( $queue_name )),
-+ FullList => "/Ticket/ModifyLinks.html?id=" . $TicketObj->id . "&Queue=" . $queue_obj->id,
++ QueueId => $queue_obj->id,
+&>
+<& /Elements/ShowLinksCollectionList,
+ TicketObj => $TicketObj,
-+ LinkTypes => @link_types,
++ LinkTypes => $link_types,
+ QueueName => $queue_name,
+ Rows => $Rows,
+ ExtraQuery => "Status = '__Inactive__'",
+ NoTicketsCaption => loc('No inactive [_1] tickets', loc( $queue_name )),
++ QueueId => $queue_obj->id,
+&>
+</&>
++% }
++% }
+% }
+% }
+%}
2: 4293902e3 ! 2: bcf17d2d0 Add docs for the new Linked Queue Portlets configs
@@ -17,16 +17,17 @@
+Acceptable link types include, 'DependsOn', 'DependedOnBy', 'HasMember'
+(children), 'MemberOf' (parents), 'RefersTo', and 'ReferredToBy'.
+Additionally, the type, 'All', which lists all linked tickets by queue,
-+is accepted. See example below:
++is accepted. In the example below, portlets will be added to all tickets
++in both the General queue and the Support queue:
+
+Set( %LinkedQueuePortlets, (
-+ General => {
-+ General => [ 'All' ],
-+ TestQueue => [ 'HasMember', 'MemberOf', 'RefersTo' ],
-+ },
-+ TestQueue => {
-+ General => [ 'All' ],
-+ },
++ General => [
++ { General => [ 'All' ] },
++ { Testing => [ 'HasMember', 'MemberOf', 'RefersTo' ] },
++ ],
++ Support => [
++ { General => [ 'All' ] },
++ ],
+));
+
+=cut
More information about the rt-commit
mailing list