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