RT 4.2.11, ticket#13852
[freeside.git] / rt / t / data / initialdata / transaction-cfs
diff --git a/rt/t/data/initialdata/transaction-cfs b/rt/t/data/initialdata/transaction-cfs
new file mode 100644 (file)
index 0000000..25c8274
--- /dev/null
@@ -0,0 +1,52 @@
+use strict;
+use warnings;
+
+our @Queues = (
+    { Name  => "Blues" },
+    { Name  => "Purples" },
+);
+
+our @CustomFields = (
+    map +{
+        LookupType  => RT::Transaction->CustomFieldLookupType,
+        MaxValues   => 1,
+        Type        => "Freeform",
+        %$_
+    },
+    {   Name    => "Billable",
+        Type    => "Select",
+        Values  => [
+            { Name => "Yes", SortOrder => 1 },
+            { Name => "No",  SortOrder => 2 },
+        ],
+    },
+    {   Name    => "Who",
+        Type    => "SelectMultiple",
+        Values  => [
+            map +{ Name => $_ },
+                "Facilities",
+                "Information Technology",
+                "Library",
+                "Telecom",
+        ],
+    },
+    {   Name    => "When",
+        Type    => "Date",
+    },
+
+    # Two CFs named the same, but each applied to only one queue
+    # Note: Queue => ref forces RT::Handle to apply rather than
+    # RT::CustomField->Create; the former respects LookupType, the latter
+    # doesn't.
+    {   Name    => "Color",
+        Queue   => ["Blues"],
+    },
+    {   Name    => "Color",
+        Queue   => ["Purples"],
+    },
+
+    # Some ticket CFs to test mixed searches
+    {   Name        => "Location",
+        LookupType  => RT::Ticket->CustomFieldLookupType,
+    },
+);