Skip to content
Snippets Groups Projects
Commit 9b2705b6 authored by Jared Hancock's avatar Jared Hancock
Browse files

pdf: Fix incorrect custom data in ticket print

parent a576e5ae
No related branches found
No related tags found
No related merge requests found
...@@ -160,14 +160,10 @@ div.hr { ...@@ -160,14 +160,10 @@ div.hr {
<?php <?php
foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) { foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) {
// Skip core fields shown earlier in the ticket view // Skip core fields shown earlier in the ticket view
// TODO: Rewrite getAnswers() so that one could write $answers = $form->getAnswers()->exclude(Q::any(array(
// ->getAnswers()->filter(not(array('field__name__in'=> 'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED | DynamicFormField::FLAG_CLIENT_VIEW,
// array('email', ...)))); 'field__name__in' => array('subject', 'priority'),
$answers = array_filter($form->getAnswers(), function ($a) { )));
return !in_array($a->getField()->get('name'),
array('email','subject','name','priority'))
&& !$a->getField()->get('private');
});
if (count($answers) == 0) if (count($answers) == 0)
continue; continue;
?> ?>
......
...@@ -183,13 +183,10 @@ div.hr { ...@@ -183,13 +183,10 @@ div.hr {
<?php <?php
foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) { foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) {
// Skip core fields shown earlier in the ticket view // Skip core fields shown earlier in the ticket view
// TODO: Rewrite getAnswers() so that one could write $answers = $form->getAnswers()->exclude(Q::any(array(
// ->getAnswers()->filter(not(array('field__name__in'=> 'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED,
// array('email', ...)))); 'field__name__in' => array('subject', 'priority')
$answers = array_filter($form->getAnswers(), function ($a) { )));
return !in_array($a->getField()->get('name'),
array('email','subject','name','priority'));
});
if (count($answers) == 0) if (count($answers) == 0)
continue; continue;
?> ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment