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>
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 ID
</title>
64 <type>int unsigned
</type>
65 <required>true
</required>
66 <export>false
</export>
68 <headerPattern>/(activity.)?type(.id$)/i
</headerPattern>
69 <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.
</comment>
73 <name>UI_activity_type_id
</name>
74 <fieldName>activity_type_id
</fieldName>
79 <name>target_entity_table
</name>
82 <required>true
</required>
83 <comment>Name of table where item being referenced is stored.
</comment>
89 <name>target_entity_id
</name>
90 <type>int unsigned
</type>
91 <required>true
</required>
92 <comment>Foreign key to the referenced item.
</comment>
99 <uniqueName>activity_subject
</uniqueName>
101 <title>Subject
</title>
103 <comment>The subject/purpose/short description of the activity.
</comment>
104 <import>true
</import>
105 <headerPattern>/(activity.)?subject/i
</headerPattern>
111 <name>scheduled_date
</name>
112 <type>datetime
</type>
113 <comment>Date and time meeting is scheduled to occur.
</comment>
119 <name>activity_date_time
</name>
120 <import>true
</import>
121 <title>Activity Date
</title>
122 <type>datetime
</type>
123 <headerPattern>/(activity.)?date(.time$)?/i
</headerPattern>
124 <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.
</comment>
128 <name>due_date_time
</name>
129 <type>datetime
</type>
130 <comment>Date and time this activity is due.
</comment>
135 <name>duration_hours
</name>
136 <type>int unsigned
</type>
137 <comment>Planned or actual duration of meeting - hours.
</comment>
143 <name>duration_minutes
</name>
144 <type>int unsigned
</type>
145 <comment>Planned or actual duration of meeting - minutes.
</comment>
151 <name>duration
</name>
152 <uniqueName>activity_duration
</uniqueName>
153 <title>Duration
</title>
154 <import>true
</import>
155 <type>int unsigned
</type>
156 <headerPattern>/(activity.)?duration(s)?$/i
</headerPattern>
157 <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.
</comment>
162 <name>location
</name>
163 <uniqueName>activity_location
</uniqueName>
164 <title>Location
</title>
165 <import>true
</import>
168 <headerPattern>/(activity.)?location$/i
</headerPattern>
169 <comment>Location of the activity (optional, open text).
</comment>
174 <name>phone_id
</name>
175 <type>int unsigned
</type>
176 <title>Phone (called) ID
</title>
177 <comment>Phone ID of the number called (optional - used if an existing phone number is selected).
</comment>
181 <name>phone_id
</name>
182 <table>civicrm_phone
</table>
185 <onDelete>SET NULL
</onDelete>
189 <name>phone_number
</name>
190 <title>Phone (called) Number
</title>
193 <comment>Phone number in case the number does not exist in the civicrm_phone table.
</comment>
199 <uniqueName>activity_details
</uniqueName>
200 <title>Details
</title>
201 <import>true
</import>
205 <headerPattern>/(activity.)?detail(s)?$/i
</headerPattern>
206 <comment>Details about the activity (agenda, notes, etc).
</comment>
213 <title>Status
</title>
214 <values>Scheduled, Completed
</values>
215 <comment>What is the status of this meeting? Completed meeting status results in activity history entry.
</comment>
221 <name>status_id
</name>
222 <uniqueName>activity_status_id
</uniqueName>
223 <title>Activity Status Id
</title>
224 <import>true
</import>
225 <export>false
</export>
226 <headerPattern>/(activity.)?status(.label$)?/i
</headerPattern>
227 <type>int unsigned
</type>
228 <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.
</comment>
232 <name>priority_id
</name>
233 <type>int unsigned
</type>
234 <title>Priority
</title>
235 <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.
</comment>
238 <name>priority
</name>
239 <optionGroupName>priority
</optionGroupName>
243 <name>parent_id
</name>
244 <title>Parent Activity Id
</title>
245 <type>int unsigned
</type>
246 <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented
</comment>
250 <name>parent_id
</name>
251 <table>civicrm_activity
</table>
254 <onDelete>CASCADE
</onDelete>
260 <uniqueName>activity_is_test
</uniqueName>
263 <import>true
</import>
264 <headerPattern>/(is.)?test(.activity)?/i
</headerPattern>
268 <name>medium_id
</name>
269 <uniqueName>activity_medium_id
</uniqueName>
270 <title>Activity Medium
</title>
271 <type>int unsigned
</type>
272 <default>NULL
</default>
273 <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.
</comment>
277 <name>index_medium_id
</name>
278 <fieldName>medium_id
</fieldName>
289 <name>relationship_id
</name>
290 <title>Relationship Id
</title>
291 <type>int unsigned
</type>
292 <default>NULL
</default>
293 <comment>FK to Relationship ID
</comment>
297 <name>relationship_id
</name>
298 <table>civicrm_relationship
</table>
300 <onDelete>SET NULL
</onDelete>
303 <name>is_current_revision
</name>
304 <title>Is this activity a current revision in versioning chain?
</title>
307 <import>true
</import>
308 <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i
</headerPattern>
312 <name>index_is_current_revision
</name>
313 <fieldName>is_current_revision
</fieldName>
317 <name>original_id
</name>
318 <type>int unsigned
</type>
319 <title>Original Activity ID
</title>
320 <comment>Activity ID of the first activity record in versioning chain.
</comment>
324 <name>original_id
</name>
325 <table>civicrm_activity
</table>
328 <onDelete>CASCADE
</onDelete>
331 <name>UI_original_id
</name>
332 <fieldName>original_id
</fieldName>
338 <uniqueName>activity_result
</uniqueName>
340 <title>Result
</title>
342 <comment>Currently being used to store result id for survey activity, FK to option value.
</comment>
346 <name>is_deleted
</name>
347 <uniqueName>activity_is_deleted
</uniqueName>
348 <title>Activity is in the Trash
</title>
351 <import>true
</import>
352 <headerPattern>/(activity.)?(trash|deleted)/i
</headerPattern>
356 <name>index_is_deleted
</name>
357 <fieldName>is_deleted
</fieldName>
361 <name>campaign_id
</name>
362 <uniqueName>activity_campaign_id
</uniqueName>
363 <type>int unsigned
</type>
364 <title>Campaign ID
</title>
365 <import>true
</import>
366 <comment>The campaign for which this activity has been triggered.
</comment>
370 <name>engagement_level
</name>
371 <uniqueName>activity_engagement_level
</uniqueName>
372 <type>int unsigned
</type>
375 <title>Engagement Index
</title>
376 <import>true
</import>
377 <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.
</comment>
381 <name>campaign_id
</name>
382 <table>civicrm_campaign
</table>
384 <onDelete>SET NULL
</onDelete>