1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
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>
12 <uniqueName>activity_id
</uniqueName>
13 <title>Activity ID
</title>
15 <type>int unsigned
</type>
16 <required>true
</required>
17 <comment>Unique Other Activity ID
</comment>
22 <autoincrement>true
</autoincrement>
25 <name>source_contact_id
</name>
26 <type>int unsigned
</type>
27 <title>Source Contact
</title>
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>
35 <name>source_contact_id
</name>
36 <table>civicrm_contact
</table>
40 <onDelete>SET NULL
</onDelete>
43 <name>UI_source_contact_id
</name>
44 <fieldName>source_contact_id
</fieldName>
49 <name>source_record_id
</name>
50 <type>int unsigned
</type>
51 <title>Source Record
</title>
52 <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>
56 <name>UI_source_record_id
</name>
57 <fieldName>source_record_id
</fieldName>
61 <name>activity_type_id
</name>
62 <title>Activity Type
</title>
64 <type>int unsigned
</type>
65 <required>true
</required>
68 <headerPattern>/(activity.)?type(.id$)/i
</headerPattern>
69 <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.
</comment>
72 <optionGroupName>activity_type
</optionGroupName>
79 <name>UI_activity_type_id
</name>
80 <fieldName>activity_type_id
</fieldName>
84 <name>target_entity_table
</name>
87 <required>true
</required>
88 <comment>Name of table where item being referenced is stored.
</comment>
93 <name>target_entity_id
</name>
94 <type>int unsigned
</type>
95 <required>true
</required>
96 <comment>Foreign key to the referenced item.
</comment>
102 <uniqueName>activity_subject
</uniqueName>
104 <title>Subject
</title>
106 <comment>The subject/purpose/short description of the activity.
</comment>
107 <import>true
</import>
108 <headerPattern>/(activity.)?subject/i
</headerPattern>
116 <name>scheduled_date
</name>
117 <type>datetime
</type>
118 <comment>Date and time meeting is scheduled to occur.
</comment>
123 <name>activity_date_time
</name>
124 <import>true
</import>
125 <required>false
</required>
126 <export>true
</export>
127 <default>CURRENT_TIMESTAMP
</default>
128 <title>Activity Date
</title>
129 <type>datetime
</type>
130 <headerPattern>/(activity.)?date(.time$)?/i
</headerPattern>
131 <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.
</comment>
133 <type>Select Date
</type>
134 <formatType>activityDateTime
</formatType>
139 <name>index_activity_date_time
</name>
140 <fieldName>activity_date_time
</fieldName>
144 <name>due_date_time
</name>
145 <type>datetime
</type>
146 <comment>Date and time this activity is due.
</comment>
151 <name>duration_hours
</name>
152 <type>int unsigned
</type>
153 <comment>Planned or actual duration of meeting - hours.
</comment>
158 <name>duration_minutes
</name>
159 <type>int unsigned
</type>
160 <comment>Planned or actual duration of meeting - minutes.
</comment>
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>
178 <name>location
</name>
179 <uniqueName>activity_location
</uniqueName>
180 <title>Location
</title>
181 <import>true
</import>
184 <headerPattern>/(activity.)?location$/i
</headerPattern>
185 <comment>Location of the activity (optional, open text).
</comment>
192 <name>phone_id
</name>
193 <type>int unsigned
</type>
194 <title>Phone (called)
</title>
195 <comment>Phone ID of the number called (optional - used if an existing phone number is selected).
</comment>
198 <type>EntityRef
</type>
202 <name>phone_id
</name>
203 <table>civicrm_phone
</table>
206 <onDelete>SET NULL
</onDelete>
209 <name>phone_number
</name>
210 <title>Phone (called) Number
</title>
213 <comment>Phone number in case the number does not exist in the civicrm_phone table.
</comment>
221 <uniqueName>activity_details
</uniqueName>
222 <title>Details
</title>
223 <import>true
</import>
224 <type>longtext
</type>
225 <headerPattern>/(activity.)?detail(s)?$/i
</headerPattern>
226 <comment>Details about the activity (agenda, notes, etc).
</comment>
228 <type>RichTextEditor
</type>
237 <title>Status
</title>
238 <values>Scheduled, Completed
</values>
239 <comment>What is the status of this meeting? Completed meeting status results in activity history entry.
</comment>
244 <name>status_id
</name>
245 <uniqueName>activity_status_id
</uniqueName>
246 <title>Activity Status
</title>
247 <import>true
</import>
248 <export>true
</export>
249 <headerPattern>/(activity.)?status(.label$)?/i
</headerPattern>
250 <type>int unsigned
</type>
251 <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.
</comment>
254 <optionGroupName>activity_status
</optionGroupName>
261 <name>index_status_id
</name>
262 <fieldName>status_id
</fieldName>
266 <name>priority_id
</name>
267 <type>int unsigned
</type>
268 <title>Priority
</title>
269 <export>true
</export>
270 <import>true
</import>
271 <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.
</comment>
274 <optionGroupName>priority
</optionGroupName>
281 <name>parent_id
</name>
282 <title>Parent Activity Id
</title>
283 <type>int unsigned
</type>
284 <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented
</comment>
288 <name>parent_id
</name>
289 <table>civicrm_activity
</table>
292 <onDelete>CASCADE
</onDelete>
297 <uniqueName>activity_is_test
</uniqueName>
300 <import>true
</import>
301 <headerPattern>/(is.)?test(.activity)?/i
</headerPattern>
304 <type>CheckBox
</type>
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>
315 <optionGroupName>encounter_medium
</optionGroupName>
323 <name>index_medium_id
</name>
324 <fieldName>medium_id
</fieldName>
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>
343 <name>relationship_id
</name>
344 <table>civicrm_relationship
</table>
346 <onDelete>SET NULL
</onDelete>
349 <name>is_current_revision
</name>
350 <title>Is this activity a current revision in versioning chain?
</title>
353 <import>true
</import>
354 <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i
</headerPattern>
358 <name>index_is_current_revision
</name>
359 <fieldName>is_current_revision
</fieldName>
363 <name>original_id
</name>
364 <type>int unsigned
</type>
365 <title>Original Activity ID
</title>
366 <comment>Activity ID of the first activity record in versioning chain.
</comment>
370 <name>original_id
</name>
371 <table>civicrm_activity
</table>
374 <onDelete>CASCADE
</onDelete>
377 <name>UI_original_id
</name>
378 <fieldName>original_id
</fieldName>
384 <uniqueName>activity_result
</uniqueName>
386 <title>Result
</title>
388 <comment>Currently being used to store result id for survey activity, FK to option value.
</comment>
392 <name>is_deleted
</name>
393 <uniqueName>activity_is_deleted
</uniqueName>
394 <title>Activity is in the Trash
</title>
397 <import>true
</import>
398 <headerPattern>/(activity.)?(trash|deleted)/i
</headerPattern>
401 <type>CheckBox
</type>
405 <name>index_is_deleted
</name>
406 <fieldName>is_deleted
</fieldName>
410 <name>campaign_id
</name>
411 <uniqueName>activity_campaign_id
</uniqueName>
412 <type>int unsigned
</type>
413 <title>Campaign
</title>
414 <import>true
</import>
415 <comment>The campaign for which this activity has been triggered.
</comment>
417 <table>civicrm_campaign
</table>
418 <keyColumn>id
</keyColumn>
419 <labelColumn>title
</labelColumn>
427 <name>campaign_id
</name>
428 <table>civicrm_campaign
</table>
430 <onDelete>SET NULL
</onDelete>
433 <name>engagement_level
</name>
434 <uniqueName>activity_engagement_level
</uniqueName>
435 <type>int unsigned
</type>
436 <title>Engagement Index
</title>
437 <import>true
</import>
438 <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.
</comment>
440 <optionGroupName>engagement_index
</optionGroupName>
455 <title>Is Starred
</title>
458 <import>true
</import>
459 <comment>Activity marked as favorite.
</comment>
460 <headerPattern>/(activity.)?(star|favorite)/i
</headerPattern>
463 <type>Checkbox
</type>
467 <name>created_date
</name>
468 <uniqueName>activity_created_date
</uniqueName>
469 <type>timestamp
</type>
470 <comment>When was the activity was created.
</comment>
471 <required>false
</required>
472 <export>true
</export>
473 <default>CURRENT_TIMESTAMP
</default>
477 <name>modified_date
</name>
478 <uniqueName>activity_modified_date
</uniqueName>
479 <type>timestamp
</type>
480 <comment>When was the activity (or closely related entity) was created or modified or deleted.
</comment>
481 <required>false
</required>
482 <export>true
</export>
483 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>