Skip to content

Commit

Permalink
Issue #3031: Added explanatory comments and tidied code.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaerter authored and svenoe committed Feb 22, 2024
1 parent c744e7a commit 6418d67
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 23 deletions.
6 changes: 4 additions & 2 deletions Kernel/Modules/AgentTicketActionCommon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $Ticket{CustomerUserID},
TicketID => $Self->{TicketID},
Expand Down
6 changes: 4 additions & 2 deletions Kernel/Modules/AgentTicketCompose.pm
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $Ticket{CustomerUserID},
TicketID => $Self->{TicketID},
Expand Down
6 changes: 4 additions & 2 deletions Kernel/Modules/AgentTicketEmail.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1445,8 +1445,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $CustomerUser,
TicketID => $Self->{TicketID},
Expand Down
7 changes: 4 additions & 3 deletions Kernel/Modules/AgentTicketEmailOutbound.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,10 @@ sub SendEmail {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory =>
$DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $Ticket{CustomerUserID},
TicketID => $Self->{TicketID},
Expand Down
6 changes: 4 additions & 2 deletions Kernel/Modules/AgentTicketForward.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,10 @@ sub SendEmail {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $Ticket{CustomerUserID},
TicketID => $Self->{TicketID},
Expand Down
7 changes: 4 additions & 3 deletions Kernel/Modules/AgentTicketMove.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ sub new {
Mandatory => $Config->{DynamicField}{ $DynamicField->{Name} } == 2 ? 1 : 0,
};

# TODO check if this persists
if ( $Config->{DynamicField}{ $DynamicField->{Name} } == 2 ) {
$DynamicField->{Mandatory} = 1;
}
Expand Down Expand Up @@ -883,8 +882,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $Ticket{CustomerUserID},
TicketID => $Self->{TicketID},
Expand Down
6 changes: 4 additions & 2 deletions Kernel/Modules/AgentTicketPhone.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1262,8 +1262,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $CustomerUser,
TicketID => $Self->{TicketID},
Expand Down
7 changes: 4 additions & 3 deletions Kernel/Modules/AgentTicketPhoneCommon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ sub new {
Mandatory => $Config->{DynamicField}{ $DynamicField->{Name} } == 2 ? 1 : 0,
};

# TODO check if this persists
if ( $Config->{DynamicField}{ $DynamicField->{Name} } == 2 ) {
$DynamicField->{Mandatory} = 1;
}
Expand Down Expand Up @@ -741,8 +740,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $Ticket{CustomerUserID},
TicketID => $Self->{TicketID},
Expand Down
6 changes: 4 additions & 2 deletions Kernel/Modules/CustomerTicketMessage.pm
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
Getparam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
Getparam => {
%GetParam,
CustomerUserID => $Self->{UserID},
TicketID => $Self->{TicketID},
Expand Down
6 changes: 4 additions & 2 deletions Kernel/Modules/CustomerTicketZoom.pm
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,10 @@ sub Run {
DynamicFieldConfig => $DynamicFieldConfig,
PossibleValuesFilter => $PossibleValuesFilter,
ParamObject => $ParamObject,
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {

# Mandatory is added to the configs by $Self->new
Mandatory => $DynamicFieldConfig->{Mandatory},
GetParam => {
%GetParam,
CustomerUserID => $Self->{UserID},
TicketID => $Ticket{TicketID},
Expand Down

0 comments on commit 6418d67

Please sign in to comment.