Skip to content

Commit

Permalink
Ajuste do módulo para pesquisa de chamados filhos
Browse files Browse the repository at this point in the history
  • Loading branch information
alderpinto committed Jul 22, 2022
1 parent 3ea12d9 commit 60105cc
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ package Kernel::System::ProcessManagement::TransitionValidation::CheckIfAllChild
use strict;
use warnings;

use Data::Dumper;

This comment has been minimized.

Copy link
@mfmatos

mfmatos Jul 22, 2022

Contributor

esse trecho pode ser retirado


use Kernel::System::VariableCheck qw(:all);

our @ObjectDependencies = (
Expand Down Expand Up @@ -71,6 +73,8 @@ sub new {
sub Validate {
my ( $Self, %Param ) = @_;

my $LinkObject = $Kernel::OM->Get('Kernel::System::LinkObject');

for my $Needed (qw(Data)) {
if ( !defined $Param{$Needed} ) {
$Kernel::OM->Get('Kernel::System::Log')->Log(
Expand All @@ -90,15 +94,15 @@ sub Validate {
return;
}

# linked tickets
my $Links = $Kernel::OM->Get('Kernel::System::LinkObject')->LinkList(
Object => 'Ticket',
Object2 => 'Ticket',
Key => $Param{Data}{TicketID},
State => 'Valid',
Type => 'ParentChild',
UserID => 1,
);
my $Links = $LinkObject->LinkList(
Object => 'Ticket',
Key => $Param{Data}{TicketID},
Object2 => 'Ticket', # (optional)
State => 'Valid',
#Type => ''ParentChild'', # (optional)
Direction => 'Target', # (optional) default Both (Source|Target|Both)
UserID => 1,
);

if ( $Links
&& $Links->{Ticket}
Expand Down

0 comments on commit 60105cc

Please sign in to comment.