Skip to content

Commit

Permalink
Merge pull request #65 from LigeroSmart/feat/Ticket#5150174
Browse files Browse the repository at this point in the history
Correção mensagem de erro de instalação
  • Loading branch information
mfmatos committed May 19, 2021
2 parents 51c3914 + edaad57 commit 546f1d9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions var/packagesetup/ServiceCatalogSidebarServiceStatus.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ sub _CreatePortalServiceClass {

my $GeneralCatalogObject = $Kernel::OM->Get('Kernel::System::GeneralCatalog');
my $ConfigItemObject = $Kernel::OM->Get('Kernel::System::ITSMConfigItem');
my $itemObj = $GeneralCatalogObject->ItemGet( Class => 'ITSM::ConfigItem::Class', Name => 'PortalService' );

my $HashRef = $GeneralCatalogObject->ItemList( Class => 'ITSM::ConfigItem::Class', Valid => 1 );
my $itemObj = undef;
foreach my $ItemID ( keys %{ $HashRef }) {
if ( $HashRef->{$ItemID} eq "PortalService" ) {
$itemObj = { ItemID => $ItemID };
}
}
if (!defined($itemObj)) {
$GeneralCatalogObject->ItemAdd(
Class => 'ITSM::ConfigItem::Class',
Expand All @@ -62,7 +69,7 @@ sub _CreatePortalServiceClass {
);
}
my $DefinitionListRef = $ConfigItemObject->DefinitionList( ClassID => $itemObj->{ItemID} );
#if (scalar @{$DefinitionListRef} == 0) {
if (scalar @{$DefinitionListRef} == 0) {
$ConfigItemObject->DefinitionAdd(
ClassID => $itemObj->{ItemID},
UserID => 1,
Expand All @@ -76,6 +83,6 @@ sub _CreatePortalServiceClass {
Size: 50
MaxLength: 50"
);
#}
}

}

0 comments on commit 546f1d9

Please sign in to comment.