Hello, Yuri!
Well, only some time ago had implemented this functionality in more or less useful way.
So steps for reproducing:
1) add new xml file to Kernel/Config/Files/...
Code: Select all
<ConfigItem Name="ServicePriority" Required="0" Valid="1">
<Description Translatable="1">Allows to set sorting (by priority) for Services in Customer Interface (Artjoms@UCB).</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Customer::Ticket::ViewNew</SubGroup>
<Setting>
<Hash>
</Hash>
</Setting>
</ConfigItem>
This is a hash, which will connect desirable service with the priority (position) into the dropbox
2) In Customer Interface (CustomerTicketMessage.pm) change the generation of the Services string to this one:
Code: Select all
$Param{ServiceStrg} = $Self->{LayoutObject}->BuildSelection(
Data => \%Service,
Name => 'ServiceID',
SelectedID => $Param{ServiceID},
PossibleNone => 1,
TreeView => $TreeView,
Sort => 'IndividualValue',
SortIndividual => \@ServicePriorityString,
Translation => 0,
Max => 200,
Class => "Validate_RequiredDropdown ",
);
Of course you will need the array ServicePriorityString and it can be get by receiving and transforming the hash from the Sysconfig options just before the generation of selectbox
Like this:
Code: Select all
# services
#generate emty string
my @ServicePriorityString = ();
#if option is received
if ( $Self->{ConfigObject}->Get('ServicePriority') ) {
foreach my $ServCount (sort (keys %{ $Self->{ConfigObject}->Get('ServicePriority') } )) {
push(@ServicePriorityString, $Self->{ConfigObject}->{ServicePriority}->{$ServCount}) ;
}
}
Here you go, hope it will help someone
