Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-8453

wrongly activity log sort order with the same timestamp

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Customer request
    • 4.6.7
    • None
    • None
    • Yes

    Description

      Sometimes actions that are executed at the same time are sorted incorrectly in the activity log

       

      to reproduce this issue create any content draft and publish it at this same time - you can use the above command (the action may have to be repeated several times so that the logs are displayed incorrectly)

      <?php
      
      namespace App\Command;
      
      use Ibexa\Contracts\Core\Repository\ContentService;
      use Ibexa\Contracts\Core\Repository\ContentTypeService;
      use Ibexa\Contracts\Core\Repository\LocationService;
      use Ibexa\Contracts\Core\Repository\PermissionResolver;
      use Ibexa\Contracts\Core\Repository\UserService;
      use Symfony\Component\Console\Command\Command;
      use Symfony\Component\Console\Input\InputInterface;
      use Symfony\Component\Console\Output\OutputInterface;
      
      class CreateDraftAndPublishCommand extends Command
      {
          public function __construct(
              private readonly ContentService $contentService,
              private readonly ContentTypeService $contentTypeService,
              private readonly LocationService $locationService,
              private readonly PermissionResolver $permissionResolver,
              private readonly UserService $userService
          ) {
              parent::__construct('app:create:folder');
          }
          
          protected function execute(InputInterface $input, OutputInterface $output): int {
              $this->permissionResolver->setCurrentUserReference(
                  $this->userService->loadUserByLogin('admin')
              );
              $folderType = $this->contentTypeService->loadContentTypeByIdentifier('folder');
              $mainLanguageCode = 'eng-GB';
              $contentCreateStruct = $this->contentService->newContentCreateStruct($folderType, $mainLanguageCode);
              $contentCreateStruct->setField('name', 'Test folder', $mainLanguageCode);
              $draft = $this->contentService->createContent(
                  $contentCreateStruct,
                  [
                      $this->locationService->newLocationCreateStruct(2),
                  ]
              );
              $this->contentService->publishVersion($draft->getVersionInfo());
              
              return Command::SUCCESS;
          }
      } 

      Result

       

      Expected

      activity log displayed correctly

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              mateusz.debinski@ibexa.co Mateusz Dębiński
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: