Merge pull request 'Corregido fallo setRemotePc en la entidad Imagen al sincronizar un repositorio' (#116) from setRemotePc-problem into devel
Reviewed-on: #116pull/117/head^2
commit
49efbaae1f
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## [1.8.1] - 2026-05-18
|
||||
|
||||
### Fixed
|
||||
- Corregido fallo setRemotePc en la entidad Imagen al sincronizar un repositorio
|
||||
|
||||
## [1.8.0] - 2026-05-18
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ namespace App\Command\Migration;
|
|||
use App\Entity\Client;
|
||||
use App\Entity\Image;
|
||||
use App\Entity\ImageRepository;
|
||||
use App\Entity\ImageImageRepository;
|
||||
use App\Entity\OrganizationalUnit;
|
||||
use App\Model\ImageStatus;
|
||||
use App\Model\OrganizationalUnitTypes;
|
||||
|
|
@ -80,16 +81,20 @@ class MigrateImagesCommand extends Command
|
|||
$imageEntity->setMigrationId((string) $image['idimagen']);
|
||||
$imageEntity->setName($image['nombreca']);
|
||||
$imageEntity->setClient($clientEntity);
|
||||
//$imageEntity->setOrganizationalUnit($ouEntity);
|
||||
$imageEntity->setRemotePc(false);
|
||||
$imageEntity->setStatus(ImageStatus::SUCCESS);
|
||||
$imageEntity->setRepository($repository);
|
||||
$imageEntity->setRevision((string) $image['revision']);
|
||||
$imageEntity->setDescription($image['descripcion']);
|
||||
$imageEntity->setComments($image['comentarios']);
|
||||
}
|
||||
$imageEntity->setType('monolithic');
|
||||
$imageEntity->setIsGlobal(false);
|
||||
$this->entityManager->persist($imageEntity);
|
||||
|
||||
$this->entityManager->persist($imageEntity);
|
||||
$imageImageRepository = new ImageImageRepository();
|
||||
$imageImageRepository->setImage($imageEntity);
|
||||
$imageImageRepository->setRepository($repository);
|
||||
$imageImageRepository->setName($image['nombreca']);
|
||||
$imageImageRepository->setStatus(ImageStatus::SUCCESS);
|
||||
$imageImageRepository->setVersion(is_numeric($image['revision']) ? (int) $image['revision'] : null);
|
||||
$imageImageRepository->setDescription($image['descripcion']);
|
||||
$imageImageRepository->setRemotePc(false);
|
||||
$this->entityManager->persist($imageImageRepository);
|
||||
}
|
||||
$this->entityManager->flush();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ class ConvertAction extends AbstractOgRepositoryController
|
|||
$imageEntity = new Image();
|
||||
$imageEntity->setName($image);
|
||||
$imageEntity->setType('monolithic');
|
||||
$imageEntity->setRemotePc(false);
|
||||
$imageEntity->setIsGlobal(false);
|
||||
|
||||
$this->entityManager->persist($imageEntity);
|
||||
|
|
@ -59,6 +58,7 @@ class ConvertAction extends AbstractOgRepositoryController
|
|||
$imageImageRepositoryEntity->setImage($imageEntity);
|
||||
$imageImageRepositoryEntity->setRepository($repository);
|
||||
$imageImageRepositoryEntity->setVersion(1);
|
||||
$imageImageRepositoryEntity->setRemotePc(false);
|
||||
|
||||
$this->entityManager->persist($imageImageRepositoryEntity);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ class SyncAction extends AbstractOgRepositoryController
|
|||
if (!$imageEntity) {
|
||||
$imageEntity = new Image();
|
||||
$imageEntity->setName($image['name']);
|
||||
$imageEntity->setRemotePc(false);
|
||||
$imageEntity->setIsGlobal(false);
|
||||
$imageEntity->setType('monolithic');
|
||||
|
||||
|
|
@ -68,6 +67,7 @@ class SyncAction extends AbstractOgRepositoryController
|
|||
$imageImageRepositoryEntity->setDatasize(isset($image['datasize']) ? (string) $image['datasize'] : null);
|
||||
$imageImageRepositoryEntity->setSize(isset($image['size']) ? (string) $image['size'] : null);
|
||||
$imageImageRepositoryEntity->setStatus(ImageStatus::SUCCESS);
|
||||
$imageImageRepositoryEntity->setRemotePc(false);
|
||||
|
||||
$this->entityManager->persist($imageImageRepositoryEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ final class ImageFactory extends ModelFactory
|
|||
'softwareProfile' => SoftwareProfileFactory::new(),
|
||||
'updatedAt' => self::faker()->dateTime(),
|
||||
'type' => 'monolithic',
|
||||
'remotePc' => self::faker()->boolean(),
|
||||
'isGlobal' => false,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue