From 8f931c88b5cf8d9d6a8bc570493e9db62f3263b6 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Thu, 9 Oct 2014 16:32:54 -0500 Subject: [PATCH] oops: Partially revert e5d61922d MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The real bug was setting the source of the ticket form — not the fallback to the form entry source. Falling back breaks edits. --- include/class.dynamic_forms.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 2f1c3a9e5..1b31e882d 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -1011,12 +1011,10 @@ class DynamicFormEntryAnswer extends VerySimpleModel { } function getValue() { - $value = $this->getField()->to_php( - $this->get('value'), $this->get('value_id')); - if (!$value && $this->getEntry()->getSource()) { - return $this->getEntry()->getField( - $this->getField()->get('name'))->getClean(); - } + if (!$this->_value && isset($this->value)) + $this->_value = $this->getField()->to_php( + $this->get('value'), $this->get('value_id')); + return $this->_value; } function getIdValue() { -- GitLab