Skip to content

Commit

Permalink
Refactored AgentTicketNoteToLinkedTicket:
Browse files Browse the repository at this point in the history
- Fixed AgentTicketNoteToLinkedTicket Ticket settings not styled.
- Added AgentTicketNoteToLinkedTicket to DynamicFieldScreens###Framework.
- Added SysConfig `Ticket::Frontend::AgentTicketNoteToLinkedTicket###DynamicField` to use DynamicFields.
  • Loading branch information
dennykorsukewitz committed Aug 11, 2023
1 parent f515ff3 commit c50c0ac
Show file tree
Hide file tree
Showing 5 changed files with 277 additions and 283 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 7.0.10 2023-??-??
- 2023-08-11 Refactored AgentTicketNoteToLinkedTicket. Fixed AgentTicketNoteToLinkedTicket Ticket settings not styled. Added AgentTicketNoteToLinkedTicket to DynamicFieldScreens###Framework. Added SysConfig `Ticket::Frontend::AgentTicketNoteToLinkedTicket###DynamicField` to use DynamicFields.
- 2023-08-11 Fixed - Installing a package with dependency not possible - Added additional check if any problem exists - means if any package or module is not installed.
- 2023-08-09 Fixed display of pending time selection. Thanks to Tim Püttmanns (@tipue-dev), maxence. [PR#469](https://github.com/znuny/Znuny/pull/469)
- 2023-08-08 Updated protocol to https for a secured communitation with gravatar.com. Updated CustomerInterface so that SysConfig Frontend::AvatarEngine will be respected.
Expand Down
63 changes: 63 additions & 0 deletions Kernel/Config/Files/XML/Znuny.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<Item Key="Ticket::Frontend::AgentTicketFreeText###DynamicField">AgentTicketFreeText</Item>
<Item Key="Ticket::Frontend::AgentTicketMove###DynamicField">AgentTicketMove</Item>
<Item Key="Ticket::Frontend::AgentTicketNote###DynamicField">AgentTicketNote</Item>
<Item Key="Ticket::Frontend::AgentTicketNoteToLinkedTicket###DynamicField">AgentTicketNoteToLinkedTicket</Item>
<Item Key="Ticket::Frontend::AgentTicketOwner###DynamicField">AgentTicketOwner</Item>
<Item Key="Ticket::Frontend::AgentTicketPending###DynamicField">AgentTicketPending</Item>
<Item Key="Ticket::Frontend::AgentTicketPhone###DynamicField">AgentTicketPhone</Item>
Expand Down Expand Up @@ -3160,6 +3161,13 @@
<Item ValueType="String" ValueRegex="">note</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###RequiredLock" Required="0" Valid="1">
<Description Translatable="1">Defines if a ticket lock is required in the ticket owner screen of a zoomed ticket in the agent interface (if the ticket isn't locked yet, the ticket gets locked and the current agent will be set automatically as its owner).</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###LinkedTicketState" Required="0" Valid="1">
<Description Translatable="1">Sets the state of the selected linked ticket in the NoteToLinkedTicket screen of the agent interface.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
Expand Down Expand Up @@ -3272,6 +3280,13 @@
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###QueueMandatory" Required="0" Valid="1">
<Description Translatable="1">Sets if queue must be selected by the agent.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###Owner" Required="0" Valid="1">
<Description Translatable="1">Sets the ticket owner in the NoteToLinkedTicket screen of the agent interface.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
Expand All @@ -3293,13 +3308,27 @@
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###ResponsibleMandatory" UserPreferencesGroup="Advanced" UserModificationPossible="1" Required="0" Valid="1">
<Description Translatable="1">Sets if ticket responsible must be selected by the agent.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###State" Required="0" Valid="1">
<Description Translatable="1">Sets the state of a ticket in the NoteToLinkedTicket screen of the agent interface.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###StateMandatory" Required="0" Valid="1">
<Description Translatable="1">Sets if state must be selected by the agent.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###StateType" Required="0" Valid="1">
<Description Translatable="1">Defines the next state of a ticket after adding a note in the NoteToLinkedTicket screen of the agent interface.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
Expand Down Expand Up @@ -3340,4 +3369,38 @@
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###FormDraft" Required="0" Valid="1">
<Description Translatable="1">Allows to save current work as draft in the ticket pending screen of the agent interface.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="Checkbox">0</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###RichTextWidth" Required="0" Valid="1">
<Description Translatable="1">Defines the width for the rich text editor component for this screen. Enter number (pixels) or percent value (relative).</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="String" ValueRegex="^\d+%?$">75%</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###RichTextHeight" Required="0" Valid="1">
<Description Translatable="1">Defines the height for the rich text editor component for this screen. Enter number (pixels) or percent value (relative).</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Item ValueType="String" ValueRegex="^\d+%?$">320</Item>
</Value>
</Setting>
<Setting Name="Ticket::Frontend::AgentTicketNoteToLinkedTicket###DynamicField" Required="0" Valid="1">
<Description Translatable="1">Dynamic fields shown in the ticket move screen of the agent interface.</Description>
<Navigation>Frontend::Agent::View::TicketNoteToLinkedTicket</Navigation>
<Value>
<Hash>
<DefaultItem ValueType="Select">
<Item ValueType="Option" Value="0" Translatable="1">0 - Disabled</Item>
<Item ValueType="Option" Value="1" Translatable="1">1 - Enabled</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled and required</Item>
</DefaultItem>
</Hash>
</Value>
</Setting>
</otrs_config>
70 changes: 0 additions & 70 deletions Kernel/Modules/AgentTicketNoteToLinkedTicket.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1149,20 +1149,6 @@ sub Run {
my @UserListWithoutSelection
= split( ',', $ParamObject->GetParam( Param => 'UserListWithoutSelection' ) || "" );

# get inform user list
my @InformUserID = $ParamObject->GetArray( Param => 'InformUserID' );

# get involved user list
my @InvolvedUserID = $ParamObject->GetArray( Param => 'InvolvedUserID' );

if ( $Config->{InformAgent} ) {
push @NotifyUserIDs, @InformUserID;
}

if ( $Config->{InvolvedAgent} ) {
push @NotifyUserIDs, @InvolvedUserID;
}

if ( $Self->{ReplyToArticle} ) {
push @NotifyUserIDs, @UserListWithoutSelection;
}
Expand Down Expand Up @@ -2511,12 +2497,6 @@ sub _Mask {
delete $ReplyToUserIDs{ $Self->{UserID} };
}

if ( $Config->{InformAgent} || $Config->{InvolvedAgent} ) {
$LayoutObject->Block(
Name => 'InformAdditionalAgents',
);
}

# get param object
my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request');

Expand Down Expand Up @@ -2573,56 +2553,6 @@ sub _Mask {
# block is called below "inform agents"
}

# agent list
if ( $Config->{InformAgent} ) {

# get inform user list
my %InformAgents;
my @InformUserID = $ParamObject->GetArray( Param => 'InformUserID' );
my %InformAgentList = $GroupObject->PermissionGroupGet(
GroupID => $GID,
Type => 'ro',
);
for my $UserID ( sort keys %InformAgentList ) {
$InformAgents{$UserID} = $AllGroupsMembers{$UserID};
}

if ( $Self->{ReplyToArticle} ) {

# get email address of all users and compare to replyto-addresses
for my $UserID ( sort keys %InformAgents ) {
if ( $ReplyToUserIDs{$UserID} ) {
push @InformUserID, $UserID;
delete $ReplyToUserIDs{$UserID};
}
}
}

my $InformAgentSize = $ConfigObject->Get('Ticket::Frontend::InformAgentMaxSize')
|| 3;
$Param{OptionStrg} = $LayoutObject->BuildSelection(
Data => \%InformAgents,
SelectedID => \@InformUserID,
Name => 'InformUserID',
Class => 'Modernize',
Multiple => 1,
Size => $InformAgentSize,
);
$LayoutObject->Block(
Name => 'InformAgent',
Data => \%Param,
);
}

# get involved
if ( $Config->{InvolvedAgent} ) {

$LayoutObject->Block(
Name => 'InvolvedAgent',
Data => \%Param,
);
}

# show list of agents, that receive this note (ReplyToNote)
# at least sender of original note and all recepients of the original note
# that couldn't be selected with involved/inform agents
Expand Down
Loading

0 comments on commit c50c0ac

Please sign in to comment.