diff --git a/CHANGELOG.md b/CHANGELOG.md index 44de5bad2..fbf615527 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Next release + +## 2.0.3 + +**Bugfix** + - Prevent new entities for checking Jira ticket #232 + ## 2.0.2 The main focus of this release was to fix some minor bugs to make a production ready release. diff --git a/src/Surfnet/ServiceProviderDashboard/Application/CommandHandler/Entity/PublishEntityProductionCommandHandler.php b/src/Surfnet/ServiceProviderDashboard/Application/CommandHandler/Entity/PublishEntityProductionCommandHandler.php index 66de8f5d8..2bdc74907 100644 --- a/src/Surfnet/ServiceProviderDashboard/Application/CommandHandler/Entity/PublishEntityProductionCommandHandler.php +++ b/src/Surfnet/ServiceProviderDashboard/Application/CommandHandler/Entity/PublishEntityProductionCommandHandler.php @@ -149,9 +149,12 @@ public function handle(PublishEntityProductionCommand $command) ); try { - // Before creating an issue, test if we didn't previously create this ticket (users can apply changes to - // requested published entities). - $issue = $this->ticketService->findByManageIdAndIssueType($entity->getManageId(), $this->issueType); + $issue = null; + if ($entity->getManageId()) { + // Before creating an issue, test if we didn't previously create this ticket (users can apply changes to + // requested published entities). + $issue = $this->ticketService->findByManageIdAndIssueType($entity->getManageId(), $this->issueType); + } if (is_null($issue)) { $issue = $this->ticketService->createIssueFrom($ticket); $this->logger->info(sprintf('Created Jira issue with key: %s', $issue->key));