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 <export>true
</export>
266 <import>true
</import>
267 <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.
</comment>
270 <optionGroupName>priority
</optionGroupName>
277 <name>parent_id
</name>
278 <title>Parent Activity Id
</title>
279 <type>int unsigned
</type>
280 <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented
</comment>
284 <name>parent_id
</name>
285 <table>civicrm_activity
</table>
288 <onDelete>CASCADE
</onDelete>
293 <uniqueName>activity_is_test
</uniqueName>
296 <import>true
</import>
297 <headerPattern>/(is.)?test(.activity)?/i
</headerPattern>
300 <type>CheckBox
</type>
304 <name>medium_id
</name>
305 <uniqueName>activity_medium_id
</uniqueName>
306 <title>Activity Medium
</title>
307 <type>int unsigned
</type>
308 <default>NULL
</default>
309 <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.
</comment>
311 <optionGroupName>encounter_medium
</optionGroupName>
319 <name>index_medium_id
</name>
320 <fieldName>medium_id
</fieldName>
331 <name>relationship_id
</name>
332 <title>Relationship Id
</title>
333 <type>int unsigned
</type>
334 <default>NULL
</default>
335 <comment>FK to Relationship ID
</comment>
339 <name>relationship_id
</name>
340 <table>civicrm_relationship
</table>
342 <onDelete>SET NULL
</onDelete>
345 <name>is_current_revision
</name>
346 <title>Is this activity a current revision in versioning chain?
</title>
349 <import>true
</import>
350 <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i
</headerPattern>
354 <name>index_is_current_revision
</name>
355 <fieldName>is_current_revision
</fieldName>
359 <name>original_id
</name>
360 <type>int unsigned
</type>
361 <title>Original Activity ID
</title>
362 <comment>Activity ID of the first activity record in versioning chain.
</comment>
366 <name>original_id
</name>
367 <table>civicrm_activity
</table>
370 <onDelete>CASCADE
</onDelete>
373 <name>UI_original_id
</name>
374 <fieldName>original_id
</fieldName>
380 <uniqueName>activity_result
</uniqueName>
382 <title>Result
</title>
384 <comment>Currently being used to store result id for survey activity, FK to option value.
</comment>
388 <name>is_deleted
</name>
389 <uniqueName>activity_is_deleted
</uniqueName>
390 <title>Activity is in the Trash
</title>
393 <import>true
</import>
394 <headerPattern>/(activity.)?(trash|deleted)/i
</headerPattern>
397 <type>CheckBox
</type>
401 <name>index_is_deleted
</name>
402 <fieldName>is_deleted
</fieldName>
406 <name>campaign_id
</name>
407 <uniqueName>activity_campaign_id
</uniqueName>
408 <type>int unsigned
</type>
409 <title>Campaign
</title>
410 <import>true
</import>
411 <comment>The campaign for which this activity has been triggered.
</comment>
413 <table>civicrm_campaign
</table>
414 <keyColumn>id
</keyColumn>
415 <labelColumn>title
</labelColumn>
423 <name>campaign_id
</name>
424 <table>civicrm_campaign
</table>
426 <onDelete>SET NULL
</onDelete>
429 <name>engagement_level
</name>
430 <uniqueName>activity_engagement_level
</uniqueName>
431 <type>int unsigned
</type>
432 <title>Engagement Index
</title>
433 <import>true
</import>
434 <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.
</comment>
436 <optionGroupName>engagement_index
</optionGroupName>
451 <title>Is Starred
</title>
454 <import>true
</import>
455 <comment>Activity marked as favorite.
</comment>
456 <headerPattern>/(activity.)?(star|favorite)/i
</headerPattern>
459 <type>Checkbox
</type>
463 <name>created_date
</name>
464 <uniqueName>activity_created_date
</uniqueName>
465 <type>timestamp
</type>
466 <comment>When was the activity was created.
</comment>
467 <required>false
</required>
468 <export>true
</export>
469 <default>NULL
</default>
473 <name>modified_date
</name>
474 <uniqueName>activity_modified_date
</uniqueName>
475 <type>timestamp
</type>
476 <comment>When was the activity (or closely related entity) was created or modified or deleted.
</comment>
477 <required>false
</required>
478 <export>true
</export>
479 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>