Loading module/Oscar/config/module.config.php +1 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ return array( 'controller' => 'Activity', 'action' => [ 'advancedsearch2', 'reindex', 'show', 'show2', 'edit', Loading module/Oscar/config/routes.yml +7 −0 Original line number Diff line number Diff line Loading @@ -1001,6 +1001,13 @@ contract: defaults: action: myRole reindex: type: segment options: route: /reindex/:id defaults: action: reindex process-document-signed-send: type: segment options: Loading module/Oscar/src/Oscar/Controller/ProjectGrantController.php +22 −0 Original line number Diff line number Diff line Loading @@ -1818,6 +1818,28 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif ]; } /** * Force la réindexation d'un activité * @return void */ public function reindexAction() { $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_MENU_ADMIN); try { $id = $this->params()->fromRoute('id'); $activity = $this->getActivityFromRoute(); $this->getProjectGrantService()->getGearmanJobLauncherService()->triggerUpdateSearchIndexActivity($activity); if( $this->isAjax() ){ return $this->getResponseOk("réindexation déclenchée"); } $this->redirect()->toRoute('contract/show', ['id' => $id]); } catch (Exception $e){ $msg = "Impossible de réindexer : " . $e->getMessage(); $this->getLoggerService()->error($msg); throw $e; } } /** * @throws NotFoundExceptionInterface * @throws OscarException Loading module/Oscar/src/Oscar/Entity/ActivityFreeField.php +5 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,11 @@ class ActivityFreeField return $this->id; } public function getKey() :string { return sprintf('ff_%s', $this->getId()); } public function getLabel(): ?string { return $this->label; Loading module/Oscar/src/Oscar/Service/ProjectGrantApiService.php +5 −1 Original line number Diff line number Diff line Loading @@ -282,6 +282,9 @@ class ProjectGrantApiService implements Privileges::ACTIVITY_CHANGE_PROJECT, $activity ), 'reindex' => !$locked && $oscarUserContext->hasPrivileges( Privileges::MAINTENANCE_MENU_ADMIN ), ]; break; Loading Loading @@ -605,7 +608,8 @@ class ProjectGrantApiService implements 'delete' => $urlPlugin->fromRoute('contract/delete', ['id' => $activity->getId()]), 'change_project' => $urlPlugin->fromRoute('contract/moveToProject', ['id' => $activity->getId()]), 'new_project' => $urlPlugin->fromRoute('project/new') . '?ids=' . $activity->getId(), 'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()]) 'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()]), 'reindex' => $urlPlugin->fromRoute('contract/reindex', ['id' => $activity->getId()]) ] ]; Loading Loading
module/Oscar/config/module.config.php +1 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ return array( 'controller' => 'Activity', 'action' => [ 'advancedsearch2', 'reindex', 'show', 'show2', 'edit', Loading
module/Oscar/config/routes.yml +7 −0 Original line number Diff line number Diff line Loading @@ -1001,6 +1001,13 @@ contract: defaults: action: myRole reindex: type: segment options: route: /reindex/:id defaults: action: reindex process-document-signed-send: type: segment options: Loading
module/Oscar/src/Oscar/Controller/ProjectGrantController.php +22 −0 Original line number Diff line number Diff line Loading @@ -1818,6 +1818,28 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif ]; } /** * Force la réindexation d'un activité * @return void */ public function reindexAction() { $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_MENU_ADMIN); try { $id = $this->params()->fromRoute('id'); $activity = $this->getActivityFromRoute(); $this->getProjectGrantService()->getGearmanJobLauncherService()->triggerUpdateSearchIndexActivity($activity); if( $this->isAjax() ){ return $this->getResponseOk("réindexation déclenchée"); } $this->redirect()->toRoute('contract/show', ['id' => $id]); } catch (Exception $e){ $msg = "Impossible de réindexer : " . $e->getMessage(); $this->getLoggerService()->error($msg); throw $e; } } /** * @throws NotFoundExceptionInterface * @throws OscarException Loading
module/Oscar/src/Oscar/Entity/ActivityFreeField.php +5 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,11 @@ class ActivityFreeField return $this->id; } public function getKey() :string { return sprintf('ff_%s', $this->getId()); } public function getLabel(): ?string { return $this->label; Loading
module/Oscar/src/Oscar/Service/ProjectGrantApiService.php +5 −1 Original line number Diff line number Diff line Loading @@ -282,6 +282,9 @@ class ProjectGrantApiService implements Privileges::ACTIVITY_CHANGE_PROJECT, $activity ), 'reindex' => !$locked && $oscarUserContext->hasPrivileges( Privileges::MAINTENANCE_MENU_ADMIN ), ]; break; Loading Loading @@ -605,7 +608,8 @@ class ProjectGrantApiService implements 'delete' => $urlPlugin->fromRoute('contract/delete', ['id' => $activity->getId()]), 'change_project' => $urlPlugin->fromRoute('contract/moveToProject', ['id' => $activity->getId()]), 'new_project' => $urlPlugin->fromRoute('project/new') . '?ids=' . $activity->getId(), 'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()]) 'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()]), 'reindex' => $urlPlugin->fromRoute('contract/reindex', ['id' => $activity->getId()]) ] ]; Loading