-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
114 lines (91 loc) · 4.62 KB
/
Copy pathREADME
File metadata and controls
114 lines (91 loc) · 4.62 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Config
Returns the validated $CreateLinkedTickets_Config entries as an
arrayref. Entries missing a required "id"/"name"/"content", entries with
a duplicate "id", or entries whose "queue" is not an arrayref of
names/ids that all resolve to a real queue are logged via
"RT->Logger->warning" and skipped.
QueueMatches $entry, $ticket
Returns true if $entry has no "queue" restriction, or if $ticket's queue
id is one of the entry's (already resolved) "queue" ids.
VisibleEntries $ticket
Returns the arrayref of config entries whose queue condition matches
$ticket, for use by the UI.
CreateTicketByConfiguration Ticket => $ticket, Id => $id
Creates a new ticket linked to "Ticket" using the config entry "Id". The
entry's "content" is used as the "RT::Action::CreateTickets" template
text directly, via a transient in-memory template object -- no
admin-managed Template database row is needed.
Returns "($ok, $message)".
NAME
RT::Extension::CreateLinkedTickets
DESCRIPTION
Allows to quickly create linked tickets based on templates.
The extension adds a "Create linked tickets" quick action as the last
row inside the "Links" box in a ticket's overview: a select box of
configured linked-ticket types plus a "Create" button. In order to avoid
ticket creation noise (notifications to queue watchers) in the workflow,
ticket creation must be confirmed.
RT VERSION
Works with RT 6.0.0
INSTALLATION
"perl Makefile.PL"
"make"
"make install"
May need root permissions
Edit your /opt/rt/etc/RT_SiteConfig.pm
Add this line:
Plugin('RT::Extension::CreateLinkedTickets');
Clear your mason cache
rm -rf /opt/rt/var/mason_data/obj
Restart your webserver
CONFIGURATION
The only configuration option required by this extension is
$CreateLinkedTickets_Config. This is a list of hashes, each representing
a linked-ticket type to offer. No admin-managed Template object is
needed -- the "RT::Action::CreateTickets" template text lives directly
in "content".
Set($CreateLinkedTickets_Config, [
{
id => 'billing', # Required, unique. Used to reference this entry.
name => 'Billing Ticket', # Required. Display label in the select box.
description => 'Creates a billing ticket linked to this one.', # Optional. Tooltip/help text.
queue => ['Support', 'Sales'], # Optional. Arrayref of queue names or ids.
# Only shown on tickets in a matching queue.
# Omit to show for every queue.
content => <<'ENDOFTEMPLATE', # Required. RT::Action::CreateTickets template text.
===Create-Ticket: billing-ticket
Subject: Billing: {$Tickets{'TOP'}->Subject}
Refers-To: {$Tickets{'TOP'}->Id}
Queue: Finance
Content: Billing ticket for Ticket #{$Tickets{'TOP'}->Id} ({$Tickets{'TOP'}->Subject}) created.
ENDOFCONTENT
ENDOFTEMPLATE
},
]);
For more information on how to write the template text, see
RT::Action::CreateTickets
<https://docs.bestpractical.com/rt/6.0/RT/Action/CreateTickets.html>.
Upgrading from 2.x
Version 3.0.0 requires RT 6 and replaces the config shape entirely:
"icon" and "title" are gone, "template" (a template *name*) is replaced
by "content" (the template *text* itself), and entries gained "id" and
"description". Old-shape entries are skipped with a logged warning
rather than misbehaving. Your previously admin-managed Templates are no
longer used and may be deleted once their "Content" has been copied into
"content" -- but keep them, and the old 2.x config, around until 3.0.0
is confirmed working in production: rolling back to 2.1.0 needs both,
since it can't read the 3.0.0 config shape.
If upgrading in place rather than via a fresh "make install" into a
clean plugin directory, remove the old 2.x plugin files first ("make
install" copies files but never removes ones that no longer exist in
this release, such as "Ticket/Display.html/BeforeDisplay"), then clear
the mason cache.
AUTHOR
NETWAYS GmbH <support@netways.de>
BUGS
All bugs should be reported on GitHub
<https://github.com/NETWAYS/rt-extension-createlinkedtickets>.
LICENSE AND COPYRIGHT
This software is Copyright (c) 2018-2026 by NETWAYS GmbH
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991