/
UPGRADING
250 lines (176 loc) · 8.81 KB
/
UPGRADING
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
Upgrading from RTIR 1.2.0 or earlier
-------------------------------------
* Best Practical Solutions will provide upgrade support to
RTIR Working Group members upgrading from RTIR 1.2 or older.
Please contact customer-development@bestpractical.com.
General upgrade instructions
============================
0) Make a backup of the database. It's very important.
1) Layout of files in RT's directories have been changed in RT 3.8.0.
Each extension is installed in its own directory and is activated
using Plugins option.
Also, some files have been renamed and delete, if you leave old
files around, you can hurt functionality of the new version.
If you're upgrading from RTIR 2.4 or newer, so RTIR is already
is in local/plugins/RT-IR directory, then you can move it before
proceding. Otherwise it's better to start from a new directory
for this installtion instead of using directories with previous
RT and extensions.
2) Install and upgrade database to the RT 3.8.4 or newer following
its upgrade instructions.
2.1) Test how RT upgrade went. You should be able to start server,
create tickets and do other things in the RT interface.
2.2) Make another backup of the DB, so you can return to this step
if something goes wrong.
3) Install or upgrade RTFM 2.4.0 or newer.
3.1) Enable it in the RT config using @Plugins option
3.2) Test RT and RTFM again
4) Install the new version of RTIR. (DO NOT RUN "make initdb")
5) Update RTIR's database.
Type:
ls etc/upgrade
For each item in that directory whose name is greater than
your previously installed RTIR version, you must run upgrade
commands.
Each step is described below and may have additional instructions.
Read them before running upgrade commands.
For example if you had RTIR 1.1.1 then you should check
instructions under "Applying changes from etc/upgrade/1.1.3"
section below and run commands, then do the same with 1.9.0 dir
and greater.
*Note* that even if there is no etc/upgrade/<some version> dir
then anyway *you must* read instructions below for all versions
greater or equal to that you're upgrading from as some upgrades
may require manual changes or describe important changes in
the RTIR you should be aware of.
Commands you should run to upgrade DB using data
from etc/upgrade/<version> directory: If the dir has any schema
files then run:
/opt/rt3/sbin/rt-setup-database --dba <dba> \
--prompt-for-dba-password --action schema \
--datadir etc/upgrade/<version>
If the dir has a file named 'content' then run:
/opt/rt3/sbin/rt-setup-database --dba <dba> \
--prompt-for-dba-password --action insert \
--datadir etc/upgrade/<version>
Upgrading from 2.4.x and earlier
--------------------------------
1) _RTIR_ prefix has been deleted from all RTIR's custom fields. What
means that you have to update custom code you have: templates,
scrips and other customizations which may have name of a custom
field hardcoded.
Custom Fields with multiple words in the name and no spaces have
been renamed, now there is space. These custom fields are:
HowReported => How Reported
ReporterType => Reporter Type
WhereBlocked => Where Blocked
All these changes are implemented in F<etc/upgrade/2.5.1/content>
file.
2) Saved searches are affected by above change and you can convert
them using a script provided.
perl -I /opt/rt3/local/lib -I/opt/rt3/lib etc/upgrade/2.5.1/update_saved_searches.pl
3) Some templates RTIR comes with contain code to insert values of
CFs into emails. It is impossible to change these templates
automatically. You have to do it manually. To identify templates
and/or confirm that all has been changed you can use the following
SQL query:
SELECT id, Queue FROM Templates WHERE Content LIKE '%_RTIR_%';
Usually this change is simple as deleting _RTIR_ prefix and adding
a space to three names mentioned above.
Some of your code may still use old names. Make sure to change
that. The following command might help you identify places:
find dir/ | xargs grep '_RTIR_'
2) _RTIR_*_default options in the config has been merged together
into RTIR_CustomFieldDefaults hash. Change site config accordingly.
Upgrading from 2.4.4 and earlier
-------------------------
SubjectTag was ignored in RTIR templates, so users could be confused.
Find all templates with the following text:
[{$rtname} #{$Ticket->id}]
And replace it with:
[{$Ticket->QueueObj->SubjectTag || $rtname} #{$Ticket->id}]
Upgrading from 2.3.17 and earlier
-------------------------
1) Layout of files in RT's directories have been changed in RT 3.8.0.
Each extension is installed in its own directory and is activated
using @Plugins options in the RT config.
2) By accident RTFM's CustomField Response could be created with MaxValues = 0
what is incorrect and should be changed to 1, run the following query to
update the DB.
UPDATE CustomFields SET MaxValues = 1 WHERE
Name = 'Response'
AND Type = 'Text'
AND LookupType = 'RT::FM::Class-RT::FM::Article'
AND MaxValues = 0;
Upgrading from 2.3.15 and earlier
-------------------------
There was an error in the etc/upgrade/upgrade.pl script. It could skip
some incidents during upgrade. Run this script again, especially if you
never did that or ran with earlier versions of the RTIR. This script
updates Due dates on active incidents where it's not set and set to
the most recent due date of the active children.
Applying changes from upgrade/2.3.0
-------------------------
At these step no special actions are required, run the upgrade scripts where we
split out incidents owned by Nobody and the Current User on the most-due views
on the homepage.
Applying changes from upgrade/2.1.1
-------------------------
At these step no special actions are required, run the upgrade
scripts where we add several scrips that set 'Started' date
of tickets in the RTIR.
Applying changes from upgrade/2.1.0
-------------------------
At these step no special actions are required, run the upgrade
scripts where we do following things:
1) Apply the _RTIR_IP CF to all RTIR's queues and convert it to
multiple type. Also, we add several scrips to parse IP addresses
from incomming mails and to fill those into the CF.
2) The constituency field we apply to all RTIR's queues too and
and add several scrips to track values of the field.
Applying changes from upgrade/1.9.0
-------------------------
1) The LaunchMessage template in the Investigations queue
has been renamed into Autoreply without any changes of the content.
This upgrade step is automated, but may fail if you've changed
the LaunchMessage template.
2) In the Blocks queue an Autoreply template has been added. This is
replacement for the NewMessage template. Automated step doesn't delete
old template, you have to check that the new template suites your
needs and may be copy customizations from the old one, then delete
the NewMessage template.
3) NotifyOnLaunch and NotifyOnCreate scrips have been deleted in
the Implementations and the Blocks queues respectively. You have to
use the default RT's Autoreply scrip instead or create autoreply
scrips in these queues if global one is disabled or doesn't exist.
You need the following scrip in the queues:
On Create AutoReply to Requestors with Template Autoreply
4) The new 'BlockRemoved' template has been added in the Blocks
queue. Check its content.
Applying changes from upgrade/1.1.3
-------------------------
No special steps required, just run upgrade scripts. Everything
is automated. At this step we install several new actions,
conditions and scrips that had been introduced in the RTIR 1.1.3.
Also, we change action of the 'SetDueReopen' scrips.
Applying changes from upgrade/1.1.1
-------------------------
1) At this step we switch from 'UserDefined' actions and conditions
to modules, so all code would be in the lib directory. If you changed
the code of the scrips then you have to port changes.
2) Run the etc/upgrade/upgrade.pl script. This script updates Due Dates
on active incidents where it's not set and set to the most recent due
date of the active children.
Applying changes from upgrade/1.0.3
-------------------------
No special steps required, just run upgrade scripts. Everything
is automated. At this step we grant the ShowTemplate right to
the DutyTeam group.
Upgrading from RTIR 1.0.0:
--------------------------
RTIR now installs in RT's local/plugins/RT-IR directory rather than local/html,
making local modifications to RTIR easier.
1) IMPORTANT! Back up any modifications that you've made to the
/opt/rt3/local/html/RTIR directory.
2) Remove the old RTIR files or better install everything into clean directory
as described in the beginning of this file.