File: transaction-cfs

package info (click to toggle)
request-tracker5 5.0.3%2Bdfsg-3~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 77,648 kB
  • sloc: javascript: 187,930; perl: 79,061; sh: 1,302; makefile: 471; python: 37; php: 15
file content (52 lines) | stat: -rw-r--r-- 1,292 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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,
    },
);