Skip to content

Commit

Permalink
Merge branch '1.0' of https://github.com/uvdesk/core-framework into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
papnoisanjeev committed Jan 4, 2020
2 parents 857cbe2 + e74271b commit 05c7db7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ CHANGELOG for 1.0.x

This changelog references any relevant changes introduced in 1.0 minor versions.

* 1.0.5 (2020-01-03)
* **Issue #275:** Customer reply error when workflow set for Mail to Agent.
* **Issue #276:** Exception occur while forwording ticket (undefined variable container).

* 1.0.4 (2019-11-15)
* **Issue #237:** Invalid base url for file icon
* **Issue #242:** Prepared response (ticket quick action button) always enabled irrespective of assigned privileges
Expand Down
6 changes: 4 additions & 2 deletions Controller/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ public function saveThread($ticketId, Request $request)

// Prepare attachments
$attachments = $entityManager->getRepository(Attachment::class)->findByThread($thread);
$attachments = array_map(function($attachment) use ($container) {
return str_replace('//', '/', $this->get('kernel')->getProjectDir() . "/public" . $attachment->getPath());

$projectDir = $this->get('kernel')->getProjectDir();
$attachments = array_map(function($attachment) use ($projectDir) {
return str_replace('//', '/', $projectDir . "/public" . $attachment->getPath());
}, $attachments);

// Forward thread to users
Expand Down
2 changes: 1 addition & 1 deletion PreparedResponse/Actions/Agent/MailAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function applyAction(ContainerInterface $container, $entity, $valu
$entityManager->flush();
}

$emailTemplate = $this->container->get('email.service')->getEmailTemplate($action['value']['value'], $object->getCompany()->getId());
$emailTemplate = $container->get('email.service')->getEmailTemplate($action['value']['value'], $object->getCompany()->getId());

// $emails = $this->getAgentMails($action['value']['for'], (($ticketAgent = $object->getAgent()) ? $ticketAgent->getEmail() : ''));

Expand Down
2 changes: 1 addition & 1 deletion PreparedResponse/Actions/Ticket/MailAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static function getAgentMails($for, $currentEmails, $container)
$agentMails = array_merge($agentMails, $currentEmails);
else
$agentMails[] = $currentEmails;
}elseif($agent == 'responsePerforming' && is_object($currentUser = $this->container->get('security.tokenstorage')->getToken()->getUser())) //add current user email if any
}elseif($agent == 'responsePerforming' && is_object($currentUser = $container->get('security.tokenstorage')->getToken()->getUser())) //add current user email if any
$agentMails[] = $currentUser->getEmail();

elseif($agent == 'baseAgent'){ //add selected user email if any
Expand Down
2 changes: 1 addition & 1 deletion Workflow/Actions/Agent/MailAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static function applyAction(ContainerInterface $container, $entity, $valu
$entityManager->flush();
}

$emailTemplate = $this->container->get('email.service')->getEmailTemplate($action['value']['value'], $object->getCompany()->getId());
$emailTemplate = $container->get('email.service')->getEmailTemplate($action['value']['value'], $object->getCompany()->getId());

// $emails = $this->getAgentMails($action['value']['for'], (($ticketAgent = $object->getAgent()) ? $ticketAgent->getEmail() : ''));

Expand Down
2 changes: 1 addition & 1 deletion Workflow/Actions/Ticket/MailAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static function applyAction(ContainerInterface $container, $entity, $valu
'name' => $attachment['name'],
'path' => str_replace('//', '/', $container->get('kernel')->getProjectDir() . "/public" . $attachment['relativePath']),
];
}, $entity->createdThread->getAttachments());
}, $entity->createdThread->getAttachments()->toArray());
}

$placeHolderValues = $container->get('email.service')->getTicketPlaceholderValues($entity, 'agent');
Expand Down
4 changes: 2 additions & 2 deletions Workflow/Actions/Ticket/MailCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public static function applyAction(ContainerInterface $container, $entity, $valu

switch (true) {
case $entity instanceof CoreEntities\Ticket:
$currentThread = $entity->currentThread;
$currentThread = $entity->currentThread ;
$createdThread = $entity->createdThread;

$emailTemplate = $entityManager->getRepository('UVDeskCoreFrameworkBundle:EmailTemplates')->findOneById($value);

if (empty($emailTemplate)) {
Expand Down

0 comments on commit 05c7db7

Please sign in to comment.