From 2433b8f9be5198aa64e13610e7ee9feed4cc06b4 Mon Sep 17 00:00:00 2001
From: JediKev <kevin@enhancesoft.com>
Date: Wed, 1 Aug 2018 14:18:24 -0500
Subject: [PATCH] issue: Priority Field Template Variable

This addresses an issue with PriorityField Template Variables introduced
with 4359 where the priority variable will appear as "Array" instead of the
actual value. This adds an `asVar()` function to `class PriorityField` to
get the appropriate data.
---
 include/class.forms.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/class.forms.php b/include/class.forms.php
index e13d73f9c..0fc575637 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -2273,6 +2273,10 @@ class PriorityField extends ChoiceField {
         return ($value instanceof Priority) ? array($value->getId()) : null;
     }
 
+    function asVar($value, $id=false) {
+        return $this->to_php($value, $id);
+    }
+
     function getConfigurationOptions() {
         $choices = $this->getChoices();
         $choices[''] = __('System Default');
-- 
GitLab