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>
11 <uniqueName>activity_id
</uniqueName>
12 <title>Activity ID
</title>
14 <type>int unsigned
</type>
15 <required>true
</required>
16 <comment>Unique Other Activity ID
</comment>
21 <autoincrement>true
</autoincrement>
24 <name>source_contact_id
</name>
25 <type>int unsigned
</type>
26 <title>Source Contact
</title>
28 <headerPattern>/(activity.)?source(.contact(.id)?)?/i
</headerPattern>
29 <comment>Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.
</comment>
34 <name>source_contact_id
</name>
35 <table>civicrm_contact
</table>
39 <onDelete>SET NULL
</onDelete>
42 <name>UI_source_contact_id
</name>
43 <fieldName>source_contact_id
</fieldName>
48 <name>source_record_id
</name>
49 <type>int unsigned
</type>
50 <title>Source Record
</title>
51 <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>
55 <name>UI_source_record_id
</name>
56 <fieldName>source_record_id
</fieldName>
60 <name>activity_type_id
</name>
61 <title>Activity Type
</title>
63 <type>int unsigned
</type>
64 <required>true
</required>
67 <headerPattern>/(activity.)?type(.id$)/i
</headerPattern>
68 <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.
</comment>
71 <optionGroupName>activity_type
</optionGroupName>
78 <name>UI_activity_type_id
</name>
79 <fieldName>activity_type_id
</fieldName>
83 <name>target_entity_table
</name>
86 <required>true
</required>
87 <comment>Name of table where item being referenced is stored.
</comment>
92 <name>target_entity_id
</name>
93 <type>int unsigned
</type>
94 <required>true
</required>
95 <comment>Foreign key to the referenced item.
</comment>
101 <uniqueName>activity_subject
</uniqueName>
103 <title>Subject
</title>
105 <comment>The subject/purpose/short description of the activity.
</comment>
106 <import>true
</import>
107 <headerPattern>/(activity.)?subject/i
</headerPattern>
115 <name>scheduled_date
</name>
116 <type>datetime
</type>
117 <comment>Date and time meeting is scheduled to occur.
</comment>
122 <name>activity_date_time
</name>
123 <import>true
</import>
124 <title>Activity Date
</title>
125 <type>datetime
</type>
126 <headerPattern>/(activity.)?date(.time$)?/i
</headerPattern>
127 <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.
</comment>
129 <type>Select Date
</type>
130 <formatType>activityDateTime
</formatType>
135 <name>index_activity_date_time
</name>
136 <fieldName>activity_date_time
</fieldName>
140 <name>due_date_time
</name>
141 <type>datetime
</type>
142 <comment>Date and time this activity is due.
</comment>
147 <name>duration_hours
</name>
148 <type>int unsigned
</type>
149 <comment>Planned or actual duration of meeting - hours.
</comment>
154 <name>duration_minutes
</name>
155 <type>int unsigned
</type>
156 <comment>Planned or actual duration of meeting - minutes.
</comment>
161 <name>duration
</name>
162 <uniqueName>activity_duration
</uniqueName>
163 <title>Duration
</title>
164 <import>true
</import>
165 <type>int unsigned
</type>
166 <headerPattern>/(activity.)?duration(s)?$/i
</headerPattern>
167 <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.
</comment>
174 <name>location
</name>
175 <uniqueName>activity_location
</uniqueName>
176 <title>Location
</title>
177 <import>true
</import>
180 <headerPattern>/(activity.)?location$/i
</headerPattern>
181 <comment>Location of the activity (optional, open text).
</comment>
188 <name>phone_id
</name>
189 <type>int unsigned
</type>
190 <title>Phone (called)
</title>
191 <comment>Phone ID of the number called (optional - used if an existing phone number is selected).
</comment>
194 <type>EntityRef
</type>
198 <name>phone_id
</name>
199 <table>civicrm_phone
</table>
202 <onDelete>SET NULL
</onDelete>
205 <name>phone_number
</name>
206 <title>Phone (called) Number
</title>
209 <comment>Phone number in case the number does not exist in the civicrm_phone table.
</comment>
217 <uniqueName>activity_details
</uniqueName>
218 <title>Details
</title>
219 <import>true
</import>
220 <type>longtext
</type>
221 <headerPattern>/(activity.)?detail(s)?$/i
</headerPattern>
222 <comment>Details about the activity (agenda, notes, etc).
</comment>
224 <type>RichTextEditor
</type>
233 <title>Status
</title>
234 <values>Scheduled, Completed
</values>
235 <comment>What is the status of this meeting? Completed meeting status results in activity history entry.
</comment>
240 <name>status_id
</name>
241 <uniqueName>activity_status_id
</uniqueName>
242 <title>Activity Status
</title>
243 <import>true
</import>
244 <export>true
</export>
245 <headerPattern>/(activity.)?status(.label$)?/i
</headerPattern>
246 <type>int unsigned
</type>
247 <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.
</comment>
250 <optionGroupName>activity_status
</optionGroupName>
257 <name>index_status_id
</name>
258 <fieldName>status_id
</fieldName>
262 <name>priority_id
</name>
263 <type>int unsigned
</type>
264 <title>Priority
</title>
265 <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.
</comment>
268 <optionGroupName>priority
</optionGroupName>
275 <name>parent_id
</name>
276 <title>Parent Activity Id
</title>
277 <type>int unsigned
</type>
278 <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented
</comment>
282 <name>parent_id
</name>
283 <table>civicrm_activity
</table>
286 <onDelete>CASCADE
</onDelete>
291 <uniqueName>activity_is_test
</uniqueName>
294 <import>true
</import>
295 <headerPattern>/(is.)?test(.activity)?/i
</headerPattern>
298 <type>CheckBox
</type>
302 <name>medium_id
</name>
303 <uniqueName>activity_medium_id
</uniqueName>
304 <title>Activity Medium
</title>
305 <type>int unsigned
</type>
306 <default>NULL
</default>
307 <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.
</comment>
309 <optionGroupName>encounter_medium
</optionGroupName>
317 <name>index_medium_id
</name>
318 <fieldName>medium_id
</fieldName>
329 <name>relationship_id
</name>
330 <title>Relationship Id
</title>
331 <type>int unsigned
</type>
332 <default>NULL
</default>
333 <comment>FK to Relationship ID
</comment>
337 <name>relationship_id
</name>
338 <table>civicrm_relationship
</table>
340 <onDelete>SET NULL
</onDelete>
343 <name>is_current_revision
</name>
344 <title>Is this activity a current revision in versioning chain?
</title>
347 <import>true
</import>
348 <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i
</headerPattern>
352 <name>index_is_current_revision
</name>
353 <fieldName>is_current_revision
</fieldName>
357 <name>original_id
</name>
358 <type>int unsigned
</type>
359 <title>Original Activity ID
</title>
360 <comment>Activity ID of the first activity record in versioning chain.
</comment>
364 <name>original_id
</name>
365 <table>civicrm_activity
</table>
368 <onDelete>CASCADE
</onDelete>
371 <name>UI_original_id
</name>
372 <fieldName>original_id
</fieldName>
378 <uniqueName>activity_result
</uniqueName>
380 <title>Result
</title>
382 <comment>Currently being used to store result id for survey activity, FK to option value.
</comment>
386 <name>is_deleted
</name>
387 <uniqueName>activity_is_deleted
</uniqueName>
388 <title>Activity is in the Trash
</title>
391 <import>true
</import>
392 <headerPattern>/(activity.)?(trash|deleted)/i
</headerPattern>
395 <type>CheckBox
</type>
399 <name>index_is_deleted
</name>
400 <fieldName>is_deleted
</fieldName>
404 <name>campaign_id
</name>
405 <uniqueName>activity_campaign_id
</uniqueName>
406 <type>int unsigned
</type>
407 <title>Campaign
</title>
408 <import>true
</import>
409 <comment>The campaign for which this activity has been triggered.
</comment>
411 <table>civicrm_campaign
</table>
412 <keyColumn>id
</keyColumn>
413 <labelColumn>title
</labelColumn>
421 <name>campaign_id
</name>
422 <table>civicrm_campaign
</table>
424 <onDelete>SET NULL
</onDelete>
427 <name>engagement_level
</name>
428 <uniqueName>activity_engagement_level
</uniqueName>
429 <type>int unsigned
</type>
430 <title>Engagement Index
</title>
431 <import>true
</import>
432 <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.
</comment>
434 <optionGroupName>engagement_index
</optionGroupName>
449 <title>Is Starred
</title>
452 <import>true
</import>
453 <comment>Activity marked as favorite.
</comment>
454 <headerPattern>/(activity.)?(star|favorite)/i
</headerPattern>
457 <type>Checkbox
</type>
461 <name>created_date
</name>
462 <uniqueName>activity_created_date
</uniqueName>
463 <type>timestamp
</type>
464 <comment>When was the activity was created.
</comment>
465 <required>false
</required>
466 <export>true
</export>
467 <default>NULL
</default>
471 <name>modified_date
</name>
472 <uniqueName>activity_modified_date
</uniqueName>
473 <type>timestamp
</type>
474 <comment>When was the activity (or closely related entity) was created or modified or deleted.
</comment>
475 <required>false
</required>
476 <export>true
</export>
477 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>