Hi There!
We recently upgraded to RT6.0.2. When we started we RT, about 16 years ago, we added a custom layout in create/update/display tickets. A layout that simply shows the basic information of the ticket on the left and on the right our own internal plugin to view assets of the company depending on a CF on the left.
Since the upgrade to RT6.0.2 we want to use the RT style layouts as they are made easy to use and maintained (Thanks for that RT dev!).
But we want to keep our internal plugin. Therefore I am trying to get the plugin inside a widget that can be dynamically placed inside the page layout. The whole RT setup is running inside docker and is deployed using CICD.
What we have done:
-
Folder structure:
./rt6-ext/local/plugins/RT-Extension-Companion/etc/RT_Config.pm
–> Variables
./rt6-ext/local/plugins/RT-Extension-Companion/lib/ExtWS/Base.pm
–> Generic API calls
./rt6-ext/local/plugins/RT-Extension-Companion/lib/ExtWS/Companion.pm
–> Specific internal API calls
./rt6-ext/local/plugins/RT-Extension-Companion/html/Ticket/Elements/Companion
–> The part where magic should be happening
./rt6-ext/local/plugins/RT-Extension-Companion/lib/RT/Extension/Companion.pm
–> Extension include -
RT_SiteConfig.pm
Plugins: ‘RT::Extension::Companion’
–> is loaded in the RT System Configuration -
html/Ticket/Elements/Companion
<%ARGS>
$Ticket => undef
</%ARGS><%INIT>
my $queue = $Ticket->QueueObj->Id;my $cf = RT::CustomField->new($session{‘CurrentUser’});
$cf->Load(‘license’);my $cf_license_id = $cf->Id;
my $license_name = “Object-RT::Ticket-”.$Ticket->Id.“-CustomField-$cf_license_id-Value”;
</%INIT><&| /Widgets/TitleBox, title => loc(‘Companion’) &>
Companion view applet from rt-companion could not be loaded.
Check the RT configuration and accessibility of the applet.
</&>
The issue is that the widget is not shown in the available widgets of page layout.
I also tried by adding the next in the site config:
Set(%WebDisplay,
‘RT::Ticket’ => {
‘ShowCompanion’ => {
‘Title’ => ‘Companion’,
‘Component’ => ‘/Ticket/Elements/Companion’,
}
}
);
Set(%WebDisplayRoles,
‘RT::Ticket’ => {
‘Display’ => [ ‘Companion’ ],
},
);
Does anybody know how to add it?
Thanks a lot!