Merge pull request #20129 from larssandergreen/apply-mailing-tracking-only-to-a-urls
[civicrm-core.git] / xml / schema / Activity / Activity.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Activity</base>
4 <class>Activity</class>
5 <name>civicrm_activity</name>
6 <comment>Other Activity details stored here include contact, location, details.</comment>
7 <add>1.1</add>
8 <log>true</log>
9 <icon>fa-tasks</icon>
10 <labelField>subject</labelField>
11 <paths>
12 <add>civicrm/activity?reset=1&amp;action=add&amp;context=standalone</add>
13 <view>civicrm/activity?reset=1&amp;action=view&amp;id=[id]</view>
14 <update>civicrm/activity/add?reset=1&amp;action=update&amp;id=[id]</update>
15 <delete>civicrm/activity?reset=1&amp;action=delete&amp;id=[id]</delete>
16 </paths>
17 <field>
18 <name>id</name>
19 <uniqueName>activity_id</uniqueName>
20 <title>Activity ID</title>
21 <import>true</import>
22 <type>int unsigned</type>
23 <required>true</required>
24 <comment>Unique Other Activity ID</comment>
25 <html>
26 <type>Number</type>
27 </html>
28 <add>1.1</add>
29 </field>
30 <primaryKey>
31 <name>id</name>
32 <autoincrement>true</autoincrement>
33 </primaryKey>
34 <field>
35 <name>source_record_id</name>
36 <type>int unsigned</type>
37 <title>Source Record</title>
38 <comment>Artificial FK to original transaction (e.g. contribution) IF it is not an Activity. Table can be figured out through activity_type_id, and further through component registry.</comment>
39 <readonly>true</readonly>
40 <add>2.0</add>
41 </field>
42 <index>
43 <name>UI_source_record_id</name>
44 <fieldName>source_record_id</fieldName>
45 <add>3.2</add>
46 </index>
47 <field>
48 <name>activity_type_id</name>
49 <title>Activity Type ID</title>
50 <import>true</import>
51 <type>int unsigned</type>
52 <required>true</required>
53 <export>true</export>
54 <default>1</default>
55 <headerPattern>/(activity.)?type(.id$)/i</headerPattern>
56 <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment>
57 <add>1.1</add>
58 <pseudoconstant>
59 <optionGroupName>activity_type</optionGroupName>
60 </pseudoconstant>
61 <html>
62 <type>Select</type>
63 <label>Activity Type</label>
64 </html>
65 </field>
66 <index>
67 <name>UI_activity_type_id</name>
68 <fieldName>activity_type_id</fieldName>
69 <add>1.6</add>
70 </index>
71 <field>
72 <name>subject</name>
73 <uniqueName>activity_subject</uniqueName>
74 <type>varchar</type>
75 <title>Subject</title>
76 <length>255</length>
77 <comment>The subject/purpose/short description of the activity.</comment>
78 <import>true</import>
79 <headerPattern>/(activity.)?subject/i</headerPattern>
80 <html>
81 <type>Text</type>
82 </html>
83 <add>1.1</add>
84 <change>2.0</change>
85 </field>
86 <field>
87 <name>activity_date_time</name>
88 <import>true</import>
89 <required>false</required>
90 <export>true</export>
91 <default>CURRENT_TIMESTAMP</default>
92 <title>Activity Date</title>
93 <type>datetime</type>
94 <headerPattern>/(activity.)?date(.time$)?/i</headerPattern>
95 <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.</comment>
96 <html>
97 <type>Select Date</type>
98 <formatType>activityDateTime</formatType>
99 </html>
100 <add>2.0</add>
101 </field>
102 <index>
103 <name>index_activity_date_time</name>
104 <fieldName>activity_date_time</fieldName>
105 <add>4.7</add>
106 </index>
107 <field>
108 <name>duration</name>
109 <uniqueName>activity_duration</uniqueName>
110 <title>Duration</title>
111 <import>true</import>
112 <type>int unsigned</type>
113 <headerPattern>/(activity.)?duration(s)?$/i</headerPattern>
114 <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.</comment>
115 <add>2.0</add>
116 <html>
117 <type>Number</type>
118 </html>
119 </field>
120 <field>
121 <name>location</name>
122 <uniqueName>activity_location</uniqueName>
123 <title>Location</title>
124 <import>true</import>
125 <type>varchar</type>
126 <length>255</length>
127 <headerPattern>/(activity.)?location$/i</headerPattern>
128 <comment>Location of the activity (optional, open text).</comment>
129 <html>
130 <type>Text</type>
131 </html>
132 <add>1.1</add>
133 </field>
134 <field>
135 <name>phone_id</name>
136 <type>int unsigned</type>
137 <title>Phone ID (called)</title>
138 <comment>Phone ID of the number called (optional - used if an existing phone number is selected).</comment>
139 <add>2.0</add>
140 <html>
141 <type>EntityRef</type>
142 <label>Phone (called)</label>
143 </html>
144 </field>
145 <foreignKey>
146 <name>phone_id</name>
147 <table>civicrm_phone</table>
148 <key>id</key>
149 <add>2.0</add>
150 <onDelete>SET NULL</onDelete>
151 </foreignKey>
152 <field>
153 <name>phone_number</name>
154 <title>Phone (called) Number</title>
155 <type>varchar</type>
156 <length>64</length>
157 <comment>Phone number in case the number does not exist in the civicrm_phone table.</comment>
158 <html>
159 <type>Text</type>
160 </html>
161 <add>2.0</add>
162 </field>
163 <field>
164 <name>details</name>
165 <uniqueName>activity_details</uniqueName>
166 <title>Details</title>
167 <import>true</import>
168 <type>longtext</type>
169 <headerPattern>/(activity.)?detail(s)?$/i</headerPattern>
170 <comment>Details about the activity (agenda, notes, etc).</comment>
171 <html>
172 <type>RichTextEditor</type>
173 <rows>8</rows>
174 <cols>60</cols>
175 </html>
176 <add>1.1</add>
177 </field>
178 <field>
179 <name>status_id</name>
180 <uniqueName>activity_status_id</uniqueName>
181 <title>Activity Status</title>
182 <import>true</import>
183 <export>true</export>
184 <headerPattern>/(activity.)?status(.label$)?/i</headerPattern>
185 <type>int unsigned</type>
186 <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.</comment>
187 <add>2.0</add>
188 <pseudoconstant>
189 <optionGroupName>activity_status</optionGroupName>
190 </pseudoconstant>
191 <html>
192 <type>Select</type>
193 </html>
194 </field>
195 <index>
196 <name>index_status_id</name>
197 <fieldName>status_id</fieldName>
198 <add>4.7</add>
199 </index>
200 <field>
201 <name>priority_id</name>
202 <type>int unsigned</type>
203 <title>Priority</title>
204 <export>true</export>
205 <import>true</import>
206 <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.</comment>
207 <add>2.0</add>
208 <pseudoconstant>
209 <optionGroupName>priority</optionGroupName>
210 </pseudoconstant>
211 <html>
212 <type>Select</type>
213 </html>
214 </field>
215 <field>
216 <name>parent_id</name>
217 <title>Parent Activity ID</title>
218 <type>int unsigned</type>
219 <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented</comment>
220 <readonly>true</readonly>
221 <html>
222 <label>Parent Activity</label>
223 </html>
224 <add>1.1</add>
225 </field>
226 <foreignKey>
227 <name>parent_id</name>
228 <table>civicrm_activity</table>
229 <key>id</key>
230 <add>1.1</add>
231 <onDelete>CASCADE</onDelete>
232 </foreignKey>
233 <field>
234 <name>is_test</name>
235 <title>Test</title>
236 <uniqueName>activity_is_test</uniqueName>
237 <type>boolean</type>
238 <default>0</default>
239 <import>true</import>
240 <headerPattern>/(is.)?test(.activity)?/i</headerPattern>
241 <add>2.0</add>
242 <html>
243 <type>CheckBox</type>
244 </html>
245 </field>
246 <field>
247 <name>medium_id</name>
248 <uniqueName>activity_medium_id</uniqueName>
249 <title>Activity Medium</title>
250 <type>int unsigned</type>
251 <default>NULL</default>
252 <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment>
253 <pseudoconstant>
254 <optionGroupName>encounter_medium</optionGroupName>
255 </pseudoconstant>
256 <html>
257 <type>Select</type>
258 </html>
259 <add>2.2</add>
260 </field>
261 <index>
262 <name>index_medium_id</name>
263 <fieldName>medium_id</fieldName>
264 <add>2.2</add>
265 <drop>5.28</drop>
266 </index>
267 <field>
268 <name>is_auto</name>
269 <title>Auto</title>
270 <type>boolean</type>
271 <default>0</default>
272 <add>2.2</add>
273 </field>
274 <field>
275 <name>relationship_id</name>
276 <title>Relationship ID</title>
277 <type>int unsigned</type>
278 <default>NULL</default>
279 <comment>FK to Relationship ID</comment>
280 <html>
281 <label>Relationship</label>
282 </html>
283 <add>2.2</add>
284 </field>
285 <foreignKey>
286 <name>relationship_id</name>
287 <table>civicrm_relationship</table>
288 <key>id</key>
289 <onDelete>SET NULL</onDelete>
290 </foreignKey>
291 <field>
292 <name>is_current_revision</name>
293 <title>Is this activity a current revision in versioning chain?</title>
294 <type>boolean</type>
295 <default>1</default>
296 <import>true</import>
297 <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i</headerPattern>
298 <add>2.2</add>
299 </field>
300 <index>
301 <name>index_is_current_revision</name>
302 <fieldName>is_current_revision</fieldName>
303 <add>2.2</add>
304 </index>
305 <field>
306 <name>original_id</name>
307 <type>int unsigned</type>
308 <title>Original Activity ID</title>
309 <comment>Activity ID of the first activity record in versioning chain.</comment>
310 <readonly>true</readonly>
311 <html>
312 <label>Original Activity</label>
313 </html>
314 <add>2.2</add>
315 </field>
316 <foreignKey>
317 <name>original_id</name>
318 <table>civicrm_activity</table>
319 <key>id</key>
320 <add>2.2</add>
321 <onDelete>CASCADE</onDelete>
322 </foreignKey>
323 <field>
324 <name>result</name>
325 <uniqueName>activity_result</uniqueName>
326 <type>varchar</type>
327 <title>Result</title>
328 <length>255</length>
329 <comment>Currently being used to store result id for survey activity, FK to option value.</comment>
330 <add>3.3</add>
331 </field>
332 <field>
333 <name>is_deleted</name>
334 <uniqueName>activity_is_deleted</uniqueName>
335 <title>Activity is in the Trash</title>
336 <type>boolean</type>
337 <default>0</default>
338 <import>true</import>
339 <headerPattern>/(activity.)?(trash|deleted)/i</headerPattern>
340 <add>2.2</add>
341 <html>
342 <type>CheckBox</type>
343 </html>
344 </field>
345 <index>
346 <name>index_is_deleted</name>
347 <fieldName>is_deleted</fieldName>
348 <add>2.2</add>
349 </index>
350 <field>
351 <name>campaign_id</name>
352 <component>CiviCampaign</component>
353 <uniqueName>activity_campaign_id</uniqueName>
354 <type>int unsigned</type>
355 <title>Campaign ID</title>
356 <import>true</import>
357 <comment>The campaign for which this activity has been triggered.</comment>
358 <add>3.4</add>
359 <html>
360 <type>EntityRef</type>
361 <label>Campaign</label>
362 </html>
363 </field>
364 <foreignKey>
365 <name>campaign_id</name>
366 <table>civicrm_campaign</table>
367 <key>id</key>
368 <onDelete>SET NULL</onDelete>
369 </foreignKey>
370 <field>
371 <name>engagement_level</name>
372 <uniqueName>activity_engagement_level</uniqueName>
373 <type>int unsigned</type>
374 <title>Engagement Index</title>
375 <import>true</import>
376 <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment>
377 <pseudoconstant>
378 <optionGroupName>engagement_index</optionGroupName>
379 </pseudoconstant>
380 <html>
381 <type>Select</type>
382 </html>
383 <add>3.4</add>
384 </field>
385 <field>
386 <name>weight</name>
387 <title>Order</title>
388 <type>int</type>
389 <add>4.1</add>
390 </field>
391 <field>
392 <name>is_star</name>
393 <title>Is Starred</title>
394 <type>boolean</type>
395 <default>0</default>
396 <import>true</import>
397 <comment>Activity marked as favorite.</comment>
398 <headerPattern>/(activity.)?(star|favorite)/i</headerPattern>
399 <add>4.7</add>
400 <html>
401 <type>Checkbox</type>
402 </html>
403 </field>
404 <field>
405 <name>created_date</name>
406 <uniqueName>activity_created_date</uniqueName>
407 <type>timestamp</type>
408 <comment>When was the activity was created.</comment>
409 <required>false</required>
410 <export>true</export>
411 <default>CURRENT_TIMESTAMP</default>
412 <html>
413 <label>Created Date</label>
414 </html>
415 <add>4.7</add>
416 </field>
417 <field>
418 <name>modified_date</name>
419 <uniqueName>activity_modified_date</uniqueName>
420 <type>timestamp</type>
421 <comment>When was the activity (or closely related entity) was created or modified or deleted.</comment>
422 <required>false</required>
423 <export>true</export>
424 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
425 <html>
426 <label>Modified Date</label>
427 </html>
428 <readonly>true</readonly>
429 <add>4.7</add>
430 </field>
431 </table>